/* ====== HERO (semantic classes that replace Tailwind utilities) ====== */

/* Wrapper del fondo del hero */
.hero-bg {
  position: absolute;      /* absolute */
  top: 0;                  /* top-0 */
  left: 0;                 /* inset-x-0 */
  right: 0;                /* inset-x-0 */
  bottom: 0;               /* bottom-0 */
  z-index: 0;              /* z-0 */
  display: flex;           /* flex */
  justify-content: center; /* justify-center */
  align-items: flex-end;   /* keep artwork anchored to bottom */
  overflow: hidden;        /* overflow-hidden */
}

@media (max-width: 1024px) {
  /* Match EN/ES language button width to hamburger menu width on mobile */
  .header-ctas .btn-sm {
    min-width: 50px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/* Imagen del hero con parallax */
.hero-parallax {
  height: auto;            /* let image dictate height */
  max-height: clamp(260px, 42vh, 520px);
  width: auto;             /* w-auto */
  max-width: none;         /* max-w-none */
  user-select: none;       /* select-none */
  pointer-events: none;    /* pointer-events-none */
  will-change: transform;  /* will-change-transform */
}

/* Ya existente (la movimos antes) */
.img-crisp {
  image-rendering: crisp-edges;
  -ms-interpolation-mode: nearest-neighbor; /* compat IE antiguo */
}

/* ====== Tito letter (ya existente) ====== */
#tito .prose p { margin: 0 0 1.25rem !important; }
#tito .prose p:last-child { margin-bottom: 0 !important; }

/* ============ LAYOUT BASICS ============ */

/* width container */
.container-1280 {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;       /* px-4 */
    padding-right: 1rem;
  }
  @media (min-width: 1024px) { /* lg */
    .container-1280 {
      padding-left: 2.5rem;   /* lg:px-10 */
      padding-right: 2.5rem;
    }
  }
  
  /* ============ HEADER ============ */
  
  .site-header {
    position: fixed;         /* sticky top-0 */
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;              /* z-50 */
    backdrop-filter: blur(6px); /* backdrop-blur-sm */
    background: rgba(255,255,255,0.8); /* bg-white/80 */
  }
  html.dark .site-header {
    background: rgba(26,46,38,0.8); /* dark:bg-background-dark/80 (#1A2E26) */
  }
  
  /* top bar */
  .header-bar {
    display: flex; 
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
    border-bottom: 1px solid #e5e7eb; /* border-b-gray-200 */
    padding: 0.75rem 0;               /* py-3 */
  }
  html.dark .header-bar {
    border-bottom-color: #374151;     /* dark:border-b-gray-700 */
  }
  
  /* brand block */
  .brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #4F6F52;                   /* primary */
  }
  html.dark .brand {
    color: #ECE3CE;                   /* text-light */
  }
.brand-logo {
  height: 4rem;
  width: 4rem;
  margin-right: 0.75rem;
  border-radius: 9999px;            /* rounded-full */
  display: block;
}
.brand-title {
  font-family: "Antonio", system-ui, sans-serif; /* font-antonio */
  font-weight: 700;                 /* font-bold */
  font-size: 1.5rem;                /* text-2xl */
  line-height: 1.2;
  letter-spacing: -0.02em;          /* tracking-tight */
  color: #000;                      /* text-black */
  margin-left: -1.5rem;          /* shift closer to iso */
}

.brand-subtitle {
  font-weight: 700 !important;   /* saca el bold que viene de font-black */
  font-size: clamp(1.5rem, 1.1rem + 0.5vw, 2rem) !important;
  line-height: 1.2 !important;
}
  
  /* right zone (nav + ctas) */
  .header-right {
    display: flex;
    flex: 1 1 auto;
    justify-content: flex-end;
    gap: 2rem;                        /* gap-8 */
  }
  
  /* desktop nav */
  .main-nav {
    display: none;                    /* hidden */
    align-items: center;
    gap: 1rem;                     /* gap-9 */
    color: #3A4D39;                   /* text-dark */
  }
  html.dark .main-nav {
    color: #ECE3CE;                   /* text-light */
  }
  @media (min-width: 1024px) { /* lg */
    .main-nav { display: flex; }      /* lg:flex */
  }
  @media (min-width: 1280px) {
    .main-nav { gap: 1.5rem; }
  }
  .nav-link {
    font-size: 0.82rem;              /* text-sm */
    font-weight: 600;                 /* font-medium */
    text-decoration: none;
    color: inherit;
  }
  
  /* header CTAs (buttons + toggles) */
  .header-ctas {
    display: flex;
    align-items: center;
    gap: 0.5rem;                      /* gap-2 */
  }
  
  /* Buttons (utility) */
  .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 0.75rem;           /* rounded-xl */
    height: 2.5rem;                   /* h-10 */
    padding: 0 1rem;                  /* px-4 */
    font-size: 0.875rem;              /* text-sm */
    font-weight: 700;                 /* font-bold */
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
  }
  .btn-sm {
    min-width: 100px;                 /* min-w-[100px] */
  }
  
  /* primary button (Donate) */
  .btn-primary {
    background: #4F6F52 !important;              /* primary */
    color: #F7F6F1 !important;                   /* background-light */
    transition: background-color .2s ease;
  }
  .btn-primary:hover {
    background: rgba(79,111,82,0.9) !important;  /* hover:bg-primary/90 */
  }
  
  /* ghost button (Lang/Menu toggles) */
  .btn-ghost {
    background: #f3f4f6;              /* gray-100 */
    color: #3A4D39;                   /* text-dark */
  }
  html.dark .btn-ghost {
    background: #1f2937;              /* gray-800 */
    color: #ECE3CE;                   /* text-light */
  }
  #lang-toggle {
    min-width: 50px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  #menu-toggle {
    min-width: 50px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  /* hide menu button on large screens (emulating lg:hidden) */
  @media (min-width: 1024px) { /* lg */
    .lg-hidden { display: none !important; }
  }
  
  /* ============ MOBILE NAV ============ */
  
.mobile-nav {
  position: fixed;
  top: 72px;
  right: 0;
  left: auto;
  background: rgba(255,255,255,0.95);    /* bg-white/95 */
  backdrop-filter: blur(6px);            /* backdrop-blur-sm */
  border: 1px solid #e5e7eb;             /* border */
  border-right: none;
  border-top: none;
  border-bottom-left-radius: 1rem;       /* rounded-bl-2xl */
  max-width: 280px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  margin-top: 0;
  margin-right: 1rem;                    /* align with header padding */
  z-index: 45;
}
html.dark .mobile-nav {
  background: rgba(26,46,38,0.95);       /* dark:bg-background-dark/95 */
  border-color: #4b5563;                 /* dark:border-gray-700 */
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

/* Inner stack */
.mobile-nav-inner {
  padding: 1rem 1.25rem;                 /* tighter horizontal, more top spacing */
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 0.85rem;                           /* gap-3 but slightly larger */
  color: #3A4D39;                         /* text-dark */
}
html.dark .mobile-nav-inner {
  color: #ECE3CE;                         /* text-light */
}

.parallax-title {
  position: relative;
  will-change: transform;
  transition: transform 0.25s ease-out;
}

/* ===== SUBSCRIPTION PAGES ===== */
.subscription-page {
  background: #f7f6f1;
  min-height: 100vh;
  color: #3a4d39;
}
.subscription-hero {
  padding: 4rem 1.5rem 2rem;
  text-align: center;
  max-width: 960px;
  margin: 0 auto;
  font-family: 'Lexend', sans-serif;
}
.subscription-hero h1 {
  font-size: clamp(2.5rem, 4vw, 3.5rem);
  font-weight: 900;
  color: #4f6f52;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.subscription-hero p {
  margin-top: 1.5rem;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(26, 46, 38, 0.75);
}
.subscription-top {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.5rem 0;
  max-width: 1100px;
  margin: 0 auto;
}
.subscription-top .brand {
  text-decoration: none;
}
.subscription-top .brand-title {
  margin-left: -0.5rem;
}
.subscription-grid {
  display: grid;
  gap: 2.5rem;
  max-width: 1100px;
  padding: 0 1.5rem 4rem;
  margin: 0 auto;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .subscription-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.subscription-grid-wrapper {
  padding: 2.5rem 2rem;
}
.subscription-grid-wrapper .subscription-grid {
  padding: 0;
  margin: 0;
  max-width: 100%;
}
.subscription-card {
  background: #fff;
  border-radius: 1.5rem;
  box-shadow: 0 20px 35px rgba(15, 23, 42, 0.08);
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  height: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  font-family: 'Lexend', sans-serif;
}
.subscription-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 45px rgba(15, 23, 42, 0.12);
}
.plan-image {
  height: 160px;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(79,111,82,0.1), rgba(58,77,57,0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3a4d39;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: 'Antonio', sans-serif;
  overflow: hidden;
}
.plan-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.plan-name {
  font-size: 1.5rem;
  font-family: 'Antonio', sans-serif;
  font-weight: 700;
  color: #1a2e26;
}
.plan-description {
  font-size: 0.975rem;
  line-height: 1.65;
  color: rgba(26, 46, 38, 0.78);
  flex: 1 1 auto;
}
.plan-button {
  margin-top: auto;
}
.plan-button.btn-primary {
  font-family: 'Lexend', sans-serif;
}
.subscription-card .blue-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  background-color: #3483fa;
  color: #fff;
  transition: background-color 0.3s ease;
  font-family: 'Lexend', sans-serif;
}
.subscription-card .blue-button:hover {
  background-color: #2a68c8;
}

/* ====== GALLERY ====== */
.gallery-grid {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.gallery-card {
  position: relative;
  perspective: 1100px;
}
.gallery-card-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
  border-radius: 1rem;
}
.gallery-card-inner.is-flipped {
  transform: rotateY(180deg);
}
.gallery-card-inner:focus-visible {
  outline: 3px solid rgba(79, 111, 82, 0.5);
  outline-offset: 4px;
}
.gallery-card-face {
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  overflow: hidden;
  backface-visibility: hidden;
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.12);
}
.gallery-card-face--front img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.gallery-card-face--back {
  transform: rotateY(180deg);
  background: #fff;
  color: rgba(26, 46, 38, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}
.gallery-card-meta {
  display: grid;
  gap: 0.65rem;
}
.gallery-card-term {
  font-weight: 700;
  font-size: 0.85rem;
  color: #4f6f52;
}
.gallery-card-definition {
  font-size: 0.9rem;
  color: rgba(26, 46, 38, 0.9);
  margin: 0;
}
.gallery-card-definition .italic {
  font-style: italic;
}
html.dark .gallery-card-face--back {
  background: rgba(31, 49, 41, 0.92);
  color: rgba(236, 227, 206, 0.92);
}
html.dark .gallery-card-term {
  color: rgba(134, 167, 137, 0.9);
}
html.dark .gallery-card-definition {
  color: rgba(236, 227, 206, 0.9);
}

/* ====== INTAKE PAGE ====== */
.intake-page {
  background: #f7f6f1;
  min-height: 100vh;
  color: #1a2e26;
  font-family: 'Lexend', sans-serif;
}
.intake-header {
  padding: 1.75rem 1.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.intake-header .brand {
  text-decoration: none;
}
.intake-header .brand-title {
  margin-left: -1rem;
}
.intake-hero {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 1.5rem 1.5rem;
  text-align: center;
}
.intake-hero h1 {
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -0.02em;
  color: #4f6f52;
}
.intake-hero p {
  margin-top: 1.25rem;
  font-size: 1rem;
  line-height: 1.7;
  color: rgba(26, 46, 38, 0.8);
}
.intake-logos {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 1rem;
  max-width: 720px;
  margin: 2rem auto 3rem;
  padding: 0 1.5rem;
}
.intake-logos img {
  width: 100%;
  max-width: 70px;
  height: 70px;
  object-fit: contain;
  background: #fff;
  border-radius: 1rem;
  padding: 0.75rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
  margin: 0 auto;
}
@media (min-width: 768px) {
  .intake-logos {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}
.intake-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  display: grid;
  gap: 2.5rem;
}
.intake-text {
  background: #fff;
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
  text-align: left;
  color: rgba(26, 46, 38, 0.85);
  line-height: 1.7;
}
.intake-text.subscription-intro {
  background: transparent;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}
.intake-text strong {
  color: #4f6f52;
}
.intake-text ul {
  list-style: disc;
  padding-left: 1.5rem;
  margin-top: 1rem;
}
.intake-text.intake-text--flush {
  background: transparent;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
}
.intake-card,
.intake-form {
  background: #fff;
  border-radius: 1.5rem;
  padding: 2.5rem;
  box-shadow: 0 24px 45px rgba(15, 23, 42, 0.12);
}
.intake-alert {
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}
.intake-alert--success {
  background: #ecf8f1;
  color: #2f6f44;
}
.intake-alert--error {
  background: #fdecea;
  color: #c4322c;
}
.intake-highlight {
  margin-top: 0.625rem;
  margin-bottom: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  background: #fff4e5;
  color: #7a4d10;
  font-weight: 600;
  font-size: 1.1rem;
}
.form-guard {
  display: none !important;
}
.intake-form h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #4f6f52;
  margin-bottom: 1.5rem;
}
.form-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
.form-grid .field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.form-grid label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #3a4d39;
}
.form-grid input,
.form-grid textarea,
.form-grid select {
  border: 1px solid rgba(74, 94, 74, 0.25);
  border-radius: 0.9rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.9);
  color: #1a2e26;
  font-size: 0.98rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form-grid .form-full {
  grid-column: 1 / -1;
}
.form-grid .field select {
  cursor: pointer;
}
.form-grid.form-grid--single {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}
.form-divider {
  border: 0;
  border-top: 1px solid rgba(74, 94, 74, 0.2);
  margin: 0.75rem 0 1.5rem;
}
.form-grid .field--captcha {
  gap: 0.75rem;
}
.field-helper {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #3a4d39;
}
.field-note {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(26, 46, 38, 0.7);
}
@media (min-width: 768px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .form-grid .form-full {
    grid-column: span 2;
  }
  .form-grid.form-grid--single {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
  .form-grid.form-grid--single .form-full {
    grid-column: 1 / -1;
  }
}
.form-grid input:focus,
.form-grid textarea:focus,
.form-grid select:focus {
  border-color: #4f6f52;
  box-shadow: 0 0 0 3px rgba(79, 111, 82, 0.25);
  outline: none;
}
.intake-radio-group {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  color: #1a2e26;
}
.intake-radio-group label {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.intake-submit {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}
.intake-submit--center {
  justify-content: center;
}
.intake-submit .btn-primary {
  font-family: 'Lexend', sans-serif;
  padding-inline: 2rem;
  font-size: 1rem;
}
.intake-submit .btn-primary[disabled] {
  opacity: 0.75;
  cursor: not-allowed;
}
.intake-form-feedback {
  margin-top: 1.25rem;
}
.intake-footer-note {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: rgba(26, 46, 38, 0.65);
  text-align: center;
}
.staff-card .staff-bio-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 0.85rem;
}
.staff-bio {
  margin-top: 1rem;
  text-align: left;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(79, 111, 82, 0.15);
  border-radius: 0.85rem;
  padding: 1rem 1.1rem;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}
.staff-bio p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: rgba(26, 46, 38, 0.85);
  margin: 0 0 0.9rem;
}
.staff-bio p:last-child {
  margin-bottom: 0;
}

  
  /* We reuse .nav-link for mobile links too */

  /* ====== Fixes: button greens + alternating section backgrounds ====== */

/* Asegurar verde en botones primarios (anchor y button) */
a.btn.btn-primary,
button.btn.btn-primary,
.btn.btn-primary {
  background: #4F6F52;           /* primary */
  color: #F7F6F1;                /* background-light */
  border-color: transparent;
}
a.btn.btn-primary:hover,
button.btn.btn-primary:hover,
.btn.btn-primary:hover {
  background: rgba(79,111,82,0.9);
}

/* Botón ghost (fallback por si no aplican utilidades) */
a.btn.btn-ghost,
button.btn.btn-ghost,
.btn.btn-ghost {
  background: #f3f4f6;           /* gray-100 */
  color: #3A4D39;                /* text-dark */
}
html.dark a.btn.btn-ghost,
html.dark button.btn.btn-ghost,
html.dark .btn.btn-ghost {
  background: #1f2937;           /* gray-800 */
  color: #ECE3CE;                /* text-light */
}

/* Fondos alternados para secciones del main */
main > section {
  background: #fff !important;
}
main > section:nth-of-type(even) {
  background: #F7F6F1 !important;           /* background-light */
}

/* Mantener hero transparente si fuera <section> */
#hero, section#hero { background: transparent; }
section#contact { background: #F7F6F1 !important; }

.site-footer {
  background-color: #E4E8DF;
}
html.dark .site-footer {
  background-color: rgba(26, 46, 38, 0.5);
}


/* ===== HERO CTA sizes & colors (fix display issue) ===== */
.btn-lg {
  height: 3rem;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  border-radius: 0.75rem;
}


 
  .btn-hero {
    height: 3rem;
    padding: 0 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border-radius: 0.75rem;
    border: 1px solid transparent;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease;
  }
  .btn-hero-groups {
    background-color: #4F6F51;
    color: #F7F6F1;
  }
  .btn-hero-groups:hover {
    background-color: #3f5841;
  }
  .btn-hero-sponsor {
    background-color: #F7F6F1;
    color: #3A4D39;
    border-color: #D1D5DB;
  }
  .btn-hero-sponsor:hover {
    background-color: rgba(247, 246, 241, 0.9);
  }
  .btn-hero-staff {
    background-color: #9EBEDC;
    color: #0b2d38;
  }
  .btn-hero-staff:hover {
    background-color: #87afcf;
  }

/* ===== Mobile-specific adjustments ===== */
@media (max-width: 767px) {
  .hero-main-logo {
    max-height: 196px; /* 70% of 280px */
  }

  .btn-hero-staff {
    display: none !important;
  }

  .hero-parallax {
    transform: translateY(50px);
  }
}
