/* --- Global Resets and Base Styles --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px; /* Base font size */
    line-height: 1.6;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif; /* Modern, clean font stack */
    color: #333;
    background-color: #f4f4f4; /* Light background for the body */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.75em;
    color: #1a1a1a; /* Darker color for headings */
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1em;
}

a {
    color: #007bff; /* Standard link color */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover, a:focus {
    color: #0056b3; /* Darker shade on hover/focus */
    text-decoration: underline;
}

img, video, svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Layout & Container --- */
.container {
    width: 90%;
    max-width: 1200px; /* Max width for larger screens */
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

.site-main {
    flex-grow: 1; /* Ensures footer stays at the bottom */
    padding-top: 20px;
    padding-bottom: 40px;
    background-color: #fff; /* White background for main content area */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); /* Subtle shadow */
}

/* --- Header --- */
.site-header {
    background-color: #ffffff; /* White header background */
    padding: 1em 0;
    border-bottom: 1px solid #e7e7e7; /* Subtle border */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    text-decoration: none;
}
.logo a:hover {
    color: #007bff;
}

/* --- Navigation --- */
.main-navigation ul.nav-menu {
    list-style: none;
    display: flex;
}

.main-navigation ul.nav-menu li {
    margin-left: 20px;
}

.main-navigation ul.nav-menu a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    padding: 0.5em 0.2em;
    position: relative;
}

.main-navigation ul.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #007bff;
    transition: width 0.3s ease;
}

.main-navigation ul.nav-menu a:hover::after,
.main-navigation ul.nav-menu li.current-menu-item a::after { /* For active page indication */
    width: 100%;
}

.main-navigation ul.nav-menu a:hover,
.main-navigation ul.nav-menu li.current-menu-item a {
    color: #007bff;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 4px;
    padding: 0.5em 0;
    min-width: 180px;
    z-index: 1001;
    flex-direction: column; /* Stack items vertically */
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu { /* Show on focus for accessibility */
    display: flex; /* Changed to flex for consistency */
}

.dropdown-menu li {
    margin-left: 0;
    width: 100%;
}

.dropdown-menu a {
    display: block;
    padding: 0.75em 1em;
    color: #333;
    white-space: nowrap;
}
.dropdown-menu a::after {
    display: none; /* No underline effect for dropdown items */
}

.dropdown-menu a:hover {
    background-color: #f0f0f0;
    color: #007bff;
}


/* Mobile Menu Toggle */
.menu-toggle {
    display: none; /* Hidden by default, shown in media query */
    background: none;
    border: 1px solid #ccc;
    padding: 1em;
    cursor: pointer;
    border-radius: 4px;
}
.menu-toggle .hamburger-icon {
    display: block;
    width: 100%;
    height: 4px;
    background-color: #333;
    position: relative;
    transition: background-color 0s 0.3s; /* Delay background disappearing */
}
.menu-toggle .hamburger-icon::before,
.menu-toggle .hamburger-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: #333;
    transition: transform 0.3s ease, top 0.3s ease 0.3s; /* Delay top movement */
}
.menu-toggle .hamburger-icon::before {
    top: -6px;
}
.menu-toggle .hamburger-icon::after {
    top: 6px;
}

/* Active state for hamburger */
.menu-toggle.active .hamburger-icon {
    background-color: transparent; /* Middle bar disappears */
}
.menu-toggle.active .hamburger-icon::before {
    top: 0;
    transform: rotate(45deg);
    transition: top 0.3s ease, transform 0.3s ease 0.3s; /* Delay transform */
}
.menu-toggle.active .hamburger-icon::after {
    top: 0;
    transform: rotate(-45deg);
    transition: top 0.3s ease, transform 0.3s ease 0.3s; /* Delay transform */
}


/* --- Footer --- */
.site-footer {
    background-color: #2c3e50; /* Dark footer background */
    color: #ecf0f1; /* Light text color for footer */
    padding: 2em 0;
    font-size: 0.9rem;
}

.footer-widgets {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px; /* Space between widget areas */
    margin-bottom: 2em;
}

.widget-area {
    flex-basis: calc(33.333% - 20px); /* Adjust for 3 columns, considering gap */
    min-width: 250px; /* Minimum width for smaller screens before stacking */
}

.widget-area h4 {
    color: #ffffff;
    margin-bottom: 0.75em;
    border-bottom: 1px solid #34495e;
    padding-bottom: 0.5em;
}

.widget-area ul {
    list-style: none;
}

.widget-area ul li a {
    color: #bdc3c7; /* Lighter link color in footer */
    text-decoration: none;
}

.widget-area ul li a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.copyright {
    text-align: center;
    padding-top: 1em;
    border-top: 1px solid #34495e; /* Separator line */
}
.copyright p {
    margin-bottom: 0.25em;
}

/* --- Forms --- */
form {
    margin-bottom: 1.5em;
}
fieldset {
    border: 1px solid #ddd;
    padding: 1em;
    margin-bottom: 1em;
    border-radius: 4px;
}
legend {
    padding: 0 0.5em;
    font-weight: bold;
    color: #333;
}
label {
    display: block;
    margin-bottom: 0.5em;
    font-weight: 500;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.75em;
    margin-bottom: 1em;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="month"]:focus,
input[type="week"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}
textarea {
    min-height: 120px;
    resize: vertical;
}
button,
input[type="submit"],
input[type="reset"],
input[type="button"],
.btn { /* General button class */
    display: inline-block;
    background-color: #007bff;
    color: #ffffff;
    padding: 0.75em 1.5em;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}
button:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover,
.btn:hover {
    background-color: #0056b3;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
button:focus,
input[type="submit"]:focus,
input[type="reset"]:focus,
input[type="button"]:focus,
.btn:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.35);
}
.btn-secondary {
    background-color: #6c757d;
}
.btn-secondary:hover {
    background-color: #545b62;
}
.btn-danger {
    background-color: #dc3545;
}
.btn-danger:hover {
    background-color: #b52b39;
}

/* --- Utility Classes --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.hidden { display: none; }
.sr-only, .skip-to-content { /* Screen reader only, accessible skip link */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.skip-to-content:focus { /* Show skip link on focus */
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    padding: 1em;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    z-index: 10000; /* Ensure it's on top */
    display: inline-block; /* Make it visible */
}

/* --- Alerts / Messages --- */
.alert {
    padding: 1em;
    margin-bottom: 1em;
    border: 1px solid transparent;
    border-radius: 4px;
}
.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}
.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}
.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}
.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

/* --- Animations (Placeholders - implement with CSS keyframes or JS libraries) --- */
/* Example: Fade-in animation */
.fade-in {
    animation: fadeInAnimation 0.5s ease-in forwards;
}
@keyframes fadeInAnimation {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Example: Slide-in from left */
.slide-in-left {
    animation: slideInLeftAnimation 0.6s ease-out forwards;
}
@keyframes slideInLeftAnimation {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* --- Cards (for news, agenda, gallery items) --- */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* Responsive grid */
    gap: 20px;
}
.card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden; /* To contain image within rounded corners */
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.1);
}
.card-image img {
    width: 100%;
    height: 200px; /* Fixed height for consistency */
    object-fit: cover; /* Crop image to fit */
}
.card-content {
    padding: 1em;
    flex-grow: 1; /* Allows content to take available space */
    display: flex;
    flex-direction: column;
}
.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5em;
    color: #333;
}
.card-excerpt {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 1em;
    flex-grow: 1; /* Pushes button to bottom if content is short */
}
.card-meta {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 0.5em;
}
.card-actions {
    margin-top: auto; /* Pushes button to the bottom of the card content */
}
.card .btn {
    width: 100%;
}


/* --- Responsive Design --- */

/* Medium screens (tablets) */
@media (max-width: 992px) {
    .widget-area {
        flex-basis: calc(50% - 10px); /* 2 columns for widgets */
    }
}


/* Small screens (mobile) */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .header-container {
        flex-wrap: wrap; /* Allow logo and nav to wrap if needed */
    }

    .menu-toggle {
        display: block; /* Show hamburger menu */
        order: 1; /* Place it after logo if nav is also visible */
        margin-left: auto; /* Push to the right */
    }

    .main-navigation {
        width: 50%;
        order: 2; /* Nav below logo/toggle */
    }

    .main-navigation ul.nav-menu {
        display: none; /* Hide by default on mobile */
        flex-direction: column; /* Stack menu items vertically */
        width: 100%;
        background-color: #fff;
        border-top: 1px solid #e7e7e7;
        position: absolute; /* Or relative, depending on desired effect */
        left: 0;
        top: 100%; /* Position below the header */
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        z-index: 999; /* Ensure it's above content but below sticky header if needed */
    }

    .main-navigation ul.nav-menu.active {
        display: flex; /* Show when active */
    }

    .main-navigation ul.nav-menu li {
        margin-left: 0;
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }
    .main-navigation ul.nav-menu li:last-child {
        border-bottom: none;
    }

    .main-navigation ul.nav-menu a {
        display: block;
        padding: 1em;
        text-align: left;
    }
    .main-navigation ul.nav-menu a::after {
        display: none; /* No underline effect on mobile stacked menu */
    }

    /* Dropdown on mobile */
    .dropdown-menu {
        position: static; /* Make dropdown part of the flow */
        box-shadow: none;
        border-top: 1px solid #eee;
        border-radius: 0;
        padding-left: 1em; /* Indent dropdown items */
        background-color: #f9f9f9;
    }
    .dropdown:hover .dropdown-menu,
    .dropdown:focus-within .dropdown-menu {
        display: none; /* Controlled by JS or a click on mobile */
    }
    .dropdown.open .dropdown-menu { /* Class to be toggled by JS */
        display: flex;
    }


    .footer-widgets {
        flex-direction: column; /* Stack widgets vertically */
    }
    .widget-area {
        flex-basis: 100%; /* Full width for widgets */
        margin-bottom: 1.5em;
    }

    .card-grid {
        grid-template-columns: 1fr; /* Single column for cards on small screens */
    }
}

/* Very small screens (adjust as needed) */
@media (max-width: 480px) {
    .container {
        width: 95%;
    }
    /* Further adjustments for very small screens */
}
