/* =============================================
   CSS CUSTOM PROPERTIES
   ============================================= */
:root {
    --primary-color: #1A3A5F;
    --accent-color: #D4AF37;
    --text-dark: #1F2937;
    --text-muted: #4B5563;
    --text-light: #F8F9FA;
    --bg-light: #F4F6F9;
    --bg-dark: #1A3A5F;
    --white: #FFFFFF;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.35s cubic-bezier(0.165, 0.84, 0.44, 1);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.09);
    --shadow-lg: 0 16px 40px rgba(0,0,0,0.12);
    --radius: 16px;
    --radius-sm: 8px;
    --max-width: 1200px;
    --header-h: 64px;
}

/* =============================================
   RESET & BASE  (Mobile-first)
   ============================================= */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    /* Prevent iOS font size inflation */
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    /* Prevent any horizontal overflow */
    overflow-x: hidden;
    max-width: 100vw;
}

h1, h2, h3, h4, .logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1.25;
}

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

a { color: inherit; }

ul { list-style: none; }

/* =============================================
   LAYOUT UTILITIES
   ============================================= */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin-inline: auto;
    padding-inline: 1rem;       /* 16px on mobile */
}

/* Section vertical rhythm — mobile base */
.section-padding {
    padding-block: 2.25rem;     /* 36px on mobile */
}

.bg-light  { background-color: var(--bg-light); }
.bg-dark   { background-color: var(--bg-dark); }
.text-white { color: var(--text-light); }

/* =============================================
   SECTION HEADER
   ============================================= */
.section-header {
    text-align: center;
    margin-bottom: 1.25rem;     /* 20px — compact */
}

.section-header h2 {
    font-size: clamp(1.5rem, 4.5vw, 2.25rem);
    color: var(--primary-color);
    display: inline-block;
    padding-bottom: 0.6rem;
    position: relative;
    letter-spacing: -0.3px;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.section-header p {
    font-size: clamp(0.95rem, 2.5vw, 1.1rem);
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.section-header.align-left {
    text-align: left;
    margin-bottom: 0.85rem;
}
.section-header.align-left h2::after {
    left: 0;
    transform: none;
}

.sub-header {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* =============================================
   HEADER & NAVIGATION  (Mobile-first)
   ============================================= */
#main-header {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-h);
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 1rem;
}

/* Logo */
.logo a {
    text-decoration: none;
    color: var(--primary-color);
    font-size: clamp(1rem, 3vw, 1.4rem);
    display: flex;
    flex-direction: column;
    gap: 2px;
    line-height: 1.1;
}

.logo .location {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Desktop nav links (hidden on mobile) */
#main-nav ul {
    display: none;              /* hidden by default (mobile) */
    list-style: none;
    gap: 0.25rem;
    align-items: center;
}

#main-nav a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

#main-nav a:hover {
    color: var(--primary-color);
    background: var(--bg-light);
}

.nav-cta {
    background-color: var(--primary-color) !important;
    color: white !important;
    padding: 0.6rem 1.25rem !important;
    border-radius: 50px !important;
}

.nav-cta:hover {
    background-color: var(--accent-color) !important;
    color: var(--primary-color) !important;
}

/* Hamburger button */
.mobile-menu-toggle {
    display: flex;              /* always visible until overridden */
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    flex-shrink: 0;
    /* Touch-friendly hit area */
    min-width: 44px;
    min-height: 44px;
    align-items: center;
}

.mobile-menu-toggle span {
    width: 28px;
    height: 2.5px;
    background-color: var(--primary-color);
    border-radius: 3px;
    transition: var(--transition);
}

/* Animated X state */
.mobile-menu-toggle.active span:nth-child(1) { transform: translateY(8.75px) rotate(45deg); }
.mobile-menu-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.mobile-menu-toggle.active span:nth-child(3) { transform: translateY(-8.75px) rotate(-45deg); }

/* Full-screen mobile nav overlay */
#main-nav ul.active {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-h);
    left: 0;
    width: 100%;
    height: calc(100dvh - var(--header-h));
    background: var(--white);
    padding: 2rem 1.5rem;
    gap: 0.5rem;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    z-index: 999;
}

#main-nav ul.active li { width: 100%; }

#main-nav ul.active a {
    display: block;
    padding: 0.9rem 1rem;
    font-size: 1.1rem;
    border-radius: var(--radius-sm);
    border-bottom: 1px solid var(--bg-light);
}

#main-nav ul.active .nav-cta {
    margin-top: 0.75rem;
    text-align: center;
}

/* =============================================
   HERO SECTION
   ============================================= */
.hero {
    position: relative;
    min-height: 100svh;         /* safe viewport unit */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
    padding-top: var(--header-h);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.4);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding-block: 3rem;
}

.hero-content h1 {
    font-size: clamp(1.9rem, 6vw, 4.5rem);
    margin-bottom: 1rem;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
    animation: fadeInUp 0.9s ease-out both;
}

.hero-content .subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 0.9s ease-out 0.2s both;
}

.hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    animation: fadeInUp 0.9s ease-out 0.4s both;
}

/* =============================================
   BUTTONS
   ============================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;  /* min 44px height */
    min-height: 44px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
}

.btn-primary  { background: var(--primary-color); color: white; border-color: var(--primary-color); }
.btn-secondary { background: transparent; border-color: white; color: white; }
.btn-gold     { background: var(--accent-color); color: var(--primary-color); border-color: var(--accent-color); }

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.btn-block { width: 100%; }

/* =============================================
   ABOUT US SECTION
   ============================================= */
.container-overview {
    display: grid;
    grid-template-columns: 1fr;  /* single column on mobile */
    gap: 2.5rem;
}

.about-p {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    line-height: 1.8;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.about-stack { margin-bottom: 2rem; }

/* Timeline */
.timeline-slim {
    position: relative;
    padding-left: 3rem;
}

.timeline-slim::before {
    content: '';
    position: absolute;
    left: 1.1rem;
    top: 0;
    height: 100%;
    width: 2px;
    background: var(--bg-light);
}

.timeline-step {
    position: relative;
    margin-bottom: 1.5rem;
}

.step-marker {
    position: absolute;
    left: -3rem;
    width: 2.25rem;
    height: 2.25rem;
    background: var(--primary-color);
    color: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    z-index: 2;
    border: 3px solid white;
    box-shadow: var(--shadow-sm);
}

.step-content {
    background: white;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--accent-color);
    transition: var(--transition);
}

.step-content:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-lg);
}

.step-content h3 {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.step-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

/* Clergy card */
.clergy-card-premium {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.clergy-card-premium:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.priest-image {
    height: min(260px, 40vw);
    flex-shrink: 0;
}

.priest-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.clergy-info { padding: 1.5rem; }

.clergy-info h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 4px;
}

.clergy-info .title {
    font-size: 0.85rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.priest-bio {
    font-style: italic;
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.clergy-links-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.clergy-contact-link {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    transition: var(--transition);
}

.clergy-contact-link:hover { color: var(--accent-color); }

/* =============================================
   MASS TIMINGS
   ============================================= */
.timings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.timing-col h3 {
    margin-bottom: 1rem;
    color: var(--accent-color);
    font-size: 1rem;
}

.timing-list { list-style: none; }

.timing-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
}

.timing-list.highlighted li {
    font-weight: 700;
    color: var(--accent-color);
}

.devotions-header {
    margin-bottom: 0.75rem;
}

.devotions-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.devotion-item {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 1rem 0.75rem;
    border-radius: var(--radius-sm);
    text-align: center;
}

.devotion-item span {
    display: block;
    font-size: 0.75rem;
    opacity: 0.7;
    margin-bottom: 4px;
}

.devotion-item strong { font-size: 0.9rem; }

.devotion-item.wide {
    grid-column: 1 / -1;
    background: var(--accent-color);
    color: var(--primary-color);
}

/* =============================================
   MINISTRIES
   ============================================= */
.ministry-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.ministry-card {
    background: white;
    padding: 1.25rem 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.04);
    min-height: 44px;
}

.ministry-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-md);
}

.card-icon {
    font-size: 0.85rem;
    background: var(--bg-light);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--primary-color);
    margin: 0 auto 0.75rem;
    font-weight: 700;
}

.ministry-card h3 {
    font-size: 0.9rem;
    color: var(--primary-color);
}

.anbiam-header { margin: 1.5rem 0 0.6rem; }
.anbiam-header h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
}

.anbiam-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.anbiam-card {
    background: var(--bg-light);
    padding: 0.85rem;
    text-align: center;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
}

/* =============================================
   EVENTS / ACCORDION
   ============================================= */
.accordion {
    width: 100%;
    max-width: 800px;
    margin-inline: auto;
}

.accordion-item {
    margin-bottom: 0.6rem;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.04);
}

.accordion-header {
    width: 100%;
    padding: 1rem 1.25rem;
    min-height: 52px;           /* touch-friendly */
    text-align: left;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--primary-color);
    transition: background 0.2s;
    font-family: inherit;
}

.accordion-header:hover { background: var(--bg-light); }
.accordion-header .icon { font-size: 1.4rem; flex-shrink: 0; }

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    padding: 0 1.25rem;
}

.accordion-content ul { padding-bottom: 1rem; list-style: none; }
.accordion-content li { padding: 0.35rem 0; font-size: 0.95rem; }

/* =============================================
   GALLERY
   ============================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.gallery-item {
    height: 180px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img { transform: scale(1.08); }

/* =============================================
   MEDIA / SOCIAL
   ============================================= */
.social-links-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.social-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.5rem;
    min-height: 56px;           /* touch-friendly */
    border-radius: var(--radius);
    text-decoration: none;
    color: white;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition);
}

.social-icon { font-size: 1.4rem; }
.social-card.youtube  { background: #ff0000; }
.social-card.facebook { background: #1877f2; }
.social-card.instagram { background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }
.social-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* =============================================
   DONATE
   ============================================= */
.donation-card {
    background: white;
    padding: 2rem 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border-top: 5px solid var(--accent-color);
}

.bank-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f3f5;
}

.detail-row span {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.detail-row strong {
    font-size: 1rem;
    color: var(--primary-color);
}

.copy-btn {
    align-self: flex-start;
    background: var(--bg-light);
    border: none;
    padding: 0.35rem 0.85rem;
    min-height: 36px;
    border-radius: 4px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.copy-btn:hover { background: var(--accent-color); color: white; }

/* =============================================
   CONTACT SECTION
   ============================================= */
.contact-side-final { width: 100%; }

.contact-card-neat {
    background: white;
    padding: 1.75rem 1.25rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border-left: 5px solid var(--accent-color);
}

.contact-card-neat address {
    font-style: normal;
    font-size: 1rem;
    line-height: 1.8;
}

.card-divider {
    border: none;
    height: 1px;
    background: #eee;
    margin: 1.25rem 0;
}

.contact-meta-neat p {
    margin-bottom: 0.75rem;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.contact-meta-neat a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 600;
}

/* =============================================
   FOOTER
   ============================================= */
#main-footer {
    background: var(--bg-dark);
    color: white;
    padding: 1.75rem 0 0;
    margin-top: 0;
}

/* Two-column layout on tablet+, stacked on mobile */
.footer-top {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Left column: brand + contact + socials */
.footer-left {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-name {
    font-size: 1.1rem;
    margin-bottom: 0.1rem;
}

.footer-address {
    font-size: 0.82rem;
    opacity: 0.72;
    line-height: 1.6;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.footer-contact a {
    color: rgba(255,255,255,0.78);
    text-decoration: none;
    font-size: 0.82rem;
    transition: var(--transition);
    line-height: 1.5;
}

.footer-contact a:hover { color: var(--accent-color); }

/* Social icon row */
.footer-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.25rem;
}

.social-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: var(--transition);
    flex-shrink: 0;
}

.social-icon-btn.facebook  { background: #1877f2; }
.social-icon-btn.instagram { background: linear-gradient(135deg, #f09433 0%, #dc2743 50%, #bc1888 100%); }
.social-icon-btn.youtube   { background: #ff0000; }
.social-icon-btn.whatsapp  { background: #25d366; }
.social-icon-btn.twitter   { background: #111; }

.social-icon-btn:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 16px rgba(0,0,0,0.4);
}

.footer-diocese {
    font-size: 0.7rem;
    opacity: 0.5;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.1rem;
}

/* Right column: quick links */
.footer-right { display: flex; flex-direction: column; gap: 0.4rem; }

.footer-col-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.footer-nav { list-style: none; }

.footer-nav li { margin-bottom: 0.2rem; }

.footer-nav li a {
    text-decoration: none;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    transition: var(--transition);
    display: inline-block;
}

.footer-nav li a:hover {
    color: white;
    padding-left: 4px;
}

/* Footer bottom bar */
.footer-bottom {
    padding: 0.85rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    text-align: center;
    font-size: 0.75rem;
    opacity: 0.55;
}

.footer-credit { font-style: italic; }

/* =============================================
   MODAL (Ministries)
   ============================================= */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(4px);
    padding: 1rem;
}

.modal.active { display: flex; }

.modal-content {
    background: white;
    width: 100%;
    max-width: 800px;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
    animation: zoomIn 0.3s ease-out both;
    max-height: 90dvh;
    overflow-y: auto;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.75rem;
    cursor: pointer;
    z-index: 10;
    color: var(--primary-color);
    background: white;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
    border: none;
    font-family: inherit;
}

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

.modal-img {
    height: 220px;
}

.modal-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    padding: 1.5rem;
}

.modal-info h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.modal-info p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-muted);
}

/* =============================================
   LIGHTBOX
   ============================================= */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.lightbox.active { display: flex; }

.lightbox-img {
    max-width: 100%;
    max-height: 88dvh;
    border-radius: 4px;
    object-fit: contain;
}

.close-lightbox {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =============================================
   ANIMATIONS
   ============================================= */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

/* =============================================
   BREAKPOINT 1 — Tablet  (min-width: 481px)
   ============================================= */
@media (min-width: 481px) {
    .section-padding { padding-block: 2.75rem; }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .gallery-item { height: 200px; }

    .social-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .devotions-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .donation-card { padding: 1.5rem 1.25rem; }

    .timings-grid { grid-template-columns: repeat(2, 1fr); }

    .ministry-grid { grid-template-columns: repeat(3, 1fr); }

    .anbiam-grid   { grid-template-columns: repeat(3, 1fr); }

    /* Footer: 2-column flex side-by-side */
    .footer-top { 
        flex-direction: row; 
    }
    .footer-left {
        flex: 0 0 calc(55% - 0.75rem);
    }
    .footer-right {
        flex: 0 0 calc(40% - 0.75rem);
    }
}

/* =============================================
   BREAKPOINT 2 — Small Laptop  (min-width: 769px)
   ============================================= */
@media (min-width: 769px) {
    :root { --header-h: 72px; }

    .container { padding-inline: 1.5rem; }

    .section-padding { padding-block: 3.5rem; }

    .section-header { margin-bottom: 1.75rem; }

    /* Nav: show full horizontal menu */
    .mobile-menu-toggle { display: none !important; }

    #main-nav ul {
        display: flex !important;       /* override inline active style */
        position: static;
        width: auto;
        height: auto;
        flex-direction: row;
        padding: 0;
        background: none;
        box-shadow: none;
        overflow: visible;
    }

    #main-nav ul li { width: auto; }

    #main-nav a {
        font-size: 0.88rem;
        padding: 0.5rem 0.75rem;
        border-bottom: none;
    }

    /* About: two columns */
    .container-overview {
        grid-template-columns: 360px 1fr;
        gap: 3.5rem;
    }

    .priest-image { height: 300px; }
    .clergy-info  { padding: 2rem; }

    /* Mass timings: 3 column */
    .timings-grid { grid-template-columns: repeat(3, 1fr); }

    /* Ministry: mixed */
    .ministry-grid { grid-template-columns: repeat(3, 1fr); }

    .anbiam-grid { grid-template-columns: repeat(4, 1fr); }

    /* Gallery */
    .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
    .gallery-item { height: 230px; }

    /* Social: 3 columns */
    .social-links-grid { grid-template-columns: repeat(3, 1fr); }

    /* Bank details grid */
    .bank-details {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    /* Modal: two columns */
    .modal-body { grid-template-columns: 1fr 1fr; }
    .modal-img  { height: 320px; }
    .modal-info { padding: 2.5rem; }
    .modal-info h3 { font-size: 1.75rem; }

    /* Footer */
    .footer-top { gap: 2rem; }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        text-align: left;
    }

    /* Contact card */
    .contact-card-neat { padding: 1.5rem; }

    .donation-card { padding: 1.75rem 1.5rem; }
}

/* =============================================
   BREAKPOINT 3 — Desktop  (min-width: 1025px)
   ============================================= */
@media (min-width: 1025px) {
    :root { --header-h: 80px; }

    .container { padding-inline: 2rem; }

    .section-padding { padding-block: 4rem; }

    .section-header { margin-bottom: 2rem; }

    #main-nav a { font-size: 0.95rem; }

    /* About: fixed left column */
    .container-overview {
        grid-template-columns: 400px 1fr;
        gap: 5rem;
    }

    .priest-image { height: 320px; }

    /* Ministry: 4-column */
    .ministry-grid { grid-template-columns: repeat(4, 1fr); }

    .anbiam-grid { grid-template-columns: repeat(5, 1fr); }

    /* Gallery */
    .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
    .gallery-item { height: 260px; }

    /* Social */
    .social-links-grid { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }

    .bank-details { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }

    .donation-card { padding: 2rem 1.75rem; }

    .contact-card-neat { padding: 2rem; }
}

/* =============================================
   SAFETY NET — Prevent any overflow on all sizes
   ============================================= */
*, *::before, *::after {
    max-width: 100%;
}

/* Reset max-width for specific elements that need it */
body, html, #main-header, .hero, .modal, .lightbox, .hero-bg {
    max-width: none;
}
