/* --- CSS Variables for Easy Theming --- */
:root {
    --white-bg: #FFFFFF;
    --header-text-color: #000066;
    --primary-text-color: #212121;
    --link-color: #09526a;
    --link-hover-color: #0056b3;
    --light-blue-bg: #BBDDFF;
    --heading-color: #000066;
    --success-color: #007200;
    --font-family-sans: Arial, Helvetica, sans-serif;
    --max-content-width: 1400px;
    --h3-text-color: #000066;
}

/* --- General Body & Reset Styles --- */
body {
    font-family: var(--font-family-sans);
    color: var(--primary-text-color);
    background-color: var(--white-bg);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

* {
    box-sizing: border-box;
}

/* --- Layout Container --- */
.container {
    max-width: var(--max-content-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    width: 100%;
}

/* --- Link Styles --- */
a {
    color: var(--link-color);
    text-decoration: none;
}

a:hover {
    color: var(--link-hover-color);
    text-decoration: underline;
}

/* --- Typography --- */
h1, h2, h3 {
    color: var(--heading-color);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
p, li { font-size: 1rem; }

/* --- Utility Classes --- */
.text-center {
    text-align: center;
}

.card {
    border: 2px solid #ccc;
    padding: 1rem;
    margin-bottom: 1.5rem;
    background-color: var(--white-bg);
}

.img-bordered {
     border: 2px solid #ffffffdb;
     max-width: 100%;
     height: auto;
}

/* --- Header Styles --- */
.site-header-wrapper {
    padding: 0.5rem 0;
}

.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.header-intro {
    text-align: left;
    color: var(--header-text-color);
    font-size: 0.8rem;
    flex-basis: 450px; /* Give it a base width */
    flex-grow: 1;
    max-width: 55%;

}

.header-intro p {
    margin: 0;
}

.header-intro strong {
    font-size: 1.2rem;
}

.header-media {
    display: flex;
    flex-direction: column;
    align-items: flex-end; /* Align items to the right */
}

.header-media h3 {
    margin: 0 0 0.5rem 0;
    text-align: right;
    font-size: 1.3rem;
    color: var(--h3-text-color);
}

.header-banner {
    width: 400px;
}

.header-banner img {
    width: 100%;
    height: auto;
    display: block;
}

/* --- Navigation Styles --- */
.main-nav-wrapper {
    background-color: var(--light-blue-bg);
    padding: 0.5rem 0;
}

.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1rem;
}

.main-nav a {
    font-weight: bold;
    font-size: 0.9rem;
    padding: 0.5rem;
    display: block;
}

/* --- Main Content Layout (Grid) --- */
.page-wrapper {
    display: grid;
    grid-template-columns: 1fr 2.5fr 1fr; /* Three-column layout */
    gap: 1.5rem;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

main {
    padding: 0 1rem;
}

/* --- Sidebar Styles --- */
.sidebar {
    background-color: var(--light-blue-bg);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center; /* Add this line back */
}

.sidebar h4 {
    font-size: 1.2rem;
    margin-top: 0;
}

.sidebar p, .sidebar a {
    font-size: 0.9rem;
}

/* --- Specific Component Styles --- */
.welcome-message h2 {
    text-align: center;
    color: var(--header-text-color);
}

.info-highlight {
    font-size: 1.2rem;
    text-align: center;
    color: var(--success-color);
    font-weight: bold;
    margin: 1.5rem 0;
}

.aunty-fran-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: left;
}

.aunty-fran-card img {
    flex-shrink: 0;
}

a[href="ESBS.htm"] strong {
    display: block;
    margin-top: 0.5rem;
}

/* --- UNIFIED CAPTION STYLES --- */
.image-caption-container {
    margin: 0 auto 1rem auto;
    padding: 0;
    display: block; /* This is the fix */
    text-align: center;
}

.image-caption-container img {
    display: block;
    max-width: 100%;
    height: auto;
}

.image-caption-container figcaption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    font-style: italic;
    color: #333;
}

/* --- Image Gallery --- */
.plant-gallery-wrapper {
    padding: 1.5rem 0;
}

.plant-gallery {
    text-align: center;
}

.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* --- Footer Styles --- */
.site-footer-wrapper {
    background-color: var(--light-blue-bg);
    border-top: 2px solid var(--header-text-color);
    padding: 0.1rem 0;
}

.site-footer {
    text-align: center;
    font-size: 0.9rem;
}

.site-footer .main-nav-wrapper {
    border-bottom: 1px solid var(--header-text-color);
    margin-bottom: 1rem;
}

.footer-contact p {
    margin: 0.5rem 0;
    color: var(--primary-text-color);
    font-weight: bold;
}

.footer-copyright {
    margin-top: 1rem;
    font-size: 0.8rem;
}

/* --- Responsive Design for Smaller Screens --- */
@media (max-width: 1024px) {
    .page-wrapper {
        grid-template-columns: 1fr;
    }

    .site-header {
        flex-direction: column;
    }
    
    .header-banner, .header-intro {
        width: 100%;
        text-align: center;
    }

    .header-media {
        align-items: center;
    }

    .header-media h3 {
        text-align: center;
    }
}