/* =========================================================
   TECNOFORENSE — hoja de estilos propia (independiente de Peritos Badajoz)
   Paleta: azul tecnológico + naranja de acento
   ========================================================= */

@font-face {
  font-family: 'Fraunces';
  src: url('fonts/fraunces-v38-latin/fraunces-v38-latin-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/ibm-plex-sans-v23-latin/ibm-plex-sans-v23-latin-regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('fonts/ibm-plex-sans-v23-latin/ibm-plex-sans-v23-latin-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  --blue: #1086d6;
  --blue-dark: #0b5f9c;
  --blue-deep: #072744;
  --orange: #ff7a1a;
  --orange-dark: #d8600a;
  --bg: #f4f8fb;
  --card: #ffffff;
  --line: #dbe6ef;
  --text: #14202b;
  --text-muted: #55697a;
  --text-on-blue: #eaf4ff;
  --text-on-blue-muted: #a9cbe6;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Cabecera ---------- */
.tf-header {
    background: var(--blue-deep);
  border-bottom: 3px solid var(--orange);
    padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 16px rgba(201, 106, 58, 0.3);
}
.tf-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.tf-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: #fff;
}
.tf-brand img { height: 48px; width: auto; }
.tf-brand span.accent { color: var(--orange); }
.tf-nav a {
  display: flex;
  align-items: center;
}
.tf-nav img {
  height: 28px;
  width: auto;
  display: block;
  vertical-align: middle;
}
.tf-nav a:hover { color: #fff; }

/* ---------- Hero ---------- */
.tf-hero {
  background: linear-gradient(160deg, var(--blue-deep) 0%, var(--blue-dark) 55%, var(--blue) 100%);
  color: var(--text-on-blue);
  padding: 90px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.tf-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  top: -120px;
  width: 340px;
  height: 340px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,122,26,0.35) 0%, rgba(255,122,26,0) 70%);
}
.tf-hero .eyebrow {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 600;
}
.tf-hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(38px, 6vw, 64px);
  margin: 16px 0 18px;
}
.tf-hero p {
  max-width: 52ch;
  margin: 0 auto;
  color: var(--text-on-blue-muted);
  font-size: 17px;
}
/* ---------- Barra de contacto + explicación ---------- */
.tf-intro-bar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 40px 0;
}
.tf-intro-bar .wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}
.tf-intro-bar p {
  color: var(--text-muted);
  max-width: 46ch;
  margin: 0;
  font-size: 15px;
}
.tf-intro-bar .tf-contact-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  width: 100%;
  max-width: 460px;
}
.tf-intro-bar .tf-contact-info a {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--blue-deep);
  font-weight: 600;
  padding-left: 20px;
  border-left: 2px solid var(--line);
}
.tf-intro-bar .tf-contact-info a:first-child {
  padding-left: 0;
  border-left: none;
}
.tf-intro-bar .tf-contact-info a span.label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--orange-dark);
  font-weight: 600;
}
.tf-nav img {
  height: 48px;
  width: auto;
  display: block;
}
/* ---------- Grid de especialidades ---------- */
.tf-specialties {
  padding: 72px 0 96px;
}
.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 48px;
}
.section-head .eyebrow {
  color: var(--orange-dark);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 500;
  margin: 10px 0 12px;
  color: var(--blue-deep);
}
.section-head p {
  color: var(--text-muted);
}

.tf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

/* ---------- Bloque "Ver más especialidades" ---------- */
/* El contenido permanece en el HTML (buscadores lo indexan);
   solo se oculta visualmente hasta que el usuario pulsa el botón. */
.tf-grid-extra {
  display: none;
  margin-top: 24px;
}
.tf-grid-extra.tf-grid-extra--visible {
  display: grid;
}
.tf-ver-mas-wrap {
  text-align: center;
  margin-top: 40px;
}
.tf-btn-outline {
  background: transparent;
  color: var(--blue-deep);
  border: 2px solid var(--blue);
}
.tf-btn-outline:hover {
  background: var(--blue);
  color: #fff;
}

.tf-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tf-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(16, 134, 214, 0.14);
  border-color: var(--blue);
}
.tf-card .tf-card-media {
  height: 160px;
  background: var(--blue-deep);
  position: relative;
  overflow: hidden;
}
.tf-card .tf-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tf-card .tf-card-num {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--orange);
  color: #fff;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
}
.tf-card .tf-card-body {
  padding: 22px 22px 26px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.tf-card h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--blue-deep);
}
.tf-card p {
  color: var(--text-muted);
  font-size: 14.5px;
  margin: 0 0 16px;
  flex: 1;
}
.tf-card a.tf-link {
  align-self: flex-start;
  font-size: 13px;
  font-weight: 600;
  color: var(--orange-dark);
  text-decoration: none;
  border-bottom: 2px solid var(--orange);
  padding-bottom: 2px;
}
.tf-card a.tf-link:hover { color: var(--orange); }

@media (prefers-reduced-motion: reduce) {
  .tf-card { transition: none; }
}
/* ---------- Sedes ---------- */

.tf-locations{
    background:var(--blue-deep);
    padding:70px 0;
}

.tf-locations .section-head{
    text-align:center;
}

.tf-locations .section-head h2{
    color:#fff;
    font-family:var(--font-display);
    font-size:clamp(28px,4vw,38px);
}

.tf-locations .section-head .eyebrow{
    color:var(--orange);
    text-transform:uppercase;
    letter-spacing:.12em;
    font-size:13px;
    font-weight:600;
}

.tf-locations .section-head p{
    color:var(--text-on-blue-muted);
}

.tf-location-grid {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-top: 32px;
}


.tf-location-card{
    position:relative;
    display:block;
    overflow:hidden;
    border-radius:16px;
    text-decoration:none;
    height:220px;
    border:1px solid rgba(255,255,255,.08);
    transition:.35s;
    box-shadow:0 8px 20px rgba(0,0,0,.15);
      width: 220px;
}

.tf-location-card img{
    width:100%;
    height:100%;
    object-fit:cover;
    transition:transform .5s ease;
}

.tf-location-overlay{
    position:absolute;
    inset:0;
    background:linear-gradient(to top,
        rgba(0,0,0,.75),
        rgba(0,0,0,.15));
    display:flex;
    flex-direction:column;
    justify-content:flex-end;
    padding:20px;
    transition:.35s;
}

.tf-location-overlay h3{
    margin:0;
    color:#fff;
    font-family:var(--font-display);
    font-size:26px;
}

.tf-location-overlay span{
    margin-top:8px;
    color:#fff;
    opacity:.85;
    font-size:14px;
    transform:translateY(12px);
    transition:.35s;
}

.tf-location-card:hover{
    transform:translateY(-8px);
    box-shadow:0 18px 40px rgba(0,0,0,.35);
}

.tf-location-card:hover img{
    transform:scale(1.08);
}

.tf-location-card:hover .tf-location-overlay{
    background:linear-gradient(to top,
        rgba(7,39,68,.92),
        rgba(7,39,68,.25));
}

.tf-location-card:hover span{
    transform:translateY(0);
    color:var(--orange);
}
/* ---------- Formulario de contacto ---------- */
.tf-contact-section {
  padding: 80px 0 96px;
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.tf-form-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 40px;
  max-width: 640px;
  margin: 0 auto;
  position: relative;
}
.tf-field { margin-bottom: 20px; }
.tf-field label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 8px;
}
.tf-field input,
.tf-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
}
.tf-field input:focus,
.tf-field textarea:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}
.tf-field textarea { min-height: 130px; resize: vertical; }

.tf-captcha-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.tf-captcha-challenge {
  background: var(--bg);
  border: 1px dashed var(--line);
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--blue-deep);
  white-space: nowrap;
}
.tf-captcha-row .tf-field { flex: 1; min-width: 160px; margin-bottom: 0; }

.tf-hp-field {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.tf-btn {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--orange);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s ease;
}
.tf-btn:hover { background: var(--orange-dark); }

.tf-form-msg { margin-top: 16px; font-size: 14px; }
.tf-form-msg.ok { color: #2f6f4f; }
.tf-form-msg.err { color: #b23b2c; }
/* ---------- Footer ---------- */
.tf-footer {
  background: #061a2c;
  color: var(--text-on-blue-muted);
  padding: 28px 0;
  font-size: 13px;
}
.tf-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.tf-footer a { color: var(--orange); text-decoration: none; font-weight: 600; }
.tf-footer a:hover { color: #fff; }