/* ====================================================
   ST. SEBASTIAN MADATHIL CHURCH — RESPONSIVE CSS
   Mobile-First Breakpoints
   ==================================================== */

/* ====== TABLET: max 1024px ====== */
@media (max-width: 1024px) {

  :root { --section-py: 72px; }

  /* Header */
  .desktop-nav { display: none; }
  .menu-toggle { display: flex; }

  /* About intro */
  .about-intro .inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .about-img-wrap img { height: 360px; }
  .about-img-wrap::before { display: none; }

  /* Patron */
  .patron-inner {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .patron-img img { max-height: 340px; width: 100%; }
  .saint-highlights { grid-template-columns: repeat(2, 1fr); }

  /* History timeline — switch to single column */
  .timeline::before { left: 28px; }
  .timeline-item {
    grid-template-columns: 56px 1fr;
    grid-template-rows: auto;
  }
  .timeline-item:nth-child(odd) .tl-dot,
  .timeline-item:nth-child(even) .tl-dot  { grid-column: 1; }
  .timeline-item:nth-child(odd) .tl-card,
  .timeline-item:nth-child(even) .tl-card { grid-column: 2; text-align: left; margin-left: 20px; margin-right: 0; }
  .tl-empty { display: none !important; }

  /* Former priests */
  .priests-grid { grid-template-columns: repeat(2, 1fr); }

  /* Priest profile */
  .priest-profile-inner {
    grid-template-columns: 1fr;
    gap: 44px;
  }
  .priest-photo-wrap { position: static; }
  .priest-photo-wrap img { max-width: 320px; margin: 0 auto; }

  /* Responsibilities */
  .resp-grid { grid-template-columns: repeat(2, 1fr); }

  /* Office */
  .office-grid { grid-template-columns: repeat(3, 1fr); }

  /* Mass schedule */
  .schedule-grid { grid-template-columns: 1fr; gap: 18px; max-width: 500px; margin: 0 auto; }

  /* Adoration */
  .adoration-grid { grid-template-columns: 1fr; }

  /* Holy days */
  .holy-days-grid { grid-template-columns: repeat(3, 1fr); }

  /* Gallery */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }

  /* Contact */
  .contact-cards { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto 48px; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 36px; }
}

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

  :root {
    --section-py: 60px;
    --header-h: 68px;
  }

  /* Header */
  .header-inner { padding: 0 20px; }
  .nav-logo-sub { display: none; }
  .nav-logo img { width: 40px; height: 40px; }
  .nav-logo-name { font-size: 0.95rem; }

  /* Desktop lang btn hidden on mobile */
  .header-actions .lang-btn { display: none; }

  /* Hero */
  .home-hero { height: calc(100svh - var(--header-h)); min-height: 500px; }
  .hero-bg.desktop-src { display: none; }
  .hero-bg.mobile-src  { display: block; }
  .hero-church-name { font-size: clamp(2.2rem, 10vw, 3.5rem); letter-spacing: 0.03em; }

  /* Page banner */
  .page-banner { height: 260px; }
  .banner-body h1 { font-size: clamp(1.7rem, 6vw, 2.4rem); }

  /* Section header */
  .section-header { margin-bottom: 40px; }
  .section-header h2 { font-size: clamp(1.5rem, 5vw, 2rem); }

  /* About features */
  .about-features { grid-template-columns: 1fr; gap: 10px; }

  /* MV grid */
  .mv-grid { grid-template-columns: 1fr; }
  .mv-card { padding: 32px 28px; }

  /* Saint highlights */
  .saint-highlights { grid-template-columns: repeat(2, 1fr); }

  /* Join buttons */
  .join-btns { flex-direction: column; align-items: center; }
  .join-btns .btn { width: 100%; max-width: 300px; justify-content: center; }

  /* Priests grid */
  .priests-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }

  /* History gallery */
  .hist-img-grid { grid-template-columns: 1fr; }
  .hist-img-grid img { height: 220px; }

  /* Resp grid */
  .resp-grid { grid-template-columns: repeat(2, 1fr); }

  /* Office grid */
  .office-grid { grid-template-columns: 1fr; max-width: 340px; margin: 0 auto; }

  /* Priest blockquote */
  .priest-blockquote { padding: 40px 28px; }
  .priest-blockquote p { font-size: 1.15rem; }

  /* Schedule */
  .schedule-grid { max-width: 100%; }

  /* Adoration card */
  .adoration-card { flex-direction: column; gap: 16px; padding: 28px 24px; }

  /* Holy days */
  .holy-days-grid { grid-template-columns: 1fr; max-width: 360px; margin: 0 auto; }

  /* Notice box */
  .notice-box { padding: 28px 24px; }

  /* Gallery */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* Contact cards */
  .contact-cards { grid-template-columns: 1fr; max-width: 100%; }

  /* Hours */
  .hours-row { padding: 14px 20px; }

  /* FAQ */
  .faq-q h4 { font-size: 0.9rem; }

  /* Social cards */
  .social-cards { flex-direction: column; align-items: center; }
  .social-card { min-width: 240px; max-width: 300px; justify-content: center; }

  /* Footer */
  .footer-inner { padding-bottom: 36px; }
  .footer-desc { max-width: 100%; }

  /* Map */
  .map-wrapper iframe { height: 320px; }

  /* Hero actions */
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 300px; justify-content: center; }

  /* Lightbox */
  .lightbox-close { top: -14px; right: -10px; width: 40px; height: 40px; }

  /* Back to top */
  .back-to-top { bottom: 24px; right: 20px; width: 44px; height: 44px; font-size: 0.9rem; }
}

/* ====== SMALL MOBILE: max 480px ====== */
@media (max-width: 480px) {

  .container { padding: 0 18px; }

  /* Nav logo */
  .nav-logo-name { font-size: 0.88rem; }

  /* About features */
  .about-features { grid-template-columns: 1fr; }

  /* Priests — single column on small phones */
  .priests-grid { grid-template-columns: 1fr; max-width: 280px; margin: 0 auto; }

  /* Responsibilities */
  .resp-grid { grid-template-columns: 1fr; max-width: 280px; margin: 0 auto; }

  /* Gallery */
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item { aspect-ratio: 16/10; }

  /* Miss page schedule */
  .schedule-card { padding: 32px 22px; }

  /* Section header */
  .section-label { font-size: 0.65rem; }

  /* Buttons */
  .btn { padding: 12px 22px; font-size: 0.82rem; }

  /* Page banner */
  .page-banner { height: 230px; }
}

/* ====== PREVENT HORIZONTAL SCROLL ====== */
body, .site-header, .home-hero, .page-banner,
.about-intro, .mv-section, .patron-section,
.timeline-section, .former-priests, .history-gallery,
.schedule-section, .adoration-section, .holy-days-section,
.notice-section, .gallery-section, .contact-section,
.map-section, .hours-section, .faq-section, .social-section,
.site-footer {
  max-width: 100vw;
  overflow-x: hidden;
}

/* ====== PRINT ====== */
@media print {
  .site-header, .back-to-top, .mobile-nav, .mobile-overlay { display: none !important; }
  body { padding-top: 0; }
}
/* =========================================================
   FINAL FOOTER FIX
   This must be at the VERY END of responsive.css
   ========================================================= */

/* ---------- DESKTOP / LAPTOP ---------- */

.site-footer {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 40px 0 0 !important;
  overflow: hidden !important;
}

.site-footer .container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
}

.site-footer .footer-inner {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 260px !important;
  gap: 50px !important;
  align-items: start !important;

  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;

  padding: 0 0 30px !important;
  margin: 0 !important;

  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.site-footer .footer-brand {
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
}

.site-footer .footer-logo-wrap {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin: 0 0 10px !important;
}

.site-footer .footer-logo-wrap img {
  width: 44px !important;
  height: 44px !important;
}

.site-footer .footer-church-name {
  font-size: 1.2rem !important;
  line-height: 1.25 !important;
}

.site-footer .footer-tagline {
  margin: 0 0 8px !important;
  font-size: 0.76rem !important;
}

.site-footer .footer-desc {
  max-width: 390px !important;
  margin: 0 !important;
  font-size: 0.85rem !important;
  line-height: 1.6 !important;
}

.site-footer .footer-social {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  margin: 16px 0 0 !important;
}

.site-footer .footer-social a {
  width: 38px !important;
  height: 38px !important;
  min-width: 38px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* QUICK LINKS */

.site-footer .footer-nav {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  align-self: start !important;
}

.site-footer .footer-nav h4 {
  margin: 0 0 12px !important;
  padding: 0 !important;
}

.site-footer .footer-nav ul {
  margin: 0 !important;
  padding: 0 !important;
}

.site-footer .footer-nav ul li {
  margin: 0 0 6px !important;
  padding: 0 !important;
}

.site-footer .footer-nav ul li:last-child {
  margin-bottom: 0 !important;
}

.site-footer .footer-nav ul li a {
  display: flex !important;
  align-items: center !important;
  gap: 7px !important;
  padding: 0 !important;
  margin: 0 !important;
  font-size: 0.84rem !important;
  line-height: 1.5 !important;
}

/* COPYRIGHT */

.site-footer .footer-bottom {
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 14px 18px !important;
  margin: 0 !important;
  text-align: center !important;
}

.site-footer .footer-bottom p {
  margin: 0 !important;
  padding: 0 !important;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1024px) {

  .site-footer {
    padding-top: 34px !important;
  }

  .site-footer .footer-inner {
    grid-template-columns: minmax(0, 1fr) 220px !important;
    gap: 35px !important;
  }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 768px) {

  .site-footer {
    padding-top: 28px !important;
  }

  .site-footer .footer-inner {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 24px !important;

    padding-bottom: 24px !important;

    height: auto !important;
    min-height: 0 !important;
  }

  .site-footer .footer-brand {
    height: auto !important;
    min-height: 0 !important;
  }

  .site-footer .footer-logo-wrap {
    margin-bottom: 8px !important;
  }

  .site-footer .footer-logo-wrap img {
    width: 40px !important;
    height: 40px !important;
  }

  .site-footer .footer-church-name {
    font-size: 1.08rem !important;
  }

  .site-footer .footer-tagline {
    margin-bottom: 7px !important;
    font-size: 0.7rem !important;
  }

  .site-footer .footer-desc {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 0.82rem !important;
    line-height: 1.6 !important;
    margin: 0 !important;
  }

  .site-footer .footer-social {
    margin-top: 14px !important;
    gap: 9px !important;
  }

  .site-footer .footer-social a {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
  }

  /* Quick links immediately below social icons */
  .site-footer .footer-nav {
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    min-height: 0 !important;
  }

  .site-footer .footer-nav h4 {
    margin: 0 0 9px !important;
  }

  .site-footer .footer-nav ul li {
    margin-bottom: 4px !important;
  }

  .site-footer .footer-nav ul li a {
    font-size: 0.82rem !important;
    line-height: 1.5 !important;
  }

  .site-footer .footer-bottom {
    padding: 12px 15px !important;
  }

}


/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 480px) {

  .site-footer {
    padding-top: 24px !important;
  }

  .site-footer .footer-inner {
    gap: 20px !important;
    padding-bottom: 20px !important;
  }

  .site-footer .footer-church-name {
    font-size: 1rem !important;
  }

  .site-footer .footer-desc {
    font-size: 0.78rem !important;
  }

  .site-footer .footer-social {
    margin-top: 12px !important;
  }

  .site-footer .footer-social a {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
  }

  .site-footer .footer-nav h4 {
    font-size: 0.65rem !important;
  }

  .site-footer .footer-nav ul li {
    margin-bottom: 3px !important;
  }

  .site-footer .footer-nav ul li a {
    font-size: 0.78rem !important;
  }

  .site-footer .footer-bottom {
    font-size: 0.67rem !important;
  }

}
/* =========================================================
   ABOUT IMAGE FIX — PHONE DESKTOP SITE MODE
   ========================================================= */

/* =========================================================
   ABOUT PAGE — PHONE DESKTOP SITE MODE FIX
   ========================================================= */

@media (min-width: 769px) and (max-width: 1024px) {

  /* ==============================
     ABOUT CHURCH IMAGE
     ============================== */

  .about-img-wrap {
    width: 100% !important;
    max-width: 560px !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    margin: 0 auto !important;
    overflow: hidden !important;
  }

  .about-img-wrap img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    display: block !important;
  }


  /* ==============================
     PATRON SAINT IMAGE
     ============================== */

  .patron-img {
    width: 100% !important;
    max-width: 560px !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    margin: 0 auto !important;
    overflow: hidden !important;
  }

  .patron-img img {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover !important;
    display: block !important;
  }

}
/* =========================================================
   LAPTOP / DESKTOP HOME HERO FIX
   REAL COMPUTER ONLY
   ========================================================= */

@media (min-width: 1025px) and (hover: hover) and (pointer: fine) {

    .home-hero {
        width: 100% !important;
        height: 720px !important;
        min-height: 720px !important;
        overflow: hidden !important;
        position: relative !important;
    }

    .home-hero .hero-bg.desktop-src {
        display: block !important;
        width: 100% !important;
        height: 100% !important;

        object-fit: fill !important;
        object-position: center center !important;
    }

    .home-hero .hero-bg.mobile-src {
        display: none !important;
    }
}
/* =========================================================
   MOBILE FOOTER — COMPACT 2 COLUMN LAYOUT
   ========================================================= */

@media (max-width: 768px) {

    .site-footer .footer-inner {
        display: grid !important;
        grid-template-columns: 1.35fr 0.85fr !important;
        gap: 25px !important;
        align-items: start !important;
    }

    /* Footer brand */
    .site-footer .footer-brand {
        min-width: 0 !important;
    }

    .site-footer .footer-logo-wrap {
        display: flex !important;
        align-items: center !important;
        gap: 8px !important;
    }

    .site-footer .footer-logo-wrap img {
        width: 38px !important;
        height: 38px !important;
    }

    .site-footer .footer-church-name {
        font-size: 0.9rem !important;
        line-height: 1.2 !important;
    }

    .site-footer .footer-tagline {
        font-size: 0.68rem !important;
        margin: 12px 0 !important;
    }

    .site-footer .footer-desc {
        font-size: 0.68rem !important;
        line-height: 1.5 !important;
        max-width: 100% !important;
    }

    /* Social icons */
    .site-footer .footer-social {
        gap: 8px !important;
        margin-top: 15px !important;
    }

    .site-footer .footer-social a {
        width: 34px !important;
        height: 34px !important;
        font-size: 0.75rem !important;
    }

    /* Quick Links */
    .site-footer .footer-nav {
        min-width: 0 !important;
    }

    .site-footer .footer-nav h4 {
        font-size: 0.7rem !important;
        margin-bottom: 12px !important;
    }

    .site-footer .footer-nav ul {
        margin: 0 !important;
        padding: 0 !important;
    }

    .site-footer .footer-nav li {
        margin-bottom: 7px !important;
    }

    .site-footer .footer-nav a {
        font-size: 0.68rem !important;
        line-height: 1.3 !important;
    }

    /* Copyright */
    .site-footer .footer-bottom {
        margin-top: 25px !important;
    }

    .site-footer .footer-bottom p {
        font-size: 0.58rem !important;
        text-align: center !important;
    }
}