/* =========================================================
   SISTEMA DE COLOR (base calmada + acentos del logo)
   ========================================================= */
:root{
  /* Marca (logo) */
  --brand-orange: #e68a1f;
  --brand-green:  #8fbf3f;

  /* Base clínica (calma) */
  --brand-base: #2f5d6b;      /* títulos, textos destacados */
  --brand-cta:  #4a90a4;      /* CTA principal (calmo) */
  --bg: #f8f8f9;
  --card: #ffffff;

  /* Texto */
  --text: #334155;
  --muted: rgba(51,65,85,.75);
  --text-strong: #1f2a37;

  /* UI */
  --shadow: 0 10px 30px rgba(0,0,0,0.06);
  --shadow-hover: 0 20px 40px rgba(0,0,0,0.08);
  --radius: 16px;
  --border: rgba(15, 23, 42, 0.08);

  /* Tipografía premium */
  --font-body: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Playfair Display', serif;
}

*{ box-sizing: border-box; }

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

  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
}

h1, h2, h3{
  font-family: var(--font-heading);
  color: var(--brand-base);
  letter-spacing: -0.01em;
}

h1{ margin-bottom: 0.4em; line-height: 1.1; }
h2{ margin-bottom: 0.5em; line-height: 1.2; }
h3{ margin-bottom: 0.6em; line-height: 1.25; }

p{ margin: 0 0 1.1em; }
strong{ color: var(--text-strong); }
a{ color: inherit; }

/* =========================================================
   ANCHO DE LECTURA PREMIUM (solo textos largos)
   - No afecta a contacto/cards/footer
   ========================================================= */
.intro-seccion,
.texto-llamada,
.marco-terapeutico,
.tarjeta-testimonio .texto{
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

/* =========================================================
   HEADER
   ========================================================= */
header{
  background: #fcfefe;
  padding: 14px 0;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.cabecera{
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1000px;
  margin: auto;
  padding: 0 20px;
  gap: 16px;
}

.zona-logo{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.logo{ height: 70px; }

.lema{
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .8px;
  margin: 0;
  text-transform: uppercase;
}

/* MENU */
nav{
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 100%;
}

/* ✅ bloque corregido (sin duplicados ni llaves sobrantes) */
nav a{
  color: var(--brand-orange);
  text-decoration: none;
  font-weight: 700;

  /* premium */
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: 12px;

  padding: 8px 10px;
  border-radius: 10px;
  transition: background .2s ease, color .2s ease;
}

nav a:hover{
  background: rgba(230,138,31,0.12);
}

/* Página activa en el menú */
nav a.active{
  background: rgba(230,138,31,0.15);
  color: var(--brand-orange);
  font-weight: 900;
}

.nav-cta{
  background: var(--brand-orange);
  color: white !important;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 800;
}

.nav-cta:hover{
  background: var(--brand-green);
}

/* Desktop: mantener el menú en una línea si cabe */
@media (min-width: 901px){
  nav a{ white-space: nowrap; }
}

/* =========================================================
   HERO (base)
   ========================================================= */
.hero{
  position: relative;
  /* Fondo por defecto (home). Para otras páginas, añade clase hero-xxxx */
  background: url('../img/cabecera.jpg') center center / cover no-repeat;
  padding: 120px 20px;
  text-align: center;
  color: white;
  overflow: hidden;
}

.hero::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(to bottom, rgba(0,0,0,.45), rgba(0,0,0,.20));
  pointer-events:none;
}

.hero > *{ position: relative; z-index: 1; }

/* Parallax suave (opcional) */
@media (min-width: 900px){
  .hero{ background-attachment: fixed; }
}

/* =========================================================
   HERO: imágenes por página (coinciden con /assets/img real)
   ========================================================= */
.hero-home{ background: url('../img/cabecera.jpg') center/cover no-repeat; }

.hero-primera-sesion{ background: url('../img/hero-primera-sesion.png') center/cover no-repeat; }
.hero-terapia-online{ background: url('../img/hero-terapia-online.png') center/cover no-repeat; }

/* TU ARCHIVO REAL: hero.conocenos.png */
.hero-nosotros{ background: url('../img/hero.conocenos.png') center/cover no-repeat; }

.hero-ansiedad{ background: url('../img/hero-ansiedad.png') center/cover no-repeat; }
.hero-bucle{ background: url('../img/hero-bucle.png') center/cover no-repeat; }
.hero-cansancio{ background: url('../img/hero-cansancio.png') center/cover no-repeat; }

.hero-reflexiones{ background: url('../img/hero-reflexiones.jpg') center/cover no-repeat; }
.hero-medios{ background: url('../img/en-medios.png') center/cover no-repeat; }

/* HERO – Consulta */
.hero-consulta{
  background: url('../img/hero-consulta.png') center/cover no-repeat;
}

/* ✅ HERO – Pide cita (NUEVO, como el resto) */
.hero-pide-cita{
  background: url('../img/hero-pide-cita.png') center/cover no-repeat;
}
/* HERO — Otros ámbitos */
.hero.otros_ambitos_hero {
  background-image: url("../img/otros_ambitos_hero.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}


/* artículo */

/* =========================================================
   BOTONES (CTA)
   ========================================================= */
.boton,
.boton-caja{
  display: inline-block;
  padding: 12px 22px;
  background: var(--brand-cta);
  color: white;
  text-decoration: none;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .01em;
  transition: background .25s ease, transform .15s ease, box-shadow .25s ease, filter .25s ease;
}

.boton{
  margin-top: 22px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.14);
}

.boton:hover,
.boton-caja:hover{
  background: var(--brand-green);
  transform: translateY(-1px);
  filter: brightness(1.01);
}

/* =========================================================
   SECCIONES
   ========================================================= */
.contenedor{
  max-width: 1000px;
  margin: auto;
  padding: 56px 20px;
}

h2{
  margin: 0 0 8px;
  font-size: 1.6rem;
}

.intro-seccion{
  line-height: 1.7;
  margin: 10px 0 0;
  color: var(--muted);
}

/* FRASE DESTACADA */
.frase-destacada{
  background: #ffffff;
  padding: 34px 0;
  text-align: center;
  border-top: 1px solid rgba(0,0,0,0.04);
  border-bottom: 1px solid rgba(0,0,0,0.04);
}

.frase-destacada p{
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--brand-base);
}

/* =========================================================
   BLOQUES / CAJAS
   ========================================================= */
.bloques{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.caja{
  background: white;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 0 10px rgba(0,0,0,0.08);
  text-align: center;
  transition: transform .25s ease, box-shadow .25s ease;
}

.caja:hover{
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.caja h3{
  margin-top: 0;
  font-size: 1.15rem;
}

.caja p{
  line-height: 1.6;
  color: var(--muted);
}

/* Miniaturas en cajas (Home) */
.caja-img{
  height: 130px;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 14px;
}

.caja-img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.85) saturate(0.90);
  transition: transform .45s ease;
}

.caja:hover .caja-img img{
  transform: scale(1.05);
}

.caja-img.ansiedad img{ filter: brightness(0.75) saturate(0.90); }
.caja-img.cansancio img{ filter: brightness(0.80) saturate(0.85); }
.caja-img.bucle img{ filter: brightness(0.88) saturate(0.90); }

/* ✅ Compatibilidad con tu HTML actual (usa class="hero-ansiedad" en la miniatura) */
.caja-img.hero-ansiedad img{ filter: brightness(0.75) saturate(0.90); }

/* =========================================================
   LLAMADA (bloques azulados)
   ========================================================= */
.llamada{
  text-align: center;
  background: #f0f5f7;
  border-radius: var(--radius);
  margin-top: 10px;
  box-shadow: 0 0 10px rgba(0,0,0,0.05);
  padding-top: 40px;
  padding-bottom: 40px;
}

.texto-llamada{
  font-size: 18px;
  margin: 0 auto 15px;
  line-height: 1.6;
  color: var(--brand-base);
}

/* =========================================================
   TESTIMONIOS
   ========================================================= */
.testimonios{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

.tarjeta-testimonio{
  background: white;
  border-radius: 14px;
  padding: 20px;
  box-shadow: 0 0 10px rgba(0,0,0,0.08);
  transition: transform .25s ease, box-shadow .25s ease;
}

.tarjeta-testimonio:hover{
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.tarjeta-testimonio .texto{
  font-style: italic;
  line-height: 1.7;
  margin: 0 0 10px;
  color: var(--muted);
}

.tarjeta-testimonio .autor{
  text-align: right;
  font-weight: 700;
  color: var(--brand-base);
  margin: 0;
}

.nota-testimonios{
  font-size: 13px;
  opacity: 0.8;
  margin-top: 10px;
  color: var(--muted);
}

/* =========================================================
   EQUIPO (GRID + CARDS)
   ========================================================= */
.equipo-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 1.5rem;
}

.equipo-card{
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform .25s ease, box-shadow .25s ease;
}

.equipo-card:hover{
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.equipo-foto{
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.antonio{
  object-position: 75% 40%;
}

/* Ajuste encuadre Dafne */
.equipo-foto.dafne{
  object-position: center 20%;
  transform: scale(1.08);
}
.equipo-body{
  padding: 1.1rem 1.2rem 1.3rem;
}

.equipo-card h3{
  margin: 0 0 .4rem;
  font-size: 1.2rem;
}

.equipo-rol{
  margin: 0 0 .9rem;
  font-size: .95rem;
  color: var(--muted);
  font-weight: 700;
}

.equipo-body p{
  margin: 0 0 .9rem;
  color: var(--muted);
  line-height: 1.7;
}

.equipo-body p:last-child{ margin-bottom: 0; }

/* Marco terapéutico común */
.marco-terapeutico{
  max-width: 800px;
  margin: 2.5rem auto 0;
  text-align: center;
  font-style: italic;
  color: var(--brand-base);
  opacity: 0.9;
}

/* =========================================================
   CONSISTENCIA VISUAL (bordes/sombras en cards)
   ========================================================= */
.caja,
.tarjeta-testimonio,
.equipo-card,
.contacto-card,
.medios-card{
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.caja,
.tarjeta-testimonio,
.contacto-card{
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.caja:hover,
.tarjeta-testimonio:hover,
.equipo-card:hover{
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

/* =========================================================
   CONTACTO
   ========================================================= */
.contacto-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 26px;
}

.contacto-card{
  background: white;
  border-radius: var(--radius);
  padding: 22px;
  text-align: center;
}

.contacto-icono{
  width: 44px;
  height: 44px;
  margin: 0 auto 10px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(47,93,107,0.08);
  color: var(--brand-base);
}

.contacto-card h3{
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.contacto-card a{
  color: var(--brand-base);
  font-weight: 600;
  text-decoration: none;
}

.contacto-card a:hover{
  color: var(--brand-orange);
  text-decoration: underline;
}

.contacto-card p{
  margin: 0;
  color: var(--muted);
  font-weight: 500;
}

/* Layout mapa + formulario */
.contacto-doble{
  display:grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 28px;
  margin-top: 26px;
  align-items: start;
}

/* MAPA CONTACTO */
.contacto-mapa{
  margin-top: 30px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.contacto-mapa iframe{
  width: 100%;
  height: 420px;
  border: 0;
  display: block;
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.08);
}

/* Formulario */
.contacto-formulario form{
  display:flex;
  flex-direction: column;
  gap: 16px;
}

.contacto-formulario input,
.contacto-formulario textarea{
  width:100%;
  border: none;
  background:#f3f3f3;
  padding:16px 16px;
  border-radius: 10px;
  font-size:16px;
  outline:none;
}

.contacto-formulario textarea{
  resize: vertical;
  min-height: 160px;
}

.contacto-formulario input:focus,
.contacto-formulario textarea:focus{
  box-shadow: 0 0 0 3px rgba(216, 137, 47, 0.22);
}

.btn-enviar{
  align-self:flex-end;
  background:#d8892f;
  color:#fff;
  border:none;
  padding:14px 26px;
  border-radius:999px;
  letter-spacing: .12em;
  cursor:pointer;
}

.btn-enviar:hover{
  opacity:.95;
  transform: translateY(-1px);
}

/* =========================================================
   EN MEDIOS (miniatura clicable + badge)
   ========================================================= */
.miniatura-medios{
  display: block;
  position: relative;
  margin: 20px 0 18px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(0,0,0,0.08);
  text-decoration: none;
}

.miniatura-medios img{
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  filter: brightness(0.85) saturate(0.9);
  transition: transform .35s ease, filter .35s ease;
}

.miniatura-medios:hover img{
  transform: scale(1.02);
  filter: brightness(0.8) saturate(0.95);
}

.miniatura-badge{
  position: absolute;
  left: 16px;
  bottom: 14px;
  background: rgba(47,93,107,0.92);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(0,0,0,0.18);
}

/* CTA claro debajo */
.cta-medios{
  display: inline-block;
  margin-top: 6px;
  background: var(--brand-base);
  color: #fff;
  font-weight: 800;
  padding: 12px 18px;
  border-radius: 999px;
  text-decoration: none;
  transition: transform .15s ease, background .25s ease;
}

.cta-medios:hover{
  background: var(--brand-green);
  transform: translateY(-1px);
}

/* Grid vídeos */
.medios-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 22px;
}

.medios-card{
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.medios-video{
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
}

.medios-card iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.medios-content{
  padding: 14px 14px 16px;
}

.medios-content h3{
  margin: 0 0 6px;
  font-size: 1rem;
}

.medios-meta{
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
}

.medios-content p{
  margin: 0;
  color: var(--muted);
}

/* =========================================================
   ARTÍCULO (reflexión)
   ========================================================= */
.articulo{
  max-width: 900px;
  margin: 0 auto;
}

.articulo h2{
  margin-top: 28px;
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer{
  background: #f0f5f7;
  padding: 40px 20px;
  margin-top: 60px;
  font-size: 14px;
  color: #444;
  border-top: 1px solid rgba(0,0,0,0.04);
}

.footer-contenedor{
  max-width: 1000px;
  margin: auto;
  text-align: center;
}

.footer-registro{ margin-bottom: 20px; }

.footer-logos{
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.footer-logos img{
  height: 45px;
  opacity: 0.85;
}

.footer-texto{
  margin: 0;
  line-height: 1.6;
  color: var(--muted);
}

.footer-legal{ margin-bottom: 12px; }

.footer-legal a{
  color: var(--brand-base);
  text-decoration: none;
  font-weight: 700;
}

.footer-legal a:hover{ text-decoration: underline; }

.footer-copy{
  font-size: 13px;
  opacity: 0.7;
}

/* =========================================================
   Botón flotante WhatsApp
   ========================================================= */
.whatsapp-float{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;

  display: inline-flex;
  align-items: center;
  gap: 10px;

  padding: 12px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .02em;

  color: #fff;
  background: #1fa855;
  box-shadow: 0 14px 28px rgba(0,0,0,.14);
  border: 1px solid rgba(255,255,255,.18);

  transition: transform .15s ease, filter .2s ease, box-shadow .2s ease;
}

.whatsapp-float:hover{
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow: 0 18px 34px rgba(0,0,0,.18);
}

.whatsapp-icon{
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.16);
}

.whatsapp-text{
  font-size: 13px;
  text-transform: uppercase;
}

@media (max-width: 520px){
  .whatsapp-text{ display: none; }
  .whatsapp-float{ padding: 12px; }
}

/* =========================================================
   COMPATIBILIDAD: páginas antiguas (tarjetas/faq/etc.)
   ========================================================= */
.tarjetas{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.tarjeta{
  background: #fff;
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  border: 1px solid rgba(15, 23, 42, 0.06);
  transition: transform .25s ease, box-shadow .25s ease;
}

.tarjeta:hover{
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.tarjeta h3{
  margin-top: 0;
  font-size: 1.15rem;
  color: var(--brand-base);
}

.tarjeta p{
  color: var(--muted);
  line-height: 1.7;
}

.pasos{
  margin: 14px 0 0;
  padding-left: 18px;
  line-height: 1.7;
  color: var(--text);
}

.faq details{
  background: #fff;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  border: 1px solid rgba(15, 23, 42, 0.06);
  margin-top: 12px;
}

.faq summary{
  cursor: pointer;
  font-weight: 700;
  color: var(--brand-base);
}

.faq p{
  margin: 10px 0 0;
  color: var(--muted);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px){
  .medios-grid{ grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px){
  .contacto-doble{ grid-template-columns: 1fr; }
  .contacto-mapa iframe{ height: 340px; }
  .btn-enviar{ align-self: stretch; }
}

@media (max-width: 800px){
  .contacto-grid{ grid-template-columns: 1fr; }
}

@media (max-width: 600px){
  .cabecera{ flex-direction: column; align-items: flex-start; }
  nav{ justify-content: flex-start; }
  .hero{ padding: 90px 18px; }
  .texto-llamada{ font-size: 16px; }

  /* Ajuste fotos equipo en móvil */
  .equipo-foto{
    height: auto;
    max-height: 360px;
    object-fit: contain;
    background: #f0f5f7;
  }
}

@media (max-width: 620px){
  .medios-grid{ grid-template-columns: 1fr; }
}

/* Accesibilidad: menos movimiento */
@media (prefers-reduced-motion: reduce){
  *{ scroll-behavior: auto !important; }
  .boton, .boton-caja, .caja, .equipo-card, .tarjeta-testimonio, .whatsapp-float{ transition: none !important; }
  .caja:hover, .equipo-card:hover, .tarjeta-testimonio:hover, .whatsapp-float:hover{ transform: none !important; }
}

/* ===============================
   FIX: Botones iguales en HERO
   (evita que .boton tenga margen extra)
   =============================== */
.hero .boton,
.hero .boton-caja{
  margin-top: 0 !important;     /* anula el margin-top:22px del .boton */
}

/* Normaliza tamaño/altura de ambos */
.boton,
.boton-caja{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 14px 26px;
  border-radius: 999px;
  white-space: nowrap;
}

.autoridad{
  padding-top: 30px;
  padding-bottom: 30px;
}

.autoridad-logos{
  display:flex;
  justify-content:center;
  gap:40px;
  flex-wrap:wrap;
  align-items:center;
  margin-top: 18px;
}

.autoridad-logos img{
  height: 40px;
  width: auto;
  opacity: 0.95;
  filter: saturate(0.95);
  transition: transform .2s ease, opacity .2s ease;
}

.autoridad-logos a:hover img{
  transform: translateY(-2px);
  opacity: 1;
}

/* =========================================================
   HERO – H1 siempre en blanco
   ========================================================= */
.hero h1{
  color: #fff;
}

/* Cierres editoriales de sección */
.cierre-motivos{
  margin-top: 18px;
}

/* =========================================================
   Opiniones externas (Doctoralia / Top Doctors / Google)
   ========================================================= */
.opiniones-externas{
  text-align: center;
}

.nota-opiniones{
  margin: 0 0 26px;
  font-size: 14px;
  color: var(--muted);
}

.logos-opiniones{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 48px;
  flex-wrap: wrap;
}

.logos-opiniones img{
  height: 42px;
  opacity: 0.9;
  transition: opacity .2s ease, transform .2s ease;
}

.logos-opiniones a:hover img{
  opacity: 1;
  transform: translateY(-2px);
}

@media (max-width: 600px){
  .logos-opiniones{
    gap: 32px;
  }

  .logos-opiniones img{
    height: 36px;
  }
}