/* --- Header System Base --- */
.main-header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
}

.main-header {
    background: var(--header-bg);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
}

.main-header__inner {
    display: flex;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* --- Logo --- */
.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 8px;
}

.header-logo__text {
    font-size: 24px;
    font-weight: 700;
    color: #000;
    letter-spacing: -0.5px;
}

.header-logo__text span {
    color: var(--accent-color);
}

.header-logo__icon {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #ff9a00, #ff5e00);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Navigation --- */
.header-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 32px;
    margin-left: 60px;
}

.header-nav__item {
    position: relative;
}

.header-nav__link {
    text-decoration: none;
    color: var(--nav-link-color);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 24px 0;
    position: relative;
    transition: color 0.2s;
}


.header-nav__link:hover {
    color: #000;
    text-decoration: underline;
    text-underline-offset: 5px;
}


.header-nav__link i {
    font-size: 11px;
    transition: transform 0.1s ease;
    display: inline-block;
}

.header-nav__item:hover .header-nav__link i {
    transform: rotate(90deg);
}

/* --- Actions --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-left: auto;
    /* Push to the right */
}

.header-contact {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: color 0.2s ease;
}

.header-contact:hover {
    color: #000;
}

.header-btn {
    padding: 5px 15px;
    border-radius: 100px;
    font-size: 14px;
    text-decoration: none;
}

.header-btn--login {
    color: #333;
    border: 1px solid var(--btn-secondary-border);
}


.header-btn--cta {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-text);
    display: flex;
    align-items: flex-end;
    gap: 5px;
}

.header-btn--cta i {
    font-size: 11px;
}

/* --- Dropdown (Basic Logic) --- */
.header-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    min-width: 260px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    padding: 16px;
    transition: all 0.2s ease;
}

.header-nav__item:hover .header-dropdown {
    opacity: 1;
    visibility: visible;
    margin-top: 0;
}

.header-dropdown__link {
    display: block;
    padding: 10px 12px;
    color: #444;
    text-decoration: underline;
    font-size: 15px;
}


/* --- Responsive --- */
@media (max-width: 1024px) {

    .header-nav,
    .header-contact {
        display: none;
    }

    .main-header__container {
        padding: 0 15px;
    }

    .main-header {
        height: 60px;
    }

    .header-logo__text {
        font-size: 18px;
    }

    .header-logo__icon {
        width: 24px;
        height: 24px;
    }

    .header-actions {
        gap: 6px;
    }

    .header-btn {
        padding: 6px 12px;
        font-size: 12px;
        white-space: nowrap;
    }
}

@media (max-width: 480px) {
    .header-logo__text {
        font-size: 16px;
    }

    .header-logo__text span {
        display: none;
    }

    .header-btn--login {
        padding: 6px 10px;
        font-size: 11px;
    }

    .header-btn--cta {
        padding: 6px 10px;
        background: transparent;
        color: var(--accent-color) !important;
        border: 1px solid var(--accent-color);
    }

    .header-btn--cta i {
        margin: 0;
        font-size: 14px;
    }

    .header-btn--cta span {
        display: none;
    }
}

/* --- Mobile Menu Toggle & Drawer --- */
.header-mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 28px;
    color: #333;
    cursor: pointer;
    padding: 8px;
    margin-right: -8px;
    align-items: center;
    justify-content: center;
    transition: var(--transition-base);
}

@media (max-width: 1024px) {
    .header-mobile-toggle {
        display: flex;
    }
}


.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    z-index: 2000;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-drawer.is-open {
    visibility: visible;
}

.mobile-drawer__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-drawer.is-open .mobile-drawer__overlay {
    opacity: 1;
}

.mobile-drawer__content {
    position: absolute;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100%;
    background: #fff;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.77, 0, 0.175, 1);
}

.mobile-drawer.is-open .mobile-drawer__content {
    right: 0;
}

.mobile-drawer__header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
}

.mobile-drawer__close {
    background: #f5f5f5;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
}

.mobile-drawer__nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0;
}

.mobile-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.2s;
}

.mobile-nav__link:active {
    background: #f9f9f9;
}

.mobile-nav__link.has-children i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.mobile-nav__link.is-active i {
    transform: rotate(180deg);
}

.mobile-nav__sub {
    list-style: none;
    padding: 0;
    background: #fcfcfc;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-nav__sub.is-open {
    max-height: 500px;
}

.mobile-nav__sub li a {
    display: block;
    padding: 12px 40px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
}


.mobile-drawer__btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 12px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 10px;
}

.mobile-drawer__btn--login {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
}

.mobile-drawer__btn--cta {
    background: #111;
    color: #fff;
}

.mobile-drawer__contact {
    text-align: center;
    font-size: 14px;
    color: #888;
    margin-top: 15px;
}