/* ============================================================
   SITE FOOTER — Premium v3
   Desktop  : Newsletter row + 4-col grid + bottom bar
   Tablet   : Brand full-width, Company|Programs 2-col, Contact full
   Mobile   : Brand full → 2-col links → Contact card (v3 rewrite)
   Small    : Compressed typography, still 2-col links
   ============================================================ */

.site-footer {
  position: relative;
  background-color: var(--navy);
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(253, 197, 0, 0.06) 0%, transparent 55%),
    radial-gradient(ellipse at 100% 100%, rgba(0, 41, 107, 0.35) 0%, transparent 60%),
    linear-gradient(to right, rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
  color: var(--white);
  padding: 5rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(253, 197, 0, 0.55) 35%,
    rgba(253, 197, 0, 0.55) 65%,
    transparent 100%);
  pointer-events: none;
  z-index: 2;
}

.site-footer .el-container {
  position: relative;
  z-index: 1;
}

/* ============================================
   NEWSLETTER STRIP
   ============================================ */
.footer-newsletter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 0 0 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 4rem;
}

.newsletter-text h3 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 0.4rem;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.newsletter-text p {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--slate-400);
  line-height: 1.5;
  max-width: 480px;
}

.newsletter-form {
  display: flex;
  gap: 0.5rem;
  width: 100%;
  max-width: 460px;
}

.newsletter-input {
  flex: 1;
  min-width: 0;
  padding: 14px 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  color: var(--white);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition:
    border-color .25s var(--ease),
    background .25s var(--ease),
    box-shadow .25s var(--ease);
}
.newsletter-input::placeholder { color: var(--slate-400); }
.newsletter-input:focus {
  border-color: var(--gold);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 4px rgba(253, 197, 0, 0.12);
}

.newsletter-btn {
  padding: 0 26px;
  background: linear-gradient(135deg, var(--gold) 0%, #e0a800 100%);
  color: var(--navy);
  border: none;
  border-radius: 99px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(253, 197, 0, 0.25);
  transition:
    transform .25s var(--ease),
    box-shadow .25s var(--ease),
    background .25s var(--ease);
}
.newsletter-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(253, 197, 0, 0.4);
  background: var(--white);
}
.newsletter-btn:active { transform: translateY(0); }

/* ============================================
   MAIN FOOTER GRID — Desktop (4-col)
   ============================================ */
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

/* ---------- Brand column ---------- */
.footer-brand .logo {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--white);
  text-decoration: none;
  margin-bottom: 1rem;
  transition: opacity .25s var(--ease);
}
.footer-brand .logo:hover { opacity: 0.85; }
.footer-brand .logo span { color: var(--gold); }
.footer-brand .logo img { display: block; }

.footer-slogan {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--slate-400);
  line-height: 1.75;
  margin-bottom: 1.75rem;
  max-width: 340px;
}

.footer-socials {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.footer-socials a {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-decoration: none;
  font-size: 15px;
  transition: all .25s var(--ease);
}
.footer-socials a:hover {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy);
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(253, 197, 0, 0.3);
}

/* ---------- Link columns ---------- */
.footer-col h4 {
  position: relative;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.footer-col h4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.footer-links a {
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--slate-400);
  text-decoration: none;
  display: inline-block;
  overflow-wrap: break-word;
  word-break: break-word;
  transition: color .25s var(--ease), transform .25s var(--ease);
}
.footer-links a:hover {
  color: var(--gold);
  transform: translateX(4px);
}

/* ---------- Contact column ---------- */
.footer-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--slate-400);
  line-height: 1.55;
}
.footer-contact-list li i {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(253, 197, 0, 0.1);
  border: 1px solid rgba(253, 197, 0, 0.22);
  border-radius: 8px;
  color: var(--gold);
  font-size: 13px;
}
.footer-contact-list li span { padding-top: 6px; }

/* ============================================
   BOTTOM BAR
   ============================================ */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--slate-400);
  flex-wrap: wrap;
}
.footer-bottom p { margin: 0; }

.footer-legal {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-legal a {
  color: var(--slate-400);
  text-decoration: none;
  transition: color .25s;
}
.footer-legal a:hover { color: var(--gold); }

/* ============================================
   TABLET — ≤1024px
   Brand full → Company|Programs → Contact full
   ============================================ */
@media (max-width: 1024px) {
  .site-footer { padding: 4rem 0 0; }

  .footer-newsletter {
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
    padding-bottom: 2.5rem;
    margin-bottom: 3rem;
  }
  .newsletter-form { max-width: 100%; width: 100%; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "brand   brand"
      "company programs"
      "contact contact";
    column-gap: 2.5rem;
    row-gap: 2.5rem;
    margin-bottom: 3rem;
  }
  .footer-brand {
    grid-area: brand;
    text-align: center;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .footer-brand .logo { justify-content: center; }
  .footer-slogan { margin: 0 auto 1.5rem; max-width: 460px; }
  .footer-socials { justify-content: center; }

  .footer-col:nth-child(2) { grid-area: company; }
  .footer-col:nth-child(3) { grid-area: programs; }
  .footer-col:nth-child(4) { grid-area: contact; }
}

/* ============================================
   MOBILE — ≤768px (v3 REWRITE)
   2-col link groups + Contact as highlighted card
   ============================================ */
@media (max-width: 768px) {
  .site-footer { padding: 3.5rem 0 0; }

  .footer-newsletter {
    padding-bottom: 2rem;
    margin-bottom: 2.5rem;
    gap: 1.25rem;
  }
  .newsletter-text h3 { font-size: 1.35rem; }
  .newsletter-text p { font-size: 0.9rem; }

  /* ---- Grid: brand → 2-col links → contact card ---- */
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "brand   brand"
      "company programs"
      "contact contact";
    column-gap: 1.5rem;
    row-gap: 0;
    margin-bottom: 2rem;
  }

  /* Brand — centered, divider below */
  .footer-brand {
    grid-area: brand;
    text-align: center;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .footer-brand .logo { justify-content: center; }
  .footer-slogan { margin: 0 auto 1.5rem; max-width: 460px; }
  .footer-socials { justify-content: center; }

  /* Company + Programs — side-by-side */
  .footer-col:nth-child(2) {
    grid-area: company;
    padding: 2rem 0 1.5rem;
  }
  .footer-col:nth-child(3) {
    grid-area: programs;
    padding: 2rem 0 1.5rem;
  }

  /* Contact — full-width highlighted card */
  .footer-col:nth-child(4) {
    grid-area: contact;
    margin-top: 1rem;
    padding: 1.5rem 1.25rem;
    background: linear-gradient(135deg,
      rgba(253, 197, 0, 0.05) 0%,
      rgba(255, 255, 255, 0.015) 100%);
    border: 1px solid rgba(253, 197, 0, 0.15);
    border-radius: 16px;
  }
  .footer-col:nth-child(4) h4 { margin-bottom: 1.25rem; }

  /* Headings stay left-aligned */
  .footer-col h4 { text-align: left; margin-bottom: 1.25rem; }
  .footer-col h4::after { left: 0; transform: none; }

  /* Tighter links inside 2-col layout */
  .footer-links { gap: 0.75rem; }
  .footer-links a { font-size: 0.9rem; line-height: 1.4; }

  /* Contact items — clean rows inside the card (no double-card) */
  .footer-contact-list { gap: 0.85rem; }
  .footer-contact-list li {
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    font-size: 0.9rem;
  }
  .footer-contact-list li i {
    width: 32px;
    height: 32px;
    background: rgba(253, 197, 0, 0.16);
    border-color: rgba(253, 197, 0, 0.3);
  }
  .footer-contact-list li span { padding-top: 5px; }

  /* Bottom bar */
  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 2rem 0;
  }
  .footer-legal { justify-content: center; gap: 1.25rem; }
}

/* ============================================
   SMALL PHONES — ≤480px
   ============================================ */
@media (max-width: 480px) {
  .site-footer { padding: 3rem 0 0; }

  /* Newsletter */
  .newsletter-form {
    flex-direction: column;
    gap: 0.75rem;
  }
  .newsletter-input {
    padding: 14px 20px;
    text-align: center;
  }
  .newsletter-btn {
    padding: 14px 24px;
    width: 100%;
    font-size: 14px;
  }
  .newsletter-text h3 { font-size: 1.25rem; }
  .newsletter-text p { font-size: 0.875rem; }

  /* Brand */
  .footer-brand .logo { font-size: 1.5rem; }
  .footer-slogan { font-size: 0.9rem; }
  .footer-socials a { width: 40px; height: 40px; font-size: 14px; }

  /* 2-col links — tighter */
  .footer-grid { column-gap: 1rem; }
  .footer-col h4 {
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
  }
  .footer-links { gap: 0.65rem; }
  .footer-links a { font-size: 0.85rem; }
  .footer-col:nth-child(2),
  .footer-col:nth-child(3) { padding: 1.75rem 0 1.25rem; }

  /* Contact card */
  .footer-col:nth-child(4) {
    padding: 1.25rem 1rem;
    border-radius: 14px;
  }
  .footer-contact-list { gap: 0.75rem; }
  .footer-contact-list li { font-size: 0.85rem; gap: 10px; }
  .footer-contact-list li i { width: 30px; height: 30px; font-size: 12px; }
  .footer-contact-list li span { padding-top: 4px; }

  /* Bottom */
  .footer-bottom { font-size: 12px; }
  .footer-legal {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }
}

/* ============================================
   TINY PHONES — ≤360px (iPhone SE 1st gen)
   Keep 2-col links, tighten typography
   ============================================ */
@media (max-width: 360px) {
  .site-footer { padding: 2.5rem 0 0; }
  .newsletter-text h3 { font-size: 1.15rem; }
  .footer-brand .logo { font-size: 1.35rem; }
  .footer-socials a { width: 38px; height: 38px; font-size: 13px; }

  .footer-grid { column-gap: 0.75rem; }
  .footer-col h4 { font-size: 0.75rem; }
  .footer-links a { font-size: 0.8rem; }
  .footer-links { gap: 0.55rem; }

  .footer-col:nth-child(4) { padding: 1rem 0.85rem; }
  .footer-contact-list li { font-size: 0.8rem; }
  .footer-contact-list li i { width: 28px; height: 28px; font-size: 11px; }
}

/* ============================================
   SAFE AREA (notched iPhones)
   ============================================ */
@supports (padding: env(safe-area-inset-bottom)) {
  .site-footer {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
.newsletter-input:focus-visible,
.newsletter-btn:focus-visible,
.footer-socials a:focus-visible,
.footer-links a:focus-visible,
.footer-legal a:focus-visible,
.footer-brand .logo:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
  .newsletter-btn,
  .footer-socials a,
  .footer-links a,
  .footer-legal a,
  .footer-brand .logo,
  .newsletter-input {
    transition: none;
  }
}