body {
    font-family: sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    /* Darker grey background */
    background-color: #e0e0e0;
    color: #333;
    /* Flexbox for sticky footer */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure body takes at least full viewport height */
}

header {
    /* Darker blue background */
    background: #004080;
    color: #fff;
    padding: 1rem 0;
    text-align: center;
    margin-bottom: 20px;
}

header h1 {
    margin: 0;
    font-size: 2em;
    font-family: 'Josefin Sans', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.3);
    /* Remove default flex/grid or ensure it works with inline-block spans */
    display: block; /* Ensure the h1 itself behaves normally */
}

/* Style for the title letters animation */
.title-letter {
    display: inline-block; /* Needed for transform and opacity */
    opacity: 0; /* Start invisible */
    transform: scale(0.8); /* Start slightly smaller */
    transition: opacity 0.4s ease-out, transform 0.4s ease-out; /* Smooth transition */
}

/* When the 'visible' class is added by JS */
.title-letter.visible {
    opacity: 1; /* Fade in */
    transform: scale(1); /* Scale up to normal size */
}

header p {
    margin: 5px 0 0;
    font-size: 1.1em;
}

nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 0 20px; /* Add padding for smaller screens */
    flex-wrap: wrap; /* Allow items to wrap on smaller screens */
    max-width: 900px;
    margin: 20px auto; /* Apply margin top/bottom and auto for centering */
}

nav label {
    font-weight: bold;
}

nav select, nav button {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    /* Darker grey button background */
    background-color: #dddddd;
}

nav button {
    background-color: #e2e6ea;
}

nav button:hover {
    /* Darker grey button hover background */
    background-color: #c0c0c0;
}

nav select:focus, nav button:focus {
    outline: none;
    /* Darker blue focus color */
    border-color: #005a9c;
    box-shadow: 0 0 5px rgba(0, 90, 156, 0.5);
}

/* Styles for the French flag */
.french-flag-container {
    position: absolute; /* Position relative to the header */
    top: 15px; /* Distance from the top */
    right: 20px; /* Distance from the right */
    width: 90px; /* Example size (aspect ratio 3:2) */
    height: 60px;
    display: flex;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.2); /* Optional subtle border */
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3); /* Optional subtle shadow */
    /* Animation */
    animation: wave 4s ease-in-out infinite alternate;
    transform-origin: 50% 50%; /* Center origin for transformation */
    z-index: 1; /* Ensure it's above other elements if needed */
}

.flag-stripe {
    width: 33.33%;
    height: 100%;
}

.flag-stripe.blue { background-color: #002654; /* French Blue - already dark */ }
.flag-stripe.white { background-color: #FFFFFF; /* White */ }
.flag-stripe.red { background-color: #ce1126; /* French Red */ }

/* Keyframes for subtle wave animation */
@keyframes wave {
    0% { transform: rotateZ(0deg) skewX(0deg); }
    25% { transform: rotateZ(0.5deg) skewX(1deg); }
    50% { transform: rotateZ(0deg) skewX(0deg); }
    75% { transform: rotateZ(-0.5deg) skewX(-1deg); }
    100% { transform: rotateZ(0deg) skewX(0deg); }
}

/* Flexbox wrapper for content to push footer down */
.content-wrapper {
    flex-grow: 1; /* This makes the wrapper take up available space */
    display: flex; /* Also use flexbox to arrange main and additional councils */
    flex-direction: column; 

}
main {
    max-width: 900px;
    min-width: 500px;
    margin: 0 auto 20px auto;
    padding: 20px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    flex-shrink: 0;
}

/* Style for each session block */
.session-block {
    border: 1px solid #ccc; /* Grey border */
    border-radius: 5px; /* Slightly rounded corners */
    padding: 15px; /* Inner spacing */
    margin-bottom: 20px; /* Space between blocks */
    background-color: #f9f9f9; /* Slightly different background for contrast */
     box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); /* Subtle shadow for depth */
}

.session-block h3 {
    margin-top: 0; /* Remove top margin from heading inside block */
    color: #005a9c; /* Match focus color or another thematic color */
    margin-bottom: 10px; /* Space below heading */
    /* Add flexbox to align icon and text */
    display: flex;
    align-items: center; /* Vertically center items */
}


.download-icon {
    display: block; /* Default to block for standalone link */
    width: 50px; /* Set width */
    height: auto; /* Maintain aspect ratio */
    margin: 0 auto; /* Center the icon */
    cursor: pointer; /* Indicate it's clickable */
    transition: transform 0.2s ease-in-out; /* Add subtle hover effect */
}

.session-block a {
    /* Style for the link wrapper around the icon */
    display: inline-block; /* Allow padding and margin */
    margin-top: 5px;
    /* Remove previous text link styling */
    color: inherit; /* Use parent color */
    text-decoration: none; /* Remove underline */
    font-weight: normal;
}

.session-block h3 a {
    color: #005a9c; /* Set link color for h3 link */
    text-decoration: none; /* Remove underline */
    display: flex; /* Make the link a flex container */
    align-items: center; /* Vertically align icon and text */
}

.session-block h3 a:hover {
    color: #19b0a4;
    text-decoration: underline; /* Add underline on hover for h3 link */
    font-weight: bold; /* Make text bold on hover */
    font-size: 1.1em; /* Make text slightly larger on hover */
}

.session-block a:hover {
    /* No underline on hover for the link wrapper */
    text-decoration: none;
}

/* *******************************************************************************/
/* *******************************************************************************/
/* *******************************************************************************/
/* *******************************************************************************/
/* *******************************************************************************/
/* *******************************************************************************/

   @media (min-width: 801px) { /* Apply for screens wider than 800px */
    .session-block h3 .download-icon {
        display: block; /* Show the inline icon */
    }



    /* Adjust the anchor link container to be inline with the heading for accessibility/structure */
    .session-block a {
        display: flex; /* Make the link a flex container */
        align-items: center; /* Vertically align icon and text */
        text-decoration: none; /* Remove underline */
        color: inherit; /* Inherit color from parent */
        /* Remove margin-top as it's now part of the heading flow */
        margin-top: 0;
    }

    /* On larger screens, remove the specific hover effect from the (now hidden) block icon */
    .session-block a:hover .download-icon {
        transform: none;
    }
}

.session-block a:hover .download-icon {
     transform: scale(1.1); /* Slightly enlarge icon on hover */
}

/* Animation for content area */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.content-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

/* New styles for additional council buttons */
.additional-councils {
    text-align: center; /* Center the buttons when they are inline-block */
    padding: 0 20px; /* Add padding for smaller screens */
     /* Ensure additional councils don't shrink */
    flex-shrink: 0;
    max-width: 900px;
    margin: 30px auto; /* Apply margin top/bottom and auto for centering */
    /* Default: display block (which contains inline-block children) */
    display: block;
}

.council-button {
    display: inline-block; /* Default display for side-by-side */
    padding: 12px 25px;
    /* margin: 0 10px; Remove previous margin */
    margin-top: 0; /* Ensure no unwanted vertical margin */
    margin-bottom: 0; /* Ensure no unwanted vertical margin */
    margin-left: 10px; /* Add space to the left of each button */
    border: none; /* Remove default button border */
    border-radius: 8px; /* Rounded corners */
    font-size: 1.1em;
    font-weight: bold;
    text-decoration: none; /* Remove underline */
    color: #fff; /* White text */
    background-color: #005a9c; /* A suitable dark blue */
    cursor: pointer;
    transition: all 0.2s ease-in-out; /* Smooth transitions for hover/active */

    /* Relief effect using box-shadow */
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3), /* Highlight top */
        inset 0 -1px 0 rgba(0, 0, 0, 0.1), /* Shadow bottom */
        0 2px 4px rgba(0, 0, 0, 0.2); /* Outer shadow */
}

/* Remove the left margin from the very first council button */
.council-button:first-child {
    margin-left: 0;
}

.council-button:hover {
    background-color: #004080; /* Slightly darker blue on hover */
    /* Subtle change in shadow or transform on hover */
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.4), /* Stronger highlight */
        inset 0 -1px 0 rgba(0, 0, 0, 0.15), /* Stronger shadow */
        0 4px 8px rgba(0, 0, 0, 0.3); /* Larger outer shadow */
    transform: translateY(-2px); /* Lift button slightly */
}

.council-button:active {
    background-color: #003060; /* Even darker on active */
    box-shadow:
        inset 0 1px 0 rgba(0, 0, 0, 0.1), /* Reverse inset shadow */
        inset 0 -1px 0 rgba(255, 255, 255, 0.3),
        0 1px 2px rgba(0, 0, 0, 0.15); /* Smaller outer shadow */
    transform: translateY(0); /* Press button down */
}

footer {
    text-align: center;
    padding: 1rem 0;
    background: #333;
    color: #fff;
     /* Ensure footer doesn't shrink */
    flex-shrink: 0;
}


/* Adjustments for screens less than 800px */
@media (max-width: 800px) {
        .french-flag-container {
        display: none;
    }

    /* Adjust padding when max-width is hit */
    nav,
    main,
    .additional-councils {
        padding-left: 20px;
        padding-right: 20px;
    }
    header h1 {
        font-size: 1.5em;
        letter-spacing: 1px;
        max-width: 350px;
        margin: 0 auto;
    }

    header p {
        font-size: 1em;
    }

    nav {
        flex-direction: column;
        gap: 10px;
        margin: 10px auto;
    }

    main {
        padding: 15px;
        max-width: 340px;
    }

    /* Stack additional council buttons below 800px */
    .additional-councils {
        flex-direction: column; /* Use flexbox to stack items */
        gap: 15px; /* Add vertical space between stacked items */
        margin: 20px auto;
        /* Padding is already 0 20px from 900px rule */
        display: flex; /* Ensure it's a flex container */
        text-align: inherit; /* Remove center alignment when stacked */
    }

    .council-button {
        display: block; /* Make buttons block to stack */
        width: 100%; /* Take full width of parent content box */
        box-sizing: border-box; /* Include padding/border in the element's total width */
        margin: 0; /* Remove any margin (including the margin-left applied above) */
    }
}

/* Adjustments for screens less than 600px */
@media (max-width: 600px) {
     /* Reduce parent padding for council buttons to give them more space */
    .additional-councils {
         padding: 0 10px; /* Reduce horizontal padding */
         /* Margin, flex-direction, gap from 800px rule still apply */
    }

    /* Council buttons continue to be block, 100% width, box-sizing: border-box;
       and will now fit within the reduced 10px padding. */

    /* Center elements within session-block for screens less than 600px */
    .session-block {
        text-align: center; /* Center text and inline-block elements */
    }

    .session-block h3 {
        justify-content: center; /* Center flex items (icon and text) */
    }
}

/* Adjustments for screens less than 480px */
@media (max-width: 480px) {
    nav select, nav button {
        width: 100%;
        box-sizing: border-box;
    }

    nav {
        padding: 0 10px;
        margin: 10px auto;
    }



     main {
         padding: 10px;
     }
}
