@import url('https://fonts.googleapis.com/css2?family=Segoe+UI&display=swap');

/* ===== Base Styles ===== */
:root {
    --primary-color: #1a3a6e;
    --secondary-color: #e67e22;
    --accent-color: #2c81ba;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --text-color: #333;
    --text-light: #6c757d;
    --white: #fff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-color);
    overflow-x: hidden;
}

body.menu-open {
    overflow: hidden;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 0;
}

.section {
    padding: 4rem 0;
}

/* Header Styles */
.header-container {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: fixed;
    width: 100%;
    top: 0;
    left: 0; /* Ensure it starts at the left edge */
    z-index: 1000; /* High z-index for the header */
    height: 80px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 2rem;
    position: relative; /* For z-index stacking context if needed */
}

.logo-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 50px;
    height: 50px;
}

.title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Mobile menu toggle button styles */
.mobile-menu-toggle {
    display: none; /* Initially hidden on desktop */
    background: none;
    border: none;
    padding: 0.5rem; /* Ensure it has some padding */
    margin: 0; /* Reset margin */
    cursor: pointer;
    z-index: 1005; /* HIGHEST z-index to ensure it's on top of other header items */
    /* Ensure it has dimensions and visible content */
    width: auto; /* Or fixed width like 44px */
    height: auto; /* Or fixed height like 44px */
    font-size: 1.5rem; /* For FontAwesome icons if used directly, or for sizing the bars */
    color: var(--primary-color); /* Make icon color visible */
}

.menu-icon { /* The container for the bars */
    display: inline-block;
    width: 24px; /* Explicit width */
    height: 24px; /* Explicit height */
    position: relative;
}

.menu-icon .bar {
    display: block;
    width: 100%; /* Full width of its container (.menu-icon) */
    height: 3px; /* Explicit height */
    background-color: var(--primary-color); /* Ensure bars are visible */
    margin: 5px 0;
    transition: var(--transition);
    border-radius: 1px; /* Optional: slightly rounded bars */
}

/* Mobile menu open state for icon */
.mobile-menu-toggle[aria-expanded="true"] .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded="true"] .bar:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle[aria-expanded="true"] .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Screen reader only class */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Navigation Styles - Desktop */
.main-nav { /* This is the navigation panel itself */
    /* Desktop: visible and styled horizontally */
}
.main-nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0; /* Reset default ul margin */
    padding: 0; /* Reset default ul padding */
}

.main-nav a {
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.5rem 0;
    position: relative;
    display: inline-block; /* Ensure it takes space */
}

.main-nav a.active {
    color: var(--secondary-color);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    background: url('../images/chapel-building.jpg') no-repeat center center/cover;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 80px;
    position: relative;
    color: var(--white);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 2rem;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.3rem;
    color: #ddd;
}

main.container {
    padding-top: 4rem;
    padding-bottom: 4rem;
    padding-left: 2rem;
    padding-right: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}


.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.allocation-notice {
    background: rgba(230, 126, 34, 0.1);
    border-left: 5px solid var(--secondary-color);
    padding: 1.5rem 2rem;
    margin-bottom: 2.5rem;
    border-radius: var(--border-radius);
}

.notice-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.notice-header i {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.notice-header h3 {
    margin: 0;
    font-size: 1.25rem;
}

.allocation-notice p {
    margin: 0;
    font-size: 1rem;
}

.allocation-table-container {
    overflow-x: auto;
    background-color: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 4rem;
}

.allocation-table {
    width: 100%;
    border-collapse: collapse;
}

.allocation-table th,
.allocation-table td {
    padding: 1rem 1.25rem;
    border: 1px solid #e0e0e0;
    vertical-align: top;
    text-align: left;
}

.allocation-table th {
    background: var(--primary-color);
    color: var(--white);
    font-weight: 600;
}

.allocation-table td ul {
    list-style-type: disc;
    padding-left: 20px;
    margin: 0;
}

.allocation-table td li {
    margin-bottom: 0.5rem;
}
.allocation-table td li:last-child {
    margin-bottom: 0;
}

.allocation-table td i {
    margin-right: 0.5rem;
    color: var(--secondary-color);
}

.community-section {
    /* margin-top: 4rem; */
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.community-card {
    background-color: var(--white);
    padding: 2rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.community-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.community-card h3 {
    color: var(--primary-color);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.community-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.btn {
    display: inline-block;
    margin-top: 1rem;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 600;
    border: 2px solid transparent;
}

.btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn i {
    margin-left: 0.5rem;
}

/* Footer Styles */
footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 4rem 2rem 0; 
    font-size: 0.95rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem; 
    margin-bottom: 2rem; 
}

.footer-section h3 {
    color: var(--secondary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    position: relative;
}

.footer-section h3::after { 
    content: "";
    display: block;
    width: 40px;
    height: 3px;
    background-color: var(--secondary-color);
    margin-top: 0.5rem;
}

.footer-section p,
.footer-section a,
.footer-section li {
    color: var(--light-color); 
    line-height: 1.6;
}

.footer-section.about p {
    margin-bottom: 1rem;
}

.footer-section.links ul {
    list-style: none;
    padding-left: 0;
}

.footer-section.links li {
    margin-bottom: 0.6rem;
}

.footer-section.links a {
    text-decoration: none; 
    display: inline-block;
    transition: var(--transition);
}

.footer-section.links a:hover {
    color: var(--secondary-color);
    transform: translateX(5px); 
}

.footer-section.contact p {
    display: flex;
    align-items: center; 
    gap: 0.5rem; 
    margin-bottom: 0.8rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    background-color: rgba(255, 255, 255, 0.05); 
    text-decoration: none;
    color: var(--white);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%; 
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--secondary-color);
    color: var(--white); 
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding: 2rem 0 1rem; 
    border-top: 1px solid rgba(255, 255, 255, 0.1); 
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Responsive Styles */
@media (max-width: 768px) { /* This is the primary breakpoint for mobile menu */

    .mobile-menu-toggle {
        display: block !important; /* CRITICAL: Make toggle button visible */
        order: 3; /* If you want it to appear after title on mobile, adjust header flex order if needed */
    }

    .main-nav { /* This is the navigation panel */
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--white);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        transition: left 0.3s ease; /* Transition only left property */
        padding: 2rem 0;
        overflow-y: auto;
        z-index: 999; /* Below header container (1000) but above content */
    }

    .main-nav.active,
    .main-nav[aria-expanded="true"] {
        left: 0;
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .main-nav a {
        display: block;
        padding: 1.2rem 1rem;
        font-size: 1.2rem;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #eee;
    }
    .main-nav ul li:last-child a {
        border-bottom: none;
    }
    .main-nav a::after { /* Hide desktop underline style on mobile */
        display: none;
    }

    /* Adjustments for other content on mobile */
    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .allocation-table-container {
        padding: 1rem;
    }
    .allocation-table th,
    .allocation-table td {
        padding: 0.75rem;
    }

    .community-grid {
        grid-template-columns: 1fr;
    }
    main.container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    /* Further responsive table adjustments if needed */
}

/* Enhancements for very narrow screens */
@media (max-width: 375px) {
    header {
        padding: 0 1rem;
    }
    .logo {
        width: 40px;
        height: 40px;
    }
    .title {
        font-size: 1rem;
        /* display: none; */ /* Uncomment if title should be hidden */
    }

    .hero-content h1 {
        font-size: 1.6rem;
    }
    .hero-content p {
        font-size: 0.9rem;
    }
    .section-header h2 {
        font-size: 1.8rem;
    }
    .main-nav a {
        padding: 1rem;
        font-size: 1.1rem;
    }
}