/* ============================================================
   HOFAI MINISTRIES — style.css
   Mobile-first, fully responsive
   ============================================================ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: Georgia, 'Times New Roman', serif;
  margin: 0;
  background: #f5fbff;
  font-size: 100%;
  color: #1a1a1a;
  line-height: 1.65;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  display: block;
}

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

/* ── Screen-reader only ── */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ============================================================
   HEADER
   ============================================================ */
header {
  background: white;
  display: flex;
  align-items: center;
  padding: 20px 32px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  gap: 18px;
  min-height: 92px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.logo-area h2 {
  margin: 0;
  font-size: 1.65rem;
  color: #003044;
  white-space: nowrap;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.logo {
  width: 78px;
  height: 78px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* Desktop nav */
nav#main-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

nav#main-nav a {
  text-decoration: none;
  color: #333;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: background 140ms, color 140ms;
}

nav#main-nav a:hover {
  background: #e8f6ff;
  color: #003044;
}

/* Donate nav link — same style as all other nav links */
.donate-btn {
  background: transparent !important;
  color: #333 !important;
  padding: 6px 10px !important;
  border-radius: 6px !important;
  font-weight: normal;
}

.donate-btn:hover {
  background: #e8f6ff !important;
  color: #003044 !important;
}

.nav-link.active {
  color: white !important;
  background: #007acc !important;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
}

/* Hamburger */
.hamburger {
  display: none;
  width: 44px;
  height: 40px;
  background: transparent;
  border: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 8px 6px;
  cursor: pointer;
  z-index: 1100;
  margin-left: auto;
  flex-shrink: 0;
}

.hamburger span {
  display: block;
  height: 3px;
  background: #003044;
  border-radius: 3px;
  transition: transform 260ms ease, opacity 200ms ease;
}

body.nav-open .hamburger span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
body.nav-open .hamburger span:nth-child(2) { opacity: 0; }
body.nav-open .hamburger span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ============================================================
   SECTIONS & LAYOUT
   ============================================================ */
section { padding: 52px 20px; }

/* ── Hero (index.html) ── */
#home {
  background: linear-gradient(180deg, rgba(0,48,68,0.65), rgba(0,48,68,0.65)),
              url('images/hero.jpg') center/cover no-repeat;
  background-color: #003044;
  color: white;
  padding: 100px 20px 80px;
  text-align: center;
}

.main-title {
  color: #ffffff;
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin: 0 0 12px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.45);
  font-weight: 800;
}

.hero-sub {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  max-width: 760px;
  margin: 0 auto 2rem;
  opacity: 0.92;
}

/* ── Two-column page hero ── */
.page-hero { padding: 52px 20px; }

.page-hero.two-col {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  max-width: 1100px;
  margin: 0 auto;
}

.page-hero.two-col .col-text {
  flex: 1 1 0;
  min-width: 0;
  text-align: left;
}

.page-hero.two-col .col-media {
  flex: 0 0 380px;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
}

.hero-img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 10px;
}

/* ── Home CTA row ── */
.home-cta {
  margin: 18px 0;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Home link cards ── */
.home-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.home-links .card {
  background: white;
  padding: 14px;
  border-radius: 8px;
  text-align: left;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  display: block;
  color: inherit;
  text-decoration: none;
}

.home-links .card img { width: 100%; height: 140px; object-fit: cover; border-radius: 6px; }
.home-links .card h4 { margin: 10px 0 6px; }
.home-links .card p  { margin: 0; color: #444; }

/* ── Projects grid ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin: 20px 0 30px;
}

.project {
  background: white;
  padding: 18px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

/* ── Feature grid (sustainability) ── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
  align-items: start;
}

.feature {
  background: white;
  padding: 22px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
  text-align: center;
}

.feature .icon { font-size: 44px; color: #00bfff; margin-bottom: 12px; }
.feature h3 { font-size: 1.15rem; margin: 8px 0; font-weight: 800; }
.feature p  { color: #444; margin: 0; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn,
button.btn {
  background: #00bfff;
  color: white;
  padding: 11px 18px;
  font-size: 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  transition: background 160ms ease, transform 120ms ease, box-shadow 160ms ease;
  line-height: 1.3;
}

.btn:hover,
button.btn:hover {
  background: #009fd8;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,191,255,0.25);
}

.btn.active,
button.btn.active {
  background: #006aa3;
  box-shadow: 0 10px 30px rgba(0,106,163,0.22);
  transform: translateY(-3px) scale(1.01);
}

.btn:focus,
button.btn:focus {
  outline: 3px solid rgba(0,191,255,0.35);
  outline-offset: 2px;
}

/* ============================================================
   CONTACT FOOTER BLOCK
   ============================================================ */
.contact-footer {
  background: #fff;
  padding: 32px 20px;
  text-align: center;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.contact-footer .contact-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 0 10px;
  color: #003044;
}

.contact-footer .contact-email {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 6px 0;
  color: #003044;
}

.contact-footer .contact-phone { margin: 4px 0; color: #444; }

.contact-footer .actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 14px;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer {
  background: white;
  padding: 20px 20px 200px; /* generous bottom so fixed CTA bar never overlaps */
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: 1100px;
  margin: 0 auto;
  flex-wrap: wrap;
  position: relative;   /* needed so socials can be absolutely centred */
}

/* Social icons — always visually centred regardless of lang/call buttons */
.socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.footer-copyright {
  text-align: center;
  font-size: 0.88rem;
  margin-top: 16px;
  color: #555;
}

/* Language selector */
.footer-lang {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-lang .footer-select,
.custom-lang-select {
  background: transparent;
  border: 1px solid rgba(0,0,0,0.12);
  padding: 7px 10px;
  border-radius: 6px;
  color: #003044;
  font-size: 0.92rem;
  cursor: pointer;
}

.socials a {
  color: #00bfff;
  font-size: 22px;
  padding: 6px;
  text-decoration: none;
  border-radius: 6px;
  transition: transform 160ms ease, filter 160ms ease;
  display: inline-flex;
}

.socials a:hover,
.socials a.active {
  transform: translateY(-4px) scale(1.08);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.14));
}

.social.facebook { color: #1877F2; }
.social.instagram { color: #E4405F; }
.social.x        { color: #1DA1F2; }
.social.tiktok   { color: #010101; }
.social.tiktok:hover { color: #EE1D52; }
.social.youtube  { color: #FF0000; }

/* Call button hidden from social icons row — a call button already
   appears in the contact block just above, so this is redundant */
.call-btn {
  display: none !important;
}

/* ============================================================
   WHATSAPP FLOATING BUTTON
   ============================================================ */
/* WhatsApp sits on the LEFT, lifted above the bottom-ctas bar (~62px) */
.whatsapp {
  position: fixed;
  bottom: 76px;        /* above the bottom-ctas bar */
  left: 20px;
  background: #25D366;
  color: white;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  text-decoration: none;
  z-index: 1200;
  box-shadow: 0 4px 14px rgba(37,211,102,0.4);
  transition: transform 160ms ease;
}

.whatsapp:hover { transform: scale(1.08); }

/* ============================================================
   FIXED BOTTOM CTA BAR
   ============================================================ */
.bottom-ctas {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px 14px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(6px);
  border-top: 1px solid rgba(0,0,0,0.07);
  z-index: 998;
}

.bottom-ctas .btn {
  padding: 12px 28px;
  border-radius: 28px;
  font-weight: 700;
  font-size: 0.97rem;
  min-width: 120px;
  text-align: center;
}

.bottom-ctas .btn.donate {
  background: #c0392b;
  color: white;
}

.bottom-ctas .btn.donate:hover {
  background: #a93226;
}

.bottom-ctas .btn.sponsor {
  background: #e67e22;
  color: white;
}

.bottom-ctas .btn.sponsor:hover {
  background: #ca6f1e;
}

/* ============================================================
   BACK TO TOP / GO TO BOTTOM BUTTONS
   Right side, stacked cleanly above the bottom CTA bar.
   bottom-ctas bar is ~60px tall, so:
     backToTop  = 70px  (just above bar)
     goToBottom = 124px (above backToTop with 10px gap)
   ============================================================ */
#backToTop {
  position: fixed;
  bottom: 70px;
  right: 20px;
  z-index: 999;
  background-color: #ff6600;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 18px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  display: none;        /* shown via JS on scroll */
  align-items: center;
  justify-content: center;
}

#goToBottom {
  position: fixed;
  bottom: 124px;
  right: 20px;
  z-index: 999;
  background-color: #006aa3;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 18px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0,0,0,0.22);
  display: none;        /* shown via JS on scroll */
  align-items: center;
  justify-content: center;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  padding: 16px;
}

.modal[aria-hidden="false"] { display: flex; }

.modal-content {
  background: white;
  padding: 24px;
  border-radius: 12px;
  width: min(540px, 100%);
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-close {
  position: absolute;
  right: 14px;
  top: 12px;
  background: transparent;
  border: none;
  font-size: 20px;
  cursor: pointer;
  color: #555;
  line-height: 1;
  padding: 4px 8px;
}

.modal-close:hover { color: #000; }

.modal-methods {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}

.modal-methods .btn { text-align: center; }

/* ============================================================
   MOBILE  ≤ 700 px
   ============================================================ */
@media (max-width: 700px) {

  /* Header */
  header {
    padding: 14px 16px;
    flex-wrap: nowrap;
    min-height: 74px;
  }

  .logo { width: 62px; height: 62px; }
  .logo-area h2 { font-size: 1.3rem; }

  /* Show hamburger, hide desktop nav */
  .hamburger { display: flex; }

  /* Off-canvas slide-in nav */
  nav#main-nav {
    position: fixed;
    top: 0;
    right: -300px;
    width: 270px;
    height: 100vh;
    background: white;
    padding: 24px 20px;
    box-shadow: -8px 0 28px rgba(0,0,0,0.14);
    flex-direction: column;
    gap: 4px;
    transition: right 260ms ease;
    overflow-y: auto;
    z-index: 1050;
    align-items: flex-start;
    margin-left: 0;
  }

  body.nav-open nav#main-nav { right: 0; }

  nav#main-nav a {
    display: block;
    width: 100%;
    padding: 13px 12px;
    font-size: 1.05rem;
    border-radius: 8px;
  }

  /* Two-column hero → single column */
  .page-hero.two-col {
    flex-direction: column;
    gap: 20px;
    padding: 36px 16px;
  }

  .page-hero.two-col .col-media {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
  }

  .page-hero.two-col .col-text {
    flex: 1 1 auto;
    width: 100%;
  }

  .hero-img {
    max-width: 100%;
    max-height: 220px;
  }

  /* Hero section */
  #home { padding: 72px 16px 56px; }
  .main-title { font-size: 2rem; }
  .hero-sub { font-size: 1rem; }

  /* General sections */
  section { padding: 36px 16px; }

  /* Projects / feature grids → single column */
  .projects-grid,
  .feature-grid {
    grid-template-columns: 1fr;
  }

  /* Contact footer */
  .contact-footer .contact-email { font-size: 1rem; }
  .contact-footer .actions { flex-direction: column; align-items: stretch; }
  .contact-footer .actions .btn { text-align: center; }

  /* Footer: socials revert to normal flow (no absolute) on mobile */
  .footer-inner {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: static;
  }

  .socials {
    position: static;
    transform: none;
  }

  footer { padding-bottom: 160px; }

  /* Bottom CTAs bar is ~58px tall */
  .bottom-ctas { padding: 8px 12px 10px; gap: 8px; }
  .bottom-ctas .btn {
    flex: 1 1 auto;
    padding: 11px 10px;
    font-size: 0.9rem;
    min-width: 0;
  }

  /* Floating buttons — right side, above the CTA bar */
  #backToTop  { bottom: 70px;  right: 14px; width: 40px; height: 40px; font-size: 16px; }
  #goToBottom { bottom: 120px; right: 14px; width: 40px; height: 40px; font-size: 16px; }

  /* WhatsApp — left side, also above the CTA bar so it never overlaps */
  .whatsapp { bottom: 70px; left: 14px; width: 46px; height: 46px; font-size: 22px; }

  /* Modal */
  .modal-content { padding: 18px 16px; }

  /* ── Stack ALL two-column inline grids on mobile ── */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  /* Story grid */
  .story-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .story-grid img { height: 220px !important; }

  /* Pillar grid - single column */
  .pillar-grid { grid-template-columns: 1fr !important; }

  /* Counter row - 2 columns on mobile is ok */
  .counter-row { grid-template-columns: 1fr 1fr !important; }

  /* Values row - 2 columns on mobile is ok */
  .values-row { grid-template-columns: 1fr 1fr !important; }

  /* Journey/timeline two col */
  [style*="gap:48px; align-items:start"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  /* Any inline flex row that should stack */
  [style*="display:flex; gap:24px; align-items:center; flex-wrap:wrap"] {
    flex-direction: column !important;
  }

  /* Inline padding reduction */
  [style*="padding:60px 20px"] { padding: 32px 16px !important; }
  [style*="padding:90px 20px"] { padding: 56px 16px !important; }
  [style*="padding:52px 20px"] { padding: 28px 16px !important; }

  /* Image height reductions on mobile */
  [style*="height:360px"] { height: 220px !important; }
  [style*="height:380px"] { height: 220px !important; }
  [style*="height:320px"] { height: 200px !important; }
  [style*="height:300px"] { height: 180px !important; }
  [style*="height:280px"] { height: 180px !important; }

  /* Talent/soccer two-col grid */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }

  /* Font size clamp helps but ensure h1 readable */
  h1 { font-size: clamp(1.6rem, 5vw, 2.2rem) !important; }
  h2 { font-size: clamp(1.3rem, 4vw, 1.75rem) !important; }

  /* Stat cards - 2 per row on mobile */
  .stat-grid { grid-template-columns: 1fr 1fr !important; gap: 12px !important; }
  .stat-card .number { font-size: 1.6rem !important; }

}

/* ============================================================
   TABLET  701 px – 900 px
   ============================================================ */
@media (min-width: 701px) and (max-width: 900px) {

  nav#main-nav { gap: 2px; }
  nav#main-nav a { font-size: 0.85rem; padding: 5px 7px; }

  .page-hero.two-col .col-media {
    flex: 0 0 300px;
    max-width: 300px;
  }

  .hero-img { max-height: 220px; }

  footer { padding-bottom: 180px; }
}

/* ============================================================
   DESKTOP  ≥ 901 px
   ============================================================ */
@media (min-width: 901px) {
  .page-hero { padding: 80px 20px; }
  section { padding: 72px 20px; }
  footer { padding-bottom: 200px; }
}
