/* ========================================
   APP HEADER - Responsive Navigation
   ======================================== */

.app-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(246, 246, 235, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(209, 209, 209, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-header__container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 60px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.app-header__logo {
    flex-shrink: 0;
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 0;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.app-logo:hover {
    opacity: 0.8;
}

.app-logo__left,
.app-logo__right {
    height: 50px;
    width: auto;
    display: block;
}

.app-logo__left {
    margin-right: -2px;
}

.app-logo__right {
    margin-left: -2px;
}

/* Desktop Navigation */
.app-nav {
    flex: 1;
    display: flex !important;
    justify-content: center;
    position: static !important;
    width: auto !important;
    height: auto !important;
    background: transparent !important;
    padding: 0 !important;
    transform: none !important;
    box-shadow: none !important;
    overflow: visible !important;
    z-index: auto !important;
    flex-direction: row !important;
    top: auto !important;
    left: auto !important;
}

.app-nav::before {
    display: none !important;
}

.app-nav__list {
    display: flex;
    align-items: center;
    gap: clamp(20px, 3vw, 48px);
    list-style: none;
    margin: 0;
    padding: 0;
}

.app-nav__item {
    position: relative;
    display: flex;
    align-items: center;
}

.app-nav__link {
    font-family: 'Atyp Kido TRIAL', sans-serif;
    font-size: 15px;
    font-weight: 400;
    letter-spacing: 0.5px;
    color: #1a1a1a;
    text-decoration: none;
    text-transform: capitalize;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s ease;
}

.app-nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: #1a1a1a;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-nav__link:hover {
    color: #8a7968;
}

.app-nav__link:hover::after {
    width: 100%;
}

.app-nav__link:focus {
    outline: none;
}

.app-nav__link--active {
    color: #1a1a1a;
    font-weight: 500;
}

.app-nav__link--active::after {
    width: 100%;
    background: #1a1a1a;
}

/* Header Controls */
.app-header__controls {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Language Switcher */
.app-language-switcher {
    display: flex;
    align-items: center;
}

.app-lang-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.app-lang-link:hover {
    background: rgba(26, 26, 26, 0.05);
}

.app-lang-text {
    font-size: 13px;
    font-weight: 500;
}

/* Menu Toggle Button - Hidden on Desktop */
.app-header__menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    z-index: 1001;
}

.app-header__menu-icon {
    position: relative;
    width: 24px;
    height: 2px;
    background: #1a1a1a;
    transition: all 0.3s ease;
}

.app-header__menu-icon::before,
.app-header__menu-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background: #1a1a1a;
    transition: all 0.3s ease;
}

.app-header__menu-icon::before {
    top: -8px;
}

.app-header__menu-icon::after {
    bottom: -8px;
}

.app-header__menu-toggle[aria-expanded="true"] .app-header__menu-icon {
    background: transparent;
}

.app-header__menu-toggle[aria-expanded="true"] .app-header__menu-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.app-header__menu-toggle[aria-expanded="true"] .app-header__menu-icon::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    .app-header__container {
        height: 70px;
        padding: 0 30px;
    }

    .app-logo__left,
    .app-logo__right {
        height: 45px;
    }

    .app-nav__list {
        gap: 32px;
    }

    .app-nav__link {
        font-size: 14px;
    }
}

/* Tablet - 820px breakpoint */
@media (max-width: 1024px) and (min-width: 769px) {
    .app-header {
        background: rgba(246, 246, 235, 0.98);
    }
}

/* 820px Responsive Breakpoint */
@media (max-width: 820px) {
    .app-header__container {
        height: 70px;
        padding: 0 20px;
    }

    .app-logo__left,
    .app-logo__right {
        height: 42px;
    }

    .app-nav__list {
        gap: 28px;
    }

    .app-nav__link {
        font-size: 13px;
    }
}

/* Mobile - Show hamburger menu */
@media (max-width: 768px) {
    .app-header {
        background: rgba(246, 246, 235, 0.98);
    }

    .app-header__container {
        height: 70px;
        padding: 0 20px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        position: relative;
    }

    .app-header__menu-toggle {
        display: flex !important;
    }

    .app-logo__left,
    .app-logo__right {
        height: 40px;
    }

    /* Mobile Navigation */
    .app-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: #f6f6eb;
        padding: 100px 40px 40px;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        z-index: 999;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }

    .app-nav::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.3);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: -1;
    }

    .app-nav[aria-expanded="true"] {
        transform: translateX(0);
        z-index: 999;
    }

    .app-nav.is-open {
        transform: translateX(0);
        z-index: 999;
    }

    .app-nav[aria-expanded="true"]::before,
    .app-nav.is-open::before {
        opacity: 1;
        visibility: visible;
    }

    .app-nav__list {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: clamp(20px, 3vw, 48px);
        list-style: none;
        margin: 0;
        padding: 0;
        width: 100%;
    }

    .app-nav__item {
        width: 100%;
        border-bottom: 1px solid rgba(209, 209, 209, 0.2);
        text-align: center;
    }

    .app-nav__link {
        display: block;
        padding: 20px 0;
        font-size: 18px;
        text-align: center;
    }

    .app-header__controls {
        gap: 10px;
    }

    .app-lang-link {
        padding: 6px 10px;
        font-size: 12px;
    }

    .app-lang-text {
        font-size: 11px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .app-header__container {
        height: 60px;
        padding: 0 20px;
    }

    .app-logo__left,
    .app-logo__right {
        height: 40px;
    }

    .app-nav {
        padding: 80px 30px 30px;
    }

    .app-header__menu-toggle {
        width: 40px;
        height: 40px;
    }

    .app-header__menu-icon {
        width: 20px;
        height: 2px;
    }

    .app-header__menu-icon::before,
    .app-header__menu-icon::after {
        width: 20px;
    }

    .app-header__menu-icon::before {
        top: -6px;
    }

    .app-header__menu-icon::after {
        bottom: -6px;
    }
}

/* RTL Support */
[dir="rtl"] .app-header__menu-toggle {
    position: absolute;
    right: auto;
    left: 20px;
}

[dir="rtl"] .app-nav {
    left: auto;
    right: 0;
    transform: translateX(100%);
}

[dir="rtl"] .app-nav[aria-expanded="true"] {
    transform: translateX(0);
}

@media (max-width: 768px) {
    [dir="rtl"] .app-nav {
        transform: translateX(100%);
    }

    [dir="rtl"] .app-nav[aria-expanded="true"],
    [dir="rtl"] .app-nav.is-open {
        transform: translateX(0);
    }
}
