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

body {
    font-family: 'Open Sans', 'Titillium Web', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4; /* Lighter background for content area */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    color: #006699; /* Original link color */
    text-decoration: none;
}

a:hover {
    color: #004366; /* Darker shade for hover */
    text-decoration: underline;
}

img.responsive-image {
    max-width: 100%;
    height: auto;
    display: block; /* Removes extra space below image */
}

ul {
    list-style: none;
}

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Header Styles */
.site-header {
    background-color: #006699; /* Main header blue */
    color: #fff;
    padding-bottom: 1px; /* To contain bottom margin of nav */
}

.header-top-bar {
    background-color: #00547F; /* Slightly darker blue for top bar */
    padding: 0.5em 0;
    font-size: 0.9em;
}

.header-top-bar .secondary-navigation ul {
    display: flex;
    justify-content: flex-end; /* Align to right or center as preferred */
}

.header-top-bar .secondary-navigation li {
    margin-left: 15px;
}

.header-top-bar .secondary-navigation a {
    color: #e0e0e0;
}
.header-top-bar .secondary-navigation a:hover {
    color: #fff;
}

.site-branding {
    padding: 2em 0;
    text-align: center;
}

.site-title a {
    font-size: 2.5em;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}
.site-title a:hover {
    color: #f0f0f0;
}

.site-description {
    font-size: 1.1em;
    color: #eee;
    margin-top: 0.2em;
}

/* General Navigation Reset & Helpers */
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
nav a {
    text-decoration: none;
    display: block; /* Makes the entire area clickable */
}

/* Header & Top Bar */
.site-header {
    background-color: #006699;
    color: #fff;
    position: relative; /* For potential absolute positioned elements later */
    z-index: 100; /* Keep header above other content */
}

.header-top-bar {
    background-color: #00547F;
    padding: 0.5em 0;
    font-size: 0.9em;
}
.header-top-bar .container {
    display: flex;
    justify-content: flex-end; /* Align nav to right */
}

/* Main Navigation Wrapper (for sticky behavior) */
.main-navigation-wrap {
    background-color: #004366;
    transition: top 0.3s ease-in-out; /* For smooth sticky effect */
}

.main-navigation-wrap.sticky {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; /* Ensure it's on top */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
/* Add padding to body when nav is sticky to prevent content jump */
body.sticky-nav-active {
    padding-top: 60px; /* Adjust this to match your nav height */
}


/* Common Navigation Menu Styles (Desktop) */
.primary-navigation-menu, .top-navigation-menu {
    display: flex;
}

.primary-navigation-menu li, .top-navigation-menu li {
    position: relative; /* For submenu positioning */
}

.primary-navigation-menu li a, .top-navigation-menu li a {
    padding: 1em 1.2em; /* Increased padding for better touch */
    color: #fff;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap; /* Prevent text wrapping */
}
.primary-navigation-menu li a:hover, 
.top-navigation-menu li a:hover,
.primary-navigation-menu li.current-menu-item > a, /* Style for active page */
.top-navigation-menu li.current-menu-item > a {
    background-color: #00547F;
}

/* Dropdown Icons */
.dropdown-icon {
    font-size: 0.7em;
    margin-left: 6px;
    display: inline-block; /* Allows transform */
    transition: transform 0.2s ease-in-out;
}
.menu-item-has-children.open > a > .dropdown-icon {
    transform: rotate(180deg);
}


/* Sub-Menu Styles (Desktop) */
.sub-menu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%; /* Position below parent */
    background-color: #00547F; /* Slightly lighter than main nav bg */
    min-width: 220px; /* Give submenus enough width */
    z-index: 1001; /* Above sticky nav, below modals etc. */
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    border-top: 1px solid #006699; /* Subtle separation */
}
.sub-menu .sub-menu { /* Third level */
    left: 100%;
    top: 0;
    border-top: none;
    border-left: 1px solid #006699;
}

/* Show submenu on hover (desktop) or when .open class is added by JS (mobile) */
.primary-navigation-menu li:hover > .sub-menu,
.top-navigation-menu li:hover > .sub-menu,
.menu-item-has-children.open > .sub-menu {
    display: block;
}

.sub-menu li a {
    padding: 0.8em 1.2em;
    color: #e0e0e0; /* Lighter text for sub-items */
    border-bottom: 1px solid #004366; /* Separator for sub-items */
}
.sub-menu li:last-child a {
    border-bottom: none;
}
.sub-menu li a:hover {
    background-color: #006699;
    color: #fff;
}

/* Mobile Menu Toggle Button */
.menu-toggle {
    display: none; /* Hidden on desktop */
    background-color: transparent;
    color: #fff;
    border: 1px solid #fff;
    padding: 0.5em 0.8em;
    font-size: 1em;
    cursor: pointer;
    margin: 0.5em 0; /* Align with nav items if shown inline */
    border-radius: 3px;
}
.menu-toggle:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Hamburger Icon basic styling */
.hamburger-icon {
    display: inline-block;
    width: 20px;
    height: 16px; /* 3 lines * 2px height + 2 gaps * 5px height */
    position: relative;
    margin-right: 8px;
    vertical-align: middle;
}
.hamburger-icon::before,
.hamburger-icon::after,
.hamburger-icon span {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
}
.hamburger-icon::before { top: 0; }
.hamburger-icon span { top: 7px; } /* Middle line */
.hamburger-icon::after { bottom: 0; }

/* Hamburger transformation to X when active */
.menu-toggle[aria-expanded="true"] .hamburger-icon::before {
    transform: translateY(7px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .hamburger-icon span {
    opacity: 0;
}
.menu-toggle[aria-expanded="true"] .hamburger-icon::after {
    transform: translateY(-7px) rotate(-45deg);
}


/* Responsive Styles for Navigation */
@media (max-width: 992px) { /* Adjust breakpoint as needed */
    .menu-toggle {
        display: inline-flex; /* Show toggle button */
        align-items: center;
    }

    .header-top-bar .container,
    .primary-navigation.container {
        /* Ensure toggle is part of the flex flow or positioned correctly */
        display: flex;
        justify-content: space-between; /* Pushes nav to one side, title/logo to other */
        align-items: center;
        flex-wrap: wrap; /* Allow toggle to wrap if needed */
    }
    
    .top-navigation-menu,
    .main-navigation-menu {
        display: none; /* Hide menu items by default on mobile */
        flex-direction: column;
        width: 100%; /* Take full width when open */
        background-color: #004366; /* Match parent or slightly different */
        position: absolute; /* For overlay effect */
        top: 100%; /* Position below the bar that contains the toggle */
        left: 0;
        box-shadow: 0 3px 5px rgba(0,0,0,0.2);
    }
     /* Specific for top bar if it's thin */
    .header-top-bar .top-navigation-menu {
        background-color: #00547F; /* Match its bar */
    }


    .top-navigation-menu.active,
    .main-navigation-menu.active {
        display: flex; /* Show when active class is added by JS */
    }

    .primary-navigation-menu li, .top-navigation-menu li {
        width: 100%;
    }

    .primary-navigation-menu li a, .top-navigation-menu li a {
        padding: 1em;
        border-bottom: 1px solid rgba(255,255,255,0.1); /* Separator lines */
    }
    .primary-navigation-menu li:last-child a, .top-navigation-menu li:last-child a {
        border-bottom: none;
    }

    /* Mobile Sub-Menus */
    .sub-menu {
        position: static; /* No absolute positioning, flow naturally */
        background-color: rgba(0,0,0,0.1); /* Slightly darker to indent */
        box-shadow: none;
        border-top: none;
        min-width: auto;
        padding-left: 0; /* Let items align with parent */
    }
    .sub-menu .sub-menu { /* Third level mobile */
        background-color: rgba(0,0,0,0.2);
        border-left: none;
    }
    .sub-menu li a {
        padding-left: 2em; /* Indent sub-menu items */
        color: #ddd;
    }
     .sub-menu .sub-menu li a {
        padding-left: 3em; /* Further indent third-level items */
    }

    /* Ensure sticky nav padding adjustment is correct on mobile */
    body.sticky-nav-active {
        /* The padding-top might need to be different if the mobile nav height changes */
        /* Or simply don't make it sticky on mobile if it becomes too complex */
    }
}

/* Menu Toggle for Mobile */
.menu-toggle {
    display: none; /* Hidden by default */
    background: #00547F;
    color: #fff;
    border: none;
    padding: 0.8em 1em;
    font-size: 1em;
    cursor: pointer;
}


/* Content Area */
#content-wrap {
    display: flex;
    flex-wrap: wrap; /* Allow sidebar to wrap below on small screens */
    padding-top: 2em;
    padding-bottom: 2em;
    background-color: #fff; /* White background for content area */
}

#main-content {
    flex: 3; /* Main content takes more space */
    padding-right: 30px; /* Space between content and sidebar */
}

#sidebar {
    flex: 1; /* Sidebar takes less space */
    background-color: #f9f9f9;
    padding: 20px;
    border-left: 1px solid #e0e0e0;
}

.page-content .entry-content {
    padding: 1em 0;
}

.columns-container {
    display: flex;
    gap: 30px; /* Space between columns */
    margin-bottom: 2em;
}

.column {
    flex: 1;
}

.text-center { text-align: center; }
.text-justify { text-align: justify; }

.flags-gallery {
    text-align: center;
    margin-bottom: 1em;
}
.flags-gallery img {
    margin: 2px;
    vertical-align: middle;
}

.separator {
    border: 0;
    height: 1px;
    background-color: #ddd;
    margin: 2em 0;
}

.section-title {
    color: #cf2e2e; /* Red color like original */
    margin-bottom: 1em;
    font-size: 1.8em;
}

.block-image-large {
    margin: 1.5em auto; /* Center align and add margin */
    max-width: 724px; /* Match original width */
}

.file-download-block {
    margin: 1em 0 2em 0;
    padding: 0.5em;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.file-download-button {
    background-color: #32373c; /* WordPress default button */
    color: #fff;
    padding: 0.6em 1.2em;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.9em;
}
.file-download-button:hover {
    background-color: #444;
    color: #fff;
}

/* Sidebar Widgets */
.widget {
    margin-bottom: 2em;
}

.widget-title {
    font-size: 1.3em;
    margin-bottom: 0.8em;
    color: #004366; /* Dark blue for widget titles */
    border-bottom: 2px solid #006699;
    padding-bottom: 0.3em;
}

.widget ul li {
    margin-bottom: 0.5em;
}
.widget ul li a {
    color: #333;
}
.widget ul li a:hover {
    color: #006699;
}

.search-form {
    display: flex;
    margin-bottom: 1em;
}
.search-field {
    flex-grow: 1;
    padding: 0.7em;
    border: 1px solid #ccc;
    border-right: none;
}
.search-submit {
    background-color: #006699;
    color: white;
    border: none;
    padding: 0.7em 1em;
    cursor: pointer;
}
.search-submit:hover {
    background-color: #00547F;
}
.search-icon {
    font-size: 1.2em; /* Adjust if you use an icon font */
}

.sidebar-image-display img {
    max-width: 100%;
    height: auto;
    margin-top: 1em;
    border: 1px solid #ddd;
    padding: 3px;
}

/* Footer Styles */
.site-footer {
    color: #e0e0e0;
    font-size: 0.9em;
}

.footer-widgets-wrap {
    background-color: #006699; /* Main header blue */
    padding: 2em 0;
}

.footer-widgets-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.footer-widget-column {
    flex: 1;
    min-width: 280px; /* Ensure columns don't get too narrow */
}

.footer-widgets-wrap .widget-title {
    color: #fff;
    border-bottom-color: #00547F;
}
.footer-widgets-wrap .widget,
.footer-widgets-wrap .widget a {
    color: #e0e0e0;
}
.footer-widgets-wrap .widget a:hover {
    color: #fff;
}

.subscribe-form input[type="email"] {
    width: calc(100% - 80px); /* Adjust based on button width */
    padding: 0.7em;
    border: 1px solid #ccc;
    margin-right: 5px;
    vertical-align: middle;
}
.subscribe-form button {
    padding: 0.7em 1em;
    background-color: #004366;
    color: white;
    border: none;
    cursor: pointer;
    vertical-align: middle;
}
.subscribe-form button:hover {
    background-color: #00547F;
}

.site-info-wrap {
    background-color: #004366; /* Darkest blue for bottom bar */
    padding: 1em 0;
    text-align: center;
}

.site-info p {
    margin: 0;
}

/* Responsive Design */
@media (max-width: 992px) {
    .primary-navigation ul, .secondary-navigation ul {
        /* For mobile, we might want to stack them if they don't fit */
    }
    #main-content {
        padding-right: 20px;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block; /* Show hamburger */
        width: 100%;
        text-align: left;
    }

    /* Hide menus by default on mobile, toggle with JS */
    .top-navigation-menu,
    .main-navigation-menu {
        display: none;
        width: 100%;
        flex-direction: column;
    }
    .top-navigation-menu.active,
    .main-navigation-menu.active {
        display: flex;
    }

    .primary-navigation li, .secondary-navigation li {
        width: 100%;
    }
    .primary-navigation li a, .secondary-navigation li a {
        border-bottom: 1px solid #00547F;
    }

    .sub-menu { /* Sub-menus on mobile */
        position: static; /* No absolute positioning */
        background-color: transparent;
        box-shadow: none;
        padding-left: 15px; /* Indent sub-items */
    }
    .sub-menu .sub-menu {
         padding-left: 30px;
    }
     .menu-item-has-children > a::after {
        float: right; /* Arrow to the right for tappable area */
    }


    #content-wrap {
        flex-direction: column;
    }
    #main-content {
        padding-right: 0;
        order: 1; /* Content first */
    }
    #sidebar {
        order: 2; /* Sidebar second */
        margin-top: 2em;
        border-left: none;
        border-top: 1px solid #e0e0e0;
    }

    .columns-container {
        flex-direction: column;
    }
    .footer-widgets-columns {
        flex-direction: column;
    }
}