/* Header 3 - Three Column Layout */

.header-three-columns {
    width: 100%;
    background-color: #FFFFFF;
}

/* Main Header Section */
.header-main-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 40px;
    background-color: #FFFFFF;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

/* Header Columns */
.header-column {
    display: flex;
    align-items: center;
}

/* Column 1: Logo */
.header-logo-column,
.header-logo {
    flex: 0 0 auto;
    justify-content: flex-start;
}

.header-logo {
    display: flex;
    align-items: center;
}

.site-logo {
    display: flex;
    align-items: center;
}

.site-logo h1 {
    margin: 0;
    padding: 0;
}

.site-logo a,
.header-logo a {
    display: inline-block;
    text-decoration: none;
    line-height: 1.3;
}

.logo-image {
    height: auto;
    max-height: 60px;
    width: auto;
    display: block;
}

/* Column 2: Menu */
.header-menu-column,
.header-menu {
    flex: 1 1 auto;
    justify-content: center;
    padding: 0 20px;
}

.main-navigation {
    width: 100%;
}

.main-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

.main-menu li {
    margin: 0;
    padding: 0;
}

.main-menu a {
    color: #333333;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 500;
    text-transform: uppercase;
    font-family: 'Satoshi', sans-serif;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    display: block;
    padding: 5px 0;
}

.main-menu a:hover {
    color: #5E5038;
}

.main-menu .current-menu-item > a,
.main-menu .current_page_item > a {
    color: #5E5038;
    font-weight: 600;
}

/* Column 3: Button */
.header-button-column,
.header-button {
    flex: 0 0 auto;
    justify-content: flex-end;
    display: flex;
    align-items: center;
}

.appointment-button {
    display: inline-block;
    background-color: #7D7246;
    color: #FFFFFF;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 1.4rem;
    font-weight: 600;
    text-transform: uppercase;
    font-family: 'Satoshi', sans-serif;
    letter-spacing: 0.5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
    border: none;
    cursor: pointer;
    width: auto;
}

.appointment-button:hover {
    background-color: #5E5038;
    transform: translateY(-1px);
    color: #FFFFFF;
}

.appointment-button:active {
    transform: translateY(0);
}
header.site-header {
    padding: 20px 0px;
}

/* Overlay – tylko na tablet/mobile przy otwartym menu */
.header-nav-overlay {
    display: none;
}

/* Hamburger – ukryty na desktopie */
.hamburger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 44px;
    height: 44px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1002;
    transition: opacity 0.2s ease;
}

.hamburger-btn:focus,
.hamburger-btn:focus-visible {
    outline: 2px solid #5E5038;
    outline-offset: 2px;
    border-radius: 999px;
}
.hamburger-btn:hover {
    opacity: 0.8;
}
.hamburger-line {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #333333;
    transition: transform 0.3s ease, opacity 0.3s ease;
}
.site-header.menu-open .hamburger-btn .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.site-header.menu-open .hamburger-btn .hamburger-line:nth-child(2) {
    opacity: 0;
}
.site-header.menu-open .hamburger-btn .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Responsive Design – tablet i mobile: hamburger + panel */
@media screen and (max-width: 1024px) {
    .header-main-section,
    .full.header-inner {
        padding: 15px 30px;
    }
    
    .hamburger-btn {
        display: flex;
    }
    
    /* Na mobile ukrywamy menu i przycisk z głównego paska (są w panelu) */
    .full.header-inner > .header-menu,
    .full.header-inner > .header-button {
        display: none;
    }
    
    .header-nav-panel {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        max-width: 320px;
        height: 100vh;
        background-color: #FFFFFF;
        box-shadow: -4px 0 20px rgba(0,0,0,0.1);
        padding: 80px 24px 24px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        gap: 24px;
        z-index: 1001;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
    }
    .header-nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.3);
        z-index: 1000;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    .site-header.menu-open .header-nav-overlay {
        display: block;
        opacity: 1;
    }
    .site-header.menu-open .header-nav-panel {
        transform: translateX(0);
    }
    .header-nav-panel .header-menu,
    .header-nav-panel .header-button {
        display: flex;
        padding: 0;
        justify-content: flex-start;
    }
    .header-nav-panel .main-menu {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
    }
    .header-nav-panel .main-menu li {
        border-bottom: 1px solid #eee;
    }
    .header-nav-panel .main-menu a {
        padding: 14px 0;
        font-size: 1.6rem;
        text-align: left;
    }
    .header-nav-panel .header-button {
        justify-content: flex-start;
    }
    .header-nav-panel .appointment-button {
        width: 100%;
        max-width: none;
        text-align: center;
    }
}

@media screen and (max-width: 768px) {
    .header-main-section,
    .full.header-inner {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0;
        padding: 20px 4%;
    }
    .header-logo {
        flex: 1 1 auto;
        justify-content: flex-start;
    }
    .header-nav-panel {
        max-width: 100%;
        padding-top: 70px;
    }
    .header-logo-column,
    .header-menu-column,
    .header-button-column,
    .header-menu,
    .header-button {
        width: 100%;
        justify-content: center;
    }
    .header-menu-column,
    .header-menu,
    .header-nav-panel .header-menu {
        padding: 0;
    }
    .main-menu a {
        text-align: left;
    }
    .appointment-button {
        width: 100%;
        text-align: center;
        max-width: 300px;
    }
}

@media screen and (max-width: 480px) {
    .header-main-section,
    .full.header-inner {
        padding: 15px 4%;
    }
    .logo-image {
        max-height: 50px;
    }
    .main-menu a {
        font-size: 1.4rem;
    }
    .appointment-button {
        padding: 10px 20px;
        font-size: 1.2rem;
    }
}

/* Tylko po włączeniu „Zwiększ kontrast” (klasa .high-contrast na body) */
body.high-contrast .site-header .main-menu a {
    color: #333333;
}

body.high-contrast .site-header .main-menu a:hover {
    color: #000000;
    text-decoration: underline;
}

body.high-contrast .site-header .main-menu .current-menu-item > a,
body.high-contrast .site-header .main-menu .current_page_item > a {
    color: #000000 !important;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 4px;
}

body.high-contrast .site-header .hamburger-line {
    background-color: #000000;
}

body.high-contrast .site-header .hamburger-btn:focus,
body.high-contrast .site-header .hamburger-btn:focus-visible {
    outline-color: #000000;
}
