/* 
   St. Joseph's Malankara Catholic Church, Valakuzhy
   Official Web Portal Theme - Modeled after the Syro-Malabar Church Official Portal (syromalabarchurch.in)
*/

:root {
    --primary: #77121b;
    --primary-dark: #500a12;
    --primary-light: #941e28;
    --gold: #c59b27;
    --gold-light: #fff8e7;
    --dark: #1a1a1a;
    --slate: #374151;
    --muted: #6b7280;
    --light-bg: #f8f9fa;
    --card-bg: #ffffff;
    --border: #e5e7eb;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;
    --font-ml: 'Anek Malayalam', 'Manjari', sans-serif;
}

body.site-body {
    font-family: var(--font-body);
    background-color: #ffffff;
    color: var(--slate);
    line-height: 1.75;
    overflow-x: hidden;
}

/* Malayalam Typography */
.font-ml, [lang="ml"], .ml-reader {
    font-family: var(--font-ml) !important;
    line-height: 2 !important;
    color: #1f2937;
}

.imp-color {
    color: var(--primary) !important;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--dark);
    font-family: var(--font-heading);
    letter-spacing: -0.01em;
}

/* Top Utility Bar */
.portal-top-bar {
    background-color: #ffffff;
    border-bottom: 1px solid var(--border);
    font-size: 0.82rem;
    color: var(--muted);
    padding: 7px 0;
}
.portal-top-bar a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
}
.portal-top-bar a:hover {
    color: var(--primary);
}

.diocese-mini-crest {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(197, 155, 39, 0.4);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: inline-block;
    vertical-align: middle;
}

/* Header & Navbar (Flagship Diocesan Style) */
.portal-navbar {
    background-color: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    padding: 8px 0;
    transition: all 0.25s ease;
}

.portal-brand {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    padding: 2px 0;
}

.portal-brand-logo {
    height: 88px;
    width: auto;
    max-height: 92px;
    object-fit: contain;
    display: block;
    transition: transform 0.25s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.04));
}

.portal-brand-logo:hover {
    transform: scale(1.02);
}

@media (min-width: 1400px) {
    .portal-brand-logo {
        height: 92px;
        max-height: 96px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .portal-brand-logo {
        height: 74px;
        max-height: 78px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .portal-brand-logo {
        height: 64px;
        max-height: 68px;
    }
}

@media (max-width: 767px) {
    .portal-brand-logo {
        height: 54px;
        max-height: 58px;
    }
}

@media (max-width: 420px) {
    .portal-brand-logo {
        height: 46px;
        max-height: 50px;
    }
}

/* Nav Menu Items - Two-Tier Bilingual Typography */
.portal-navbar .navbar-nav {
    gap: 4px;
}

.portal-navbar .nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 12px !important;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.22s ease;
    line-height: 1.25;
    position: relative;
}

.portal-navbar .nav-label-en {
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: 0.2px;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.portal-navbar .nav-label-ml {
    font-family: var(--font-ml);
    font-size: 0.72rem;
    font-weight: 500;
    color: #64748b;
    margin-top: 2px;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.portal-navbar .nav-link:hover {
    background-color: #fef2f2;
}

.portal-navbar .nav-link:hover .nav-label-en {
    color: var(--primary);
}

.portal-navbar .nav-link:hover .nav-label-ml {
    color: var(--primary-dark);
}

.portal-navbar .nav-link.active {
    background-color: #fef2f2;
}

.portal-navbar .nav-link.active .nav-label-en {
    color: var(--primary);
    font-weight: 800;
}

.portal-navbar .nav-link.active .nav-label-ml {
    color: var(--primary);
    font-weight: 700;
}

.portal-navbar .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 12px;
    right: 12px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

/* Prayer Request Button */
.portal-navbar .nav-prayer-btn {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px 18px;
    background: linear-gradient(135deg, var(--primary) 0%, #8b1823 100%);
    color: #ffffff !important;
    border-radius: 6px;
    box-shadow: 0 3px 10px rgba(119, 18, 27, 0.22);
    text-decoration: none;
    line-height: 1.25;
    transition: all 0.25s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.portal-navbar .nav-prayer-btn:hover {
    background: linear-gradient(135deg, #5b0d14 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(119, 18, 27, 0.35);
    color: #ffffff !important;
}

.portal-navbar .nav-prayer-btn .btn-text-en {
    font-size: 0.84rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.portal-navbar .nav-prayer-btn .btn-text-ml {
    font-size: 0.68rem;
    font-family: var(--font-ml);
    opacity: 0.92;
    white-space: nowrap;
}

/* Laptop adjustments (992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .portal-navbar .navbar-nav {
        gap: 2px;
    }
    .portal-navbar .nav-link {
        padding: 6px 8px !important;
    }
    .portal-navbar .nav-label-en {
        font-size: 0.82rem;
    }
    .portal-navbar .nav-label-ml {
        font-size: 0.68rem;
    }
    .portal-navbar .nav-prayer-btn {
        padding: 6px 12px;
    }
    .portal-navbar .nav-prayer-btn .btn-text-en {
        font-size: 0.78rem;
    }
    .portal-navbar .nav-prayer-btn .btn-text-ml {
        font-size: 0.65rem;
    }
}

/* Mobile Offcanvas / Dropdown (< 992px) */
@media (max-width: 991px) {
    .portal-navbar .navbar-collapse {
        background: #ffffff;
        border-top: 1px solid #f1f5f9;
        margin-top: 12px;
        padding: 16px 12px;
        border-radius: 8px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    }
    .portal-navbar .navbar-nav {
        gap: 6px;
    }
    .portal-navbar .nav-link {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 10px 16px !important;
        border-radius: 6px;
        border-bottom: 1px solid #f8fafc;
    }
    .portal-navbar .nav-link.active::after {
        display: none;
    }
    .portal-navbar .nav-link.active {
        border-left: 4px solid var(--primary);
        border-radius: 0 6px 6px 0;
    }
    .portal-navbar .nav-label-en {
        font-size: 0.95rem;
    }
    .portal-navbar .nav-label-ml {
        font-size: 0.85rem;
        margin-top: 0;
    }
    .portal-navbar .nav-prayer-btn {
        margin-top: 10px;
        width: 100%;
        padding: 12px;
        flex-direction: row;
        gap: 8px;
    }
    .portal-navbar .nav-prayer-btn .btn-text-en {
        font-size: 0.95rem;
    }
    .portal-navbar .nav-prayer-btn .btn-text-ml {
        font-size: 0.85rem;
    }
}

/* Buttons (Matching syromalabarchurch.in primary-button) */
.primary-button {
    display: inline-flex;
    align-items: center;
    padding: 11px 26px;
    background: var(--primary);
    color: #ffffff !important;
    border-radius: 4px;
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: all 0.25s ease;
    border: none;
    box-shadow: 0 4px 14px rgba(119, 18, 27, 0.2);
}
.primary-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(119, 18, 27, 0.3);
}

.primary-button-outline {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    background: transparent;
    color: var(--primary) !important;
    border: 1.5px solid var(--primary);
    border-radius: 4px;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
}
.primary-button-outline:hover {
    background: var(--primary);
    color: #ffffff !important;
}

/* Hero Carousel / Slider */
.portal-hero {
    position: relative;
    background: #0f172a;
}

.carousel-item {
    height: 580px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.carousel-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15,23,42,0.45) 0%, rgba(15,23,42,0.85) 100%);
}

.hero-overlay-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-align: center;
    padding: 0 20px;
}

.hero-overlay-content h1 {
    font-size: 3.2rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.75rem;
    text-shadow: 0 3px 12px rgba(0,0,0,0.6);
}

.hero-overlay-content p {
    font-size: 1.15rem;
    max-width: 800px;
    margin: 0 auto 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Quick Links Floating Strip (Matching syromalabarchurch.in .quicklink) */
.quicklink {
    margin-top: -38px;
    position: relative;
    z-index: 10;
}

.quick-link-card {
    background: #ffffff;
    padding: 16px 18px;
    border-radius: 8px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
    text-decoration: none;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.25s ease;
    height: 100%;
}
.quick-link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(119, 18, 27, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

.quick-link-card .icon-box {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #fdf2f2;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.quick-link-card h6 {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.quick-link-card small {
    color: var(--muted);
    font-size: 0.75rem;
}

/* Latest Updates Marquee Ribbon (Matching syromalabarchurch.in .Circularnotification) */
.Circularnotification {
    background: var(--primary);
    color: #ffffff;
    padding: 8px 0;
    font-size: 0.88rem;
}

.news-badge {
    background: #ffffff;
    color: var(--primary);
    font-weight: 800;
    font-size: 11.5px;
    padding: 4px 12px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.news-ticker-text a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
}

/* Section Title Headings (Matching syromalabarchurch.in .section-title & .main-title) */
.section-title {
    margin-bottom: 8px;
}
.section-title h6 {
    font-family: var(--font-body);
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 6px;
    display: inline-block;
}

.main-title h1, .main-title h2 {
    font-size: 2.35rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.25;
    margin-bottom: 14px;
}

.main-title h1 span, .main-title h2 span {
    display: inline-block;
}

/* About Us Section with Image Collage (Matching syromalabarchurch.in) */
.about-us {
    padding: 70px 0;
    background: #ffffff;
}

.about-images-collage {
    position: relative;
    padding: 10px;
}

.img-border {
    border: 5px solid #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    object-fit: cover;
    transition: transform 0.3s ease;
}
.img-border:hover {
    transform: scale(1.02);
}

/* Dignitary Section (Matching syromalabarchurch.in .cardinal-new) */
.cardinal-new {
    padding: 70px 0;
    background: #fbfbfb;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

.cardinal-images {
    text-align: center;
    position: relative;
}

.cardinal-photo-frame {
    display: inline-block;
    padding: 8px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.cardinal-photo {
    width: 290px;
    height: 380px;
    object-fit: cover;
    object-position: top center;
    border-radius: 8px;
    display: block;
}

.cardinal-new-details {
    padding-left: 20px;
}

.event-title {
    background: #f3f4f6;
    border-left: 4px solid var(--primary);
    padding: 10px 18px;
    border-radius: 0 6px 6px 0;
    font-weight: 700;
    font-size: 15px;
    color: var(--primary);
    margin-bottom: 16px;
}

.cardinal-quote {
    font-size: 0.98rem;
    line-height: 1.85;
    color: #4b5563;
    margin-bottom: 20px;
}

/* Leadership Grid (Secretary Tojo P Thomas & Trustee Johnson John) */
.leadership-section {
    padding: 70px 0;
    background: #ffffff;
}

.leader-card-portal {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 28px 24px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    height: 100%;
    transition: all 0.25s ease;
}
.leader-card-portal:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(119, 18, 27, 0.12);
    border-color: var(--primary);
}

.leader-avatar-img {
    display: block;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    border: 3px solid var(--primary);
    margin: 0 auto 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    cursor: zoom-in;
}

.leader-placeholder-circle {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: #f9fafb;
    border: 3px solid var(--border);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.2rem;
    margin: 0 auto 16px;
}

/* Full Malayalam History Dossier Section */
.history-dossier-section {
    padding: 70px 0;
    background: #f8f9fa;
    border-top: 1px solid var(--border);
}

.dossier-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.dossier-header-badge {
    display: inline-block;
    background: #fef2f2;
    color: var(--primary);
    border: 1px solid #fecaca;
    padding: 6px 18px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 12px;
}

.dossier-subtitle {
    font-family: var(--font-ml);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 8px;
    margin: 32px 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dossier-pioneer-pill {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.95rem;
    font-family: var(--font-ml);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.dossier-org-box {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    border-left: 4px solid var(--primary);
}

/* Liturgical Timings Section (Matching syromalabarchurch.in .liturgy) */
.liturgy-section {
    padding: 70px 0;
    background: #ffffff;
}

.liturgy-card {
    background: #fdfbf7;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 24px;
    border-top: 4px solid var(--primary);
    height: 100%;
}

.liturgy-time-pill {
    display: inline-block;
    background: var(--primary);
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 50px;
    margin-bottom: 14px;
}

/* Gallery Grid */
.portal-gallery-section {
    padding: 70px 0;
    background: #fbfbfb;
}

.portal-gallery-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    background: #000;
}

.portal-gallery-card img {
    width: 100%;
    height: 270px;
    object-fit: cover;
    transition: transform 0.4s ease, opacity 0.4s ease;
    display: block;
}

.portal-gallery-card:hover img {
    transform: scale(1.06);
    opacity: 0.88;
}

.portal-gallery-card .gallery-title-box {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(17,24,39,0.92) 100%);
    color: #ffffff;
    padding: 16px;
}

/* ==========================================================================
   Photo Gallery Page (gallery.php) Specific Styles
   ========================================================================== */
.gallery-filter-wrapper {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 6px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.gallery-filter-btn {
    padding: 8px 22px;
    border-radius: 50px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #475569;
    background: transparent;
    border: none;
    transition: all 0.25s ease;
    cursor: pointer;
}

.gallery-filter-btn:hover {
    color: var(--primary);
    background: #fef2f2;
}

.gallery-filter-btn.active {
    background: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(119, 18, 27, 0.25);
}

.gallery-item-wrap {
    display: flex;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.gallery-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(119, 18, 27, 0.12);
    border-color: rgba(119, 18, 27, 0.3);
}

.gallery-card-img-wrap {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: #0f172a;
}

.gallery-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.45s ease, opacity 0.3s ease;
}

.gallery-card:hover .gallery-card-img {
    transform: scale(1.06);
    opacity: 0.92;
}

.gallery-card-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(119, 18, 27, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-card-hover-overlay {
    opacity: 1;
}

.gallery-card-zoom-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-card-zoom-icon {
    transform: scale(1);
}

.gallery-card-category-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(4px);
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 11px;
    border-radius: 20px;
    z-index: 2;
}

.gallery-card-body {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.gallery-card-title-en {
    font-family: var(--font-title);
    font-size: 1.12rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 3px;
    line-height: 1.35;
}

.gallery-card-title-ml {
    font-family: var(--font-malayalam);
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 10px;
    line-height: 1.4;
}

.gallery-card-desc {
    font-size: 0.86rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 0;
    margin-top: auto;
}

/* Portal Footer (Matching syromalabarchurch.in footer) */
.portal-footer {
    background: #111827;
    color: #9ca3af;
    border-top: 4px solid var(--primary);
    padding: 60px 0 25px;
}

.portal-footer h5, .portal-footer h6 {
    color: #ffffff;
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: 0.5px;
}

.portal-footer a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s;
}
.portal-footer a:hover {
    color: #ffffff;
}

/* Back to Top */
#btn-back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: none;
    z-index: 99;
    border-radius: 4px;
    width: 42px;
    height: 42px;
    background: var(--primary);
    color: #ffffff;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}
#btn-back-to-top:hover {
    background: var(--primary-dark);
}

/* Vicar Roll Cards & Grid Styling */
.vicar-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    transition: all 0.28s ease;
}
.vicar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(119, 18, 27, 0.12);
    border-color: var(--primary);
}
.vicar-card-img-wrap {
    position: relative;
    width: 100%;
    height: 250px;
    background-color: #f1f3f5;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vicar-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.35s ease;
}
.vicar-card:hover .vicar-card-img {
    transform: scale(1.05);
}
.vicar-number-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    z-index: 2;
}
.vicar-card-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

/* Short-Term Shepherds Cards */
.short-term-vicar-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
    transition: all 0.28s ease;
    text-align: center;
}
.short-term-vicar-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 26px rgba(197, 155, 39, 0.18);
    border-color: var(--gold);
}
.short-term-img-wrap {
    width: 100%;
    height: 240px;
    background: #f1f3f5;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.short-term-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.35s ease;
}
.short-term-vicar-card:hover .short-term-img-wrap img {
    transform: scale(1.05);
}
.short-term-body {
    padding: 18px 14px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Custom Tribute & Blessing Boxes */
.custom-blessing-box {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-top: 4px solid var(--primary);
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

/* Leader Cards (Administration & Leaders) */
.leader-clean-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    height: 100%;
    transition: all 0.25s ease;
}
.leader-clean-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(119, 18, 27, 0.12);
    border-color: var(--primary);
}
.leader-avatar-circle {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    border: 3px solid var(--primary);
    margin: 0 auto 16px;
    box-shadow: 0 4px 12px rgba(119, 18, 27, 0.15);
    display: block;
}
.leader-avatar-circle-placeholder {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    background: #fdf2f2;
    border: 3px solid #fecaca;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 16px;
}

/* Committee Member Cards */
.committee-member-card {
    transition: all 0.25s ease;
    border: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}
.committee-member-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(119, 18, 27, 0.12) !important;
    border-color: var(--primary) !important;
}
.member-avatar-circle {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: transform 0.25s ease;
}
.member-avatar-circle.avatar-male {
    background: #fdf2f2;
    color: var(--primary);
    border: 2px solid rgba(119, 18, 27, 0.2);
}
.member-avatar-circle.avatar-female {
    background: #fbf7ee;
    color: #b45309;
    border: 2px solid rgba(197, 155, 39, 0.35);
}
.committee-member-card:hover .member-avatar-circle {
    transform: scale(1.08);
}

/* History Reader & Dossier Elements */
.history-chapter-title {
    font-family: var(--font-ml);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 8px;
    margin: 32px 0 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.history-pioneer-pill {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.95rem;
    font-family: var(--font-ml);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.org-item-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
    border-left: 4px solid var(--primary);
}
.ml-text {
    font-family: var(--font-ml) !important;
    line-height: 2 !important;
    color: #1f2937;
    margin-bottom: 1rem;
}
.section-header-clean {
    text-align: center;
    margin-bottom: 40px;
}
.section-label {
    display: inline-block;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}
.section-title-clean {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 6px;
}
.section-lead-clean {
    color: var(--muted);
    font-size: 1rem;
    max-width: 650px;
    margin: 0 auto;
}


/* Mass Timing Cards */
.mass-timing-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}
.mass-timing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}
.time-badge {
    display: inline-block;
    background: #fdf2f2;
    color: var(--primary);
    border: 1px solid #fecaca;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 5px 12px;
    border-radius: 20px;
}

/* ==========================================================================
   Sacred Figures Clean Cards (Saint Joseph, Pope Leo XIV, Mar Ivanios)
   ========================================================================== */
.sacred-figure-section {
    padding: 60px 0 70px;
    background: #f8f9fa;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.sacred-figure-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.sacred-figure-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(119, 18, 27, 0.12);
    border-color: #77121b;
}

.sacred-figure-photo-wrap {
    width: 100%;
    height: 330px;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    margin-bottom: 16px;
}

.sacred-figure-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    cursor: pointer;
    transition: transform 0.35s ease;
}

.sacred-figure-card:hover .sacred-figure-img {
    transform: scale(1.03);
}

.sacred-figure-badge {
    display: inline-block;
    padding: 4px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 20px;
    margin-bottom: 10px;
    background: #fdf2f2;
    color: #77121b;
    border: 1px solid #fecaca;
}

.sacred-figure-title-en {
    font-family: var(--font-title);
    font-size: 1.35rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 3px;
}

.sacred-figure-title-ml {
    font-family: var(--font-malayalam);
    font-size: 1.15rem;
    font-weight: 700;
    color: #77121b;
    margin-bottom: 8px;
}

.sacred-figure-desc {
    font-size: 0.88rem;
    color: #6b7280;
    margin-bottom: 0;
    line-height: 1.45;
}

@media (max-width: 768px) {
    .hero-overlay-content h1 {
        font-size: 2.1rem;
    }
    .carousel-item {
        height: 440px;
    }
    .quicklink {
        margin-top: 20px;
    }
    .cardinal-photo {
        width: 100%;
        max-width: 280px;
        height: 320px;
    }
    .cardinal-new-details {
        padding-left: 0;
        margin-top: 24px;
    }
    .dossier-card {
        padding: 20px;
    }
    .sacred-figure-photo-wrap {
        height: 290px;
    }
}

