/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
    /* Colors */
    --bg-color: #ffffff;
    --surface-alt: #f8f9fa;
    --text-main: #2d3748;
    --text-muted: #718096;
    --accent-color: #D4AF37;
    /* Rich Gold */
    --accent-hover: #b4942b;
    --nav-bg: rgba(255, 255, 255, 0.95);
    --border-color: #e2e8f0;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Animations */
    --transition-fast: 0.3s ease;
    --transition-smooth: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

body.loaded {
    opacity: 1;
}

/* --- Admin Login --- */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f4f4f9;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.login-box {
    background: #fff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h2 {
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.login-box p {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hidden {
    display: none !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--text-main);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* --- Utilities --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section-padding {
    padding: var(--spacing-xl) 0;
}

.text-center {
    text-align: center;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background-color: var(--accent-color);
    margin: var(--spacing-xs) auto 0;
}

.grid {
    display: grid;
    gap: var(--spacing-md);
}

/* --- Animations --- */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.delay-100 {
    transition-delay: 0.1s;
}

.delay-200 {
    transition-delay: 0.2s;
}

.delay-300 {
    transition-delay: 0.3s;
}

/* --- Navbar --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--nav-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
    font-family: var(--font-heading);
}

.logo img {
    height: 40px;
    width: auto;
    margin-right: 0.5rem;
}

.logo ion-icon {
    margin-right: 0.5rem;
    color: var(--accent-color);
}

.nav-links {
    display: flex;
    gap: var(--spacing-md);
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.admin-icon-link {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    color: var(--text-muted) !important;
}

.admin-icon-link:hover {
    color: var(--accent-color) !important;
}

.admin-icon-link::after {
    display: none !important;
}

.nav-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- Hero Slider --- */
.hero-slider {
    position: relative;
    height: 100vh;
    width: 100%;
    overflow: hidden;
}

.slider-container {
    height: 100%;
    width: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide.active {
    opacity: 1;
    z-index: 1;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    font-size: 2rem;
    padding: 0.5rem;
    cursor: pointer;
    z-index: 10;
    border-radius: 50%;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev {
    left: 20px;
}

.slider-btn.next {
    right: 20px;
}

.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.dot.active {
    background: #fff;
    transform: scale(1.2);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #f0f0f0;
    /* Fallback */
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    /* Using a subtle parallax or just fixed attachment if preferred */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.4);
    /* Light overlay for white theme */
    /* Or a gradient */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.8));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 800px;
    padding: 0 var(--spacing-sm);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: var(--spacing-sm);
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.5);
    /* Soft shadow since bg is light */
}

.hero-motto {
    font-size: 1.25rem;
    color: var(--text-main);
    margin-bottom: var(--spacing-lg);
    font-style: italic;
    font-weight: 500;
}

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--text-main);
    color: #fff;
    border: 1px solid var(--text-main);
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin: 0 0.5rem;
}

.btn:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--text-main);
}

.btn-outline:hover {
    background-color: var(--text-main);
    color: #fff;
}

/* --- Administration Section --- */
.admin-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
    margin-top: 3rem;
}

.vicar-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 500px;
}

.admin-img-box {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--accent-color);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.admin-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sub-admin-row {
    display: flex;
    gap: 4rem;
    flex-wrap: wrap;
    justify-content: center;
}

.sub-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.admin-img-box-sm {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--surface-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    border: 2px solid var(--border-color);
}

.placeholder-avatar {
    font-size: 2rem;
    color: var(--text-muted);
    font-family: var(--font-heading);
}

.role {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent-color);
    font-weight: 600;
    margin-top: 0.25rem;
}

.message-quote {
    font-style: italic;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* --- Payment Modal --- */
.payment-modal-box {
    background: #fff;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 800px;
    position: relative;
    text-align: center;
    /* Ensure content is not cut off */
    max-height: 90vh;
    overflow-y: auto;
    /* Soften scrollbar */
    scrollbar-width: thin;
}

.payment-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem;
    margin-top: 2rem;
    justify-content: center;
    align-items: center;
}

.payment-col {
    flex: 1;
    min-width: 250px;
}

.qr-box img {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    border: 2px solid var(--border-color);
    padding: 1rem;
    border-radius: 8px;
}

.bank-details {
    text-align: left;
    background: var(--surface-alt);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--accent-color);
}

.bank-details p {
    margin-bottom: 0.5rem;
    color: var(--text-main);
    font-size: 0.95rem;
}

.bank-details strong {
    color: var(--text-muted);
    font-weight: 500;
    min-width: 100px;
    display: inline-block;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: 0.3s;
}

.close-modal:hover {
    color: #e53e3e;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background-color: #fff;
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        align-items: center;
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    }

    .nav-links.active {

        transform: translateY(0);
    }

    .nav-toggle {
        display: block;
    }
}

/* --- Services Section --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background: #fff;
    padding: 2.5rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    border: 1px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.service-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-time {
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.service-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- This Sunday Section --- */
.this-sunday-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    color: var(--accent-color);
    font-weight: 600;
    display: block;
    margin-bottom: 1rem;
}

.theme-text {
    font-size: 1.25rem;
    font-style: italic;
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.reading-box {
    background-color: var(--surface-alt);
    padding: 2rem;
    border-left: 4px solid var(--accent-color);
    margin-bottom: 2rem;
}

.reading-box h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.reading-box ul li {
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.announcement-highlight {
    display: flex;
    gap: 1rem;
    align-items: center;
    background-color: #fff9e6;
    /* Light yellow/gold tint */
    padding: 1rem;
    border-radius: 4px;
    color: #856404;
}

.announcement-highlight ion-icon {
    font-size: 1.5rem;
}

.this-sunday-image img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

@media (max-width: 900px) {
    .this-sunday-layout {
        grid-template-columns: 1fr;
    }
}

/* --- Notices Section --- */
.notices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.notice-card {
    background: #fff;
    padding: 1.5rem;
    border-left: 4px solid var(--accent-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.notice-date {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.5rem;
}

.notice-card h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.notice-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* --- Highlights Section --- */
.highlights-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

.highlight-col {
    flex: 1;
    min-width: 300px;
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.highlight-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

.highlight-header ion-icon {
    font-size: 2rem;
}

.highlight-list li {
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border-color);
    color: var(--text-main);
}

.highlight-list li:last-child {
    border-bottom: none;
}

/* --- Memorials Section --- */
.memorials-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.memorial-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: #fff;
    padding: 1.5rem;
    border-radius: 50px 8px 8px 50px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    max-width: 400px;
    width: 100%;
}

.memorial-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #bbb;
}

.memorial-info h4 {
    margin-bottom: 0.25rem;
}

.memorial-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.memorial-verse {
    font-size: 0.8rem;
    font-style: italic;
    color: var(--accent-color);
}

/* --- Events Section --- */
.events-list {
    max-width: 800px;
    margin: 0 auto;
}

.event-item {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    background: #fff;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease;
}

.event-item:hover {
    transform: translateX(10px);
}

.event-date-box {
    background-color: var(--text-main);
    color: #fff;
    padding: 1rem;
    border-radius: 4px;
    text-align: center;
    min-width: 80px;
}

.event-date-box .day {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.event-date-box .month {
    font-size: 0.8rem;
    text-transform: uppercase;
}

.event-details {
    flex: 1;
}

.event-details h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.event-action .btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border: 1px solid var(--text-main);
    border-radius: 4px;
}

@media (max-width: 600px) {
    .event-item {
        flex-direction: column;
        text-align: center;
    }

    .event-item:hover {
        transform: translateY(-5px);
    }
}

/* --- Gallery Section --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.gallery-grid img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.gallery-grid img:hover {
    transform: scale(1.02);
}

/* --- Footer --- */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
}

.footer-title {
    color: #fff;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.footer-title::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background-color: var(--accent-color);
    margin-top: 0.5rem;
}

.footer-text,
.footer-links a,
.contact-info li {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    display: block;
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    color: #fff;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 3rem;
    padding: 1.5rem 0 3rem;
    /* Extra padding at bottom */
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}