/* Global Styles */
:root {
    --primary-blue: #002147;
    --primary-red: #A40000;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --gold: #D4AF37; 
    --font-heading: 'Cinzel', serif;
    --font-body: 'Lato', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-red);
    color: var(--white);
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    background-color: #800000;
    transform: translateY(-2px);
}

/* Header & Navbar */
#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
    transition: all 0.3s;
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 60px;
}

.logo-text h1 {
    font-size: 1.2rem;
    color: var(--primary-blue);
    margin: 0;
    line-height: 1.2;
}

.logo-text span {
    font-size: 0.9rem;
    color: var(--primary-red);
    font-weight: 700;
    text-transform: uppercase;
}

#navbar ul {
    display: flex;
    gap: 25px;
}

#navbar a {
    font-size: 1rem;
    color: var(--primary-blue);
    font-weight: 600;
    position: relative;
}

#navbar a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-red);
    transition: width 0.3s;
}

#navbar a:hover::after,
#navbar a.active::after {
    width: 100%;
}

.mobile-menu-icon {
    display: none;
    font-size: 1.5rem;
    color: var(--primary-blue);
    cursor: pointer;
}

/* Hero Section / Slider */
.hero-section {
    height: 100vh;
    position: relative;
    overflow: hidden;
    margin-top: 0; /* Sticky header overlays it? No, header is fixed. */
}

.slider-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex; /* Flex to center content */
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 33, 71, 0.4); /* Blue overlay */
}

.slide.active {
    opacity: 1;
}

.slide-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    max-width: 800px;
    padding: 20px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.8s ease-out 0.5s; /* Delay for slide transition */
}

.slide.active .slide-content {
    transform: translateY(0);
    opacity: 1;
}

.slide h2 {
    font-size: 3rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 20px;
}

.slide p {
    font-size: 1.5rem;
    font-weight: 300;
}

.prev-slide, .next-slide {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    border: none;
    color: var(--white);
    font-size: 2rem;
    padding: 15px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
}

.prev-slide:hover, .next-slide:hover {
    background: var(--primary-red);
}

.prev-slide { left: 20px; }
.next-slide { right: 20px; }

/* About Section */
.about-container {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text, .about-image {
    flex: 1;
}

.about-image img {
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.section-header .divider {
    width: 80px;
    height: 4px;
    background-color: var(--primary-red);
    margin: 10px auto 20px;
}

.section-header h2 {
    color: var(--primary-blue);
    font-size: 2.5rem;
    text-align: center;
}

/* Clergy Cards */
.clergy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.clergy-card {
    background: var(--white);
    padding: 40px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    border-top: 5px solid var(--primary-blue);
}

.clergy-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-red);
}

.card-icon {
    font-size: 3rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

/* Service List */
.dark-overlay {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    position: relative;
    color: var(--white);
}

.dark-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 33, 71, 0.85); /* Heavy Blue Overlay */
}

.dark-overlay .container {
    position: relative;
    z-index: 2;
}

.services-list {
    max-width: 800px;
    margin: 40px auto 0;
}

.service-item {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.1);
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

.time-box {
    background: var(--primary-red);
    padding: 15px;
    text-align: center;
    border-radius: 4px;
    min-width: 100px;
    margin-right: 20px;
}

.time-box .day {
    display: block;
    font-weight: 700;
    font-family: var(--font-heading);
}

.time-box .time {
    display: block;
    font-size: 0.9rem;
}

/* Organizations */
.org-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

.org-card {
    background: var(--light-bg);
    padding: 30px;
    border-radius: 8px;
    width: calc(33.333% - 20px);
    text-align: center;
    border: 1px solid #eee;
    transition: all 0.3s;
}

.org-card:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.org-card:hover h3 {
    color: var(--white);
}

/* News Ticker */
.news-ticker-container {
    background: var(--white);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 8px;
    display: flex;
    flex-direction: column; /* Vertical Layout */
    padding: 0;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    min-height: 250px; /* Increased Height */
}

.news-badge {
    background: var(--primary-red);
    color: var(--white);
    padding: 15px;
    border-radius: 0;
    font-size: 1.2rem;
    font-family: var(--font-heading);
    font-weight: 700;
    margin: 0;
    width: 100%; /* Full Width */
    text-align: center;
    letter-spacing: 1px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: relative;
    z-index: 2;
}

.news-ticker {
    flex: 1;
    overflow: hidden;
    padding: 20px 30px;
    background-color: #fcfcfc;
    position: relative;
}

#ticker-list {
    display: block;
    animation: scroll-up-step 12s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

#ticker-list li {
    line-height: 1.4;
    padding: 15px 0;
    min-height: 60px; /* Larger items */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-size: 1.1rem;
    color: #555;
}

/* Animation for 3 items of approx 60px height. 
   Total height assumed per item ~60px. 
   We translate by percentage or pixels. Let's use percentage if container varies, 
   but list items are fixed height? No, standard tickers are easier with fixed height.
   Let's force fixed height for calculation simplicity in pure CSS.
*/
#ticker-list li {
    height: 80px; /* Fixed height for animation calculation */
    overflow: hidden;
}

@keyframes scroll-up-step {
    0%, 25% { transform: translateY(0); }
    33%, 58% { transform: translateY(-80px); }
    66%, 91% { transform: translateY(-160px); }
    100% { transform: translateY(0); } /* Jump back */
}

/* Gallery - Simple Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
    margin-top: 40px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Footer / Contact */
.footer-section {
    background-color: #0d1b2a; /* Very dark blue */
    color: var(--white);
    padding-bottom: 20px;
}

.contact-layout {
    display: flex;
    gap: 50px;
    margin-bottom: 50px;
}

.contact-info, .live-stream {
    flex: 1;
}

.contact-info h3, .live-stream h3 {
    color: var(--white);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--primary-red);
    display: inline-block;
    padding-bottom: 5px;
}

.contact-info address {
    font-style: normal;
    font-size: 1.1rem;
    line-height: 1.8;
}

.contact-info i {
    color: var(--primary-red);
    width: 25px;
}

.social-links {
    margin-top: 20px;
}

.social-links a {
    color: var(--white);
    font-size: 1.5rem;
    margin-right: 15px;
}

.social-links a:hover {
    color: var(--primary-red);
}

.video-placeholder {
    width: 100%;/* 16:9 Aspect Ratio */
    background: #000;
    position: relative;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.video-placeholder i {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 4rem;
    color: red; /* Youtube color */
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    #navbar {
        display: none; /* Mobile menu needed */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    
    #navbar.active {
        display: block;
    }

    #navbar ul {
        flex-direction: column;
        align-items: center;
    }

    .mobile-menu-icon {
        display: block;
    }

    .about-container {
        flex-direction: column;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .slide h2 {
        font-size: 2rem;
    }

    .contact-layout {
        flex-direction: column;
    }
    
    .org-card {
        width: 100%;
    }
}

/* Lightbox Styles */
.lightbox-modal {
    display: none;
    position: fixed; /* Stay in place */
    z-index: 2000; /* Sit on top of everything including header */
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.95); /* Black w/ opacity */
    backdrop-filter: blur(10px);
    transition: opacity 0.3s ease;
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 1000px;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    animation-name: zoom;
    animation-duration: 0.4s;
}

#lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #f1f1f1;
    padding: 20px 0;
    font-size: 1.2rem;
    font-family: var(--font-heading);
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 50px;
    font-weight: 300;
    transition: 0.3s;
    line-height: 1;
    cursor: pointer;
    background: transparent;
    border: none;
    z-index: 2001;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: var(--primary-red);
    text-decoration: none;
    cursor: pointer;
    transform: rotate(90deg);
}

@keyframes zoom {
    from {transform:scale(0.8); opacity: 0;}
    to {transform:scale(1); opacity: 1;}
}

@media only screen and (max-width: 768px) {
    .lightbox-content {
        width: 100%;
        padding: 0 10px;
    }
    .close-lightbox {
        top: 15px;
        right: 20px;
        font-size: 40px;
    }
    .lightbox-prev, .lightbox-next {
        font-size: 30px;
        padding: 10px;
    }
}

/* Lightbox Navigation */
.lightbox-prev, .lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 40px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    z-index: 2002;
    background-color: rgba(0,0,0,0.1);
}

.lightbox-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.lightbox-prev {
    left: 0;
    border-radius: 3px 0 0 3px;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background-color: rgba(0,0,0,0.8);
    color: var(--primary-red);
}
