/* ============================================
   MEGA MENU & ADVANCED HEADER STYLES
   ============================================ */

/* Header Sticky Scroll Behavior */
.header {
    transition: box-shadow 0.3s ease;
    position: sticky;
    top: 0;
}

.header--scrolled {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    background: rgba(11, 16, 32, 0.98);
}

/* Navigation Structure */
.nav {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.nav__logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    z-index: 2;
}

.nav__logo-img {
    height: 70px;
    width: auto;
    display: block;
}

@media (min-width: 768px) {
    .nav__logo-img {
        height: 85px;
    }
}

.nav__desktop {
    display: none;
}

.nav__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.nav__action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--txt);
    cursor: pointer;
    transition: all 0.2s;
}

.nav__action-btn:hover {
    background: rgba(0, 229, 255, 0.1);
    border-color: rgba(0, 229, 255, 0.3);
    color: var(--neon);
}

/* Desktop Navigation */
@media (min-width: 1024px) {
    .nav__desktop {
        display: flex;
        flex: 1;
        justify-content: center;
        margin: 0 40px;
    }

    .nav__list {
        display: flex;
        align-items: center;
        gap: 4px;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .nav__item {
        position: relative;
    }

    .nav__link {
        display: flex;
        align-items: center;
        gap: 6px;
        padding: 10px 16px;
        border-radius: 10px;
        color: var(--white);
        font-weight: 500;
        font-size: 15px;
        transition: all 0.2s;
        background: transparent;
        border: none;
        cursor: pointer;
        white-space: nowrap;
        text-decoration: none;
        min-height: auto;
    }

    .nav__link:hover {
        background: rgba(0, 229, 255, 0.1);
        color: var(--neon);
    }

    .nav__link--active {
        background: rgba(0, 229, 255, 0.15);
        color: var(--neon);
    }

    .nav__chevron {
        transition: transform 0.2s;
    }

    .nav__link--expandable[aria-expanded="true"] .nav__chevron {
        transform: rotate(180deg);
    }
}

/* Mega Menu */
.mega-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 800px;
    background: rgba(11, 16, 32, 0.98);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 16px;
    padding: 32px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.nav__item--mega:hover .mega-menu,
.nav__link--expandable[aria-expanded="true"] + .mega-menu {
    opacity: 1;
    visibility: visible;
}

.mega-menu__inner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
}

.mega-menu__column {
    min-width: 0;
}

.mega-menu__column-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--neon);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.mega-menu__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mega-menu__list li {
    margin-bottom: 4px;
}

.mega-menu__link {
    display: block;
    padding: 10px 12px;
    border-radius: 8px;
    transition: all 0.2s;
    text-decoration: none;
    min-height: auto;
}

.mega-menu__link:hover {
    background: rgba(0, 229, 255, 0.1);
}

.mega-menu__link-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.mega-menu__link-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    background: rgba(0, 229, 255, 0.1);
    border-radius: 8px;
    color: var(--neon);
    transition: all 0.2s;
}

.mega-menu__link:hover .mega-menu__link-icon {
    background: rgba(0, 229, 255, 0.2);
    transform: scale(1.05);
}

.mega-menu__link-text {
    flex: 1;
    min-width: 0;
}

.mega-menu__link-label {
    display: block;
    font-weight: 500;
    color: var(--white);
    font-size: 14px;
    margin-bottom: 2px;
}

.mega-menu__link-desc {
    display: block;
    font-size: 12px;
    color: var(--txt);
    line-height: 1.4;
}

.mega-menu__callout {
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.15), rgba(31, 182, 255, 0.1));
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 12px;
    padding: 24px;
}

.mega-menu__callout-title {
    font-size: 18px;
    color: var(--white);
    margin-bottom: 8px;
}

.mega-menu__callout-desc {
    font-size: 14px;
    color: var(--txt);
    margin-bottom: 20px;
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    background: rgba(11, 16, 32, 0.98);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 12px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.nav__item--dropdown:hover .dropdown-menu,
.nav__link--expandable[aria-expanded="true"] + .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-menu__link {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    min-height: auto;
}

.dropdown-menu__link:hover {
    background: rgba(0, 229, 255, 0.1);
    color: var(--neon);
}

/* Button Sizes */
.btn-sm {
    padding: 8px 18px;
    font-size: 14px;
    min-height: 38px;
}

/* Mobile Menu */
.nav__hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav__hamburger:hover {
    background: rgba(0, 229, 255, 0.1);
}

.nav__hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all 0.3s;
}

.nav__hamburger[aria-expanded="true"] .nav__hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav__hamburger[aria-expanded="true"] .nav__hamburger-line:nth-child(2) {
    opacity: 0;
}

.nav__hamburger[aria-expanded="true"] .nav__hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Drawer */
.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 90%;
    max-width: 400px;
    height: 100vh;
    background: linear-gradient(135deg, rgba(11, 16, 32, 0.98), rgba(15, 23, 42, 0.98));
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid rgba(0, 229, 255, 0.2);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.6), 0 0 80px rgba(0, 229, 255, 0.15);
    transform: translateX(100%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.mobile-drawer.active {
    transform: translateX(0);
    opacity: 1;
}

.mobile-drawer__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 20px;
    border-bottom: 1px solid rgba(0, 229, 255, 0.15);
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.05), rgba(31, 182, 255, 0.03));
}

.mobile-drawer__logo {
    display: block;
}

.mobile-drawer__logo img {
    height: 45px;
    width: auto;
    display: block;
}

.mobile-drawer__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 10px;
    color: var(--txt);
    cursor: pointer;
    transition: all 0.2s;
}

.mobile-drawer__close:hover {
    background: rgba(255, 59, 48, 0.2);
    color: #ff3b30;
    transform: rotate(90deg);
}

.mobile-drawer__content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    padding-bottom: 100px;
    -webkit-overflow-scrolling: touch;
}

.mobile-drawer__overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.7), rgba(11, 16, 32, 0.85));
    backdrop-filter: blur(12px) saturate(1.2);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
}

.mobile-drawer__overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Menu */
.mobile-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu__item {
    margin-bottom: 4px;
}

.mobile-menu__link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 12px;
    color: var(--white);
    font-weight: 500;
    font-size: 15px;
    line-height: 1.4;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: transparent;
    border: 1px solid transparent;
    width: 100%;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.mobile-menu__link > i:first-child {
    flex-shrink: 0;
    color: var(--neon);
    opacity: 0.8;
    width: 20px;
    height: 20px;
}

.mobile-menu__link > span {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mobile-menu__link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.08), rgba(31, 182, 255, 0.04));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.mobile-menu__link:active {
    background: rgba(0, 229, 255, 0.12);
    border-color: rgba(0, 229, 255, 0.3);
    color: var(--neon);
}

.mobile-menu__link:active::before {
    opacity: 1;
}

.mobile-menu__link--expandable {
    justify-content: space-between;
}

.mobile-menu__chevron {
    transition: transform 0.2s;
}

.mobile-menu__link--expandable.active .mobile-menu__chevron {
    transform: rotate(180deg);
}

/* Mobile Submenu */
.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    padding-left: 12px;
    opacity: 0;
}

.mobile-submenu.active {
    max-height: 3000px;
    opacity: 1;
}

.mobile-submenu__group {
    margin: 12px 0;
}

.mobile-submenu__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
    color: var(--neon);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 12px;
    padding-left: 18px;
    opacity: 0.85;
}

.mobile-submenu__link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    line-height: 1.5;
    transition: all 0.2s;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.04);
    margin-bottom: 6px;
    border: 1px solid transparent;
}

.mobile-submenu__link:active {
    background: rgba(0, 229, 255, 0.15);
    border-color: rgba(0, 229, 255, 0.25);
    color: var(--neon);
}

.mobile-submenu__icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 229, 255, 0.1);
    border-radius: 8px;
    color: var(--neon);
}

.mobile-submenu__text {
    flex: 1;
    min-width: 0;
}

.mobile-submenu__label {
    display: block;
    font-weight: 500;
    color: var(--white);
    margin-bottom: 3px;
    line-height: 1.4;
}

.mobile-submenu__desc {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

/* Mobile Drawer Footer */
.mobile-drawer__footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.btn-block {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font-weight: 600;
}

/* Mobile Bottom Bar */
.mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 12px;
    background: rgba(11, 16, 32, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 229, 255, 0.2);
    z-index: 1998;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.3);
}

@media (max-width: 1023px) {
    .mobile-bottom-bar {
        display: grid;
    }
    
    /* Add padding to body to prevent content being hidden */
    body {
        padding-bottom: 80px;
    }
}

.mobile-bottom-bar__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    text-decoration: none;
    min-height: auto;
}

.mobile-bottom-bar__btn--secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-bottom-bar__btn--secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(0, 229, 255, 0.3);
}

.mobile-bottom-bar__btn--primary {
    background: var(--grad);
    color: var(--bg);
    border: none;
}

.mobile-bottom-bar__btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 229, 255, 0.4);
}

.mobile-bottom-bar__btn--whatsapp {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    border: none;
}

.mobile-bottom-bar__btn--whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

/* Search Modal */
.search-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 100px 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
}

.search-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
}

.search-modal__container {
    position: relative;
    width: 100%;
    max-width: 640px;
    background: rgba(11, 16, 32, 0.98);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 60px rgba(0, 229, 255, 0.2);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.search-modal.active .search-modal__container {
    transform: translateY(0);
}

.search-modal__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.search-modal__header i {
    color: var(--neon);
    flex-shrink: 0;
}

.search-modal__input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--white);
    font-size: 18px;
    font-family: inherit;
}

.search-modal__input::placeholder {
    color: var(--txt);
    opacity: 0.6;
}

.search-modal__close {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: var(--txt);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.search-modal__close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.search-modal__close kbd {
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 11px;
    font-family: monospace;
}

.search-modal__results {
    max-height: 500px;
    overflow-y: auto;
    padding: 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 229, 255, 0.3) rgba(255, 255, 255, 0.05);
}

.search-modal__results::-webkit-scrollbar {
    width: 8px;
}

.search-modal__results::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.search-modal__results::-webkit-scrollbar-thumb {
    background: rgba(0, 229, 255, 0.3);
    border-radius: 4px;
}

.search-modal__results::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 229, 255, 0.5);
}

.search-modal__empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: var(--txt);
}

.search-modal__empty p {
    margin-top: 16px;
    font-size: 15px;
}

.search-modal__footer {
    padding: 12px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.search-modal__hints {
    display: flex;
    gap: 20px;
    font-size: 12px;
    color: var(--txt);
}

.search-modal__hints kbd {
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 11px;
    font-family: monospace;
}

/* Desktop-only Navigation Actions */
@media (max-width: 1023px) {
    .nav__desktop {
        display: none !important;
    }
    
    .nav__actions .btn {
        display: none;
    }
    
    /* Arama butonu mobilde görünsün */
    .nav__action-btn {
        display: flex !important;
    }
}

@media (min-width: 1024px) {
    .nav__hamburger {
        display: none;
    }
    
    .mobile-drawer,
    .mobile-bottom-bar {
        display: none;
    }
    
    body {
        padding-bottom: 0;
    }
    
    .nav__actions {
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .nav__actions .btn {
        display: inline-flex;
    }
    
    .nav__action-btn {
        display: flex;
    }
}
