/* Basic Reset & Body Styles */
body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    padding: 0;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

/* Container for content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

/* Header Styles */
.page-header {
    background-color: #004d40;
    font-family: 'Poppins', sans-serif;
    color: #ecf0f1;
    padding: 0.5rem 0;
    border-bottom: 2px solid #e74c3c;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow items to wrap on smaller screens */
}

.page-title {
    margin: 0;
    font-size: 1.7rem;
    padding-left: 0.5rem;
}

/* Navigation Styles */
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    display: block;
    padding: 0.8rem 1.2rem;
    color: #ecf0f1;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.main-nav a:hover {
    background-color: #e74c3c;
}

/* Dropdown Menu (if needed, otherwise remove) */
.dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #34495e;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 10;
}

.main-nav li:hover > .dropdown {
    display: block;
}

.dropdown a {
    padding: 0.5rem 1rem;
    color: #ecf0f1;
}

.dropdown a:hover {
    background-color: #e74c3c;
}

/* Hamburger Menu Icon */
.menu-toggle {
    display: none; /* Hidden by default on larger screens */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    cursor: pointer;
    padding-right: 1rem;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #ecf0f1;
    transition: all 0.3s ease;
}

/* Main Content Styling */
main {
    padding: 2rem 0;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

main h2 {
    font-family: 'Playfair Display', serif;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 1.5rem;
}

main p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.main-image {
    width: 100%;
    height: auto;
    max-width: 600px; /* Limit image size */
    display: block; /* Remove extra space below image */
    margin: 1.5rem auto; /* Center image and add vertical space */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.image-left {
    float: left;
    width: 250px;
    margin: 0 10px 10px 0;
}


.image-right {
    float: right;
    width: 250px;
    margin: 0 10px 10px 5px;
}


/* --- NEW: Community Page Styling --- */

/* Primary Section Title */
.section-title {
    color: #004d40; /* Match header color */
    border-bottom: 3px solid #e74c3c; /* Match accent color */
    display: inline-block;
    padding-bottom: 5px;
    margin-bottom: 2rem !important;
}

/* Introduction Text */
.intro-text {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem auto; /* Center it and give space below */
    color: #555;
}

/* Card Grid Layout */
.community-links-grid {
    display: grid;
    /* 3 columns on desktop, max card width 350px */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px; /* Space between cards */
    padding-top: 1rem;
}

/* Individual Card Styling */
.community-card {
    background-color: #d8e2dc;
    border-radius: 8px;
    overflow: hidden; /* Ensures child elements stay within rounded corners */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%; /* Important for equal height in grid */
}

 

.community-card:hover {
    transform: translateY(-5px); /* Lift effect on hover */
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.community-card a {
    text-decoration: none;
    display: block;
    padding: 20px;
    color: inherit; /* Inherit text color from body */
    height: 100%;
    box-sizing: border-box; /* Include padding in height */
}

/* Card Image Placeholder (replace with actual image styles) */
.community-card a img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    margin-bottom: 10px;
    border-radius: 6px;
}

.card-title {
    color: #4a4e69; /* Use accent color for titles */
    font-size: 1.4rem;
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.card-description {
    font-size: 0.95rem;
    color: #666;
}

.external-icon {
    font-size: 0.8em;
    vertical-align: top;
    color: #2c3e50;
    margin-left: 5px;
}

/* Footer Styles */
.footer {
    background-color: #004d40;
    color: #ecf0f1;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
    justify-content: center; /* Centering y-axis */
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .page-title {
        font-size: 1.3rem;
    }

    .menu-toggle {
        display: flex; /* Show hamburger icon on small screens */
    }

    .main-nav {
        width: 100%;
        max-height: 0; /* Hide nav by default */
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        flex-basis: 100%; /* Take full width below header items */
    }

    .main-nav.active {
        max-height: 300px; /* Show nav when active (adjust as needed) */
    }

    .main-nav ul {
        flex-direction: column; /* Stack menu items vertically */
        background-color: #34495e;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .main-nav li {
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .main-nav a {
        padding: 1rem 1.5rem;
        text-align: center;
    }

    .dropdown {
        position: static; /* Dropdowns are inline in mobile */
        box-shadow: none;
        background-color: #49637c;
    }

    .dropdown a {
        padding-left: 2.5rem; /* Indent dropdown items */
    }

    .image-left {
        float: left;
        width: 120px;
        height: 120px;
        margin: 0 10px 10px 0;
    }

    .image-right {
        float: right;
        width: 120px;
        height: 120px;
        margin: 0 10px 10px 0;
    }

    /* Stack cards on very small screens */
    .community-links-grid {
        grid-template-columns: 1fr; /* Single column on small screens */
    }
}