/* Basic Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.5;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #e6eaec;
}

body.lightbox-active {
    overflow: hidden;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
    overflow: visible;
    padding: 0 20px;
}

/* Header */
header {
    background-color: #6a98b5;
    background: linear-gradient(to bottom, #4b7a97, #a5cee7);
    border-top: 3px solid #8bafc5;
    border-bottom: 3px solid #c3e3f7;
    padding: 10px 0; /* Restored some padding for better inline balance */
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
}

header .container {
    display: flex;
    justify-content: space-between; /* Pushes logo left, nav right */
    align-items: center; /* Vertically aligns logo and nav */
    position: relative;
    flex-wrap: wrap; /* Allows wrapping only if absolutely necessary */
}

header .logo {
   order: 1; /* Logo is first */
   flex-shrink: 0; /* Prevent logo from shrinking excessively */
}

header .logo img {
    height: 40px; /* Keep the reduced logo height */
    width: auto;
    display: block;
}

/* --- Modified Nav Styling for Desktop --- */
header nav {
    order: 2; /* Nav comes immediately after logo on desktop */
    flex-grow: 1; /* Allow nav to take up remaining space if needed */
    display: flex; /* Use flex to easily align the ul inside */
    justify-content: flex-end; /* Push the ul (menu items) to the right */
}

header nav ul {
    list-style: none;
    display: flex; /* Keep items inline */
    flex-wrap: wrap; /* Allow wrapping if many items */
    padding-left: 0;
    margin: 0; /* Reset margin */
}
/* --- End Modified Nav Styling --- */

header nav ul li {
    margin-left: 8px; 
}

header nav ul li a {
    text-decoration: none;
    color: #ffffff;
    padding: 5px 8px;
    transition: background-color 0.3s ease, text-shadow 0.3s ease;
    display: block;
    border-radius: 4px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

header nav ul li a:hover,
header nav ul li a.active {
    background-color: rgba(255, 255, 255, 0.15);
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.3);
}

/* Hamburger Menu Icon - Initially hidden on desktop */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    /* Order will be adjusted in mobile MQ */
    position: absolute; /* Keep absolute positioning relative to container */
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    color: #ffffff;
    order: 3; /* Initially place it last logically, mobile will override */
}

/* Main Content Area */
main {
    flex-grow: 1;
    padding: 30px 0;
}

/* Add text shadow to headings */
main h1, main h2, main h3 {
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.15);
}

main h1 {
    color: #c00;
    margin-bottom: 20px;
    font-size: 2em;
}

main h2 {
    color: #00418a; /* Darker Blue */
    margin-top: 15px; /* Reduced top margin */
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
    font-size: 1.6em;
}

main h3 {
    color: #c00;
    margin-top: 15px;
    margin-bottom: 8px;
    font-size: 1.3em;
}

/* --- Hero Section (Homepage) --- */
.hero-section {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-top: 20px;
    margin-bottom: 40px;
    flex-wrap: wrap;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.hero-image-col {
    flex: 1 1 40%;
    min-width: 60px;
}

.hero-text-col {
    flex: 1 1 55%;
    min-width: 100px;
}

.hero-image-col img {
    max-width: 95%;
    height: auto;
    display: block;
    border-radius: 8px;
}
/* --- End Hero Section --- */

.facebook-embed {
    margin-top: 30px;
    border: 1px solid #ccc;
    padding: 15px;
    background-color: #ffffff;
    min-height: 300px;
    overflow: auto;
    border-radius: 5px;
    justify-content: center; 
    max-width: 550px; /* Set a maximum width */
    margin-left: auto; /* Horizontally center */
    margin-right: auto; /* Horizontally center */
}

.gallery-placeholder, .gallery-section .gallery-placeholder {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.gallery-placeholder .photo {
    border: 1px solid #ddd;
    padding: 5px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    text-align: center;
    flex: 1 1 200px;
    max-width: 220px;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}
.gallery-placeholder .photo:hover {
    transform: scale(1.03);
}

.gallery-placeholder .photo img {
     width: 100%;
     height: 150px;
     object-fit: cover;
     display: block;
     margin-bottom: 5px;
     border-radius: 3px;
     pointer-events: none;
}

.gallery-placeholder .photo figcaption {
    font-size: 0.9em;
    text-align: center;
    margin-top: 5px;
    color: #555;
    min-height: 2.5em;
}

.event-item {
    border: 1px solid #e0e0e0;
    padding: 15px;
    margin-bottom: 20px;
    background-color: #ffffff;
    border-radius: 5px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.event-item h3 {
    margin-top: 0;
    border-bottom: none;
}

.event-item p {
    margin-bottom: 8px;
}

/* Footer */
footer {
    background: #222;
    color: #ddd;
    text-align: center;
    border-top: 3px solid #8bafc5;
    padding: 20px 0;
    margin-top: 20px;
    width: 100%;
}

footer .footer-links a {
    color: #ddd;
    text-decoration: none;
    margin: 0 15px;
    font-size: 1.1em;
}

footer .footer-links a:hover {
    color: #fff;
    text-decoration: underline;
}

footer p {
    margin-top: 10px;
    font-size: 0.9em;
}

/* Link Styling */
a {
    color: #00418a;
    text-decoration: none;
}
a:hover {
    color: #c00;
    text-decoration: underline;
}
main ul {
    list-style-position: inside;
    padding-left: 10px;
    margin-bottom: 15px;
}
main ul li {
    margin-bottom: 8px;
}


/* --- Lightbox Styles --- */
.lightbox-overlay {
    display: none;
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85); z-index: 1000;
    justify-content: center; align-items: center; padding: 20px;
}
.lightbox-content {
    position: relative; max-width: 90%; max-height: 90%;
    display: flex; justify-content: center; align-items: center;
}
.lightbox-image {
    max-width: 100%; max-height: 100%; object-fit: contain;
    display: block; border: 3px solid white;
    box-shadow: 0 0 25px rgba(0,0,0,0.5);
}
.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute; background: rgba(30, 30, 30, 0.6);
    color: white; border: none; font-size: 24px;
    cursor: pointer; padding: 10px 15px; z-index: 1010;
    transition: background-color 0.3s ease; border-radius: 4px;
    line-height: 1;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(0, 0, 0, 0.8); }
.lightbox-close { top: 10px; right: 10px; font-size: 20px; padding: 5px 10px; }
.lightbox-prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 10px; top: 50%; transform: translateY(-50%); }
.lightbox-prev[disabled], .lightbox-next[disabled] { display: none; }


/* Responsive Design */
@media (max-width: 768px) { /* Tablets and smaller laptops */
    body { font-size: 98%; }
    header .container {
        /* Keep flex for alignment, will be handled by order */
        padding-top: 10px;
        padding-bottom: 10px;
    }

    header .logo {
        margin-bottom: 0; /* Remove bottom margin for mobile */
        /* Order 1 is default, still good */
    }

    header nav {
        /* These properties ONLY apply on mobile now */
        order: 3; /* Nav comes below logo and toggle */
        width: 100%; /* Full width below */
        margin-top: 10px; /* Space above nav when stacked */
        justify-content: flex-start; /* Align the ul to the start */
    }

    header nav ul {
        /* These properties ONLY apply on mobile now */
        display: none; /* Hidden by default */
        flex-direction: column; /* Stack items vertically */
        width: 100%; /* Ensure ul takes full width */
        background-color: #7aa9c5; /* Mobile nav background */
        position: static; /* No longer absolute */
        box-shadow: none;
        border-top: 1px solid #6a98b5;
        margin-top: 10px; /* Space above the dropdown */
        padding: 0;
        justify-content: flex-start;
    }
    header nav ul.active {
        display: flex; /* Show when active */
    }
    header nav ul li { margin: 0; text-align: center; border-bottom: 1px dotted #6a98b5; }
    header nav ul li:last-child { border-bottom: none; }
    header nav ul li a { display: block; padding: 15px; width: 100%; color: #ffffff; }
    header nav ul li a:hover, header nav ul li a.active { background-color: #6a98b5; }

    .menu-toggle {
        display: block; /* Show hamburger */
        order: 2; /* Place toggle after logo, before nav */
        /* Absolute positioning handles placement */
    }
    .container { width: 95%; padding: 0 10px; }
    main { padding: 20px 0; }
    main h1 { font-size: 1.9em; } main h2 { font-size: 1.6em; } main h3 { font-size: 1.3em; }
    footer .footer-links a { margin: 5px 10px; display: inline-block; margin-bottom: 10px; }
    .gallery-placeholder .photo { flex-basis: calc(50% - 10px); max-width: calc(50% - 10px); }
    .gallery-placeholder .photo img { height: 120px; }

    .lightbox-close { font-size: 18px; padding: 4px 8px; top: 5px; right: 5px; }
    .lightbox-prev, .lightbox-next { font-size: 20px; padding: 8px 12px; }
    .lightbox-prev { left: 5px; }
    .lightbox-next { right: 5px; }

}

@media (max-width: 500px) { /* Breakpoint for Hero Section Stacking */
    .hero-section {
        flex-direction: column;
        gap: 20px;
        align-items: stretch;
        padding: 15px;
    }
}


@media (max-width: 480px) { /* Phones */
    body { font-size: 95%; }
    header .logo img { height: 40px; }
    .menu-toggle { font-size: 20px; right: 15px; }
    main h1 { font-size: 1.7em; } main h2 { font-size: 1.4em; } main h3 { font-size: 1.2em; }
    .gallery-placeholder .photo { flex-basis: 100%; max-width: 100%; }
    .gallery-placeholder .photo img { height: 150px; }

     .lightbox-prev, .lightbox-next { font-size: 18px; padding: 6px 10px; }
}