/* ================================
   Global Styles
   - Reset and base structure
   - Body styling + background + borders
================================== */

* {
    box-sizing: border-box;
    /* Ensures padding and border stay inside width */
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    /* Prevents sideways scroll on small screens */
    background-color: rgb(74, 124, 189);
    /* Blue-ocean background tone */
    /* Site-wide outer frame */
    /* Alternative border: #0c53b0 if a more vivid blue is preferred */
}


/* Page-wide headers used in interior sections (e.g. "Meeting Minutes") */

.page-header {
    font-size: clamp(2rem, 5vw, 3rem);
    /* Responsive size */
    font-weight: 700;
    color: black;
    text-align: center;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    /* White outline around text for contrast against blue backgrounds */
    text-shadow: -3px -3px 0 white, 3px -3px 0 white, -3px 3px 0 white, 3px 3px 0 white, -3px 0px 0 white, 3px 0px 0 white, 0px -3px 0 white, 0px 3px 0 white;
}


/* ================================
   Banner / Header
   - Full-width scenic image
   - Optional title overlaid (left or centered)
================================== */

header.banner {
    position: relative;
    width: 100%;
    min-height: 240px;
    /* Minimum for mobile */
    height: clamp(250px, 35vw, 480px);
    /* Responsive height */
    overflow: hidden;
    border-top: none;
    border-bottom: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
}

header.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* Small title in top-left corner */

.banner-title {
    position: absolute;
    top: clamp(2px, 1.2vw, 8px);
    left: clamp(4px, 2vw, 12px);
    color: white;
    background: #2a4d3d;
    /* Forest green solid */
    border: 4px solid white;
    padding: 0.4em 0.4em;
    font-size: 1.4em;
    font-weight: bold;
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    border-radius: 0.3em;
    /* Rounded edges */
}


/* Centered large banner title (e.g. full name version) */

.banner-title.centered {
    position: absolute;
    top: clamp(3px, 3vw, 4px);
    /* Controlled offset from top */
    left: 50%;
    transform: translateX(-50%);
    /* True center alignment */
    text-align: center;
    white-space: nowrap;
    /* Keeps title from wrapping awkwardly */
    color: white;
    background: rgba(42, 77, 61, 0.85);
    /* Forest green, semi-transparent */
    padding: 0.5em 1em;
    border: 3px solid rgba(255, 255, 255, 1);
    border-radius: 0.4em;
    font-size: clamp(.8em, 2vw, 1.8em);
    font-weight: bold;
    z-index: 10;
    max-width: none;
    /* Allows for wider titles if needed */
}


/* ================================
   Navigation
   - Sticky top menu
   - Buttons wrap neatly on smaller screens
================================== */

nav {
    position: sticky;
    top: 0;
    /* Sticks to top on scroll */
    z-index: 1000;
    /* Ensures nav sits above content */
    background-color: rgb(74, 124, 189);
    /* Matches body background */
    padding: 0.8em;
    display: flex;
    flex-wrap: wrap;
    /* Allows wrapping if too many buttons */
    justify-content: center;
    gap: 1em;
    /* Spacing between buttons */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    /* Light drop shadow */
}

nav a {
    /* Uniform appearance for each nav button */
    text-align: center;
    padding: 0.6em 1em;
    width: clamp(120px, 12vw, 180px);
    /* Responsive button width for consistency */
    background-color: #2a4d3d;
    /* Forest green */
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: clamp(.8em, 2vw, 1.8em);
    /* Responsive sizing */
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    border: 3px solid white;
    border-radius: 0.3em;
    transition: background 0.2s, color 0.2s;
    /* Smooth hover effect */
}

nav a:hover {
    background-color: #ee7503;
    /* Bright orange for hover accent */
}


/* ================================
   Main Content Area
   - Core layout wrapper for most pages
================================== */

main {
    /*flex tells main to take up the whole space between nav and footer*/
    flex: 1;
    padding: 2em clamp(1em, 5vw, 3em);
    /* Responsive horizontal padding */
    width: 100%;
    margin: 0 auto;
    /* Reserved in case top border is added later */
}


/* ================================
   Welcome Message Box
   - Optional box that loads if welcome.txt is present
   - Styled for legibility and warmth
================================== */

.welcome-box {
    background-color: rgba(255, 255, 255, 1);
    /* Solid white for high contrast */
    padding: 2em;
    margin: 2em auto;
    box-sizing: border-box;
    border-radius: 0.3em;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    /* Soft outer shadow */
    border: 3px solid #2a4d3d;
    /* Matches nav and banner borders */
}

#welcome-message {
    font-size: 1.2em;
    line-height: 1.6;
    color: #222;
    font-family: Georgia, serif;
    /* Serif for elegance and readability */
    margin-top: 0.5em;
}

.welcome-box h1 {
    text-align: center;
    font-size: clamp(1.4em, 4vw, 2em);
    /* Responsive header */
}


/* ================================
   PDF Flyer Box
   - Loads special.pdf if present
   - Used for community flyers, notices, etc.
================================== */

.pdf-flyer {
    background-color: rgba(255, 255, 255, 0.85);
    /* Slight transparency */
    border: 2px solid #2a4d3d;
    border-radius: 8px;
    padding: 1em;
    margin: 2em auto;
    max-width: 960px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.pdf-flyer h2 {
    margin-top: 0;
    font-size: 1.4em;
    color: #2a4d3d;
    text-align: center;
}


/* ================================
   Urgent Message Box
   - Appears when alert.txt is loaded
   - Designed to catch attention
================================== */

.urgent-message {
    text-align: center;
    padding: 1em;
    background-color: #fff0f0;
    /* Soft red background */
    color: #b00000;
    /* Bold red text */
    font-weight: bold;
    font-size: 1.1em;
    display: none;
    /* Hidden unless JS activates it */
}

.urgent-message.active {
    display: block;
}

.urgent-rule {
    border: none;
    border-top: 3px solid #b00000;
    /* Thick red separator line */
    margin: 0.5em auto;
    width: 92%;
}


/* ================================
   Calendar Layout
   - Used on events.html to show clickable dates
   - JS generates grid and injects events
================================== */

.calendar-container {
    padding: 1em;
    max-width: 960px;
    margin: auto;
    background: white;
    border: 2px solid #2a4d3d;
    border-radius: 8px;
}

#calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    /* 7-day week */
    gap: 5px;
    margin-top: 1em;
    text-align: center;
}

#calendar div {
    padding: 1em;
    background: #f0f0f0;
    border: 1px solid #ccc;
    cursor: pointer;
    /* Indicates interactivity */
}

#calendar .has-event {
    background: #2a4d3d;
    color: white;
    font-weight: bold;
}


/* ================================
   Calendar Controls
   - Next/prev buttons and month label
================================== */

.calendar-header-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1em;
    margin-bottom: 1em;
}

.calendar-header-controls h2 {
    margin: 0;
    font-size: 1.5em;
}

.calendar-header-controls button {
    font-size: 1.2em;
    padding: 0.4em 0.8em;
    background-color: #2a4d3d;
    color: white;
    border: 2px solid white;
    border-radius: 0.3em;
    cursor: pointer;
}


/* Days of the week row (above calendar cells) */

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: bold;
    margin-top: -0.5em;
    padding-bottom: 0.01em;
    color: #2a4d3d;
}


/* ================================
   Event Card List
   - Populated by JS under calendar
   - Shows upcoming events in card format
================================== */

.event-cards {
    max-width: 960px;
    margin: 2em auto;
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}

.event-card {
    padding: 1em;
    background: white;
    border: 2px solid #2a4d3d;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}


/* ================================
   Footer
   - Appears at bottom of every page
   - Styled to match nav and banner
================================== */

footer {
    text-align: center;
    padding: 1em;
    background-color: #2a4d3d;
    /* Forest green */
    font-weight: bold;
    font-size: clamp(.8em, 2vw, 1em);
    font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
    color: white;
}


/* ================================
   Member Profiles
   - Used on members.html to list bios and photos
================================== */

.member {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1.5em;
    margin: 2em auto;
    padding: 1.5em;
    max-width: clamp(300px, 99%, 1500px);
    background-color: rgba(255, 255, 255, 0.85);
    border: 2px solid #2a4d3d;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.member img {
    width: clamp(100px, 20vw, 150px);
    height: clamp(100px, 20vw, 150px);
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.member-info {
    flex: 1;
    min-width: 200px;
}

.member-info h2 {
    margin-top: 0;
    color: #2a4d3d;
}


/* ================================
   Meeting Minutes List
   - Table format with PDF links
================================== */

.minutes-list table {
    width: 100%;
    max-width: 960px;
    margin: 2em auto;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid #2a4d3d;
    border-radius: 8px;
    overflow: hidden;
}

.minutes-list th,
.minutes-list td {
    text-align: left;
    padding: 0.75em;
    border-bottom: 1px solid #ccc;
}

.minutes-list th {
    background: #2a4d3d;
    color: white;
}

.minutes-list a {
    font-weight: bold;
    color: #2a4d3d;
    text-decoration: none;
}

.minutes-list a:hover {
    text-decoration: underline;
}


/* ================================
   Forms Table (Downloads Page)
   - Basic alignment and spacing fix
================================== */

.welcome-box table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    /* Align form name and description for readability */
}

.welcome-box th {
    text-align: center;
    /* Center just the headers */
    padding: 0.5em 1em;
    vertical-align: middle;
}

.welcome-box td {
    padding: 0.5em 1em;
    vertical-align: middle;
}

.welcome-box tr td:last-child {
    text-align: center;
    /* Center the "Download" link only */
}


/* ================================
   Responsive Tweaks
   - For small and large screen sizes
================================== */


/* For layout columns and mobile padding helpers */

.responsive-padding {
    padding-left: clamp(1em, 5vw, 3em);
    padding-right: clamp(1em, 5vw, 3em);
}

.responsive-padding-y {
    padding-top: 2em;
    padding-bottom: 2em;
}


/* General mobile optimizations */

@media (max-width: 600px) {
    .member {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .calendar-weekdays div {
        font-size: 0.85em;
    }
    #calendar {
        grid-template-columns: repeat(7, 1fr);
        gap: 4px;
    }
    #calendar div {
        padding: 0.5em 0.2em;
        font-size: 0.85em;
    }
    .calendar-header-controls {
        flex-wrap: wrap;
        gap: 0.5em;
    }
    .calendar-header-controls h2 {
        font-size: 1.2em;
    }
    .event-card {
        padding: 1em;
        font-size: 0.9em;
    }
    /* Mobile-friendly data table style */
    .welcome-box table,
    .welcome-box thead,
    .welcome-box tbody,
    .welcome-box th,
    .welcome-box td,
    .welcome-box tr {
        display: block;
        width: 100%;
    }
    .welcome-box thead {
        display: none;
    }
    .welcome-box tr {
        margin-bottom: 1em;
        padding: 1em;
        border: 2px solid #2a4d3d;
        border-radius: 8px;
        background-color: #fff;
    }
    .welcome-box td {
        padding: 0.4em 0.6em;
        text-align: left;
    }
    .welcome-box td::before {
        content: attr(data-label);
        /* Label for mobile */
        font-weight: bold;
        display: block;
        color: #2a4d3d;
        margin-bottom: 0.3em;
    }
    .member-info {
        min-width: unset;
    }
    .banner-title {
        font-size: 1em;
        padding: 0.3em 0.6em;
        top: 8px;
        left: 8px;
    }
    nav a {
        padding: 0.4em 1em;
        font-size: 0.95em;
    }
    .welcome-box {
        margin: 1em 1em;
        padding: 1.5em;
        font-size: 1em;
    }
    footer {
        font-size: 0.85em;
        padding: 0.5em;
    }
}


/* Large screen layout optimization */

@media (min-width: 1400px) {
    main {
        max-width: 1200px;
    }
}

@media (max-width: 600px) {
    header.banner {
        min-height: 140px;
        /* or 125px, tweak to taste */
    }
}