body {
    margin: 0;
    background: #f8f8f8;
    color: #333333;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px; /* Base font size for larger screens */
    line-height: 1.8;
    text-shadow: 0 1px 0 #ffffff;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 10px;
}

header {
    background-color: #0056b3;
    color: #ffffff;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    background-image: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('images/banner.jpg');
    background-size: 80%;
    background-position: center center;
    background-repeat: no-repeat;
    padding: 0px 0;
}

header h1 {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 4em;
}

header p {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.6em;
}

/* Navigation Styles */
nav {
    background-color: #004085;
    padding: 5px 0;
    text-align: center;
}

nav ul {
    list-style: none; /* Removes bullet points */
    padding: 0; /* Removes default padding */
    margin: 0; /* Removes default margin */
    display: flex; /* Makes list items display horizontally */
    flex-wrap: wrap; /* Allows items to wrap to the next line if space is limited */
    justify-content: center; /* Centres the navigation items horizontally */
    gap: 15px; /* Adds space between navigation items */
    /* Explicitly ensure horizontal direction, though it's the default for flex */
    flex-direction: row;
}

nav ul li {
    /* No specific margin needed here, gap on ul handles spacing */
}

nav ul li a {
    display: block; /* Makes the entire link area clickable */
    padding: 10px 15px; /* Adds padding for better touch targets */
    text-decoration: none; /* Removes the underline from links */
    color: #ffffff; /* Your preferred text colour for nav links */
    white-space: nowrap; /* Prevents text from wrapping within a link */
    border-bottom: 2px solid transparent; /* Your preferred border for nav links */
    transition: color 0.3s ease, border-bottom 0.3s ease, background-color 0.3s ease; /* Smooth transitions */
}

nav ul li a:hover,
nav ul li a:focus {
    border-bottom: 2px solid #ffffff; /* Your preferred hover effect */
    background-color: rgba(255, 255, 255, 0.1); /* Subtle background change on hover */
    color: #ffffff; /* Keep text white on hover */
}

/* Section Styles */
section {
    background-color: #ffffff;
    margin-bottom: 20px;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

section h2 {
    color: #0056b3;
    font-size: 2em;
    margin-top: 0;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Link Styles (for general body links, not nav) */
a {
    color: #0056b3;
    text-decoration: none;
    border-bottom: 1px solid #0056b3;
    transition: color 0.3s ease, border-bottom 0.3s ease;
}

a:hover {
    color: #004085;
    border-bottom: 1px solid #004085;
}

/* Footer Styles */
footer {
    background-color: #333333;
    color: #ffffff;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9em;
    margin-top: 40px;
}

footer p {
    margin: 0;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

/* Responsive Adjustments for Font Sizes */
/* This media query applies to screens up to 768px wide */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    header h1 {
        font-size: 2em; /* Adjust header H1 for tablets/smaller desktops */
    }
    header p {
        font-size: 1.4em; /* Adjust header P for tablets/smaller desktops */
    }
    section h2 {
        font-size: 1.8em; /* Adjust section headings for tablets/smaller desktops */
    }
}

/* This media query applies to very small screens (e.g., mobile phones) */
@media (max-width: 480px) {
    body {
        font-size: 14px; /* Smaller base font size for mobile */
    }
    nav ul {
        gap: 10px; /* Slightly less gap on very small screens */
        padding: 5px 0;
    }
    nav ul li a {
        padding: 8px 10px;
        font-size: 0.9em; /* Slightly smaller font size for nav links */
    }
    header h1 {
        font-size: 1.8em; /* Further reduce header H1 on very small screens */
    }
    header p {
        font-size: 1.2em; /* Further reduce header P on very small screens */
    }
    section h2 {
        font-size: 1.5em; /* Adjust section headings for very small screens */
    }
}

/* --- Media Page Specific Styles --- */
/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Responsive grid */
    gap: 15px;
    margin-top: 20px;
}

.gallery-item {
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s ease-in-out;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover; /* Ensures images cover the area without distortion */
    display: block;
}

.gallery-item p {
    padding: 10px;
    margin: 0;
    font-size: 0.9em;
    color: #555;
    background-color: #f9f9f9;
}

/* Audio/Video Players */
.media-player {
    margin-bottom: 0px;
    background-color: #f0f0f0;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
}

.media-player h3 {
    margin-top: 0;
    color: #004085;
    font-size: 1em;
}

.media-player p {
    margin-block-start: 0;
    margin-block-end: 0;
}

audio, video {
    width: 100%;
    max-width: 600px; /* Limit width for embedded players */
    display: block;
    margin: 1px auto;
}

.video-embed {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin-bottom: 20px;
}

.video-embed iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
