:root {
    --primary-color: #222;
    --secondary-color: #6E6D68;
    --text-color: #000;
    --light-text: #FFF;
    --link-color: #0066CC;
    --link-hover: #C30;
    --sidebar-bg: linear-gradient(to bottom, #FFF, #AAA);
    --menu-bg: #333;
    --footer-bg: #222;
    --max-width: 980px;
    --content-width: 74%;
    --sidebar-width: 26%;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    background-color: #FFFFFF;
    line-height: 1.6;
    margin: 20px 0;
    padding: 0;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    display: block;
}

/* Layout Containers */
.content-wrapper {
    width: min(98%, var(--max-width));
    margin: 0 auto;
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    background-color: #FFF;
}

.columns-wrapper {
    display: flow-root;
    background-color: #FFF;
}

/* Navigation Menu Styles - Updated for responsive hamburger */
.menutop-wrapper {
    background-color: var(--secondary-color);
    border-bottom: 1px solid var(--light-text);
    box-shadow: 0 0 30px rgba(0,0,0,0.3);
    position: relative;
    z-index: 10;
    padding: 0.5rem;
}

.menutop {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.menutop li {
    margin: 0;
}

.menutop a {
    display: block;
    color: #CCC;
    text-decoration: none;
    padding: 12px 16px;
    font-size: 1em;
    border: 1px solid rgba(255,255,255,0.5);
    background-color: #333;
    box-shadow: inset 0 12px 6px rgba(255,255,255,0.15),
                0 0 10px rgba(0,0,0,0.5);
    border-radius: 5px;
    transition: all 0.35s linear;
}

.menutop a:hover,
.menutop a:focus {
    color: #FFFFFF;
    background-color: rgba(51,51,51,0.2);
    outline: 0;
}

/* Hamburger menu styles */
.hamburger {
    display: none;
    cursor: pointer;
    padding: 10px;
    background-color: var(--menu-bg);
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 5px;
    margin: 0 auto;
    width: 50px;
    height: 50px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.hamburger span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: #CCC;
    transition: var(--transition);
}

/* Sidebar Menu */
.menuside {
    margin: 0;
    padding: 0;
    list-style: none;
}

.menuside li {
    margin-bottom: 0.5rem;
}

.menuside a {
    display: block;
    color: #CCC;
    padding: 0.75rem 1rem;
    font-size: 1.25em;
    border: 1px solid #FFF;
    background-color: var(--menu-bg);
    box-shadow: inset 0 16px 2px rgba(255,255,255,0.05), 0 0 5px rgba(0,0,0,0.5);
    border-radius: 5px;
    transition: var(--transition);
}

.menuside a:hover,
.menuside a:focus {
    color: var(--light-text);
    background-color: rgba(51,51,51,0.75);
    outline: 0;
}

/* Header Styles */
.masthead {
    background-color: var(--primary-color);
    padding: 0;
    text-align: left;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    position: relative;
}

.masthead .logo {
    border-bottom: 1px solid #000;
}

.masthead h1,
.masthead h2 {
    color: #8C8C8C;
    font-weight: 400;
    letter-spacing: 0.1em;
    margin: 0;
    padding: 20px;
}

.masthead h1 {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.masthead h2 {
    font-size: 1rem;
}

.masthead .banner {
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    border-bottom: 1px solid #fff;
}

.masthead .banner img {
    width: 100%;
    height: auto;
}

/* Main Content Areas */
.main-content {
    width: var(--content-width);
    float: right;
    padding: 30px;
}

.sidebar {
    width: var(--sidebar-width);
    float: left;
    background: var(--sidebar-bg);
    padding: 30px;
    font-size: 0.85em;
}

.main-content .content {
    border-left: 1px solid #000;
    line-height: 1.5;
}

/* Typography */
h1, h2, h3, h4 {
    margin: 1.5rem 0 0.5rem;
    line-height: 1.2;
    font-weight: 500;
}

h1 { font-size: 1.5rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

.page-topper {
    margin-top: 0;
}

.center {
    text-align: center;
}

/* Links */
a {
    color: var(--link-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover,
a:focus {
    color: var(--link-hover);
    text-decoration: underline;
}

.footer a {
    color: #8C8C8C;
}

.footer a:hover,
.footer a:focus {
    color: var(--light-text);
}

/* Footer */
.footer {
    background-color: var(--footer-bg);
    box-shadow: inset 0 16px 2px rgba(255,255,255,0.025);
    border-top: 1px solid #000;
    padding: 1rem;
    font-size: 0.7em;
    color: #8C8C8C;
    text-align: center;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.footer p {
    margin: 0.5rem 0;
}

.footer .copyright {
    text-transform: uppercase;
}

/* Cookie Consent Banner */
#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

.cookie-content {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.cookie-content p {
    flex: 1 1 300px;
    margin: 0;
}

.cookie-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.5rem 1rem;
    border: 1px solid #444;
    background: #333;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.cookie-btn:hover {
    background: #444;
}

/* Accessibility */
:focus-visible {
    outline: 2px solid #005f87;
    outline-offset: 2px;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: #000;
    color: white;
    padding: 0.5rem;
    z-index: 100;
}

.skip-link:focus {
    left: 0;
}

/* Responsive Design */
@media (max-width: 699px) {
    body {
        margin: 0;
    }

    .content-wrapper,
    .masthead,
    .footer {
        border-radius: 0;
    }

    .content-wrapper {
        width: 100%;
    }

    .sidebar,
    .main-content {
        width: 100% !important;
        float: none;
    }

    .content {
        padding: 0.625rem !important;
        border: none !important;
    }

    .main-content .content {
        border-left: none;
    }

    /* Mobile menu styles */
    .menutop {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .menutop.active {
        display: flex;
    }

    .menutop a {
        width: 100%;
        text-align: center;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

@media (min-width: 700px) and (max-width: 1000px) {
    .content-wrapper {
        width: 95%;
        margin: 0 auto;
    }

    .content {
        padding: 1.25rem !important;
    }
}

/* Print Styles */
@media print {
    .menutop-wrapper,
    .sidebar {
        display: none;
    }

    a::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        font-weight: normal;
    }

    .main-content {
        width: 100%;
    }

    .footer {
        background: none;
        color: #000;
    }
}