/* Basic Reset */
body, h1, h2, p, button, div, img {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    line-height: 1.6;
}

/* Page Structure */
.page-body {
    background-color: #f3f4f6; /* Light gray background */
    color: #333; /* Dark gray text */
}

.page-header {
    background-color: white;
    padding: 1rem;
    /* Allow dropdown content to flow outside header boundaries */
    overflow: visible !important; 
    z-index: 20; 
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between; 
    
    /* ANCHOR THE ABSOLUTELY POSITIONED DROPDOWN HERE */
    position: relative; 
    z-index: 20;
}

.logo-container {
}

.logo-image {
    height: 4rem;
}

.headline-container {
    text-align: center;
    max-width: 60%; 
    flex-grow: 1; 
}

.main-headline {
    font-weight: bold;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.sub-headline {
    font-size: 1rem;
    color: #666;
}

/* Navigation Menu Styles (Keeping as is) */
.nav-menu {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 10px 0;
    text-align: center;
}

.nav-menu li {
    margin-left: 1rem;
    display: inline;
    margin-right: 15px;
}

.nav-menu li a {
    text-decoration: none;
    color: #333;
    padding: 0.5rem 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1.6rem;
}

.nav-menu li a:hover {
    background-color: #f0f0f0;
}

/* Logout button styled like nav link (Keeping as is) */
.nav-menu li .nav-link-form {
    display: inline;
    margin: 0;
    padding: 0.5rem 1rem;
}

.nav-menu li .nav-link-form .nav-link-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    text-decoration: none;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: white;
    cursor: pointer;
}

.nav-menu li .nav-link-form .nav-link-button:hover {
    background-color: #f0f0f0;
}

/* Help menu dropdown (Keeping as is) */
.nav-menu .help-menu {
    position: relative;
}

.nav-menu .help-menu .help-dropdown {
    display: none;
    position: absolute;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    top: 100%;
    left: 0;
    z-index: 10;
    min-width: 200px;
    border-radius: 5px;
}

.nav-menu .help-menu:hover .help-dropdown {
    display: block;
}

.nav-menu .help-menu .help-dropdown ul {
    list-style: none;
    padding: 0.5rem;
    margin: 0;
}

.nav-menu .help-menu .help-dropdown li a {
    display: block;
    padding: 0.5rem 1rem;
    color: #333;
    text-decoration: none;
    font-size: 1rem;
}

.nav-menu .help-menu .help-dropdown li a:hover {
    background-color: #f0f0f0;
}

/* ------------------------------------------- */
/* MAIN CONTENT / FOOTER STYLES */
/* ------------------------------------------- */

.page-main {
    padding: 2rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.page-footer {
    background-color: white;
    padding: 1rem;
    text-align: center;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content {
    /* RESTORED: Use flexbox to arrange items horizontally */
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.copyright {
    font-size: 0.875rem;
    margin-right: 0.5rem; 
}

.footer-logo-image {
    height: 2rem; 
    margin-left: 0.5rem; 
}

/* ------------------------------------------- */
/* LANGUAGE SWITCH STYLES (RETAINED FIXES) */
/* ------------------------------------------- */

/* Language Dropdown Container: Just for flex positioning */
.language-dropdown-container {
    flex-shrink: 0; 
    z-index: 20; 
}

/* The Blue Button Trigger */
.language-switch-button {
    background-color: #007bff; 
    color: white; 
    padding: 12px 20px; 
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: inline-block; 
    font-weight: bold;
    font-size: 1.2rem; 
    line-height: 1.2; 
    text-transform: uppercase;
    transition: background-color 0.2s;
    text-decoration: none; 
}

.language-switch-button:hover
{
    background-color: #0056b3
}

/* The Dropdown Menu: Positioned absolutely relative to the .header-container */
.language-dropdown {
    display: none; /* Hide by default - JS handles toggle */
    
    position: absolute;
    top: 70%; 
    right: 15px; /* Aligns to the right edge of the header */
    
    margin-top: 2px; 
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 120px;
    z-index: 20;
}

.language-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.language-dropdown li a {
    display: block;
    padding: 8px 15px;
    color: #333;
    text-decoration: none;
    font-weight: normal;
    font-size: 0.9rem;
    white-space: nowrap;
}

.language-dropdown li a:hover {
    background-color: #f0f0f0;
}

/* ------------------------------------------- */
/* RESPONSIVE STYLES (FOOTER RESTORED) */
/* ------------------------------------------- */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column; 
        align-items: center; 
        position: relative; 
    }

    .logo-container {
        margin-right: 0; 
        margin-bottom: 1rem; 
    }

    .headline-container {
        text-align: center; 
    }

    .nav-menu {
        margin-top: 1rem; 
        flex-direction: column; 
        align-items: center; 
    }

    .nav-menu li {
        margin-left: 0; 
        margin-bottom: 0.5rem; 
        margin-right: 0; 
    }

    /* RESTORED FOOTER MOBILE STYLES */
    .footer-content {
        display: flex; /* Keep original flex setting for potential overrides */
        flex-direction: column; 
    }

    .copyright {
        margin-right: 0; 
        margin-bottom: 0.5rem; 
    }

    .footer-logo-image {
        margin-left: 0; 
    }
    /* END RESTORED FOOTER MOBILE STYLES */
    
    .language-dropdown {
        /* Keep absolute positioning for dropdown to be toggleable by JS */
        position: absolute; 
        right: 50%;
        transform: translateX(50%);
        width: 200px;
        border: 1px solid #ddd; 
    }
}