.banner-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    margin-bottom: 0;
}

.banner-container picture {
    width: 100%;
    display: block;
}

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

.banner {
    width: 100%;
    max-height: 40vh;
    min-height: 200px;
    object-fit: cover;
    object-position: center;
    display: block;
}

.banner-title,
.banner-subtitle {
    position: static;
    width: 100%;
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--pico-spacing);
    padding-right: var(--pico-spacing);
    box-sizing: border-box;
    text-shadow: none;
}

.banner-title {
    margin-top: var(--pico-spacing);
    margin-bottom: 0;
    color: var(--pico-h1-color);
    font-family: var(--pico-font-family);
    font-size: 1.8rem;
    font-weight: 700;
}

.banner-subtitle {
    margin-top: 0;
    margin-bottom: var(--pico-spacing);
    color: var(--pico-muted-color);
    font-family: var(--pico-font-family);
    font-size: var(--pico-font-size);
    font-weight: var(--pico-font-weight);
}

@media (min-width: 576px) {
    .banner-title,
    .banner-subtitle {
        max-width: 510px;
        padding-left: 0;
        padding-right: 0;
    }
}

@media (min-width: 768px) {
    .banner-title,
    .banner-subtitle {
        max-width: 700px;
    }
}

@media (min-width: 1024px) {
    .banner-title,
    .banner-subtitle {
        max-width: 950px;
    }
}

@media (min-width: 1280px) {
    .banner-title,
    .banner-subtitle {
        max-width: 1200px;
    }
}

@media (min-width: 1536px) {
    .banner-title,
    .banner-subtitle {
        max-width: 1450px;
    }
}

/* Video iframe centering and responsive */
.video-container {
    position: relative;
    width: 100%;
    max-width: 560px;
    margin: var(--pico-typography-spacing-vertical) auto;
    border: 0;
}

.video-container::before {
    content: "";
    display: block;
    padding-bottom: 56.25%; /* 16:9 aspect ratio (9/16 = 0.5625) */
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Photo gallery layout */
.photo-gallery {
    display: flex;
    gap: calc(var(--pico-spacing) * 2);
    justify-content: center;
    align-items: flex-start;
    margin: var(--pico-typography-spacing-vertical) 0;
    flex-wrap: wrap;
}

.photo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 800px;
    flex: 0 1 auto;
}

.photo-item small {
    margin-bottom: calc(var(--pico-typography-spacing-vertical) * 0.5);
    text-align: center;
    width: 100%;
    display: block;
}

.photo-item img {
    max-width: 100%;
    height: auto;
    border-radius: 0.25rem;
}

/* Responsive behavior */
@media (max-width: 768px) {
    .photo-gallery {
        flex-direction: column;
        align-items: center;
    }
    
    .photo-item {
        max-width: 100%;
        margin-bottom: var(--pico-typography-spacing-vertical);
    }
}

/* Make headers use primary green color for both themes */
:root:not([data-theme="dark"]) {
    --pico-h1-color: var(--pico-primary);
    --pico-h2-color: var(--pico-primary);
    --pico-h3-color: var(--pico-primary);
    --pico-h4-color: var(--pico-primary);
    --pico-h5-color: var(--pico-primary);
    --pico-h6-color: var(--pico-primary);
}

/* Make headers use primary color in dark theme too */
[data-theme="dark"] {
    --pico-h1-color: var(--pico-primary);
    --pico-h2-color: var(--pico-primary);
    --pico-h3-color: var(--pico-primary);
    --pico-h4-color: var(--pico-primary);
    --pico-h5-color: var(--pico-primary);
    --pico-h6-color: var(--pico-primary);
}

/* Custom header colors for green theme - light mode */
/* [data-theme="light"],
:root:not([data-theme="dark"]) {
    --pico-h1-color: #2d5016;
    --pico-h2-color: #3e6b1f;
    --pico-h3-color: #4f8528;
    --pico-h4-color: #609f31;
    --pico-h5-color: #71ba3a;
    --pico-h6-color: #5a9428;
}*/

/* Test: Force green color on ALL headings */
/* h1, h2, h3, h4, h5, h6 {
    color: #2d5016 !important;
}  */

/* Theme toggle button styling — match nav link height */
#theme-toggle {
    margin: calc(var(--pico-nav-link-spacing-vertical) * -1) calc(var(--pico-nav-link-spacing-horizontal) * -1);
    padding: calc(var(--pico-nav-link-spacing-vertical) - var(--pico-border-width) * 2) var(--pico-nav-link-spacing-horizontal);
    min-height: auto;
    height: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--pico-border-radius);
    font-size: inherit;
    line-height: var(--pico-line-height);
    transition: transform 0.2s ease;
}

#theme-toggle:hover {
    transform: scale(1.05);
}

#theme-toggle #theme-icon {
    display: block;
    line-height: 1;
}

/* Responsive Navigation Styles */
/* Hide mobile nav by default (desktop first) */
.mobile-nav {
    display: none;
}

/* Show desktop nav by default */
.desktop-nav {
    display: flex;
}

.nav-pages-dropdown {
    display: none;
}

/* Mobile breakpoint - hide desktop nav and show mobile nav */
@media (max-width: 767px) {
    .desktop-nav {
        display: none;
    }
    
    .mobile-nav {
        display: flex;
        flex: 0 0 auto;
        gap: calc(var(--pico-spacing) * 0.5);
    }

    .nav-page-link {
        display: none;
    }

    .nav-pages-dropdown {
        display: inline-block;
    }
    
    /* Arrange mobile nav items horizontally */
    header nav {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center;
        gap: 0;
    }
    
    /* Make the About/theme toggle ul display as flex */
    header nav > ul:not(.desktop-nav):not(.mobile-nav) {
        display: flex !important;
        gap: calc(var(--pico-spacing) * 0.5);
        align-items: center;
        flex: 0 0 auto;
        margin: 0;
    }
    
    header nav > ul:not(.desktop-nav):not(.mobile-nav) {
        padding: 0;
    }
    
    header nav > ul:not(.desktop-nav):not(.mobile-nav) li {
        margin: 0;
    }
    
    .mobile-nav li,
    .nav-pages-dropdown {
        position: relative;
    }

    .mobile-nav .dropdown,
    .nav-pages-dropdown .dropdown {
        width: auto;
        min-width: auto;
    }
    
    .mobile-nav .dropdown summary,
    .nav-pages-dropdown .dropdown summary {
        margin: 0;
        padding: calc(var(--pico-spacing) * 0.5) var(--pico-spacing);
        border-radius: var(--pico-border-radius);
        cursor: pointer;
        user-select: none;
    }
    
    .mobile-nav .dropdown[open] summary,
    .nav-pages-dropdown .dropdown[open] summary {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
    
    .mobile-nav .dropdown ul,
    .nav-pages-dropdown .dropdown ul {
        position: absolute;
        top: 100%;
        width: auto;
        min-width: 100%;
        background: var(--pico-background-color);
        border: 1px solid var(--pico-muted-border-color);
        border-top: none;
        border-radius: 0 0 var(--pico-border-radius) var(--pico-border-radius);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        margin: 0;
        padding: 0;
        list-style: none;
        white-space: nowrap;
    }

    .mobile-nav .dropdown ul {
        left: 0;
        right: auto;
    }

    .nav-pages-dropdown .dropdown ul {
        left: auto;
        right: 0;
    }
    
    .mobile-nav .dropdown ul li,
    .nav-pages-dropdown .dropdown ul li {
        margin: 0;
        border-bottom: 1px solid var(--pico-muted-border-color);
    }
    
    .mobile-nav .dropdown ul li:last-child,
    .nav-pages-dropdown .dropdown ul li:last-child {
        border-bottom: none;
    }
    
    .mobile-nav .dropdown ul li a,
    .nav-pages-dropdown .dropdown ul li a {
        display: block;
        padding: calc(var(--pico-spacing) * 0.75) var(--pico-spacing);
        text-decoration: none;
        color: var(--pico-color);
        transition: background-color 0.2s ease;
    }
    
    .mobile-nav .dropdown ul li a:hover,
    .nav-pages-dropdown .dropdown ul li a:hover {
        background-color: var(--pico-muted-color);
        opacity: 0.1;
    }
}

/* Services Summary Styling */
.services-summary {
    background: var(--pico-muted-color);
    background: rgba(var(--pico-muted-color-rgb, 0, 0, 0), 0.05);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    padding: var(--pico-spacing);
    margin: var(--pico-typography-spacing-vertical) 0;
}

.services-summary h3 {
    margin-top: 0;
    margin-bottom: var(--pico-typography-spacing-vertical);
    color: var(--pico-primary);
}

.service-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: calc(var(--pico-spacing) * 0.75);
    margin: 0;
}

.service-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: calc(var(--pico-spacing) * 0.75);
    padding: calc(var(--pico-spacing) * 0.75);
    background: var(--pico-background-color);
    border: 1px solid var(--pico-muted-border-color);
    border-radius: var(--pico-border-radius);
    text-decoration: none;
    color: var(--pico-color);
    transition: all 0.2s ease;
    text-align: center;
}

.service-link:hover {
    background: var(--pico-primary);
    color: var(--pico-primary-inverse);
    border-color: var(--pico-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.service-icon {
    flex-shrink: 0;
    display: block;
    width: 60px;
    height: 60px;
}

.service-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    display: block;
}

.service-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.service-link strong {
    display: block;
    font-size: 1.1em;
    margin-bottom: calc(var(--pico-spacing) * 0.25);
}

/* 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;
}


/* Main Navigation Structure */
.main-nav {
    display: flex;
    align-items: center;
    gap: calc(var(--pico-spacing) * 0.5);
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-nav li {
    margin: 0;
}

.main-nav a[aria-current="page"] {
    font-weight: bold;
    color: var(--pico-primary);
}

/* Services Navigation */
.services-nav {
    margin-top: calc(var(--pico-spacing) * 0.5);
    padding-top: calc(var(--pico-spacing) * 0.5);
    border-top: 1px solid var(--pico-muted-border-color);
}

.services-nav h2 {
    margin: 0 0 calc(var(--pico-spacing) * 0.5) 0;
    font-size: 1em;
    color: var(--pico-muted-color);
}

/* Navigation Layout */
header nav {
    display: flex;
    flex-direction: column;
    gap: calc(var(--pico-spacing) * 0.5);
}

/* Desktop navigation layout */
@media (min-width: 768px) {
    header nav {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
        flex-wrap: wrap;
    }

    header nav > ul {
        align-items: flex-start;
    }
    
    .main-nav {
        order: 1;
        flex: 0 0 auto;
    }
    
    .services-nav {
        order: 2;
        margin-top: 0;
        padding-top: 0;
        border-top: none;
        flex: 1 1 100%;
        margin-top: calc(var(--pico-spacing) * 0.5);
    }
}

/* Mobile navigation layout */
@media (max-width: 767px) {
    .services-nav {
        margin-top: calc(var(--pico-spacing) * 0.5);
        padding-top: calc(var(--pico-spacing) * 0.5);
        border-top: 1px solid var(--pico-muted-border-color);
    }
}

/* Responsive service links */
@media (max-width: 768px) {
    .service-links {
        grid-template-columns: 1fr;
        gap: calc(var(--pico-spacing) * 0.5);
    }
    
    .service-link {
        padding: calc(var(--pico-spacing) * 0.5);
    }
}

footer ul {
    display: flex;
    flex-wrap: wrap;
    gap: calc(var(--pico-spacing) * 0.5);
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
}

footer li {
    margin: 0;
    display: flex;
    align-items: center;
}

footer li:not(:last-child)::after {
    content: "|";
    margin: 0 calc(var(--pico-spacing) * 0.5);
    color: var(--pico-muted-color);
    font-weight: normal;
}

@media (max-width: 480px) {
    footer ul {
        flex-direction: column;
        align-items: center;
        gap: calc(var(--pico-spacing) * 0.5);
    }
    
    footer li:not(:last-child)::after {
        content: none; /* Remove delimiters on mobile */
    }
}

/* Mascot section styling */
.mascot-section {
    display: flex;
    align-items: center;
    gap: calc(var(--pico-spacing) * 2);
    margin: var(--pico-typography-spacing-vertical) 0;
}

.mascot-image {
    flex-shrink: 0;
    min-width: 120px; /* Prevent image from disappearing on thin screens */
}

.mascot-image picture,
.mascot-image img {
    display: block;
    max-width: 100%;
    height: auto;
}

.mascot-image img {
    width: 200px;
    max-width: min(200px, 30vw);
    min-width: 120px; /* Ensure image stays visible on very thin screens */
}

.mascot-text {
    flex: 1;
    min-width: 0; /* Allows text to shrink properly */
}

/* Stack on small devices */
@media (max-width: 576px) {
    .mascot-section {
        flex-direction: column;
        align-items: center;
        gap: var(--pico-spacing);
    }
    
    .mascot-image {
        min-width: auto; /* Reset min-width when stacked */
    }
    
    .mascot-image img {
        width: 100%;
        max-width: 200px;
        min-width: 120px; /* Keep minimum size even when stacked */
    }
    
    .mascot-text {
        text-align: center;
    }
}

/* Very thin screens - ensure image stays visible */
@media (max-width: 400px) {
    .mascot-image img {
        min-width: 100px; /* Smaller but still visible on very thin screens */
    }
}