/* =============================================================
   PSICOLOGÍA INFANTIL — css/styles.css
   Mobile-first · Paleta pastel · Playfair Display + Nunito
   ============================================================= */


/* -----------------------------------------------------------
   1. VARIABLES DE DISEÑO
   ----------------------------------------------------------- */
:root {
  /* Paleta */
  --color-bg:             #FAFAF8;   /* Fondo crema muy suave */
  --color-sage:           #A8D5C2;   /* Verde agua / sage claro */
  --color-sage-dark:      #6B9E8A;   /* Sage oscuro — CTAs y acentos */
  --color-sage-deep:      #2D5A47;   /* Verde profundo — footer */
  --color-sky:            #B8D4E8;   /* Celeste pastel */
  --color-sand:           #E8D5C4;   /* Arena cálida */
  --color-sand-light:     #F5EDE4;   /* Arena muy suave */
  --color-lavender:       #D8CCE8;   /* Lavanda pastel */
  --color-white:          #FFFFFF;
  --color-text:           #3A3A3A;   /* Texto principal */
  --color-text-light:     #757575;   /* Texto secundario */
  --color-hero-overlay:   rgba(30, 70, 50, 0.50);

  /* Tipografías */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'Nunito', 'Segoe UI', system-ui, sans-serif;

  /* Geometría */
  --radius-card:  1.25rem;
  --radius-btn:   99px;
  --max-width:    1100px;

  /* Sombras */
  --shadow-soft:  0 4px 24px rgba(107, 158, 138, 0.14);
  --shadow-card:  0 2px 16px rgba(107, 158, 138, 0.10);
  --shadow-hover: 0 8px 32px rgba(107, 158, 138, 0.22);

  /* Transiciones */
  --transition: 0.3s ease;
}


/* -----------------------------------------------------------
   2. RESET Y BASE
   ----------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.75;
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}


/* -----------------------------------------------------------
   3. UTILIDADES GLOBALES
   ----------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section-padding {
  padding-block: 4.5rem 4rem;
}

.section-header {
  text-align: center;
  margin-bottom: 2.75rem;
}

/* Etiqueta tipo "chip" sobre los títulos de sección */
.section-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-sage-dark);
  background-color: rgba(168, 213, 194, 0.22);
  padding: 0.28rem 0.9rem;
  border-radius: 99px;
  margin-bottom: 0.7rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4.5vw, 2.5rem);
  font-weight: 600;
  color: var(--color-text);
  line-height: 1.22;
  margin-bottom: 0.7rem;
}

/* Énfasis italic en títulos (usado en "Sobre mí") */
.section-title em {
  font-style: italic;
  font-family: 'Montserrat', var(--font-body);
  color: var(--color-sage-dark);
}

.section-subtitle {
  font-size: 1rem;
  color: var(--color-text-light);
  max-width: 500px;
  margin-inline: auto;
  line-height: 1.7;
}


/* -----------------------------------------------------------
   4. BOTONES
   ----------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1;
  padding: 0.8rem 1.75rem;
  border-radius: var(--radius-btn);
  border: none;
  cursor: pointer;
  transition:
    background-color var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-2px);
}

/* Verde sage — uso general */
.btn--primary {
  background-color: var(--color-sage-dark);
  color: var(--color-white);
  box-shadow: 0 4px 18px rgba(107, 158, 138, 0.32);
}
.btn--primary:hover {
  background-color: #5a8a78;
  box-shadow: 0 6px 24px rgba(107, 158, 138, 0.42);
}

/* Blanco sobre hero oscuro */
.btn--hero {
  background-color: var(--color-white);
  color: var(--color-sage-dark);
  font-size: 1rem;
  padding: 0.9rem 2rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.16);
}
.btn--hero:hover {
  background-color: var(--color-sand-light);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.22);
}

/* Verde WhatsApp — footer */
.btn--footer-wa {
  background-color: #25D366;
  color: var(--color-white);
  font-size: 0.97rem;
  padding: 0.85rem 1.85rem;
  box-shadow: 0 4px 18px rgba(37, 211, 102, 0.28);
}
.btn--footer-wa:hover {
  background-color: #1eb85a;
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.38);
}


/* -----------------------------------------------------------
   5. NAVBAR
   ----------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: rgba(250, 250, 248, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

/* Sombra suave al hacer scroll (añadida por JS) */
.navbar.scrolled {
  border-bottom-color: rgba(168, 213, 194, 0.28);
  box-shadow: 0 2px 18px rgba(107, 158, 138, 0.1);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 0.95rem;
}

.navbar__logo {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--color-text);
  transition: opacity var(--transition);
}
.navbar__logo:hover { opacity: 0.75; }
.logo-mark { font-size: 1.25rem; line-height: 1; }
.logo-text strong { color: var(--color-sage-dark); }

.navbar__cta {
  font-size: 0.78rem;
  padding: 0.52rem 1.1rem;
}


/* -----------------------------------------------------------
   6. HERO
   ----------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh; /* fallback */
  display: flex;
  align-items: center;
  overflow: hidden;
}

/* Imagen de fondo con efecto Ken Burns sutil */
.hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center 100%;
  background-repeat: no-repeat;
  transform-origin: center bottom;
  animation: kenburns 18s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes kenburns {
  from { transform: scale(1.00); }
  to   { transform: scale(1.06); }
}

/* Overlay verde oscuro translúcido */
.hero__overlay {
  position: absolute;
  inset: 0;
  background: var(--color-hero-overlay);
}

.hero__content {
  position: relative;
  z-index: 2;
  padding-top: 8rem;
  padding-bottom: 7rem;
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
}

.hero__eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.36);
  padding: 0.28rem 0.9rem;
  border-radius: 99px;
  margin-bottom: 1.25rem;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6.5vw, 3.6rem);
  font-weight: 600;
  color: var(--color-white);
  line-height: 1.18;
  margin-bottom: 1rem;
  max-width: 520px;
  margin-inline: auto;
}

.hero__subtitle {
  margin-top: 0;
}

/* Ola SVG de transición hero → siguiente sección */
.hero__wave {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  z-index: 3;
  line-height: 0;
  pointer-events: none;
}
.hero__wave svg {
  width: 100%;
  height: 55px;
  display: block;
}


/* -----------------------------------------------------------
   7. SOBRE MÍ
   ----------------------------------------------------------- */
.sobre-mi {
  background-color: var(--color-bg);
}

.sobre-mi__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

/* Contenedor de la foto */
.sobre-mi__image-wrap {
  position: relative;
  flex-shrink: 0;
}

.sobre-mi__photo {
  width: 210px;
  height: 265px;
  object-fit: cover;
  /* Bordes redondeados asimétricos: cálido, orgánico, no genérico */
  border-radius: 2.5rem 2.5rem 2.5rem 0.6rem;
  box-shadow: var(--shadow-soft);
  border: 5px solid var(--color-white);
}

/* Chip de especialidad sobre la foto */
.sobre-mi__badge {
  position: absolute;
  bottom: -0.8rem;
  right: -0.8rem;
  background-color: var(--color-sand);
  color: var(--color-text);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.38rem 0.9rem;
  border-radius: 99px;
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
  border: 2px solid var(--color-white);
}

.sobre-mi__text {
  text-align: center;
}

.sobre-mi__text .section-title {
  margin-bottom: 1rem;
}

/* Aplicar Montserrat especificamente al título dentro de la sección "Sobre mí" */
.sobre-mi .section-title {
  font-family: 'Montserrat', var(--font-body);
  font-style: normal;
}

.sobre-mi .section-title em {
  font-style: normal;
}

/* Evitar salto de línea en el título de 'Sobre mí' en pantallas medianas/desktop */
@media (min-width: 600px) {
  .sobre-mi .section-title {
    white-space: nowrap;
    overflow-wrap: normal;
  }
}

.sobre-mi__text p {
  font-size: 0.97rem;
  color: var(--color-text-light);
  margin-bottom: 0.9rem;
  max-width: 540px;
  margin-inline: auto;
}

.sobre-mi__matricula {
  display: block;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  color: var(--color-sage-dark) !important;
  letter-spacing: 0.05em;
  margin-bottom: 1.5rem !important;
  margin-inline: auto;
}


/* -----------------------------------------------------------
   8. SERVICIOS
   ----------------------------------------------------------- */
.servicios {
  background: linear-gradient(180deg, var(--color-bg) 0%, #EEF5F2 100%);
}

/* Grilla de tarjetas: 1 columna en móvil */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.2rem;
}

.card {
  background-color: var(--color-white);
  border-radius: var(--radius-card);
  padding: 1.7rem 1.5rem;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(168, 213, 194, 0.18);
  transition:
    transform var(--transition),
    box-shadow var(--transition);
}

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

.card__icon {
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.8rem;
}

.card__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.card__text {
  font-size: 0.88rem;
  color: var(--color-text-light);
  line-height: 1.65;
}


/* -----------------------------------------------------------
   9. FAQ — Preguntas Frecuentes
   ----------------------------------------------------------- */
.faq {
  background-color: var(--color-bg);
}

.faq__inner {
  max-width: 700px;
  margin-inline: auto;
}

.faq__list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.faq__item {
  background-color: var(--color-white);
  border-radius: 1rem;
  border: 1px solid rgba(168, 213, 194, 0.22);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition);
}

.faq__item[open] {
  box-shadow: 0 4px 24px rgba(107, 158, 138, 0.18);
}

.faq__question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.05rem 1.35rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  color: var(--color-text);
  user-select: none;
  -webkit-user-select: none;
}

/* Quita el triángulo nativo del navegador */
.faq__question::-webkit-details-marker { display: none; }
.faq__question::marker { display: none; }

.faq__question:hover {
  color: var(--color-sage-dark);
}

.faq__icon {
  font-size: 1.35rem;
  font-weight: 300;
  color: var(--color-sage-dark);
  flex-shrink: 0;
  line-height: 1;
  transition: transform var(--transition);
}

/* Rotar icono al abrir (cambia de + a − por JS) */
.faq__item[open] .faq__icon {
  transform: rotate(45deg);
}

.faq__answer {
  padding: 0 1.35rem 1.15rem;
  border-top: 1px solid rgba(168, 213, 194, 0.18);
  padding-top: 1rem;
  font-size: 0.91rem;
  color: var(--color-text-light);
  line-height: 1.7;
}


/* -----------------------------------------------------------
   10. FOOTER / CONTACTO
   ----------------------------------------------------------- */

/* -----------------------------------------------------------
   UBICACIÓN / MAPA
   ----------------------------------------------------------- */
.map-section {
  background-color: var(--color-bg);
}
.map-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  align-items: start;
}
.map-iframe iframe {
  width: 100%;
  height: 320px;
  border: 0;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-card);
}
.map-address {
  text-align: center;
  color: var(--color-text-light);
  font-size: 0.97rem;
}

@media (min-width: 900px) {
  .map-grid {
    grid-template-columns: 1fr 380px;
    gap: 2rem;
  }
  .map-iframe iframe { height: 420px; }
  .map-address { text-align: left; align-self: center; }
}

.footer {
  background-color: var(--color-sage-deep);
  color: rgba(255, 255, 255, 0.82);
  position: relative;
}

.footer__wave {
  line-height: 0;
  margin-bottom: -1px;
}
.footer__wave svg {
  width: 100%;
  height: 55px;
  display: block;
}

.footer__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2.5rem;
  padding-block: 3rem 2.5rem;
}

.footer__logo-mark {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.3rem;
}

.footer__name {
  font-size: 1.1rem;
  color: var(--color-white);
  margin-top: 0.2rem;
}
.footer__name strong {
  color: var(--color-sage);
}

.footer__tagline {
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 0.15rem;
}

.footer__matricula {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.38);
  margin-top: 0.25rem;
  letter-spacing: 0.04em;
}

.footer__cta-block > p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.78);
  margin-bottom: 1.2rem;
}

/* Enlace de Instagram en el footer */
.footer__social {
  margin-top: 1.1rem;
}

.footer__instagram {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.48rem 1.1rem;
  border-radius: 99px;
  transition:
    background-color var(--transition),
    border-color var(--transition),
    color var(--transition);
}
.footer__instagram:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.38);
  color: var(--color-white);
}

/* Línea final del footer */
.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  padding: 1.2rem 1.25rem;
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.3);
}


/* -----------------------------------------------------------
   11. BOTÓN FLOTANTE DE WHATSAPP
   ----------------------------------------------------------- */
.wa-float {
  position: fixed;
  bottom: 1.4rem;
  right: 1.4rem;
  z-index: 999;
  width: 56px;
  height: 56px;
  background-color: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.42);
  animation: wa-pulse 2.8s ease-in-out infinite;
  transition:
    transform var(--transition),
    box-shadow var(--transition);
}

.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.55);
  animation: none;
}

.wa-float svg {
  color: white;
  display: block;
}

@keyframes wa-pulse {
  0%,  100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.42); }
  50%        { box-shadow: 0 4px 28px rgba(37, 211, 102, 0.65), 0 0 0 9px rgba(37, 211, 102, 0.09); }
}


/* -----------------------------------------------------------
   12. ANIMACIONES SCROLL REVEAL
   ----------------------------------------------------------- */
.reveal,
.reveal-item {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s ease,
    transform 0.7s ease;
}

/* Stagger para los ítems de la grilla de servicios */
.reveal-item:nth-child(1) { transition-delay: 0.00s; }
.reveal-item:nth-child(2) { transition-delay: 0.09s; }
.reveal-item:nth-child(3) { transition-delay: 0.18s; }
.reveal-item:nth-child(4) { transition-delay: 0.06s; }
.reveal-item:nth-child(5) { transition-delay: 0.15s; }
.reveal-item:nth-child(6) { transition-delay: 0.24s; }

/* Clase agregada por JS cuando el elemento entra al viewport */
.reveal.visible,
.reveal-item.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respeta la preferencia de movimiento reducido del sistema */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-item {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero__bg {
    animation: none;
  }
  .wa-float {
    animation: none;
  }
}


/* -----------------------------------------------------------
   13. RESPONSIVE — TABLET (≥ 600px)
   ----------------------------------------------------------- */
@media (min-width: 600px) {
  /* Cambia a flexbox: filas envueltas y centradas */
  .cards-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.35rem;
    justify-content: center;
  }

  .cards-grid .card {
    flex: 0 1 220px;
  }

  .sobre-mi__photo {
    width: 250px;
    height: 310px;
  }

}


/* -----------------------------------------------------------
   14. RESPONSIVE — DESKTOP (≥ 900px)
   ----------------------------------------------------------- */
@media (min-width: 900px) {

  /* Sobre mí: layout horizontal */
  .sobre-mi__inner {
    flex-direction: row;
    align-items: flex-start;
    gap: 4.5rem;
  }

  .sobre-mi__text {
    text-align: left;
  }

  .sobre-mi__text p {
    margin-inline: 0;
  }

  .sobre-mi__photo {
    width: 290px;
    height: 365px;
  }

  /* Servicios: 3 columnas */
  /* Desktop: flexbox con tarjetas de mayor base para mejor distribución */
  .cards-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
  }

  .cards-grid .card {
    flex: 0 1 260px;
  }

  /* Footer: layout horizontal */
  .footer__content {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    text-align: left;
    gap: 3rem;
  }

  .footer__brand {
    flex: 0 0 auto;
  }

  .footer__cta-block {
    text-align: right;
  }

  .footer__social {
    display: flex;
    justify-content: flex-end;
  }

}


/* -----------------------------------------------------------
   15. RESPONSIVE — DESKTOP GRANDE (≥ 1200px)
   ----------------------------------------------------------- */
@media (min-width: 1200px) {

  .section-padding {
    padding-block: 5.5rem 5rem;
  }

  .hero__content {
    padding-top: 9rem;
    padding-bottom: 8rem;
  }

}
