/* 
  Estrategia Maestra - Luciana Bravo
  Premium Styling & Architecture
*/

:root {
  --ink: #0d0c0a;
  --ink-light: #2d2b27;
  --paper: #fcfaf7;
  --gold: #b08d57;
  --gold-bright: #d4a53c;
  --coral: var(--gold);
  --teal: var(--gold-bright);
  --line: rgba(20, 19, 17, 0.2);
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  --glass: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --gradient-dark: linear-gradient(180deg, #0d0c0a 0%, #1a1916 100%);
  --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: auto;
  font-size: 20px;
  /* Increases baseline size for all rem units */
}

body {
  font-family: 'Cormorant Garamond', serif;
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 500;
  overflow-x: hidden;
}

body.theme-dark-to-light {
  background: linear-gradient(180deg, #0d0c0a 0%, #1a1916 20%, #fcfaf7 40%, #fcfaf7 100%);
}

h1 {
  font-size: 4.5rem;
  /* ~81px */
  line-height: 1.1;
  margin-bottom: 0.5em;
  font-weight: 700;
}

h2 {
  font-size: 3.2rem;
  /* ~57px */
  line-height: 1.2;
  margin-bottom: 0.5em;
  font-weight: 700;
}

h3 {
  font-size: 2.5rem;
  /* ~45px */
  line-height: 1.3;
  margin-bottom: 0.5em;
  font-weight: 700;
}

h4 {
  font-size: 2rem;
  /* ~36px */
  line-height: 1.4;
  margin-bottom: 0.5em;
}

h5 {
  font-size: 1.5rem;
  /* ~27px */
  line-height: 1.4;
  margin-bottom: 0.5em;
}

h6 {
  font-size: 1.25rem;
  /* ~22px */
  line-height: 1.4;
  margin-bottom: 0.5em;
}

p {
  font-size: 1.35rem;
  /* ~24px */
  line-height: 1.6;
  margin-bottom: 1rem;
}

.font-serif {
  font-family: 'Cormorant Garamond', serif;
}

.text-gold {
  color: var(--gold);
}

.text-teal {
  color: var(--teal);
}

.text-ink {
  color: var(--ink);
}

.text-ink-light {
  color: var(--ink-light);
}

.text-paper {
  color: var(--paper);
}

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

.mt-2 {
  margin-top: 1rem;
}

.mt-3 {
  margin-top: 1.5rem;
}

.mt-4 {
  margin-top: 2rem;
}

.mt-5 {
  margin-top: 3rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

.mb-3 {
  margin-bottom: 1.5rem;
}

.mb-4 {
  margin-bottom: 2rem;
}

.w-100 {
  width: 100%;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
  position: relative;
  z-index: 2;
}

.light-bg {
  background: var(--paper) !important;
  background: var(--paper);
}

.dark-bg {
  background: var(--ink);
  color: var(--paper);
}

.bg-gradient-light {
  background: linear-gradient(180deg, #fcfaf7 0%, #f5f0e6 100%);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.align-center {
  align-items: center;
}

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

/* ── BUTTONS ── */
.btn-gold {
  display: inline-block;
  background: var(--gold);
  color: var(--ink); /* Changed for better contrast */
  padding: 16px 40px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  transition: var(--transition);
  border: 1px solid var(--gold);
  cursor: pointer;
}

.btn-gold:hover {
  background: var(--gold-bright);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(176, 141, 87, 0.3);
}

/* ── NAVIGATION ── */
.main-nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(13, 12, 10, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  color: #ffffff !important;
  font-family: 'Cormorant Garamond', serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--gold);
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-links a {
  color: #ffffff !important;
  color: var(--paper);
  text-decoration: none;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: var(--transition);
}

.nav-links a:hover {
  color: var(--gold);
}

.nav-login {
  border: 1px solid var(--gold);
  padding: 8px 20px;
  border-radius: 50px;
}

.nav-login:hover {
  background: var(--gold);
  color: var(--ink) !important;
}

.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  z-index: 1000;
  margin-top: 10px;
}

.dropdown-content::before {
  content: "";
  position: absolute;
  top: -15px;
  left: 0;
  width: 100%;
  height: 15px;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.mobile-menu-btn {
  color: #ffffff !important;
  display: none;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 24px;
  cursor: pointer;
}

@media (max-width: 900px) {
  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
  }
}

/* ── HERO ── */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  color: var(--paper);
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: 0 24px;
}

.hero-bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at center, rgba(176, 141, 87, 0.1) 0%, rgba(13, 12, 10, 0) 70%);
  z-index: 1;
}

.eyebrow {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--gold);
  margin-bottom: 20px;
}

.mantra-title {
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 600;
  line-height: 1;
  margin-bottom: 30px;
}

.mantra-title span {
  color: var(--gold);
  font-style: italic;
}

.history-box {
  max-width: 650px;
  margin: 0 auto;
  font-size: 18px;
  color: rgba(252, 250, 247, 0.8);
  line-height: 1.8;
}

/* ── POPUP DIAGNOSTIC ── */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(13, 12, 10, 0.9);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.5s;
}

.popup-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.popup-content {
  background: var(--paper);
  color: var(--ink);
  padding: 50px;
  border-radius: 20px;
  max-width: 600px;
  width: 90%;
  position: relative;
  text-align: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  transform: translateY(0);
  transition: transform 0.5s;
}

.popup-overlay.hidden .popup-content {
  transform: translateY(50px);
}

.close-popup {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--ink-light);
}

.diag-btn {
  display: block;
  width: 100%;
  padding: 15px;
  margin: 10px 0;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  transition: var(--transition);
}

.diag-btn:hover {
  border-color: var(--gold);
  background: #fdfaf5;
}

.diag-step.hidden {
  display: none;
}

/* Formulario del test: los datos van al CRM, sin salir de la página */
.diag-form {
  margin-top: 22px;
  text-align: left;
}
.diag-form-intro {
  font-size: 14px;
  color: var(--ink-light);
  margin-bottom: 12px;
  text-align: center;
}
.diag-form input[type="text"]:not([aria-hidden]),
.diag-form input[type="email"] {
  display: block;
  width: 100%;
  padding: 13px 15px;
  margin-bottom: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
}
.diag-form input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.16);
}
.diag-form button[type="submit"] {
  width: 100%;
  margin-top: 6px;
  border: none;
  min-height: 48px;
}
.diag-form button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: wait;
}
.diag-ok {
  display: none;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 10px;
  background: rgba(176, 141, 87, 0.12);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}
.diag-ok.visible {
  display: block;
}

/* ── POPUP DE SALIDA (exit intent) ──────────────────────────────────────
   Reutiliza .popup-overlay, que ya trae el desplazamiento y el encaje en
   pantallas pequeñas. Solo cambia la tarjeta: aquí manda la imagen. */
.exit-overlay {
  z-index: 2100;
}
.exit-content {
  position: relative;
  margin: auto;
  width: 100%;
  max-width: 460px;
  background: var(--paper);
  border-radius: 18px;
  overflow: hidden;
  padding: 26px 24px 28px;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
}
/* Los 40px laterales dejan libre la esquina de la X sin descentrar el texto */
.exit-title {
  margin: 0 0 16px;
  padding: 0 40px;
  font-size: clamp(1.15rem, 4.4vw, 1.5rem);
  line-height: 1.3;
  color: var(--ink);
}
.exit-content img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}
.exit-cta {
  display: block;
  width: 100%;
  margin-top: 20px;
}
.exit-content .close-popup {
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  font-size: 26px;
  line-height: 1;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}
@media (max-width: 600px) {
  .exit-content { max-width: 100%; }
  .exit-content .close-popup { width: 44px; height: 44px; }
}

/* ── ABOUT SECTION ── */
.image-placeholder {
  background: var(--ink-light);
  border-radius: 20px;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ── METHOD ── */
.phase-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .phase-nav {
    grid-template-columns: 1fr;
  }
}

.phase-card {
  background: transparent;
  perspective: 1000px;
  min-height: 280px;
  cursor: pointer;
}

.phase-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
}

.phase-card:hover .phase-card-inner {
  transform: rotateY(180deg);
}

.phase-card-front, .phase-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  background: white;
  padding: 30px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--gold);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.phase-card.coral .phase-card-front,
.phase-card.coral .phase-card-back {
  border-color: var(--coral);
}

.phase-card.teal .phase-card-front,
.phase-card.teal .phase-card-back {
  border-color: var(--teal);
}

.phase-card-front h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 32px;
  margin-bottom: 10px;
}

.phase-card-back {
  transform: rotateY(180deg);
  text-align: left;
  align-items: flex-start;
  justify-content: flex-start;
}

.phase-card-back h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  margin-bottom: 10px;
  color: var(--ink);
}

.phase-card-back p {
  font-size: 15px;
  color: var(--ink-light);
}

.content h4 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  margin-bottom: 12px;
}

/* ── PRODUCTS ── */
.products {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
  max-width: 850px;
  margin: 0 auto;
}

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

.product-item {
  background: white;
  padding: 40px 30px;
  border-radius: 20px;
  border: 1px solid var(--line);
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.product-item.featured {
  border: 2px solid var(--gold);
  transform: scale(1.05);
}

.product-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--gold);
  margin: 15px 0;
}

.product-features {
  list-style: none;
  text-align: left;
  margin-bottom: 30px;
}

.product-features li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 10px;
  font-size: 15px;
}

.product-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--gold);
}

.product-cta {
  display: block;
  background: var(--ink);
  color: white;
  padding: 15px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: var(--transition);
}

.product-cta:hover {
  background: var(--ink-light);
}

/* ── CAROUSEL ── */
.carousel-container {
  overflow: hidden;
  padding: 40px 0;
  position: relative;
}

.carousel-container::before,
.carousel-container::after {
  content: "";
  position: absolute;
  top: 0;
  width: 100px;
  height: 100%;
  z-index: 2;
}

.carousel-container::before {
  left: 0;
  background: linear-gradient(to right, var(--ink), transparent);
}

.carousel-container::after {
  right: 0;
  background: linear-gradient(to left, var(--ink), transparent);
}

.carousel-track {
  display: flex;
  gap: 30px;
  width: max-content;
  transition: transform 0.5s ease-in-out;
}

.testimonial-card {
  width: 400px;
  background: var(--ink-light);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 30px;
  border-radius: 16px;
  flex-shrink: 0;
}

.test-img-placeholder {
  width: 100%;
  height: 250px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 12px;
  text-transform: uppercase;
}

.test-text {
  font-size: 16px;
  font-style: italic;
  margin-bottom: 20px;
  color: rgba(255, 255, 255, 0.8);
}

.yt-short-link {
  color: var(--gold);
  text-decoration: none;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── FORMS ── */
.form-container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 50px 60px;
  border-radius: 20px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
  .form-container {
    padding: 30px 20px;
    margin: 0 15px;
  }
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--ink-light);
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 15px;
  border: 2px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: 15px;
  background: var(--paper);
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--gold);
  background: white;
  box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.3);
}

.form-disclaimer {
  font-size: 12px;
  color: #888;
  text-align: center;
}

/* ── CHATBOT ── */
.chatbot-wrapper {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1500;
}

.chatbot-toggle {
  width: 60px;
  height: 60px;
  background: var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  transition: var(--transition);
}

.chatbot-toggle:hover {
  transform: scale(1.1);
  background: var(--gold-bright);
}

.chatbot-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 350px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transform-origin: bottom right;
  transition: transform 0.3s, opacity 0.3s;
}

.chatbot-window.hidden {
  transform: scale(0.5);
  opacity: 0;
  pointer-events: none;
}

.chatbot-header {
  background: var(--ink);
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chatbot-header button {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
}

.chatbot-body {
  padding: 20px;
  height: 350px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: var(--paper);
}

.chat-msg {
  padding: 10px 15px;
  border-radius: 12px;
  font-size: 14px;
  max-width: 85%;
}

.chat-msg.bot {
  background: white;
  border: 1px solid var(--line);
  align-self: flex-start;
}

.chat-msg.user {
  background: var(--gold);
  color: white;
  align-self: flex-end;
}

.chat-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-options button {
  background: white;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.chat-options button:hover {
  background: var(--gold);
  color: white;
}

/* ── FOOTER ── */
.main-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.7);
  padding: 80px 0 30px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 60px;
}

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

.footer-purpose {
  font-size: 16px;
  line-height: 1.8;
}

.footer-links {
  list-style: none;
}

.footer-links a {
  color: #e0e0e0 !important;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
  line-height: 2;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-socials {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.footer-socials a {
  color: var(--gold) !important;
  background: rgba(255,255,255,0.1) !important;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
}

.footer-socials a:hover {
  color: var(--gold);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p, 
.footer-bottom .footer-legal-inline, 
.footer-bottom a {
  color: #a0a0a0 !important;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  line-height: 1;
}

@media (max-width: 600px) {
  .footer-bottom {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
}

/* ── ANIMATIONS ── */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-up {
  animation: fadeInUp 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── DASHBOARD LAYOUTS (Admin/App) ── */
.dashboard-layout {
  display: flex;
  min-height: 100vh;
  background: var(--paper);
}

.sidebar {
  width: 280px;
  background: var(--ink);
  color: white;
  padding: 30px 20px;
  flex-shrink: 0;
}

.sidebar .logo {
  font-size: 20px;
  margin-bottom: 40px;
  text-align: center;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-menu a {
  display: block;
  padding: 12px 15px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  border-radius: 8px;
  margin-bottom: 5px;
  transition: var(--transition);
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--gold);
}

.dashboard-content {
  flex: 1;
  padding: 40px;
  overflow-y: auto;
}

.stat-card {
  background: white;
  padding: 25px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}

.table-wrapper {
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 20px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

th {
  background: #fdfaf5;
  color: var(--ink-light);
  font-weight: 500;
}

.badge {
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.badge-high {
  background: #e6f7ff;
  color: #0070a3;
}

.badge-med {
  background: #fff5e6;
  color: #a67c00;
}

.badge-low {
  background: #ffe6e6;
  color: #c00000;
}

/* ── GAMIFICATION BREATHE UI ── */
.breathe-container {
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.breathe-circle {
  width: 150px;
  height: 150px;
  background: rgba(176, 141, 87, 0.2);
  border: 2px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 4s ease-in-out;
}

.breathe-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  color: var(--ink);
}

.breathe-circle.inhale {
  transform: scale(2);
}

.breathe-circle.exhale {
  transform: scale(1);
}

/* Cuenta atrás de la fase dentro del círculo */
.breathe-text small {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  opacity: 0.7;
  margin-top: 2px;
}

/* ── Selector de patrón de respiración ── */
.breathe-choose {
  margin: 18px 0 10px;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-bright);
}
.breathe-patterns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.breathe-pattern {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-height: 62px;
  padding: 10px 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--paper);
  font-family: inherit;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.2s;
}
.breathe-pattern strong {
  font-size: 14px;
  line-height: 1.15;
}
.breathe-pattern span {
  font-size: 11px;
  line-height: 1.25;
  opacity: 0.75;
}
.breathe-pattern:hover {
  border-color: var(--gold);
  background: rgba(176, 141, 87, 0.14);
}
.breathe-pattern.is-active {
  border-color: var(--gold-bright);
  background: rgba(212, 165, 60, 0.18);
  color: #fff;
}
.breathe-hint {
  margin: 12px 0 0;
  font-size: 13px;
  font-style: italic;
  line-height: 1.5;
  opacity: 0.75;
  color: var(--paper);
}

/* ── PANEL RESUMEN DE PROGRESO (3 tarjetas) ── */
.progress-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 34px;
}
.progress-card {
  background: var(--ink-light);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px 18px;
  color: var(--paper);
  text-align: center;
}
.progress-emoji {
  font-size: 26px;
  line-height: 1;
  display: block;
  margin-bottom: 8px;
}
.progress-value {
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  font-weight: 700;
  line-height: 1.1;
  color: var(--gold-bright);
}
.progress-value small {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  opacity: 0.7;
}
.progress-label {
  margin: 6px 0 0;
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  opacity: 0.75;
}
.progress-note {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.85;
}
.progress-medallas {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.progress-medalla {
  font-size: 20px;
  line-height: 1;
  filter: grayscale(1);
  opacity: 0.35;
  transition: filter 0.3s, opacity 0.3s, transform 0.3s;
}
.progress-medalla.is-on {
  filter: none;
  opacity: 1;
  transform: scale(1.12);
}

/* ── Adaptación a pantallas pequeñas ── */
@media (max-width: 900px) {
  .progress-grid { grid-template-columns: 1fr; gap: 12px; }
  .progress-card { padding: 16px; }
}
@media (max-width: 600px) {
  .breathe-patterns { grid-template-columns: 1fr; }
  .breathe-pattern {
    flex-direction: row;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    flex-wrap: wrap;
  }
  .breathe-pattern span::before { content: '· '; }
  .breathe-container { height: 300px; }
  .breathe-circle { width: 120px; height: 120px; }
}

/* ── FORM CAROUSEL WIZARD ── */
.form-carousel-wrapper {
  overflow: hidden;
  position: relative;
  width: 100%;
}

.carousel-form-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  width: 100%;
}

.form-step-card {
  width: 100%;
  flex-shrink: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.form-step-card.step-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.step-next-btn {
  width: 100%;
  margin-top: 10px;
}

/* ── FOOTER & MODALS ── */
.footer-legal-inline {
  color: rgba(255, 255, 255, 0.6);
}
.footer-legal-inline a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: var(--transition);
  padding: 0 5px;
}
.footer-legal-inline a:hover {
  color: var(--gold);
}

.legal-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}
.legal-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.legal-modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: var(--paper);
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  border-radius: 16px;
  z-index: 2001;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
.legal-modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

.modal-close {
  position: absolute;
  top: 15px; right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  color: var(--ink-light);
  cursor: pointer;
  transition: color 0.3s;
}
.modal-close:hover {
  color: var(--coral);
}

.modal-content-scroll {
  max-height: calc(80vh - 120px);
  overflow-y: auto;
  padding-right: 15px;
  font-size: 15px;
  color: var(--ink-light);
}
.modal-content-scroll p {
  margin-bottom: 15px;
}
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--gold);
  color: var(--ink);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: background 0.3s, transform 0.2s;
}

.carousel-arrow:hover {
  background: var(--clay);
  color: white;
  transform: translateY(-50%) scale(1.1);
}

.carousel-arrow.left {
  left: 20px;
}

.carousel-arrow.right {
  right: 20px;
}

/* ==========================================================================
   UX ENHANCEMENTS - Animaciones, Espaciado y Retroiluminación
   ========================================================================== */

/* 1. Scroll Dinámico y Calmo */
html {
    scroll-behavior: auto;
}

/* 2. Transiciones Suaves Globales */
a, button, input, select, textarea, .app-card, .service-card, .testimonial-card, .form-step-card, .pill {
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

/* 3. Retroiluminación de Botones (Glow / Backlight) */
.btn:hover {
    transform: translateY(-3px) scale(1.02) !important;
}

.btn:active {
    transform: translateY(1px) scale(0.98) !important;
}

.btn-clay:hover {
    background: var(--clay-dark) !important;
    box-shadow: 0 0 25px rgba(110, 49, 25, 0.6), 0 10px 40px rgba(110, 49, 25, 0.3) !important;
}

.btn-ember:hover {
    background: var(--ember) !important;
    box-shadow: 0 0 25px rgba(175, 43, 30, 0.6), 0 10px 40px rgba(175, 43, 30, 0.3) !important;
}

.btn-ghost:hover {
    background: rgba(33, 29, 26, 0.08) !important;
    box-shadow: 0 5px 20px rgba(33, 29, 26, 0.15) !important;
}

/* Botones genéricos con inline styles dorados o rojos en funnels */
button[style*="background:var(--gold)"]:hover, 
a[style*="background:var(--gold)"]:hover,
.btn-gold:hover {
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.7), 0 10px 50px rgba(212, 175, 55, 0.4) !important;
    transform: translateY(-3px) scale(1.02) !important;
}

button[style*="background:#e43f5a"]:hover, 
a[style*="background:#e43f5a"]:hover {
    box-shadow: 0 0 30px rgba(228, 63, 90, 0.7), 0 10px 50px rgba(228, 63, 90, 0.4) !important;
    transform: translateY(-3px) scale(1.02) !important;
}

/* 4. Interacción con Tarjetas (Hover, Tilt sutil) */
.service-card:hover, .testimonial-card:hover, .app-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12) !important;
    border-color: rgba(212, 175, 55, 0.4) !important;
}

/* 5. Márgenes y Espaciado (Sensación de calma) */
.section {
    padding: 100px 0 !important;
}

.container {
    padding: 0 30px !important;
}

.service-card {
    padding: 40px !important;
}

/* 6. Entradas (Fade-in) más suaves y amplias */
.fade-in {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1), transform 1.2s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* 7. Inputs intermitentes al hacer focus */
input:focus, textarea:focus, select:focus {
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3) !important;
    border-color: var(--gold) !important;
    outline: none !important;
    transform: scale(1.01);
}

/* Mejorar legibilidad de las preguntas en el cuestionario de Lista de Espera */
#waitlist-form .form-group label {
    font-size: 1.25rem !important; /* Tamaño mayor */
    font-weight: 600 !important;   /* Peso 600 */
    color: var(--ink);
    margin-bottom: 12px;
    display: block;
    line-height: 1.4;
}

/* Clase global para ocultar elementos */
.hidden {
    display: none !important;
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px; /* Inferior izquierda como solicitado */
    width: 50px;
    height: 50px;
    background: var(--gold);
    color: var(--ink);
    border: none;
    border-radius: 50%;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    cursor: pointer;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    transform: translateY(-5px) scale(1.1) !important;
    box-shadow: 0 15px 30px rgba(212, 175, 55, 0.5) !important;
}

/* Botones del Hero Section */
.btn-hero-gold {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 16px 36px;
    border-radius: 999px;
    font-size: 1.15rem !important; /* Tamaño de letra mayor */
    font-weight: 700;
    width: 240px;
    text-align: center;
    text-decoration: none !important; /* Sin subrayado */
    background: var(--gold) !important; /* Fondo dorado */
    color: #000000 !important; /* Letras negras siempre */
    border: none;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1) !important;
    position: relative;
    overflow: hidden;
}

.btn-hero-gold:hover {
    background: #ffffff !important; /* Cambio de color a blanco */
    color: #000000 !important; /* Letras siguen negras */
    transform: translateY(-3px) scale(1.03);
    animation: heroGlowPulse 2s infinite alternate ease-in-out;
}

@keyframes heroGlowPulse {
    0% {
        box-shadow: 0 0 15px rgba(255, 255, 255, 0.4), 0 5px 20px rgba(212, 175, 55, 0.4);
    }
    100% {
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 10px 40px rgba(212, 175, 55, 0.8);
    }
}

/* ==========================================================================
   PROGRAMS CARDS REDESIGN
   ========================================================================== */
#programas .product-item {
    background: #0a0908 !important; /* Fondo negro */
    border: 2px solid var(--gold) !important; /* Contorno dorado redondeado */
    border-radius: 20px !important; 
    padding: 40px !important;
}

#programas .product-item h3 {
    color: var(--gold) !important; /* Dorado sólido */
    font-size: 1.8rem;
    margin-bottom: 10px;
}

#programas .product-item .product-price {
    color: var(--gold) !important;
    font-weight: 700;
    font-size: 1.4rem;
    margin: 15px 0;
}

#programas .product-item p, 
#programas .product-item li {
    color: #ffffff !important; /* Textos blancos */
    font-size: 1.05rem;
}

/* Botones CTAs de Programas */
.btn-prog-gold, .btn-prog-white {
    display: block;
    margin-top: 25px;
    padding: 16px 20px;
    border-radius: 999px;
    font-size: 1.15rem !important; /* Más fáciles de leer */
    font-weight: 700;
    text-align: center;
    text-decoration: none !important; /* Sin subrayado */
    border: none;
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1) !important;
    position: relative;
    overflow: hidden;
}

.btn-prog-gold {
    background: var(--gold) !important;
    color: #000000 !important; /* Letras negras */
}

.btn-prog-white {
    background: #ffffff !important;
    color: #000000 !important; /* Letras negras */
}

.btn-prog-gold:hover, .btn-prog-white:hover {
    background: #ffffff !important; /* Blanco puro en hover */
    color: #000000 !important;
    transform: translateY(-4px) scale(1.03);
    /* Se reutiliza la animación heroGlowPulse creada anteriormente */
    animation: heroGlowPulse 2s infinite alternate ease-in-out;
}

/* Efecto Hover para las tarjetas de Programas (Productos) */
#programas .product-item {
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

#programas .product-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 50px rgba(212, 175, 55, 0.15), 0 0 20px rgba(212, 175, 55, 0.2) !important;
    border-color: var(--gold) !important;
}

/* ==========================================================================
   FAQ ACCORDION
   ========================================================================== */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 10px;
    font-size: 1.4rem;
    color: var(--ink);
    cursor: pointer;
    text-align: left;
    transition: all 0.3s ease;
}

.faq-question:hover {
    color: var(--gold);
}

.faq-icon {
    font-size: 1.8rem;
    color: var(--gold);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    line-height: 1;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    padding: 0 10px;
}

.faq-answer p {
    color: var(--ink-light);
    font-size: 1.15rem;
    padding-bottom: 20px;
    margin: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-item.active .faq-question {
    color: var(--gold);
}

/* ==========================================================================
   GOLD BG OVERRIDES
   ========================================================================== */
.gold-bg {
    background: var(--gold) !important;
}

#faq.gold-bg .faq-question {
    color: var(--ink);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
#faq.gold-bg .faq-question:hover {
    color: #ffffff;
}
#faq.gold-bg .faq-icon {
    color: var(--ink);
}
#faq.gold-bg .faq-item.active .faq-icon {
    color: #ffffff;
}
#faq.gold-bg .faq-item.active .faq-question {
    color: #ffffff;
}
#faq.gold-bg .faq-answer p {
    color: var(--ink);
}
#faq.gold-bg h2 {
    color: var(--ink) !important;
}

footer.footer, .footer { background: var(--ink) !important; }

.footer-socials a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
}
.footer-socials a svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   COOKIE CONSENT BANNER
   ========================================================================== */
.cookie-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: var(--ink);
    color: var(--paper);
    padding: 20px;
    z-index: 9999;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
    transition: bottom 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-banner.show {
    bottom: 0;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    text-align: center;
}

.cookie-content p {
    margin: 0;
    font-size: 0.95rem;
    color: #e0e0e0;
}

.cookie-buttons {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cookie-policy-link {
    color: var(--gold);
    text-decoration: underline;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.cookie-policy-link:hover {
    color: var(--gold-bright);
}

@media (min-width: 768px) {
    .cookie-content {
        flex-direction: row;
        text-align: left;
    }
}

/* ==========================================================================
   MINIMALIST FOOTER
   ========================================================================== */
.footer-minimal {
    background: var(--ink);
    padding: 60px 0 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.footer-cta-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 20px;
    margin-bottom: 50px;
}

.footer-cta-line p {
    font-size: 1.2rem;
    color: #ffffff;
    margin: 0;
    max-width: 600px;
    line-height: 1.5;
}

.footer-cta-btn {
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 2px;
}

.footer-legal-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    font-size: 0.8rem;
}

.footer-brand {
    font-weight: 500;
    letter-spacing: 1px;
}

.footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.footer-legal-links a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s;
}
.footer-legal-links a:hover {
    color: var(--gold);
}

.footer-legal-links .sep {
    color: rgba(255,255,255,0.3);
}

.footer-social-icons {
    display: flex;
    gap: 15px;
}

.footer-social-icons a {
    color: var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.footer-social-icons a:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.1);
}

.footer-social-icons svg {
    width: 20px;
    height: 20px;
}

@media (min-width: 992px) {
    .footer-cta-line {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
    .footer-cta-line p {
        text-align: left;
    }
    .footer-legal-line {
        flex-direction: row;
    }
}

/* ==========================================================================
   LEGAL MODALS
   ========================================================================== */
.legal-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(13, 12, 10, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    padding: 20px;
}

.legal-modal.show {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--paper);
    color: var(--ink);
    width: 100%;
    max-width: 800px;
    max-height: 80vh;
    padding: 40px;
    border-radius: 10px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    display: flex;
    flex-direction: column;
}

.legal-modal.show .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--ink-light);
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--coral);
}

.modal-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--ink);
}

.modal-body {
    overflow-y: auto;
    padding-right: 15px;
}

.modal-body p {
    margin-bottom: 15px;
    font-size: 1rem;
    line-height: 1.6;
}

/* ==========================================================================
   MEJORAS 2026 — header, secciones, chatbot, back-to-top, accesibilidad
   (Bloque añadido al final para sobreescribir sin romper lo existente)
   ========================================================================== */

/* ── Protección de contenido: sin selección fuera de campos ── */
body {
  -webkit-user-select: none;
  user-select: none;
}
input, textarea, select, [contenteditable] {
  -webkit-user-select: text;
  user-select: text;
}
img {
  -webkit-user-drag: none;
  user-drag: none;
}

/* ── Header: estado al hacer scroll + subrayado dorado ── */
.main-nav {
  background: rgba(13, 12, 10, 0.55);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}
.main-nav.scrolled {
  background: rgba(13, 12, 10, 0.92);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  border-bottom: 1px solid rgba(176, 141, 87, 0.25);
}
.nav-links a {
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}
.nav-links a:hover::after,
.nav-links a.active::after {
  transform: scaleX(1);
}
.nav-links a.active {
  color: var(--gold-bright);
}

/* ── Menú móvil por clases (sin estilos inline) ── */
@media (max-width: 900px) {
  .nav-links {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    height: 100dvh;
    width: min(320px, 85vw);
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    padding: 40px 30px;
    background: rgba(13, 12, 10, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(176, 141, 87, 0.25);
    transform: translateX(100%);
    transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
    z-index: 1001;
  }
  .nav-links.open {
    transform: translateX(0);
  }
  .nav-links li {
    list-style: none;
  }
  .nav-links a {
    font-size: 1.1rem;
    display: block;
    padding: 10px 0;
  }
  .mobile-menu-btn {
    position: relative;
    z-index: 1002;
  }
}

/* ── Secciones: ancho completo y altura de pantalla, contenido centrado ── */
.section {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 110px 0 !important;
}
.section > .container {
  width: 100%;
}
@media (max-width: 768px) {
  .section {
    min-height: auto;
    padding: 80px 0 !important;
  }
}

/* ── Formulario multipasos: solo el paso activo ocupa espacio ── */
#form-track {
  position: relative;
}
#form-track .form-step-card {
  display: none;
}
#form-track .form-step-card.step-active {
  display: block;
  animation: wl-step-in 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
@keyframes wl-step-in {
  from { opacity: 0; transform: translateX(24px); }
  to   { opacity: 1; transform: translateX(0); }
}
.wl-back-btn:hover {
  color: var(--gold) !important;
}

/* ── Chatbot ── */
.chatbot-toggle {
  position: relative;
}
.chatbot-toggle::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(176, 141, 87, 0.5);
  animation: bot-pulse 2.4s ease-out infinite;
}
@keyframes bot-pulse {
  0%   { transform: scale(1); opacity: 0.8; }
  70%  { transform: scale(1.35); opacity: 0; }
  100% { transform: scale(1.35); opacity: 0; }
}
.chatbot-toggle.open::after {
  animation: none;
  opacity: 0;
}
.chatbot-window {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(176, 141, 87, 0.3);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.35);
}
.chatbot-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.25;
}
.chatbot-header-info strong {
  font-size: 0.95rem;
  display: block;
}
.chatbot-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.chatbot-status {
  font-size: 0.7rem;
  opacity: 0.85;
  display: flex;
  align-items: center;
  gap: 5px;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4caf78;
  display: inline-block;
  animation: status-blink 2s ease-in-out infinite;
}
@keyframes status-blink {
  50% { opacity: 0.4; }
}
.chatbot-input-row {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid rgba(20, 19, 17, 0.1);
  background: #fff;
}
.chatbot-input-row input {
  flex: 1;
  border: 1px solid rgba(20, 19, 17, 0.15);
  border-radius: 20px;
  padding: 9px 14px;
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  outline: none;
}
.chatbot-input-row input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(176, 141, 87, 0.15);
}
.chatbot-input-row button {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}
.chatbot-input-row button:hover {
  background: var(--gold-bright);
  transform: scale(1.06);
}
.chat-msg {
  animation: msg-in 0.3s ease;
}
@keyframes msg-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.chat-msg.bot a {
  color: var(--gold);
  font-weight: 600;
}
.chat-typing span {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--gold);
  animation: typing-dot 1.2s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30%           { transform: translateY(-5px); opacity: 1; }
}
.chat-options {
  margin-top: 6px;
  animation: msg-in 0.3s ease;
}
.chat-options button {
  text-align: left;
}

/* ── Back to top con anillo de progreso ── */
#back-to-top {
  background: var(--paper);
  color: var(--gold);
  width: 52px;
  height: 52px;
  border: 1px solid rgba(176, 141, 87, 0.35);
}
#back-to-top .btt-progress {
  position: absolute;
  inset: 0;
}
#back-to-top .btt-progress .bar {
  transition: stroke-dashoffset 0.15s linear;
}
#back-to-top .btt-arrow {
  position: relative;
  z-index: 1;
}
#back-to-top:hover {
  background: var(--gold);
  color: var(--ink);
}

/* ── Footer: hovers dorados ── */
.footer-legal-links a:hover {
  color: var(--gold-bright) !important;
}
.footer-social-icons a {
  color: rgba(255, 255, 255, 0.75);
  transition: var(--transition);
  display: inline-flex;
}
.footer-social-icons a:hover {
  color: var(--gold-bright);
  transform: translateY(-3px);
}

/* ── Modales legales: pulido ── */
.legal-modal .modal-content {
  border: 1px solid rgba(176, 141, 87, 0.3);
}
.legal-modal .modal-body p {
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ── Accesibilidad: foco visible y movimiento reducido ── */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .fade-in, .fade-in-up {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ==========================================================================
   MEJORAS 2026 · Fase 2 — marquesina, hero slideshow, máscaras, footer v2
   ========================================================================== */

/* ── Marquesina superior de frases ── */
:root {
  --marquee-h: 34px;
}
.top-marquee {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--marquee-h);
  background: linear-gradient(90deg, #0d0c0a, #1a1610 50%, #0d0c0a);
  border-bottom: 1px solid rgba(176, 141, 87, 0.35);
  overflow: hidden;
  z-index: 1002;
  display: flex;
  align-items: center;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee-scroll 38s linear infinite;
}
.top-marquee:hover .marquee-track {
  animation-play-state: paused;
}
.marquee-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding-right: 28px;
}
.marquee-group span {
  font-family: 'DM Sans', sans-serif;
  font-size: 0.62rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold-bright);
  white-space: nowrap;
}
.marquee-group .mq-sep {
  margin: 0 22px;
  font-size: 0.7rem;
  letter-spacing: 0;
}
@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* La navegación baja para dejar sitio a la marquesina */
.main-nav {
  top: var(--marquee-h);
}
@media (max-width: 900px) {
  .nav-links {
    top: 0;
    padding-top: calc(var(--marquee-h) + 40px);
  }
}

/* ── Hero: slideshow de frases con fundido ── */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.hero-eyebrow .mask-ornament {
  color: var(--gold);
  opacity: 0.9;
}
.hero-slideshow {
  position: relative;
  min-height: 5.2em;
  display: grid;
}
.hero-slideshow .hero-slide {
  grid-area: 1 / 1;
  margin: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.9s ease, transform 0.9s ease;
  pointer-events: none;
}
.hero-slideshow .hero-slide.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
@media (prefers-reduced-motion: reduce) {
  .hero-slideshow .hero-slide { transition: none; }
}

/* ── Divisor con máscara teatral ── */
.mask-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 6px auto 14px;
  max-width: 340px;
}
.mask-divider .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(176, 141, 87, 0.6));
}
.mask-divider .line:last-child {
  background: linear-gradient(90deg, rgba(176, 141, 87, 0.6), transparent);
}

/* ── Footer v2 — Fira Sans, grid ordenado, iconos visibles ── */
.footer-v2 {
  font-family: 'Fira Sans', 'DM Sans', sans-serif;
  background: linear-gradient(180deg, #12100d 0%, #0d0c0a 100%);
  padding: 70px 0 30px;
}
.footer-v2 .footer-cta-block {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 50px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.footer-v2 .footer-cta-text {
  font-size: 1.15rem;
  font-weight: 300;
  color: #f4f1ea;
  line-height: 1.7;
  margin: 0;
}
.footer-v2 .footer-cta-btn {
  padding: 10px 26px;
  font-family: 'Fira Sans', sans-serif;
  font-weight: 600;
  letter-spacing: 1px;
  font-size: 0.9rem;
}
.footer-grid-v2 {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  align-items: start;
  border-top: 1px solid rgba(176, 141, 87, 0.25);
  padding-top: 40px;
}
.footer-col-brand .footer-logo {
  font-family: 'Fira Sans', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 3px;
  color: var(--gold);
}
.footer-col-brand .footer-tagline {
  margin-top: 12px;
  font-size: 0.86rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.8;
}
.footer-col-legal {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-col-legal a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 400;
  width: fit-content;
  border-bottom: 1px solid transparent;
  transition: color 0.3s, border-color 0.3s;
}
.footer-col-legal a:hover {
  color: var(--gold-bright);
  border-bottom-color: var(--gold-bright);
}
.footer-social-label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 14px;
}
.footer-v2 .footer-social-icons {
  display: flex;
  gap: 12px;
}
.footer-v2 .footer-social-icons a {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(176, 141, 87, 0.5);
  background: rgba(176, 141, 87, 0.08);
  color: #f4f1ea;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.footer-v2 .footer-social-icons a:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--ink);
  transform: translateY(-4px);
  box-shadow: 0 8px 18px rgba(176, 141, 87, 0.35);
}
.footer-bottom-line {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.78rem;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.65);
}
.footer-bottom-line a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: underline;
  transition: color 0.3s;
}
.footer-bottom-line a:hover {
  color: var(--gold-bright);
}
@media (max-width: 768px) {
  .footer-grid-v2 {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  .footer-col-legal { align-items: center; }
  .footer-col-legal a { width: auto; }
  .footer-v2 .footer-social-icons { justify-content: center; }
  .footer-bottom-line { justify-content: center; text-align: center; }
}

/* ==========================================================================
   MEJORAS 2026 · Fase 3 — fix modales, dropdown libros, responsive del panel
   ========================================================================== */

/* ── FIX: los modales legales no se veían ──
   Una regla antigua dejaba .legal-modal con visibility:hidden y la clase
   .show nunca la revertía. Se corrige aquí de forma explícita. */
.legal-modal {
  visibility: hidden;
}
.legal-modal.show {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}
.legal-modal .modal-content {
  max-height: 82vh;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* ── Dropdown LIBROS: letras claras sobre fondo dorado ── */
.dropdown-books {
  min-width: 300px;
  padding: 8px;
  background: linear-gradient(160deg, #a37b3a, #8a6530);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  text-align: left;
}
.dropdown-books a {
  display: block;
  padding: 12px 16px;
  border-radius: 7px;
  text-decoration: none;
  color: #fdfaf4 !important;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.4px;
  line-height: 1.45;
  transition: background 0.25s ease, padding-left 0.25s ease;
}
.dropdown-books a + a {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0 0 7px 7px;
}
.dropdown-books a:hover {
  background: rgba(13, 12, 10, 0.28);
  padding-left: 22px;
}
.dropdown-books a::after {
  display: none; /* sin subrayado del nav */
}

/* ── Club BRAVO responsive: menú lateral desplegable en móvil ── */
@media (max-width: 900px) {
  .dashboard-layout {
    flex-direction: column;
  }
  .app-menu-toggle {
    display: flex !important;
  }
  /* La barra lateral se convierte en panel deslizante (drawer) */
  .dashboard-layout .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100dvh;
    width: min(300px, 86vw);
    z-index: 1150;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 74px 18px 30px; /* deja sitio al botón de menú */
    border-right: 1px solid rgba(176, 141, 87, 0.35);
    box-shadow: 12px 0 40px rgba(0, 0, 0, 0.5);
    transform: translateX(-102%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  }
  .dashboard-layout .sidebar.open {
    transform: translateX(0);
  }
  /* Objetivos táctiles cómodos (accesibilidad) */
  .dashboard-layout .sidebar-menu li a {
    padding: 13px 15px;
    font-size: 0.88rem;
    min-height: 44px;
  }
  .dashboard-layout .dashboard-content {
    padding: 76px 18px 60px;
    width: 100%;
  }
  .folder-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 18px;
  }
}

/* Teléfonos en horizontal (pantalla baja): compactar verticalmente */
@media (max-height: 500px) and (orientation: landscape) {
  .dashboard-layout .dashboard-content { padding-top: 66px; }
  .zen-intro { font-size: 1rem; margin-bottom: 22px; }
  .folder-3d { width: 84px; height: 66px; }
  .breathe-container { transform: scale(0.8); }
}
@media (prefers-reduced-motion: reduce) {
  .dashboard-layout .sidebar { transition: none; }
  .app-overlay { transition: none; }
}

/* Móvil vertical estrecho: tarjetas de recursos en una columna cómoda */
@media (max-width: 480px) {
  .folder-grid { grid-template-columns: 1fr 1fr; }
  .folder-card { padding: 20px 12px 18px; }
  .folder-card p { display: none; } /* en pantallas mínimas: título + CTA bastan */
}

/* ==========================================================================
   MEJORAS 2026 · Fase 4 — modales legales: centrado real y adaptativos
   Una regla antigua dejaba transform/width sobre el contenedor de fondo
   y lo sacaba del centro. Se neutraliza por completo aquí.
   ========================================================================== */
.legal-modal {
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  max-width: none !important;
  max-height: none !important;
  transform: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: rgba(13, 12, 10, 0.9) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px !important;
}
.legal-modal .modal-content {
  width: min(760px, 100%);
  max-height: min(85dvh, 900px);
  padding: clamp(22px, 4vw, 40px);
  border-radius: 14px;
  margin: 0 auto;
}
.legal-modal.show .modal-content {
  animation: modal-pop 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}
@keyframes modal-pop {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
/* Título fijo y cuerpo con scroll propio */
.legal-modal .modal-content h2 {
  flex-shrink: 0;
  font-size: clamp(1.4rem, 3.5vw, 2rem);
  padding-right: 40px; /* que no choque con la X */
}
.legal-modal .modal-body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 12px;
}
/* Móvil: ocupar casi toda la pantalla, cómodo de leer y cerrar */
@media (max-width: 600px) {
  .legal-modal { padding: 12px !important; }
  .legal-modal .modal-content {
    max-height: 92dvh;
    border-radius: 12px;
  }
  .legal-modal .modal-body p { font-size: 0.92rem; }
  .modal-close {
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px; /* objetivo táctil accesible */
    display: flex;
    align-items: center;
    justify-content: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  .legal-modal.show .modal-content { animation: none; }
}

/* ==========================================================================
   MEJORAS 2026 · Fase 5 — MÓVIL: espacio vertical, popups y legibilidad
   Corrige: títulos que no bajaban de tamaño en el teléfono, popups que
   quedaban fuera de pantalla sin poder desplazarse, el submenú "Libros"
   inalcanzable en pantallas táctiles y las alturas 100vh bajo la barra
   del navegador. No altera el diseño de escritorio.
   ========================================================================== */

/* ── 1. Tipografía fluida ──────────────────────────────────────────────
   h1 y h2 estaban fijos en 4.5rem y 3.2rem sin ningún ajuste para móvil:
   en un teléfono se veían a 72px y 51px, desbordando la pantalla. Con
   clamp() el tamaño máximo es idéntico al actual en escritorio. */
h1 { font-size: clamp(2.2rem, 7vw, 4.5rem); }
h2 { font-size: clamp(1.75rem, 5vw, 3.2rem); }
h3 { font-size: clamp(1.4rem, 4vw, 2.5rem); }
h4 { font-size: clamp(1.25rem, 3.2vw, 2rem); }

/* ── 2. Popup de diagnóstico: que quepa y se pueda desplazar ───────────
   El contenedor era fixed con height:100% y align-items:center pero sin
   overflow: si el contenido superaba la altura de la pantalla se recortaba
   por arriba y por abajo, sin forma de llegar a los botones.
   La combinación overflow-y:auto + margin:auto centra cuando cabe y
   permite desplazar cuando no. */
.popup-overlay {
  height: 100dvh;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 16px;
}
.popup-content {
  margin: auto;
  width: 100%;
  max-width: 600px;
  padding: clamp(22px, 5vw, 50px);
}
.popup-content h2 { padding-right: 44px; }
.close-popup {
  top: 6px;
  right: 6px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.diag-btn {
  text-align: left;
  min-height: 44px;
  font-size: clamp(0.9rem, 3.4vw, 0.95rem);
  line-height: 1.45;
}

/* ── 3. Menú móvil: desplazable y con el submenú accesible al tacto ────
   El panel centraba su contenido sin overflow, así que en pantallas bajas
   los últimos enlaces quedaban fuera. Y "Libros" solo se abría con :hover,
   que no existe en una pantalla táctil: ahora se muestra desplegado. */
@media (max-width: 900px) {
  .nav-links {
    justify-content: flex-start;
    gap: 2px;
    padding: 84px 24px 32px;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .nav-links a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .nav-links .dropdown { width: 100%; }
  .nav-links .dropdown-content {
    display: block;
    position: static;
    transform: none;
    min-width: 0;
    width: 100%;
    margin: 4px 0 10px;
    box-shadow: none;
  }
  .nav-links .dropdown-books a {
    font-size: 0.78rem;
    padding: 11px 14px;
    min-height: 42px;
  }
  .mobile-menu-btn {
    width: 44px;
    height: 44px;
  }
}

/* ── 4. Alturas: usar el viewport realmente visible ────────────────────
   100vh no descuenta la barra de direcciones del navegador móvil, así que
   parte del contenido quedaba oculta bajo ella. svh sí la descuenta. */
.hero {
  height: 100vh;      /* respaldo para navegadores antiguos */
  height: 100svh;
}

/* ── 4b. Hero: se salía 86px por cada lado en el teléfono ──────────────
   .hero-content es un ítem flex y los ítems flex tienen min-width:auto,
   que les impide encoger por debajo del ancho de su contenido. Resultado:
   548px de contenido dentro de una pantalla de 375px, con el texto
   recortado a izquierda y derecha. min-width:0 lo libera. */
.hero-content {
  min-width: 0;
  width: 100%;
}
.mantra-title,
.history-box,
.hero-slideshow,
.hero-slide {
  min-width: 0;
}

/* ── 5. Secciones y contenedores en pantallas pequeñas ─────────────────
   Las reglas originales llevan !important, por eso se repite aquí. */
@media (max-width: 600px) {
  .container { padding: 0 18px !important; }
  .section { padding: 56px 0 !important; }
  .service-card { padding: 24px !important; }
  /* El mínimo del título del hero era 48px: demasiado en pantallas estrechas */
  .mantra-title { font-size: clamp(2rem, 11vw, 48px); }
}

/* Flechas del carrusel: 39px se quedaba corto para el objetivo táctil de 44px */
@media (max-width: 900px) {
  .carousel-arrow {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* ── 6. Chatbot: que no se salga de la pantalla ────────────────────────
   Ancho fijo de 350px y sin límite de alto: en un teléfono de 375px se
   desbordaba y la ventana crecía por encima del borde superior. */
@media (max-width: 600px) {
  .chatbot-window {
    width: min(350px, calc(100vw - 28px));
    max-height: min(72dvh, 540px);
  }
  .chatbot-body { overflow-y: auto; }
}

/* ── 7. Teléfono en horizontal: muy poca altura disponible ─────────────*/
@media (max-height: 520px) and (orientation: landscape) {
  .hero {
    height: auto;
    min-height: 100svh;
    padding: 90px 0 50px;
  }
  .nav-links { justify-content: flex-start; padding-top: 70px; }
  .popup-overlay { align-items: flex-start; padding: 12px; }
  .popup-content { padding: 20px 22px; }
  .legal-modal { padding: 10px !important; }
  .legal-modal .modal-content {
    max-height: 94dvh;
    padding: 18px 22px;
  }
  .chatbot-window { max-height: 82dvh; }
}

/* ── 8. Anti-desbordes generales ───────────────────────────────────────*/
img, video, iframe { max-width: 100%; }
@media (max-width: 900px) {
  html, body { overflow-x: hidden; }
  /* El iframe del podcast lleva height="500" fijo en el HTML */
  .video-container iframe {
    height: auto;
    aspect-ratio: 16 / 9;
  }
}

/* ==========================================================================
   Botón "Comunidad Sin Máscaras" (WhatsApp) — footer
   ========================================================================== */
.btn-comunidad {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  margin-top: 16px;
  padding: 11px 20px;
  border-radius: 12px;
  background: var(--gold);
  color: var(--ink);
  border: 2px solid #ffffff;
  text-decoration: none;
  font-family: 'Fira Sans', 'DM Sans', sans-serif;
  font-weight: 700;
  letter-spacing: 0.6px;
  line-height: 1.05;              /* separación mínima entre las dos líneas */
  /* Solo transform y color: propiedades que no provocan reflujo */
  transition: transform 0.28s cubic-bezier(0.25, 1, 0.5, 1),
              background-color 0.28s ease,
              border-color 0.28s ease,
              color 0.28s ease,
              box-shadow 0.28s ease;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}
.btn-comunidad-texto {
  display: flex;
  flex-direction: column;
  font-size: 0.78rem;
  text-align: left;
}
.btn-comunidad-icon {
  flex-shrink: 0;
  transition: color 0.28s ease;
}

/* Hover, foco de teclado y pulsación: dorado sobre negro */
.btn-comunidad:hover,
.btn-comunidad:focus-visible {
  transform: scale(1.06);
  background: var(--ink);
  color: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
}
.btn-comunidad:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}
.btn-comunidad:active {
  transform: scale(0.98);
  background: var(--ink);
  color: var(--gold);
  border-color: var(--gold);
}

/* Móvil: ancho completo y objetivo táctil cómodo */
@media (max-width: 768px) {
  .btn-comunidad {
    width: 100%;
    max-width: 300px;
    justify-content: center;
    margin: 18px auto 0;
    padding: 13px 20px;
    min-height: 52px;
  }
  .btn-comunidad-texto { text-align: center; }
}
@media (max-width: 360px) {
  .btn-comunidad { gap: 9px; padding: 12px 14px; }
  .btn-comunidad-texto { font-size: 0.72rem; }
}

/* En pantallas táctiles no se aplica el hover: solo la pulsación */
@media (hover: none) {
  .btn-comunidad:hover {
    transform: none;
    background: var(--gold);
    color: var(--ink);
    border-color: #ffffff;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn-comunidad { transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
  .btn-comunidad:hover, .btn-comunidad:focus-visible, .btn-comunidad:active { transform: none; }
}

/* ==========================================================================
   Botón "Continuar por WhatsApp" al final de los formularios
   ========================================================================== */
.btn-wa-enviar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 18px auto 0;
  padding: 13px 26px;
  min-height: 48px;
  border-radius: 100px;
  background: var(--gold);
  color: var(--ink);
  border: 2px solid var(--ink);
  text-decoration: none;
  font-family: 'DM Sans', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
  transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1),
              background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-wa-enviar.hidden { display: none; }
.btn-wa-enviar:hover,
.btn-wa-enviar:focus-visible {
  transform: scale(1.04);
  background: var(--ink);
  color: var(--gold);
  border-color: var(--gold);
}
.btn-wa-enviar:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 3px;
}
.btn-wa-enviar:active { transform: scale(0.98); }

/* Dentro del popup de diagnóstico y del formulario: centrado y ancho cómodo */
#diag-ok + .btn-wa-enviar,
#wl-success-msg + .btn-wa-enviar {
  display: none;
}
#diag-ok + .btn-wa-enviar:not(.hidden),
#wl-success-msg + .btn-wa-enviar:not(.hidden) {
  display: inline-flex;
}

/* Enlace de WhatsApp dentro del chatbot */
.chat-wa-link {
  display: inline-block;
  margin-top: 8px;
  padding: 8px 16px;
  border-radius: 100px;
  background: var(--gold);
  color: var(--ink) !important;
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
}
.chat-wa-link:hover { transform: scale(1.04); background: var(--gold-bright); }

/* Campo de WhatsApp del test de diagnóstico: mismo estilo que los demás */
#diag-whatsapp { width: 100%; }

@media (max-width: 600px) {
  .btn-wa-enviar { width: 100%; }
}
@media (hover: none) {
  .btn-wa-enviar:hover {
    transform: none; background: var(--gold); color: var(--ink); border-color: var(--ink);
  }
}
@media (prefers-reduced-motion: reduce) {
  .btn-wa-enviar, .chat-wa-link { transition: background-color 0.2s ease, color 0.2s ease; }
  .btn-wa-enviar:hover, .btn-wa-enviar:focus-visible, .btn-wa-enviar:active,
  .chat-wa-link:hover { transform: none; }
}
