/* --- Global Styles & Resets --- */

/* A modern best-practice: tells the browser to include padding and border in an element's total width/height */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background-color: #f4f7f6; /* A very light, neutral background */
    color: #333;
    margin: 0;
    padding: 0;
}

/* --- Layout --- */

/* We center the content on the page with a max-width
  and use 'margin: 20px auto' (top/bottom 20px, left/right auto)
*/
.container {
    display: flex; /* THIS IS THE MODERN LAYOUT: FLEXBOX */
    max-width: 1100px;
    margin: 20px auto;
    background-color: #ffffff;
    border-radius: 8px; /* Subtle rounded corners */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); /* Subtle shadow */
}

/* This is the magic of Flexbox.
  The sidebar takes up 250px, and the content 'grows' to fill the rest.
*/
.sidebar {
    flex-basis: 250px; /* Set a base width */
    flex-shrink: 0;   /* Don't shrink */
    padding: 20px;
    border-right: 1px solid #ddd;
}

.content {
    flex-grow: 1; /* Allow this element to grow */
    padding: 20px 40px;
}

/* --- Page Sections --- */

.main-header,
.main-footer {
    text-align: center;
    padding: 15px;
    background-color: #004a99; /* A clean, dark blue */
    color: white;
}

.main-footer {
    font-size: 0.9em;
    color: #ccc;
}

h1, h2, h3 {
    color: #004a99; /* Use the same theme color */
    margin-top: 0;
}

h2 {
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 5px;
}

/* --- Navigation Styling --- */

.sidebar nav ul {
    list-style-type: none; /* Remove bullet points */
    padding: 0;
    margin: 0;
}

.sidebar nav li a {
    text-decoration: none;
    color: #007bff; /* A bright, accessible blue */
    font-weight: 500;
    display: block; /* Make the whole link clickable */
    padding: 10px 15px;
    border-radius: 5px;
}

/* This is an advanced CSS "pseudo-class" for interactivity */
.sidebar nav li a:hover {
    background-color: #f0f8ff;
    color: #004a99;
}

/* --- RESPONSIVENESS (The "Magic") --- */

/* This is a Media Query.
  It says "IF the screen is 768px wide OR LESS, apply these styles."
*/
@media (max-width: 768px) {
    .container {
        /* Stack the columns instead of side-by-side */
        flex-direction: column;
    }

    .sidebar {
        border-right: none;
        border-bottom: 1px solid #ddd;
    }

    .content {
        padding: 20px;
    }
}