/* ============================================================
   COLEGIO DIGITAL — Theme CSS
   Adapted from template/styles/main.css for WordPress.
   Mobile-first · WCAG 2.1 AA · Core Web Vitals optimised
   ============================================================ */

/* ============================================================
   0. LOCAL FONTS — Helvetica
   Paths are relative to this CSS file inside assets/css/.
   Fonts live at assets/fonts/helvetica/*.
   NOTES:
   - helvetica-light TTF has an invalid cmap and is excluded.
   - Font files are copied from template/fonts/helvetica/.
   ============================================================ */
@font-face {
  font-family: 'Helvetica';
  src: url('../fonts/helvetica/Helvetica.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Helvetica';
  src: url('../fonts/helvetica/Helvetica-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Helvetica';
  src: url('../fonts/helvetica/Helvetica-Oblique.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Helvetica';
  src: url('../fonts/helvetica/Helvetica-BoldOblique.ttf') format('truetype');
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Helvetica Compressed';
  src: url('../fonts/helvetica/helvetica-compressed-5871d14b6903a.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Helvetica Rounded';
  src: url('../fonts/helvetica/helvetica-rounded-bold-5871d05ead8de.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   1. DESIGN TOKENS / CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Primary palette */
  --color-blue-dark:    #094696;
  --color-blue-mid:     #2970db;
  --color-blue-nav:     #073a7a;
  --color-orange:       #ef8d1c;
  --color-orange-hover: #d47910;
  --color-white:        #ffffff;
  --color-off-white:    #f8f9fa;
  --color-gray-light:   #e8ecf0;
  --color-gray-mid:     #6b7280;
  --color-gray-dark:    #374151;
  --color-text:         #1f2937;
  --color-text-muted:   #6b7280;
  --color-error:        #dc2626;
  --color-success:      #16a34a;
  --color-footer-bg:    #094696;

  /* Typography */
  --font-heading: 'Helvetica', Arial, sans-serif;
  --font-body:    'Helvetica', Arial, sans-serif;

  /* Fluid type scale */
  --text-xs:   clamp(0.75rem,  1.5vw, 0.875rem);
  --text-sm:   clamp(0.875rem, 1.8vw, 1rem);
  --text-base: clamp(1rem,     2vw,   1.125rem);
  --text-lg:   clamp(1.125rem, 2.2vw, 1.25rem);
  --text-xl:   clamp(1.25rem,  2.5vw, 1.5rem);
  --text-2xl:  clamp(1.5rem,   3vw,   2rem);
  --text-3xl:  clamp(1.75rem,  4vw,   2.9rem);
  --text-4xl:  clamp(2rem,     5vw,   3.25rem);

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Radii and shadows */
  --radius-btn: 9999px;
  --radius-sm:  4px;
  --radius-md:  8px;
  --radius-lg:  12px;
  --radius-xl:  16px;
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.15), 0 2px 6px rgba(0,0,0,0.10);
  --shadow-lg:  0 10px 30px rgba(0,0,0,0.20), 0 4px 12px rgba(0,0,0,0.12);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;

  /* Layout */
  --container-max: 1200px;
  --header-height: 100px;
}

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

h1, h2, h3, h4, p {
  overflow-wrap: break-word;
  word-break: break-word;
}

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

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: 'Helvetica', Arial, sans-serif;
  font-size: var(--text-base);
  color: var(--color-text);
  background-color: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Scroll lock when mobile menu is open */
body.menu-open {
  overflow: hidden;
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* ============================================================
   3. ACCESSIBILITY — SKIP LINK AND FOCUS
   ============================================================ */
.skip-link {
  position: fixed;
  top: -100%;
  left: var(--space-4);
  z-index: 9999;
  padding: var(--space-3) var(--space-6);
  background-color: var(--color-blue-dark);
  color: var(--color-white);
  font-weight: 700;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  border-radius: var(--radius-md);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-4);
  outline: 3px solid var(--color-orange);
  outline-offset: 2px;
}

:focus-visible {
  outline: 3px solid var(--color-orange);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   4. UTILITIES
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

/* tablet */
@media (min-width: 768px) and (max-width: 1199px) {
  .container {
    padding-inline: var(--space-8);
  }
}

/* desktop */
@media (min-width: 1200px) {
  .container {
    padding-inline: var(--space-12);
  }
}

/* ============================================================
   5. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-8);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.05em;
  border-radius: var(--radius-btn);
  transition: background-color var(--transition-base),
              color var(--transition-base),
              transform var(--transition-fast),
              box-shadow var(--transition-base);
  cursor: pointer;
  text-align: center;
  min-height: 48px;
  min-width: 44px;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

/* Orange primary button */
.btn--primary {
  background-color: var(--color-orange);
  color: var(--color-white);
  border: 2px solid var(--color-orange);
}

@media (hover: hover) {
  .btn--primary:hover {
    background-color: var(--color-orange-hover);
    border-color: var(--color-orange-hover);
    box-shadow: var(--shadow-md);
  }
}

/* Outline white button (hero) */
.btn--outline-white {
  background-color: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-white);
}

@media (hover: hover) {
  .btn--outline-white:hover {
    background-color: rgba(255,255,255,0.15);
    box-shadow: var(--shadow-sm);
  }
}

/* Dark blue button */
.btn--dark-blue {
  background-color: var(--color-blue-dark);
  color: var(--color-white);
  border: 2px solid var(--color-blue-dark);
}

@media (hover: hover) {
  .btn--dark-blue:hover {
    background-color: var(--color-blue-mid);
    border-color: var(--color-blue-mid);
    box-shadow: var(--shadow-md);
  }
}

/* Large CTA button (admission) */
.btn--primary-lg {
  background-color: var(--color-blue-dark);
  color: var(--color-white);
  border: 2px solid var(--color-blue-dark);
  padding: var(--space-4) var(--space-12);
  font-size: var(--text-base);
  letter-spacing: 0.08em;
}

@media (hover: hover) {
  .btn--primary-lg:hover {
    background-color: var(--color-blue-mid);
    border-color: var(--color-blue-mid);
    box-shadow: var(--shadow-lg);
  }
}

/* Form submit button */
.btn--primary-form {
  background-color: var(--color-blue-dark);
  color: var(--color-white);
  border: 2px solid var(--color-blue-dark);
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-sm);
  width: 100%;
  position: relative;
  overflow: hidden;
}

@media (hover: hover) {
  .btn--primary-form:hover {
    background-color: var(--color-blue-mid);
    box-shadow: var(--shadow-md);
  }
}

.btn--primary-form:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: var(--color-white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  position: absolute;
  right: var(--space-5);
  top: 50%;
  transform: translateY(-50%);
}

.btn--loading .btn-spinner {
  display: block;
}

@keyframes spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

/* ============================================================
   6. LOGO
   ============================================================ */
.header__logo,
.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
}

/* WordPress custom logo img — keep our sizing */
.header__logo img,
.header__logo-img {
  height: 80px;
  width: auto;
  object-fit: contain;
  display: block;
}

.footer__logo img,
.footer__logo-img {
  height: 80px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* ============================================================
   7. HEADER / NAVIGATION
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--color-white);
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  min-height: var(--header-height);
  transition: box-shadow var(--transition-base), background-color var(--transition-base);
}

.header.header--scrolled {
  box-shadow: 0 4px 16px rgba(9,70,150,0.18);
}

.header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  padding-block: var(--space-3);
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
}

/* desktop */
@media (min-width: 1200px) {
  .header__container {
    padding-inline: var(--space-10);
  }
}

/* ---- Navigation: mobile (hidden by default) ---- */
.header__nav {
  display: none;
}

/* Mobile menu open — slideDown animated */
.header__nav.is-open {
  display: block;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--color-white);
  padding: var(--space-6) var(--space-6) var(--space-8);
  overflow-y: auto;
  padding-bottom: calc(var(--space-8) + env(safe-area-inset-bottom, 0px));
  z-index: 999;
  animation: menuSlideDown 280ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes menuSlideDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*
 * WordPress nav_menu outputs:
 *   <ul class="nav-list">
 *     <li class="menu-item"><a class="nav-link">…</a></li>
 *
 * The nav_menu walker adds WP classes (.menu-item, .current-menu-item, etc.)
 * to <li> elements. We style via the <a> tag classes set in the menu args.
 */
.nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

/* Remove default WP list-style that Bootstrap might reset */
.nav-list li {
  list-style: none;
}

.nav-link,
.header__nav .nav-list a {
  display: flex;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-blue-dark);
  letter-spacing: 0.02em;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast), background-color var(--transition-fast);
  min-height: 48px;
  text-decoration: none;
}

@media (hover: hover) {
  .nav-link:hover,
  .header__nav .nav-list a:hover {
    color: var(--color-orange);
    background-color: rgba(239,141,28,0.08);
  }
}

.nav-link.is-active,
.header__nav .nav-list .current-menu-item > a,
.header__nav .nav-list .current_page_item > a {
  color: var(--color-orange);
  background-color: rgba(239,141,28,0.08);
}

/* ---- Hamburger — 3 lines → animated X ---- */
.header__hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: var(--space-2);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background-color var(--transition-fast);
  flex-shrink: 0;
}

@media (hover: hover) {
  .header__hamburger:hover {
    background-color: var(--color-gray-light);
  }
}

.hamburger-line {
  display: block;
  height: 2px;
  width: 24px;
  background-color: var(--color-blue-dark);
  border-radius: 2px;
  transform-origin: center center;
  transition:
    transform  300ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity    200ms ease,
    width      200ms ease;
  will-change: transform, opacity;
}

/* Open state: top line rotates +45deg */
.header__hamburger.is-open .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

/* Open state: middle line disappears */
.header__hamburger.is-open .hamburger-line:nth-child(2) {
  opacity: 0;
  width: 0;
}

/* Open state: bottom line rotates -45deg */
.header__hamburger.is-open .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ---- Desktop nav: hamburger hidden, nav visible ---- */
@media (min-width: 1200px) {
  .header__hamburger {
    display: none;
  }

  .header__nav {
    display: block;
  }

  .nav-list {
    flex-direction: row;
    gap: 0;
    align-items: center;
  }

  .nav-link,
  .header__nav .nav-list a {
    font-size: 0.8rem;
    padding: var(--space-2) var(--space-3);
    letter-spacing: 0.03em;
    min-height: 44px;
  }
}

/* ============================================================
   8. HERO
   Heights: mobile <768px  → 100svh
            tablet 768–1199px → 600px
            desktop ≥1200px  → 768px
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding-top: var(--header-height);
}

/* tablet */
@media (min-width: 768px) and (max-width: 1199px) {
  .hero {
    min-height: 600px;
  }
}

/* desktop */
@media (min-width: 1200px) {
  .hero {
    min-height: 768px;
  }
}

.hero__image-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, #1a5ec8 0%, #094696 50%, #2970db 100%);
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 5%;
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--color-white);
  padding: var(--space-8) var(--space-6);
  max-width: 820px;
  margin-inline: auto;
  animation: heroFadeIn 0.8s ease-out both;
}

@media (min-width: 768px) {
  .hero__content {
    padding: var(--space-12) var(--space-8);
  }
}

.hero__quote p {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
  text-wrap: balance;
  margin-bottom: var(--space-6);
}

.hero__subtitle {
  font-size: 1.6rem;
  font-weight: 400;
  line-height: 1;
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: var(--space-10);
  text-shadow: 0 1px 4px rgba(0,0,0,0.25);
  opacity: 0.95;
}

.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

@media (min-width: 480px) {
  .hero__actions {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================
   9. PILLARS SECTION
   Heights: mobile → height:auto
            tablet 768–1199px → 450px
            desktop ≥1200px  → 450px
   ============================================================ */
.pillars {
  padding-block: var(--space-12) var(--space-10);
  background-color: var(--color-white);
  text-align: center;
}

/* tablet */
@media (min-width: 768px) and (max-width: 1199px) {
  .pillars {
    height: 450px;
    padding-block: 0;
    display: flex;
    align-items: center;
  }

  .pillars .container {
    width: 100%;
  }
}

/* desktop */
@media (min-width: 1200px) {
  .pillars {
    height: 450px;
    padding-block: 0;
    display: flex;
    align-items: center;
  }

  .pillars .container {
    width: 100%;
  }
}

.pillars__title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-blue-dark);
  margin-bottom: var(--space-8);
  text-wrap: balance;
}

.pillars__title em {
  color: var(--color-orange);
  font-style: normal;
}

/* mobile: 1 column */
.pillars__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

/* tablet: 3 fluid columns from 768px */
@media (min-width: 768px) and (max-width: 1199px) {
  .pillars__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
  }
}

/* desktop */
@media (min-width: 1200px) {
  .pillars__grid {
    grid-template-columns: repeat(3, 322px);
    gap: var(--space-6);
    justify-content: center;
    margin-bottom: var(--space-10);
  }
}

.pillar-card {
  padding: var(--space-6) var(--space-5);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  cursor: pointer;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
  width: 100%;
  height: auto;
  min-height: 130px;
  justify-content: center;
}

/* tablet */
@media (min-width: 768px) and (max-width: 1199px) {
  .pillar-card {
    padding: var(--space-8) var(--space-6);
    width: 100%;
    height: 170px;
    min-height: unset;
  }
}

/* desktop */
@media (min-width: 1200px) {
  .pillar-card {
    padding: var(--space-8) var(--space-6);
    width: 322px;
    height: 209px;
    min-height: unset;
  }
}

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

.pillar-card:focus {
  outline: 3px solid var(--color-orange);
  outline-offset: 4px;
}

.pillar-card--orange {
  background-color: var(--color-orange);
  color: var(--color-white);
}

.pillar-card--blue {
  background-color: var(--color-blue-dark);
  color: var(--color-white);
}

/* Third card: mid blue */
.pillars__grid .pillar-card:nth-child(3) {
  background-color: var(--color-blue-mid);
}

.pillar-card__icon {
  font-size: 1.6rem;
  opacity: 0.9;
}

.pillar-card__title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1.1;
}

.pillars__cta {
  display: flex;
  justify-content: center;
}

/* ============================================================
   10. EDU-GRID — PROYECTO EDUCATIVO (2×2)
   mobile: 1 column stacked
   tablet 768px–1199px: 2×2, 600px rows
   desktop ≥1200px: 2×2, 768px rows
   ============================================================ */
.edu-grid {
  width: 100%;
  overflow: hidden;
}

/* mobile: 1 column */
.edu-grid__layout {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto;
}

/* mobile: cell 4 (image) appears before cell 3 (orange) */
@media (max-width: 767px) {
  .edu-grid__cell--bottom-right {
    order: 3;
  }
  .edu-grid__cell--bottom-left {
    order: 4;
  }
}

/* tablet */
@media (min-width: 768px) and (max-width: 1199px) {
  .edu-grid__layout {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 600px 600px;
    align-items: stretch;
  }
}

/* desktop */
@media (min-width: 1200px) {
  .edu-grid__layout {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 768px 768px;
    align-items: stretch;
  }
}

.edu-grid__cell {
  position: relative;
  overflow: hidden;
}

/* Images — mobile: 300px fixed; tablet/desktop: 100% of grid cell */
.edu-grid__cell--img {
  height: 300px;
}

@media (min-width: 768px) {
  .edu-grid__cell--img {
    height: 100%;
  }
}

.edu-grid__cell--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform var(--transition-slow);
}

@media (hover: hover) {
  .edu-grid__cell--img:hover img {
    transform: scale(1.04);
  }
}

/* Fallback backgrounds for images */
.edu-grid__cell--top-left {
  background: linear-gradient(135deg, #8B9D5A 0%, #5A7A3A 100%);
}

.edu-grid__cell--bottom-right {
  background: linear-gradient(135deg, #7ab648 0%, #4a8a2a 100%);
}

/* Blue card */
.edu-grid__cell--blue {
  background-color: var(--color-blue-mid);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-8) var(--space-6);
  height: auto;
}

@media (min-width: 768px) {
  .edu-grid__cell--blue {
    padding: var(--space-8) var(--space-10);
    height: 100%;
  }
}

/* Orange card */
.edu-grid__cell--orange {
  background-color: var(--color-orange);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-8) var(--space-6);
  height: auto;
}

@media (min-width: 768px) {
  .edu-grid__cell--orange {
    padding: var(--space-8) var(--space-10);
    height: 100%;
  }
}

.edu-grid__content {
  color: var(--color-white);
}

/* Blue cell content: max-width 550px, centered */
.edu-grid__cell--blue .edu-grid__content {
  max-width: 550px;
  width: 100%;
  margin-inline: auto;
}

/* Orange cell content: max-width 500px, pushed right */
.edu-grid__cell--orange .edu-grid__content {
  max-width: 500px;
  width: 100%;
  margin-left: auto;
}

@media (max-width: 767px) {
  .edu-grid__cell--blue .edu-grid__content,
  .edu-grid__cell--orange .edu-grid__content {
    max-width: 100%;
    margin-left: 0;
  }
}

.edu-grid__cell--blue h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--space-5);
}

.edu-grid__cell--blue h2 em {
  color: var(--color-orange);
  font-style: normal;
}

.edu-grid__cell--blue p {
  font-size: 1.6rem;
  line-height: 1;
  opacity: 0.92;
  margin-bottom: var(--space-6);
}

.edu-grid__link {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-white);
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  text-decoration: none;
  padding: var(--space-2) 0;
  min-height: 44px;
  transition: opacity var(--transition-fast), gap var(--transition-fast);
}

@media (hover: hover) {
  .edu-grid__link:hover {
    opacity: 0.8;
    gap: var(--space-2);
  }
}

.edu-grid__label {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--color-white);
  opacity: 0.8;
  margin-bottom: var(--space-5);
}

.edu-grid__vida-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-white);
  line-height: 1.1;
  margin-bottom: var(--space-2);
  letter-spacing: 0.02em;
}

.edu-grid__vida-sub,
.proyectedu {
  font-size: 1.6rem;
  line-height: 1;
  color: var(--color-white);
  opacity: 0.88;
  margin-bottom: var(--space-6);
}

/* ============================================================
   11. LOCATION / MAP
   Full-bleed iframe. Title and address inside .container.
   ============================================================ */
.location {
  padding-block: var(--space-12) 0;
  background-color: var(--color-off-white);
  text-align: center;
}

@media (min-width: 768px) {
  .location {
    padding-block: var(--space-16) 0;
  }
}

.location__title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-blue-dark);
  margin-bottom: var(--space-8);
}

.location__title em {
  color: var(--color-orange);
  font-style: normal;
}

.location__map-wrapper {
  width: 100%;
  overflow: hidden;
  background-color: var(--color-gray-light);
  margin-bottom: 0;
}

/* mobile */
.location__map {
  display: block;
  width: 100%;
  height: 400px;
  border: 0;
}

/* tablet */
@media (min-width: 768px) and (max-width: 1199px) {
  .location__map {
    height: 600px;
  }
}

/* desktop */
@media (min-width: 1200px) {
  .location__map {
    height: 768px;
  }
}

.location__address {
  font-style: normal;
  font-size: var(--text-base);
  color: var(--color-gray-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding-block: var(--space-6);
}

.location__address .fa-map-marker-alt {
  color: var(--color-orange);
  font-size: 1.1rem;
  flex-shrink: 0;
}

.location__address-text {
  color: #094696;
}

/* ============================================================
   12. CTA ADMISSION
   Heights: mobile <768px  → 480px
            tablet 768–1199px → 600px
            desktop ≥1200px  → 768px
   ============================================================ */
.admision-cta {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: var(--space-12) var(--space-6);
}

@media (min-width: 768px) and (max-width: 1199px) {
  .admision-cta {
    min-height: 600px;
    padding: var(--space-16) var(--space-6);
  }
}

@media (min-width: 1200px) {
  .admision-cta {
    min-height: 768px;
    padding: var(--space-20) var(--space-6);
  }
}

.admision-cta__image-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, #6B4226 0%, #4A2E1A 50%, #8B6040 100%);
}

.admision-cta__image-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

/* mobile: centered */
.admision-cta__content {
  position: relative;
  z-index: 1;
  color: var(--color-white);
  text-align: center;
  max-width: var(--container-max);
  width: 100%;
  padding-inline: var(--space-6);
}

/* tablet + desktop: left-aligned */
@media (min-width: 768px) {
  .admision-cta__content {
    text-align: left;
    padding-inline: var(--space-16);
  }
}

@media (min-width: 1200px) {
  .admision-cta__content {
    padding-inline: var(--space-20);
  }
}

.admision-cta__label {
  display: block;
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.12em;
  opacity: 0.8;
  margin-bottom: var(--space-4);
}

.admision-cta__content h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--space-8);
  text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.admision-cta__content h2 em {
  color: var(--color-orange);
  font-style: normal;
}

/* ============================================================
   13. CONTACT SECTION
   mobile: 1 column (image hidden)
   tablet+: 2 columns
   ============================================================ */
.contact {
  background-color: var(--color-white);
}

.contact__layout {
  display: grid;
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .contact__layout {
    grid-template-columns: 1fr 1fr;
    min-height: 600px;
  }
}

@media (min-width: 1200px) {
  .contact__layout {
    min-height: 700px;
  }
}

/* Lateral image — hidden on mobile */
.contact__image {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #c8a07a 0%, #8B6040 100%);
  display: none;
}

@media (min-width: 768px) {
  .contact__image {
    display: block;
    min-height: 600px;
  }
}

@media (min-width: 1200px) {
  .contact__image {
    min-height: 700px;
  }
}

.contact__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.contact__image-label {
  position: absolute;
  top: var(--space-8);
  left: var(--space-8);
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--color-white);
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

/* Form wrapper */
.contact__form-wrapper {
  padding: var(--space-10) var(--space-6);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 768px) and (max-width: 1199px) {
  .contact__form-wrapper {
    padding: var(--space-12) var(--space-8);
  }
}

@media (min-width: 1200px) {
  .contact__form-wrapper {
    padding: var(--space-16) var(--space-16);
  }
}

.contact__form-wrapper h2 {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-blue-dark);
  margin-bottom: var(--space-8);
  letter-spacing: 0.04em;
}

@media (max-width: 767px) {
  .contact__form-wrapper h2 {
    text-align: center;
  }
}

/* ============================================================
   14. FORM
   ============================================================ */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  width: 100%;
  max-width: 480px;
}

@media (max-width: 767px) {
  .contact-form {
    max-width: 100%;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-gray-dark);
  letter-spacing: 0.03em;
}

.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--color-text);
  background-color: var(--color-white);
  border: 1px solid var(--color-gray-light);
  border-radius: var(--radius-sm);
  min-height: 48px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
  /* Prevent iOS zoom on input focus */
  font-size: max(16px, var(--text-sm));
}

.form-input::placeholder {
  color: var(--color-text-muted);
}

.form-input:focus {
  border-color: var(--color-blue-dark);
  box-shadow: 0 0 0 3px rgba(9,70,150,0.12);
}

.form-input:invalid:not(:placeholder-shown) {
  border-color: var(--color-error);
}

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

.form-error {
  font-size: var(--text-xs);
  color: var(--color-error);
  min-height: 1.2em;
  display: block;
}

.form-error:empty {
  display: none;
}

/* Submission feedback */
.form-feedback {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  display: none;
}

.form-feedback.is-success {
  display: block;
  background-color: rgba(22, 163, 74, 0.1);
  color: var(--color-success);
  border: 1px solid rgba(22, 163, 74, 0.3);
}

.form-feedback.is-error {
  display: block;
  background-color: rgba(220, 38, 38, 0.08);
  color: var(--color-error);
  border: 1px solid rgba(220, 38, 38, 0.25);
}

/* ============================================================
   15. FOOTER
   mobile: 1 column
   tablet (480px–767px): 2 columns
   desktop (≥768px): 4 columns (logo + 3 cols)
   ============================================================ */
.footer {
  background-color: var(--color-footer-bg);
  color: var(--color-white);
  padding-block: var(--space-10) var(--space-6);
}

@media (min-width: 768px) {
  .footer {
    padding-block: var(--space-12) var(--space-6);
  }
}

.footer__container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-6);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
}

/* tablet */
@media (min-width: 480px) and (max-width: 767px) {
  .footer__container {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8) var(--space-6);
  }
}

/* desktop */
@media (min-width: 768px) {
  .footer__container {
    grid-template-columns: auto 1fr 1fr 1fr;
    gap: var(--space-10);
    align-items: start;
    padding-inline: var(--space-8);
  }
}

@media (min-width: 1200px) {
  .footer__container {
    padding-inline: var(--space-12);
  }
}

/* Logo footer */
.footer__brand {
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .footer__brand {
    grid-column: auto;
    border-right: 2px solid var(--color-orange);
    padding-right: var(--space-16);
    align-self: stretch;
    display: flex;
    align-items: flex-start;
  }
}

/* Footer columns */
.footer__col-title {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-white);
  margin-bottom: var(--space-4);
  opacity: 0.9;
}

.footer__nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer__nav-list li {
  list-style: none;
}

.footer__link {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.75);
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  padding-block: 2px;
  min-height: 32px;
  text-decoration: none;
}

@media (hover: hover) {
  .footer__link:hover {
    color: var(--color-white);
  }
}

.footer__address {
  font-style: normal;
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.75);
  line-height: 1.8;
}

/* Social links */
.footer__social-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer__social-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.75);
  transition: color var(--transition-fast);
  min-height: 44px;
  padding: var(--space-1) 0;
  text-decoration: none;
}

@media (hover: hover) {
  .footer__social-link:hover {
    color: var(--color-orange);
  }
}

.footer__social-link i {
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
}

/* Credits bar */
.footer__credits {
  max-width: var(--container-max);
  margin-inline: auto;
  padding: var(--space-5) var(--space-6) 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: var(--space-8);
  text-align: center;
}

.footer__credits p {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.5);
}

.footer__credits-link {
  color: rgba(255,255,255,0.7);
  transition: color var(--transition-fast);
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (hover: hover) {
  .footer__credits-link:hover {
    color: var(--color-orange);
  }
}

/* ============================================================
   16. SCROLL ANIMATIONS — Intersection Observer
   ============================================================ */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-on-scroll--delay-1 { transition-delay: 0.1s; }
.animate-on-scroll--delay-2 { transition-delay: 0.2s; }
.animate-on-scroll--delay-3 { transition-delay: 0.3s; }

/* ============================================================
   17. SMALL VIEWPORT ADJUSTMENTS (≤374px — iPhone SE 1st gen)
   ============================================================ */
@media (max-width: 374px) {
  .hero__quote p {
    font-size: 1.5rem;
  }

  .btn {
    padding: var(--space-3) var(--space-5);
    font-size: 0.8rem;
  }

  .pillar-card {
    padding: var(--space-5) var(--space-4);
  }

  .edu-grid__cell--blue,
  .edu-grid__cell--orange {
    padding: var(--space-8) var(--space-5);
  }

  .contact__form-wrapper {
    padding: var(--space-8) var(--space-4);
  }

  .admision-cta__content {
    padding-inline: var(--space-4);
  }
}

/* ============================================================
   18. PRINT
   ============================================================ */
@media print {
  .header,
  .hero__actions,
  .admision-cta,
  .footer {
    display: none;
  }

  body {
    font-size: 12pt;
    color: #000;
  }
}

/* ============================================================
   19. BOOTSTRAP 5 OVERRIDES
   main.css loads after Bootstrap, these rules win by cascade.
   !important used only where Bootstrap specificity would win.
   ============================================================ */

/* 19.1 Buttons */
.btn {
  border-radius: var(--radius-btn) !important;
  font-family: 'Helvetica', Arial, sans-serif !important;
  line-height: inherit !important;
}

.btn:focus,
.btn:focus-visible {
  box-shadow: none !important;
  outline: 3px solid var(--color-orange) !important;
  outline-offset: 3px !important;
}

/* 19.2 Inputs */
.form-input.form-control {
  border-radius: var(--radius-sm) !important;
  font-family: 'Helvetica', Arial, sans-serif !important;
  font-size: max(16px, var(--text-sm)) !important;
  padding: var(--space-3) var(--space-4) !important;
  min-height: 48px !important;
  border: 1px solid var(--color-gray-light) !important;
  color: var(--color-text) !important;
  background-color: var(--color-white) !important;
}

.form-input.form-control:focus {
  border-color: var(--color-blue-dark) !important;
  box-shadow: 0 0 0 3px rgba(9,70,150,0.12) !important;
  outline: none !important;
}

.form-input.form-textarea.form-control {
  min-height: 120px !important;
  resize: vertical !important;
  line-height: 1.6 !important;
}

/* 19.3 Labels */
.form-label {
  margin-bottom: 0 !important;
}

/* 19.4 Body font */
body {
  font-family: 'Helvetica', Arial, sans-serif !important;
}

/* 19.5 Links */
a:not([class*="btn"]) {
  color: inherit;
  text-decoration: none;
}

/* 19.6 Custom container — prevent Bootstrap interference */
.container {
  max-width: var(--container-max) !important;
  padding-inline: var(--space-6) !important;
}

@media (min-width: 768px) and (max-width: 1199px) {
  .container {
    padding-inline: var(--space-8) !important;
  }
}

@media (min-width: 1200px) {
  .container {
    padding-inline: var(--space-12) !important;
  }
}
