/* ==========================================================================
   Header
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
}

.header__logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dgreen);
}

/* Navigation (PC) */
.header__nav {
    display: flex;
}

.header__nav-list {
    display: flex;
    align-items: center;
}

.header__nav-item {
    position: relative;
    margin-left: 20px;
}

.header__nav-link {
    display: block;
    padding: 10px;
    font-weight: 500;
    position: relative;
}

.header__nav-link .en {
    display: none;
    /* Hide EN text in menu for simplicity or show small below */
}

.header__nav-link:hover {
    color: var(--primary-color);
}

/* Dropdown */
.header__dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    min-width: 180px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    border-radius: 0;
    padding: 10px 0;
    z-index: 100;
}

/* Modifier for wider dropdown content */
.header__dropdown--wide {
    min-width: 260px;
}

.header__nav-item.has-dropdown:hover .header__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header__dropdown li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-color);
    white-space: nowrap;
}

.header__dropdown li a:hover {
    background-color: #f0f8ff;
    color: var(--primary-color);
}

/* Contact Button in Header */
.header__btn-contact {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 0;
    margin-left: 10px;
}

.header__btn-contact:hover {
    background-color: var(--primary-dark);
    color: var(--white);
    opacity: 1;
}

/* Hamburger (Mobile) */
.header__hamburger {
    display: none;
    background: #3b8d88;
    background: none;
    border: none;
    cursor: pointer;
    width: 50px;
    height: 50px;
    position: relative;
    border-radius: 8px;
    z-index: 1001;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.header__hamburger span:not(.hamburger__text) {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--white);
    position: absolute;
    left: 13px;
    /* Center (50-24)/2 */
    transition: var(--transition);
}

.header__hamburger span:nth-child(1) {
    top: 12px;
}

.header__hamburger span:nth-child(2) {
    top: 20px;
}

.header__hamburger span:nth-child(3) {
    top: 28px;
    bottom: auto;
}

.hamburger__text {
    position: absolute;
    bottom: 6px;
    left: 0;
    width: 100%;
    text-align: center;
    color: var(--white);
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1;
}


/* Mobile Menu Active State */
.header__hamburger.active span:nth-child(1) {
    top: 20px;
    transform: rotate(45deg);
}

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

.header__hamburger.active span:nth-child(3) {
    top: 20px;
    transform: rotate(-45deg);
}

@media (max-width: 900px) {
    .header__hamburger {
        display: block;
        background-color: var(--dgreen);
    }

    .header__nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 80px;
        transition: right 0.4s ease;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        background-color: var(--dgreen);
    }

    .header__nav.active {
        right: 0;
    }

    .header__nav-list {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .header__nav-item {
        margin: 0;
        width: 100%;
        border-bottom: 1px solid #eee;
    }

    .header__nav-item a {
        color: #fff;
    }

    .header__nav-link {
        padding: 15px 20px;
        width: 100%;
    }

    .header__btn-contact {
        margin: 20px;
        text-align: center;
        width: calc(100% - 40px);
        display: inline-block;
    }

    .header__dropdown li a {
        padding-left: 40px;
    }

    /* Mobile Dropdown (Always visible or toggle, keeping it simple: indent) */
    .header__dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0;
        background-color: #f9f9f9;
        display: none;
        /* JS toggle could be added, but for now show on hover or default hidden */
    }

    .header__nav-item.has-dropdown:hover .header__dropdown,
    .header__nav-item.active .header__dropdown {
        /* Class 'active' to be toggled by JS if needed */
        display: block;
    }

    .header__dropdown li a {
        padding-left: 40px;
    }
}