:root {
    --primary-color: #40291E;
    /* Dark Brown */
    --text-color: #40291E;
    --bg-color: #F3EFE7;
    /* Cream */
    --header-text-color: #C49A44;
    /* Gold */
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.5;
}

.content-image {
    margin: 0 auto 2rem;
    /* Center horizontally, bottom margin */
    max-width: 200px;
    /* Adjust size as needed */
    height: auto;
    display: block;
}

/* Header */
.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    background-color: var(--primary-color);
    /* Dark Brown */
    color: var(--header-text-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.burger-menu {
    display: none !important;
}

.nav-left a {
    text-decoration: none;
    color: var(--header-text-color);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    margin-right: 1.5rem;
    text-transform: uppercase;
}

.logo a {
    font-family: var(--font-serif);
    /* Match the main title font */
    font-size: 1.5rem;
    font-weight: 400;
    /* Regular weight like the title */
    color: var(--header-text-color);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-bar {
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--header-text-color);
    padding-bottom: 2px;
    margin-right: 1rem;
}

.search-bar input {
    border: none;
    outline: none;
    font-size: 0.8rem;
    width: 100px;
    background-color: transparent;
    color: var(--header-text-color);
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--header-text-color);
}

.icon-link {
    color: var(--header-text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
}

.flag-icon {
    font-size: 1.2rem;
}

/* Main Content */
.community-section {
    padding: 4rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.content-wrapper {
    display: flex;
    gap: 4rem;
}

.text-content {
    flex: 0 0 30%;
    padding-top: 2rem;
    text-align: center;
    /* Center all text */
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Center flex children like img and a */
}

.text-content h1 {
    font-family: var(--font-serif);
    font-size: 3.5rem;
    font-weight: 400;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.italic-text {
    font-style: italic;
    font-weight: 400;
}

.mission-text p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    max-width: 350px;
    /* Slightly wider for better readability */
    margin-left: auto;
    margin-right: auto;
}

.italic-quote {
    font-style: italic;
    font-weight: 500;
}

.learn-more {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--text-color);
    padding-bottom: 2px;
    display: inline-block;
    /* Allow margin auto to work if needed, though align-items handles it */
    margin-top: 1rem;
}

/* Grid Container */
.grid-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.grid-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    font-style: italic;
}

/* Image Grid */
.image-grid {
    width: 100%;
    max-width: 850px;
    /* Bigger images */
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    /* Less space */
    position: relative;
    margin: auto;
    /* Center grid horizontally and vertically */
}

.grid-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    /* Make items perfect squares */
    width: 100%;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background-color: #e0e0e0;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    color: #fff;
    font-weight: 500;
    font-size: 0.8rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    position: relative;
    /* Ensure children are positioned relative to this */
}

.placeholder-image span {
    position: relative;
    z-index: 2;
    /* Ensure text is above the image */
}

.placeholder-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    /* Above background, below text */
}

/* Removed custom positioning for uniform square grid */

/* Responsive */
@media (max-width: 1024px) {
    .content-wrapper {
        flex-direction: column;
        align-items: center;
        /* Center items in column mode */
    }

    .text-content {
        text-align: center;
        padding-top: 0;
        margin-bottom: 2rem;
        flex: auto;
        /* Reset flex basis */
    }

    .text-content p {
        margin: 0 auto 2rem;
    }

    .image-grid {
        grid-template-columns: 1fr;
        /* Single column when stacked */
        max-width: 350px;
        /* Constrain width to match desktop tile size (approx) */
        width: 100%;
        /* Ensure it takes space up to max-width */
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 1rem;
        flex-wrap: wrap;
        position: relative;
        /* For absolute positioning of nav */
    }

    .burger-menu {
        display: flex !important;
        flex-direction: column;
        justify-content: space-around;
        width: 2rem;
        height: 2rem;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 10;
        margin-right: 1rem;
    }

    .burger-menu span {
        width: 2rem;
        height: 0.25rem;
        background: var(--header-text-color);
        border-radius: 10px;
        transition: all 0.3s linear;
        position: relative;
        transform-origin: 1px;
    }

    .burger-menu.open span:first-child {
        transform: rotate(45deg);
    }

    .burger-menu.open span:nth-child(2) {
        opacity: 0;
        transform: translateX(20px);
    }

    .burger-menu.open span:nth-child(3) {
        transform: rotate(-45deg);
    }

    .nav-left {
        display: none;
        /* Hidden by default */
        flex-direction: column;
        width: 100%;
        text-align: center;
        padding: 1rem 0;
        background-color: var(--primary-color);
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 9;
        border-top: 1px solid rgba(196, 154, 68, 0.2);
    }

    .nav-left.active {
        display: flex;
    }

    .nav-left a {
        margin: 0.5rem 0;
        font-size: 1rem;
    }

    .nav-right {
        margin-left: auto;
    }

    /* Removed conflicting grid-item styles to let 1024px rules apply */
}

/* Lightbox Modal */
.modal {
    display: none;
    /* Hidden by default */
    position: fixed;
    /* Stay in place */
    z-index: 1000;
    /* Sit on top */
    padding-top: 50px;
    /* Location of the box */
    left: 0;
    top: 0;
    width: 100%;
    /* Full width */
    height: 100%;
    /* Full height */
    overflow: auto;
    /* Enable scroll if needed */
    background-color: rgb(0, 0, 0);
    /* Fallback color */
    background-color: rgba(0, 0, 0, 0.9);
    /* Black w/ opacity */
}

.modal-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    max-height: 80vh;
    object-fit: contain;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    height: 150px;
    font-family: var(--font-sans);
}

.modal-content,
#caption {
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

@media only screen and (max-width: 700px) {
    .modal-content {
        width: 100%;
    }
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-float svg {
    width: 35px;
    height: 35px;
    fill: none;
    /* Reset fill for stroke-based icon if needed, or adjust SVG */
    stroke: #FFF;
}