.header-container {
    width: 100%;
    background: var(--white);
    z-index: 9999;
}

/* Stacks Logo on top, Menu underneath */
.header-top-bar {
    display: flex;
    flex-direction: row; 
    align-items: center;
	justify-content: space-between; /* Pushes logo to one side, nav to other */
    padding: 10px 0 10px 0;
    gap: 15px;
	border-top: var(--px-size-big) solid var(--brand-primary);
}

.my-logo img { 
    max-width: 70px;
    height: auto;
	margin: 5px 20px 5px 20px;
}

/* Menu horizontal line */
.header-menu { 
    display: flex; 
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px; 
    padding-left: 10px;
	padding-right: 10px;
}

/* CRUCIAL: Allow dropdowns to align to the menu item */
.header-menu > li { 
    position: relative; 
}

.header-menu a {
    color: var(--text-main);
    padding: 10px 15px;
    font-weight: bold;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px; /* Space between flag and text */
}

.header-menu a:hover { color: var(--brand-primary); }

/* Base style for all Menu Buttons */
.header-menu > li > a {
    color: var(--brand-primary-dark);
    background: var(--brand-primary-light);
    /*padding: 2px 4px;*/
    font-weight: 800;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: var(--radius-md);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-menu > li > a:hover {
    background: var(--brand-primary);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(6, 182, 212, 0.2);
}

/* Highlight the Current Site / Page */
.header-menu > li.current-menu-item > a,
.header-menu > li.current-page-item > a {
    background: var(--brand-primary);
    color: var(--white);
}

/* --- Language Switcher Special Styling --- */
/* --- Polylang Dropdown Logic (PC Fix) --- */
.header-menu .sub-menu {
    position: absolute;
    /* Move to 100% (no gap) to keep the hover connection stable */
    top: 100%; 
    /* Anchor to the right edge of the button to stop the "sliding" look */
    right: 0;
    left: auto;
    transform: none;
    
    /* Use padding to create the VISUAL gap while keeping the HOVER active */
    padding-top: 10px; 
    
    background: transparent; /* Parent container must be clear */
    min-width: 180px;
    display: none;
    z-index: 10000;
    list-style: none;
    border: none;
    box-shadow: none;
}

/* The actual visible box inside the sub-menu */
.header-menu .sub-menu a {
    background: var(--white);
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    padding: 12px 15px;
    font-weight: 600;
    color: var(--text-main);
    text-transform: none;
}

/* Border radius for the first and last items in the dropdown */
.header-menu .sub-menu li:first-child a {
    border-top: 1px solid var(--border-color);
    border-top-left-radius: var(--radius-md);
    border-top-right-radius: var(--radius-md);
}

.header-menu .sub-menu li:last-child a {
    border-bottom: 1px solid var(--border-color);
    border-bottom-left-radius: var(--radius-md);
    border-bottom-right-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1); /* Shadow only at the bottom */
}

/* Show on hover - target the parent LI */
.header-menu li:hover > .sub-menu {
    display: block;
    animation: none; /* Remove sliding animation for maximum stability */
}

.header-menu .sub-menu a:hover {
    background: var(--bg-light);
    color: var(--brand-secondary);
}

/* Banner Section */
.header-banner {
    width: 100%;
	height: 40vh;              /* 20% of viewport height */
    max-height: 500px;         /* safety cap */
    overflow: hidden;
	border-top: var(--px-size-big) solid var(--brand-primary);
	/*border-bottom: var(--px-size-big) solid var(--brand-primary);
	border-radius: var(--radius-lg) var(--radius-lg) var(--radius-lg) var(--radius-lg);*/
}
.header-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.main-navigation {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end; /* Aligns menu buttons to the right */
}

/* RTL Support */
body.rtl .header-menu { flex-direction: row !important; }