/* css/style.css */
body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    background-color: #F3F3E0; /* Light background */
    color: #27548A; /* Dark blue text */
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure footer stays at bottom */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto; /* Center the content */
    flex-grow: 1; /* Allow container to grow and push footer down */
    background-color: #FFFFFF; /* White content background */
    padding: 20px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    border-radius: 8px;
}

header {
    background-color: #183B4E; /* Dark teal header */
    color: #FFFFFF; /* White header text */
    padding: 15px 0;
    text-align: center;
    border-bottom: 5px solid #DDA853; /* Gold accent */
}

header h1 {
    margin: 0;
    font-size: 2em;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
    background-color: #27548A; /* Dark blue nav */
    text-align: center;
}

nav ul li {
    display: inline-block;
    margin: 0;
}

nav ul li a {
    display: block;
    padding: 10px 20px;
    color: #FFFFFF;
    text-decoration: none;
    font-weight: bold;
}

nav ul li a:hover,
nav ul li a.active {
    background-color: #DDA853; /* Gold hover/active */
    color: #183B4E;
}


h2 {
    color: #183B4E; /* Dark teal headings */
    border-bottom: 2px solid #DDA853; /* Gold underline */
    padding-bottom: 5px;
}

.section {
    margin-bottom: 30px;
    padding: 15px;
    background-color: #f8f9fa; /* Light grey background for sections */
    border-left: 5px solid #27548A; /* Blue left border */
    border-radius: 5px;
}

.section h3 {
    margin-top: 0;
    color: #27548A;
}

.item-list li {
    margin-bottom: 10px;
    list-style: none; /* Remove default bullets */
    padding-left: 0;
}

.item-list li a {
    text-decoration: none;
    color: #183B4E;
    display: block; /* Make link take full width */
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.item-list li a:hover {
    background-color: #e2e6ea; /* Light hover effect */
    color: #27548A;
}

.item-list li a::before {
    content: '\📄'; /* Document icon - adjust as needed */
    margin-right: 8px;
    color: #DDA853;
}

footer {
    background-color: #183B4E; /* Dark teal footer */
    color: #F3F3E0; /* Light text */
    text-align: center;
    padding: 15px 0;
    margin-top: auto; /* Pushes footer to bottom */
    font-size: 0.9em;
}

/* Basic Mobile Responsiveness */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.5em;
    }
    nav ul li {
        display: block; /* Stack nav items */
        margin: 0;
    }
    nav ul li a {
         padding: 12px 5px;
         border-bottom: 1px solid #183B4E;
    }
    nav ul {
        margin-top: 10px;
    }
    .container {
        width: 95%;
        padding: 15px;
    }
}
/* --- Card Layout Styles --- */

.card-grid {
    display: flex; /* Enable flexbox */
    flex-wrap: wrap; /* Allow items to wrap onto the next line */
    gap: 20px; /* Spacing between cards */
    margin-top: 15px; /* Space below category title or search results heading */
    padding: 5px; /* Small padding around the grid */
}

.document-card {
    background-color: #ffffff; /* White background for cards */
    border: 1px solid #e0e0e0; /* Light grey border */
    border-radius: 8px; /* Rounded corners */
    padding: 15px 20px; /* Internal spacing */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08); /* Subtle shadow */
    box-sizing: border-box; /* Include padding/border in width calculation */
    display: flex; /* Use flexbox for internal layout */
    flex-direction: column; /* Stack elements vertically */
    transition: box-shadow 0.3s ease, transform 0.3s ease; /* Smooth hover effect */

    /* Flexbox sizing: basis=300px (ideal width), grow=1 (can grow), shrink=1 (can shrink) */
    flex: 1 1 300px;
    /* Or use calc for precise columns (e.g., 3 columns with gap): */
    /* flex-basis: calc(33.333% - 20px); */ /* Adjust percentage and gap */
}

.document-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
    transform: translateY(-3px); /* Slight lift effect */
}

.card-title {
    font-size: 1.1em;
    font-weight: bold;
    color: #183B4E; /* Dark teal */
    margin-bottom: 8px;
    /* Limit title lines (optional) */
    /* display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden; */
}

.card-title a {
    text-decoration: none;
    color: inherit; /* Inherit color from .card-title */
}

.card-meta {
    font-size: 0.85em;
    color: #555; /* Dark grey for meta text */
    margin-bottom: 15px; /* Space before link/button */
    flex-grow: 1; /* Push download link to bottom */
}

.card-meta .category-tag {
    display: inline-block;
    background-color: #e2e6ea; /* Light background for tag */
    color: #333;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    margin-right: 8px;
}


.card-link a {
    display: inline-block;
    text-decoration: none;
    padding: 8px 15px;
    background-color: #27548A; /* Dark blue */
    color: white;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s ease;
}

.card-link a:hover {
    background-color: #183B4E; /* Dark teal hover */
}

.card-link a::before {
    content: '\📄'; /* Document icon */
    margin-right: 5px;
}


/* Responsive adjustments */
@media (max-width: 768px) {
    .document-card {
        flex-basis: calc(50% - 15px); /* 2 columns on medium screens */
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .document-card {
        flex-basis: 100%; /* 1 column on small screens */
    }
}

/* Override default list styles if they interfere */
.item-list { list-style: none; padding: 0; }
.item-list li { margin-bottom: 0; } /* Remove default list margins */
.item-list li a::before { content: none; } /* Remove default icon from list */

/* Adjustments for category block */
.category-block { margin-bottom: 40px; /* More space between category sections */ }
.category-block h4 { margin-bottom: 10px; /* Space between title and card grid */ }
.category-block h4 a { text-decoration: none; color: inherit; } /* Ensure link style matches */