/* ============================================================
   Psicólogos Asociados — Stylesheet unificado
   Paleta clínica: #F7F5F0 (fondo hueso), #1A2E40 (estructura),
   #5E6953 (acento oliva), #D4A383 / #8C5E45 (humano terracota),
   #2A7B6B (CTA menta), #E06666 (error coral), #7FA06F (éxito)
   Fuentes: Avenir LT, Futura LT, Din Next, Helvetica, Basic
   ============================================================ */

/* ---- @font-face: fuentes locales (conservadas del original) ---- */
@font-face {
  font-family: 'Avenir LT 35 Light';
  font-style: normal;
  font-weight: 400;
  src: url('../fuentes/avenir-lt-w01_35-light1475496_01b8128f61dd.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Avenir LT 85 Heavy';
  font-style: normal;
  font-weight: 700;
  src: url('../fuentes/avenir-lt-w01_85-heavy1475544_8b736c041122.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Futura LT Book';
  font-style: normal;
  font-weight: 400;
  src: url('../fuentes/futura-lt-w01-book_02de18b7f6ca.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Futura LT Light';
  font-style: normal;
  font-weight: 300;
  src: url('../fuentes/futura-lt-w01-light_bc07b1eeafa7.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Din Next Light';
  font-style: normal;
  font-weight: 300;
  src: url('../fuentes/din-next-w01-light_42d993795a64.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Helvetica Roman';
  font-style: normal;
  font-weight: 400;
  src: url('../fuentes/helvetica-w01-roman_b27253dc1620.woff2') format('woff2');
  font-display: swap;
}

/* ---- RESET ---- */
*,
*::before,
*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; font-size: 10px; }
body {
  font-family: 'Din Next Light', 'Helvetica Roman', Arial, Helvetica, sans-serif;
  font-size: 1.5rem;
  line-height: 1.5;
  color: #1A2E40;
  background: #F7F5F0;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; font: inherit; color: inherit; background: none; border: 0; }
strong { font-weight: 700; }
.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- HEADER ---- */
.site-header {
  background: #F7F5F0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}
.header-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 8px 20px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.logo-container a { display: inline-block; }
.logo-img { width: 260px; height: auto; }

/* Navegación */
.main-nav { }
.nav-toggle {
  display: none;
  width: 36px; height: 28px;
  position: relative;
  background: none; border: 0;
  cursor: pointer;
  margin: 0 auto;
}
.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block; width: 100%; height: 3px;
  background: #1A2E40; border-radius: 2px;
  transition: all 0.3s;
}
.nav-toggle-icon { position: relative; }
.nav-toggle-icon::before { content: ''; position: absolute; top: -9px; left: 0; }
.nav-toggle-icon::after  { content: ''; position: absolute; top: 9px; left: 0; }
.nav-open .nav-toggle-icon { background: transparent; }
.nav-open .nav-toggle-icon::before { top: 0; transform: rotate(45deg); }
.nav-open .nav-toggle-icon::after  { top: 0; transform: rotate(-45deg); }

.nav-list {
  display: flex;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.nav-link {
  display: block;
  padding: 10px 24px;
  font-family: 'Avenir LT 35 Light', sans-serif;
  font-size: 1.7rem;
  color: #1A2E40;
  transition: background 0.3s, color 0.3s;
  white-space: nowrap;
}
.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  background: #1A2E40;
  color: #F7F5F0;
}
.nav-dropdown { position: relative; }
.has-submenu::after { content: ' ▼'; font-size: 0.7em; }
.submenu {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: #5E6953;
  min-width: 280px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.3);
  z-index: 200;
}
.nav-dropdown:hover .submenu,
.nav-dropdown:focus-within .submenu { display: block; }
.submenu a {
  display: block;
  padding: 10px 20px;
  font-family: 'Avenir LT 35 Light', sans-serif;
  font-size: 1.5rem;
  color: #F7F5F0;
  transition: background 0.3s;
}
.submenu a:hover,
.submenu a:focus-visible { background: #F7F5F0; color: #5E6953; }

/* ---- SECTIONS ---- */
.section {
  padding: 60px 0;
}
.section-heading {
  font-family: 'Avenir LT 85 Heavy', sans-serif;
  font-size: 4rem;
  letter-spacing: 0.1em;
  background: #1A2E40;
  color: #F7F5F0;
  display: inline-block;
  padding: 4px 20px;
  margin-bottom: 30px;
}

/* ===== SECCIÓN INICIO ===== */
.section-inicio { padding-top: 20px; }

/* Slider */
.slider {
  position: relative;
  width: 100%;
  max-width: 910px;
  margin: 0 auto 20px;
  overflow: hidden;
  border-radius: 0;
}
.slider-track {
  display: flex;
  transition: transform 0.5s ease-in-out;
}
.slider-slide {
  min-width: 100%;
  position: relative;
}
.slider-slide img {
  width: 100%;
  height: 476px;
  object-fit: cover;
  display: block;
}
.slider-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.55);
  padding: 12px 20px;
}
.slider-title {
  font-family: 'Futura LT Book', sans-serif;
  font-size: 1.6rem;
  color: #fff;
}
.slider-counter {
  position: absolute;
  bottom: 10px; right: 20px;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 1.2rem;
}
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 45px; height: 70px;
  background: rgba(0,0,0,0.01);
  color: rgba(255,255,255,0.4);
  font-size: 3rem;
  border: 0;
  cursor: pointer;
  transition: opacity 0.3s, color 0.3s;
}
.slider-btn:hover,
.slider-btn:focus-visible { color: #fff; opacity: 1; }
.slider-btn-prev { left: 20px; }
.slider-btn-next { right: 20px; }

/* Info bar */
.info-bar {
  background: rgba(94, 105, 83, 0.88);
  max-width: 910px;
  margin: 0 auto 30px;
  padding: 15px 0;
}
.info-bar-inner {
  display: flex;
  align-items: center;
  padding: 0 20px;
}
.info-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}
.info-item:first-child { flex: 1; }
.info-item-split {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 200px;
  padding-left: 20px;
  border-left: 1px solid rgba(255,255,255,0.3);
}
.info-icon { flex-shrink: 0; }
.info-text-full p {
  font-family: 'Avenir LT 35 Light', sans-serif;
  font-size: 1.5rem;
  color: #fff;
  line-height: 1.5;
}
.info-sub { margin-top: 6px; font-size: 1.4rem; font-style: italic; }
.info-link { color: #fff; text-decoration: underline; font-weight: 700; }
.info-link:hover { color: #2A7B6B; }
.info-phone {
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-phone-number {
  font-family: 'Avenir LT 85 Heavy', sans-serif;
  font-size: 1.9rem;
  color: #fff;
}
.info-phone-icon { flex-shrink: 0; }

/* Formulario de contacto */
.contact-form-container {
  background: #5E6953;
  max-width: 595px;
  padding: 30px 25px;
}
.form-title {
  font-family: 'Avenir LT 35 Light', sans-serif;
  font-weight: 700;
  font-size: 2.5rem;
  color: #fff;
  margin-bottom: 25px;
}
.contact-form { display: flex; flex-direction: column; gap: 12px; }
.form-row {
  display: flex;
  gap: 12px;
}
.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.form-group label {
  font-family: 'Avenir LT 35 Light', sans-serif;
  font-size: 1.7rem;
  color: #fff;
  margin-bottom: 6px;
}
.required { color: #fff; }
.form-group input,
.form-group textarea {
  font-family: 'Futura LT Light', sans-serif;
  font-size: 1.4rem;
  padding: 10px 16px;
  border: 0;
  background: rgba(255,255,255,0.8);
  color: #000;
  width: 100%;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid #fff;
  background: rgba(255,255,255,1);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-row-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 8px;
}

/* Social icons inline */
.social-icons-inline {
  display: flex;
  gap: 10px;
  align-items: center;
}
.social-icons-inline a { display: inline-block; }
.social-icons-inline img { width: 39px; height: 39px; }
.social-centered { justify-content: center; margin-top: 20px; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 30px;
  font-family: 'Avenir LT 35 Light', sans-serif;
  font-size: 1.7rem;
  border: 3px solid #fff;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
  text-align: center;
  cursor: pointer;
}
.btn-submit {
  background: #2A7B6B;
  color: #F7F5F0;
  border-color: #fff;
  min-width: 140px;
}
.btn-submit:hover,
.btn-submit:focus-visible {
  background: #5E6953;
  color: #F7F5F0;
}
.btn-age {
  background: transparent;
  color: #F7F5F0;
  border: 0;
  font-size: 2.2rem;
  padding: 10px 22px;
}
.btn-age:hover,
.btn-age:focus-visible { background: #2A7B6B; color: #F7F5F0; }

.form-success-message {
  font-family: 'Futura LT Book', sans-serif;
  font-weight: 700;
  color: #7FA06F;
  font-size: 1.5rem;
  margin-top: 10px;
}
.form-error {
  color: #E06666;
  font-family: 'Futura LT Book', sans-serif;
  font-size: 1.4rem;
  margin-top: 4px;
}

/* ===== SECCIÓN NOSOTROS ===== */
.section-nosotros { background: #F7F5F0; }
.nosotros-layout { display: flex; flex-direction: column; gap: 30px; }
.nosotros-heading-decor { display: flex; justify-content: center; }
.nosotros-badge {
  display: inline-block;
  font-family: 'Avenir LT 85 Heavy', sans-serif;
  font-size: 4rem;
  letter-spacing: 0.1em;
  background: #8C5E45;
  color: #F7F5F0;
  padding: 0 18px;
}
.nosotros-content {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}
.nosotros-accent {
  flex-shrink: 0;
  min-width: 250px;
}
.accent-line {
  font-family: 'Avenir LT 85 Heavy', sans-serif;
  font-size: 3.5rem;
  color: #8C5E45;
  line-height: 0.9;
  letter-spacing: 0.15em;
}
.accent-line-last { margin-bottom: 0; }
.nosotros-text {
  font-family: 'Avenir LT 35 Light', sans-serif;
  font-size: 1.8rem;
  color: #1A2E40;
  line-height: 1.6;
}
.nosotros-text p + p { margin-top: 16px; }
.nosotros-quote {
  margin-top: 24px;
  position: relative;
  padding-left: 24px;
}
.quote-mark {
  position: absolute;
  top: -8px; left: -4px;
  font-size: 4rem;
  color: #8C5E45;
  line-height: 1;
  font-family: serif;
}
.nosotros-quote p {
  font-family: 'Avenir LT 35 Light', sans-serif;
  font-size: 1.8rem;
  font-weight: 700;
  font-style: italic;
  color: #1A2E40;
}

/* ===== SECCIÓN CONSULTAS FRECUENTES ===== */
.section-consultas { background: #fff; }

.age-buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
  background: rgba(94, 105, 83, 0.25);
  padding: 40px 10px;
  margin-bottom: 20px;
}
.age-separator {
  color: #fff;
  font-size: 1.8rem;
  transform: rotate(90deg);
}

/* Cards */
.cards-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-bottom: 20px;
}
.card {
  padding: 26px 18px 40px;
  display: flex;
  flex-direction: column;
}
.card-dark { background: rgba(94, 105, 83, 0.85); }
.card-light { background: rgba(247, 245, 240, 0.85); }
.card-title {
  font-family: 'Avenir LT 35 Light', sans-serif;
  font-size: 2rem;
  color: #fff;
  text-align: center;
  margin-bottom: 18px;
}
.card-light .card-title { color: #1A2E40; }
.card-text {
  font-family: 'Avenir LT 35 Light', sans-serif;
  font-size: 1.4rem;
  color: #1A2E40;
  line-height: 1.5;
  text-align: center;
  flex: 1;
  margin-bottom: 18px;
}
.card-dark .card-text { color: #F7F5F0; }
.card-link {
  display: block;
  text-align: center;
  font-family: 'Avenir LT 35 Light', sans-serif;
  font-size: 1.4rem;
  color: #F7F5F0;
  padding: 8px 0;
  transition: color 0.3s;
}
.card-link:hover,
.card-link:focus-visible { color: #2A7B6B; }
.card-link-dark { color: #1A2E40; }
.card-link-dark:hover,
.card-link-dark:focus-visible { color: #2A7B6B; }

/* Contacto cards */
.contacto-cards { grid-template-columns: repeat(4, 1fr); }
.card-contacto {
  align-items: center;
  text-align: center;
  min-height: 280px;
}
.card-icon { margin: 0 auto 16px; }
.card-icon-group { display: flex; justify-content: center; gap: 20px; margin-bottom: 16px; }
.card-subtitle {
  font-family: 'Avenir LT 35 Light', sans-serif;
  font-size: 1.7rem;
  line-height: 1.4;
  margin-bottom: 14px;
}
.card-dark .card-subtitle { color: #F7F5F0; }
.card-light .card-subtitle { color: #1A2E40; }
.card-phone {
  font-family: 'Avenir LT 85 Heavy', sans-serif;
  font-size: 2.6rem;
  color: #F7F5F0;
  margin-bottom: 14px;
}
.card-phone-green { color: #2A7B6B; }

/* Contacto intro */
.contacto-intro {
  font-family: 'Avenir LT 35 Light', sans-serif;
  font-size: 1.8rem;
  color: #1A2E40;
  line-height: 1.8;
  margin-bottom: 20px;
  max-width: 980px;
}

/* ===== FOOTER ===== */
.site-footer {
  background: #1A2E40;
  padding: 20px 0;
  text-align: center;
}
.site-footer p {
  font-size: 1.4rem;
  color: #F7F5F0;
}

/* ===== SCROLL TO TOP ===== */
.scroll-to-top {
  position: fixed;
  bottom: 30px; right: 20px;
  z-index: 200;
  width: 61px; height: 61px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}
.scroll-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ===== RESPONSIVE: TABLET (768px - 1024px) ===== */
@media (max-width: 1024px) {
  .container { padding: 0 16px; }
  .section { padding: 40px 0; }
  .section-heading { font-size: 3rem; }
  .nosotros-content { flex-direction: column; gap: 24px; }
  .nosotros-accent { min-width: auto; display: flex; flex-wrap: wrap; gap: 8px; }
  .accent-line { font-size: 2.4rem; }

  .cards-row { grid-template-columns: 1fr; }
  .contacto-cards { grid-template-columns: repeat(2, 1fr); }

  .info-bar-inner { flex-direction: column; gap: 16px; }
  .info-item-split {
    border-left: 0;
    padding-left: 0;
    border-top: 1px solid rgba(255,255,255,0.3);
    padding-top: 16px;
    flex-direction: row;
    gap: 20px;
  }

  .slider-slide img { height: 320px; }
}

/* ===== RESPONSIVE: MOBILE (< 768px) ===== */
@media (max-width: 767px) {
  html { font-size: 9px; }
  .container { padding: 0 12px; }
  .section { padding: 30px 0; }
  .section-heading { font-size: 2.4rem; }

  /* Header */
  .header-container { flex-direction: row; justify-content: space-between; }
  .logo-img { width: 180px; }
  .nav-toggle { display: block; }
.nav-list {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #5E6953;
    z-index: 300;
  }
  .nav-open .nav-list { display: flex; }
  .nav-link { text-align: center; padding: 14px; color: #F7F5F0; }
  .nav-link:hover,
  .nav-link:focus-visible,
  .nav-link.active { background: #F7F5F0; color: #5E6953; }
  .submenu {
    position: static;
    background: rgba(0,0,0,0.15);
    min-width: auto;
  }
  .nav-dropdown:hover .submenu { display: none; }
  .submenu.open { display: block; }

  /* Slider */
  .slider-slide img { height: 220px; }
  .slider-btn { width: 32px; height: 50px; font-size: 2rem; }

  /* Info bar */
  .info-bar-inner { gap: 10px; }
  .info-item-split { flex-direction: column; gap: 6px; }
  .info-phone-number { font-size: 1.6rem; }

  /* Form */
  .contact-form-container { max-width: 100%; padding: 20px; }
  .form-row { flex-direction: column; }
  .form-title { font-size: 2rem; }

  /* Nosotros */
  .nosotros-accent { flex-direction: column; }
  .accent-line { font-size: 2rem; line-height: 1.2; }

  /* Cards */
  .contacto-cards { grid-template-columns: 1fr; }

  /* Age buttons */
  .age-buttons { flex-direction: column; padding: 20px; }
  .age-separator { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slider-track { transition: none; }
  .nav-toggle-icon,
  .nav-toggle-icon::before,
  .nav-toggle-icon::after { transition: none; }
  .scroll-to-top { transition: none; }
}