/* ============================================
   Centro de Psicología Clínica y Bienestar Integral
   Paleta de colores terapéuticos:
   - Verde salvia suave: #4A7C6F (confianza, calma)
   - Azul profundo: #2C3E50 (profesionalismo)
   - Blanco roto: #F5F7F6 (fondo limpio)
   - Verde claro: #E8F0ED (fondos alternos)
   - Texto oscuro: #1A2E40
   ============================================ */

/* === RESET & BASE === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Avenir LT 35 Light', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.6rem;
  line-height: 1.7;
  color: #2C3E50;
  background-color: #F5F7F6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: #4A7C6F;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover, a:focus {
  color: #3A6559;
}

/* === HEADER === */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 2px 20px rgba(44, 62, 80, 0.08);
  z-index: 1000;
  transition: background 0.3s ease;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-img {
  width: 200px;
  height: auto;
}

/* === NAVIGATION === */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 1rem;
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
  display: block;
  width: 24px;
  height: 2px;
  background: #2C3E50;
  transition: all 0.3s ease;
}

.nav-toggle-icon {
  position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
  content: '';
  position: absolute;
  left: 0;
}

.nav-toggle-icon::before { top: -7px; }
.nav-toggle-icon::after { top: 7px; }

.nav-list {
  list-style: none;
  display: flex;
  gap: 0.5rem;
}

.nav-link {
  display: block;
  padding: 0.8rem 1.6rem;
  font-family: 'Avenir LT 85 Heavy', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.4rem;
  color: #2C3E50;
  border-radius: 4px;
  transition: all 0.3s ease;
}

.nav-link:hover,
.nav-link:focus,
.nav-link.active {
  color: #4A7C6F;
  background: #E8F0ED;
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 280px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 30px rgba(44, 62, 80, 0.12);
  padding: 0.8rem 0;
  list-style: none;
  z-index: 100;
}

.submenu.open {
  display: block;
}

.submenu a {
  display: block;
  padding: 0.8rem 2rem;
  font-size: 1.4rem;
  color: #2C3E50;
  transition: all 0.2s ease;
}

.submenu a:hover {
  background: #E8F0ED;
  color: #4A7C6F;
}

/* === MAIN OFFSET === */
main {
  padding-top: 80px;
}

/* === HERO === */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2C3E50 0%, #4A7C6F 100%);
  overflow: hidden;
  margin-top: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: center/cover no-repeat;
  opacity: 0.15;
  mix-blend-mode: overlay;
  transition: background-image 1.5s ease-in-out;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 4rem 2rem;
  max-width: 800px;
}

.hero-title {
  font-family: 'Avenir LT 85 Heavy', 'Helvetica Neue', Arial, sans-serif;
  font-size: 4rem;
  color: #fff;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.hero-subtitle {
  font-size: 2rem;
  color: rgba(255,255,255,0.9);
  margin-bottom: 3rem;
  line-height: 1.5;
}

/* === BUTTONS === */
.btn {
  display: inline-block;
  padding: 1.2rem 3rem;
  font-family: 'Avenir LT 85 Heavy', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.6rem;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background: #fff;
  color: #2C3E50;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.btn-primary:hover {
  background: #E8F0ED;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.btn-submit {
  background: #4A7C6F;
  color: #fff;
  padding: 1.2rem 4rem;
}

.btn-submit:hover {
  background: #3A6559;
  transform: translateY(-2px);
}

/* === SECTIONS === */
.section {
  padding: 8rem 2rem;
}

.section-alt {
  background: #E8F0ED;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.section-heading {
  font-family: 'Avenir LT 85 Heavy', 'Helvetica Neue', Arial, sans-serif;
  font-size: 3.2rem;
  color: #2C3E50;
  text-align: center;
  margin-bottom: 1.5rem;
  position: relative;
}

.section-heading::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: #4A7C6F;
  margin: 1rem auto 0;
  border-radius: 2px;
}

.section-description {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 4rem;
  font-size: 1.8rem;
  color: #555;
  line-height: 1.8;
}

/* === TEAM GRID === */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
}

.team-card {
  background: #fff;
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(44, 62, 80, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(44, 62, 80, 0.1);
}

.team-card-placeholder {
  border: 2px dashed #C8D6D0;
  background: rgba(255,255,255,0.5);
}

.team-card-placeholder:hover {
  border-color: #4A7C6F;
}

.team-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 1.5rem;
  border: 3px solid #E8F0ED;
}

.team-avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #E8F0ED;
  border: 3px dashed #C8D6D0;
}

.team-placeholder-icon {
  font-size: 4rem;
  color: #4A7C6F;
  font-weight: 300;
}

.team-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-name {
  font-family: 'Avenir LT 85 Heavy', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.8rem;
  color: #2C3E50;
  margin-bottom: 0.5rem;
}

.team-role {
  font-family: 'Avenir LT 85 Heavy', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.4rem;
  color: #4A7C6F;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.team-bio {
  font-size: 1.4rem;
  color: #666;
  line-height: 1.6;
}

/* === SERVICES GRID === */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2.5rem;
}

.service-card {
  background: #fff;
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(44, 62, 80, 0.06);
  transition: all 0.3s ease;
  display: block;
  color: #2C3E50;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(74, 124, 111, 0.15);
  color: #2C3E50;
}

.service-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 1.5rem;
  background: #E8F0ED;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
}

.service-icon svg {
  width: 100%;
  height: 100%;
  fill: #4A7C6F;
}

.service-title {
  font-family: 'Avenir LT 85 Heavy', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: #2C3E50;
}

.service-desc {
  font-size: 1.4rem;
  color: #666;
  line-height: 1.6;
}

/* === CONTACT === */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.contact-label {
  font-family: 'Avenir LT 85 Heavy', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.4rem;
  color: #4A7C6F;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contact-value {
  font-size: 1.6rem;
  color: #2C3E50;
}

.contact-value a {
  color: #4A7C6F;
  font-weight: bold;
}

/* Form */
.contact-form {
  background: #fff;
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(44, 62, 80, 0.06);
}

.form-group {
  margin-bottom: 2rem;
}

.form-label {
  display: block;
  font-family: 'Avenir LT 85 Heavy', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.4rem;
  color: #2C3E50;
  margin-bottom: 0.5rem;
}

.form-input {
  width: 100%;
  padding: 1.2rem 1.5rem;
  font-family: 'Avenir LT 35 Light', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.6rem;
  border: 2px solid #E8F0ED;
  border-radius: 8px;
  background: #F5F7F6;
  color: #2C3E50;
  transition: border-color 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: #4A7C6F;
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* === MODAL DE AGENDAMIENTO === */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(44, 62, 80, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  width: 90%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 12px 50px rgba(0, 0, 0, 0.25);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1.2rem;
  background: none;
  border: none;
  font-size: 2.8rem;
  line-height: 1;
  color: #999;
  cursor: pointer;
  z-index: 10;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: #2C3E50;
}

.modal-logo {
  display: block;
  margin: 0 auto 1.5rem;
  width: 180px;
  height: auto;
}

.modal-content iframe {
  display: block;
  width: 100%;
}

.modal-footer-info {
  text-align: center;
  font-size: 1.3rem;
  color: #666;
  line-height: 1.5;
  margin-bottom: 4px;
}

.reservo-credit {
  display: block;
  text-align: center;
  font-size: 1.2rem;
  color: #999;
  margin-top: 4px;
  transition: color 0.3s ease;
}

.reservo-credit:hover {
  color: #4A7C6F;
}

/* Bloquear scroll del body cuando el modal está abierto */
body.modal-open {
  overflow: hidden;
}

/* === FOOTER === */
.site-footer {
  background: #2C3E50;
  color: rgba(255,255,255,0.9);
  padding: 4rem 2rem 2rem;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

.footer-logo {
  width: 180px;
  height: auto;
  opacity: 0.9;
}

.footer-nav {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-nav a {
  color: rgba(255,255,255,0.8);
  font-size: 1.4rem;
  transition: color 0.3s ease;
}

.footer-nav a:hover {
  color: #fff;
}

/* === BRANCHES (Sucursales) === */
.footer-branches {
  width: 100%;
  max-width: 600px;
  text-align: center;
  padding: 2rem 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-branches-title {
  font-family: 'Avenir LT 85 Heavy', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.branches-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.branch-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.branch-name {
  font-family: 'Avenir LT 85 Heavy', 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.4rem;
  color: #4A7C6F;
}

.branch-address {
  font-size: 1.3rem;
  color: rgba(255,255,255,0.7);
}

/* Social */
.footer-social {
  display: flex;
  gap: 1.5rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  transition: all 0.3s ease;
}

.footer-social a:hover {
  background: #4A7C6F;
  transform: translateY(-2px);
}

.footer-social svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

.footer-copy {
  font-size: 1.3rem;
  color: rgba(255,255,255,0.6);
  text-align: center;
  line-height: 1.8;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-list {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    flex-direction: column;
    background: #fff;
    box-shadow: 0 8px 30px rgba(44, 62, 80, 0.12);
    padding: 1rem 0;
  }

  .nav-list.open {
    display: flex;
  }

  .submenu {
    position: static;
    box-shadow: none;
    padding-left: 2rem;
  }

  .hero-title {
    font-size: 2.8rem;
  }

  .hero-subtitle {
    font-size: 1.6rem;
  }

  .section {
    padding: 5rem 1.5rem;
  }

  .section-heading {
    font-size: 2.4rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .team-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .footer-nav {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
}




/* Flexibilidad del Modal y el Iframe */
.modal-content {
    display: flex;
    flex-direction: column;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 10px;
    background-color: #ffffff;
}

.iframe-reservo {
    width: 100%;
    min-height: 60vh;
    border-radius: 10px;
    overflow: hidden;
    transition: height 0.3s ease-in-out;
}

@media (max-width: 768px) {
    .iframe-reservo { min-height: 75vh; }
    .modal-content { width: 95%; max-height: 95vh; }
}

/* Interfaz de Éxito */
.modal-success-container { margin-top: 20px; text-align: center; font-family: 'Avenir LT 35 Light', 'Helvetica Neue', Arial, sans-serif; }
.animate-fade-in { animation: fadeInModal 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes fadeInModal { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.success-badge { width: 46px; height: 46px; background-color: #10b981; color: white; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; font-weight: bold; margin: 0 auto 12px; }
.modal-success-header h3 { margin: 0 0 4px 0; color: #1e293b; font-size: 18px; font-weight: 700; }
.modal-success-header p { margin: 0 0 20px 0; color: #64748b; font-size: 13px; }

.modal-receipt-table { width: 100%; border-collapse: collapse; margin-bottom: 18px; background-color: #f8fafc; border-radius: 8px; overflow: hidden; }
.modal-receipt-table td { padding: 10px 14px; font-size: 13px; text-align: left; color: #334155; border-bottom: 1px solid #f1f5f9; }
.modal-receipt-table tr:last-child td { border-bottom: none; }

.modal-address-box { font-style: normal; background-color: #f0fdf4; border: 1px dashed #bbf7d0; padding: 12px; border-radius: 8px; font-size: 13px; color: #166534; text-align: left; margin-bottom: 22px; }

.modal-success-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-modal-action { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 20px; font-size: 13px; font-weight: 600; border-radius: 6px; border: none; cursor: pointer; text-decoration: none; transition: all 0.2s ease; }
.btn-modal-print { background-color: #e2e8f0; color: #334155; }
.btn-modal-print:hover { background-color: #cbd5e1; }
.btn-modal-calendar { background-color: #2563eb; color: white; box-shadow: 0 2px 4px rgba(37, 99, 235, 0.15); }
.btn-modal-calendar:hover { background-color: #1d4ed8; box-shadow: 0 4px 6px rgba(29, 78, 216, 0.25); }

/* Botón cerrar en pantalla de éxito */
.btn-modal-close-success {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  font-size: 1.3rem;
  font-weight: 600;
  border-radius: 6px;
  border: 2px solid #cbd5e1;
  cursor: pointer;
  background-color: #fff;
  color: #475569;
  transition: all 0.2s ease;
}

.btn-modal-close-success:hover {
  border-color: #94a3b8;
  color: #1e293b;
}

/* Reglas de Impresión */
@media print {
    #reservo-modal { position: static !important; background: white !important; }
    .modal-overlay { background: none !important; }
    .modal-content { box-shadow: none !important; border: none !important; padding: 0 !important; max-width: none !important; width: 100% !important; }
    .modal-close, .modal-success-actions, .btn-modal-close-success, .modal-loading, .modal-error { display: none !important; }
}
