/**
 * Menu CSS - Tamamen Yeni ve Düzenli
 * Dropdown menü kesinlikle en üstte görünür
 */

/* ============================================
   BODY VE HTML RESET
   ============================================ */
body,
html {
    position: relative;
    z-index: 0;
}

/* ============================================
   NAVBAR WRAPPER - EN ÜSTTE
   ============================================ */
.navbar-wrapper {
    position: relative;
    z-index: 999999999;
    isolation: isolate;
}

/* ============================================
   NAVBAR - EN ÜSTTE
   ============================================ */
.navbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 999999999 !important;
    isolation: isolate !important;
    background: #ffffff !important;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
    padding: 0.4rem 0 !important;
    min-height: 50px;
}

/* ============================================
   NAVBAR NAV
   ============================================ */
.navbar-nav {
    gap: 0 !important;
    align-items: center;
    flex-wrap: wrap;
}

.nav-item {
    position: relative;
    z-index: 999999999;
}

.nav-link {
    font-weight: 500 !important;
    font-size: 0.8rem !important;
    padding: 0.35rem 0.6rem !important;
    border-radius: 5px;
    transition: all 0.2s ease;
    position: relative;
    color: #495057 !important;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
    line-height: 1.3;
}

.nav-link:hover {
    color: #667eea !important;
    background: rgba(102, 126, 234, 0.08);
}

.nav-link.active {
    color: #667eea !important;
    background: rgba(102, 126, 234, 0.12);
    font-weight: 600;
}

/* ============================================
   DROPDOWN TOGGLE
   ============================================ */
.dropdown-toggle::after {
    margin-left: 0.25rem;
    transition: transform 0.2s ease;
    border-top: 3.5px solid;
    border-right: 3px solid transparent;
    border-left: 3px solid transparent;
    vertical-align: 0.15em;
}

.nav-item:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

/* ============================================
   DROPDOWN MENU - PORTAL STYLE (BODY'YE TAŞINACAK)
   ============================================ */
.dropdown-menu {
    border: none;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    padding: 0.4rem;
    margin-top: 0.3rem;
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: block !important;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.8rem;
    position: absolute;
    z-index: 1000;
    pointer-events: none;
}

/* Dropdown portal (body'ye taşınan - JavaScript ile) */
.dropdown-menu-portal {
    position: fixed !important;
    z-index: 999999999 !important;
    pointer-events: auto !important;
    isolation: isolate !important;
    background: #ffffff !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
    border-radius: 8px !important;
}

/* Portal container */
#dropdown-portal-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 999999999 !important;
    isolation: isolate !important;
}

/* ============================================
   DROPDOWN HOVER - EN ÜSTTE
   ============================================ */
.nav-item:hover .dropdown-menu,
.nav-item.show .dropdown-menu,
.nav-item.dropdown:hover .dropdown-menu,
.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: block !important;
    z-index: 999999999 !important;
    pointer-events: auto !important;
}

/* ============================================
   DROPDOWN ITEMS
   ============================================ */
.dropdown-item {
    padding: 0.5rem 0.65rem !important;
    border-radius: 5px;
    font-weight: 500;
    color: #495057;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.15rem;
    position: relative;
    overflow: hidden;
    font-size: 0.8rem;
    line-height: 1.3;
}

.dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.2s ease;
    z-index: -1;
}

.dropdown-item:hover::before {
    width: 3px;
}

.dropdown-item:hover {
    background: rgba(102, 126, 234, 0.08);
    color: #667eea;
    transform: translateX(3px);
    padding-left: 0.85rem !important;
}

.dropdown-item i {
    width: 14px;
    text-align: center;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.dropdown-item:hover i {
    transform: scale(1.15);
}

.dropdown-divider {
    margin: 0.3rem 0;
    border-color: rgba(0, 0, 0, 0.08);
}

/* ============================================
   NAVBAR COLLAPSE
   ============================================ */
.navbar-collapse {
    z-index: 999999999 !important;
    position: relative;
}

.navbar-brand {
    position: relative;
    z-index: 999999999;
}

.navbar-toggler {
    position: relative;
    z-index: 999999999;
}

/* ============================================
   TÜM SAYFA İÇERİĞİ - ALTTA
   ============================================ */
body > main,
.main-content,
main,
section:not(.navbar-wrapper):not(.navbar),
.hero-slider-section,
.hero-slider-section *,
.hero-content,
.hero-content *,
.featured-hostings,
.featured-hostings *,
.featured-hosting-card,
.featured-hosting-card *,
.container:not(.navbar-wrapper .container):not(.navbar .container),
.card,
.card *,
.provider-card,
.provider-card * {
    position: relative !important;
    z-index: 0 !important;
}

/* ============================================
   DESKTOP DROPDOWN
   ============================================ */
@media (min-width: 992px) {
    .navbar-wrapper {
        z-index: 999999999 !important;
    }
    
    .navbar {
        z-index: 999999999 !important;
    }
    
    .nav-item.dropdown {
        position: relative !important;
        z-index: 999999999 !important;
    }
    
    .dropdown-menu {
        position: fixed !important;
        z-index: 999999999 !important;
    }
    
    .nav-item:hover .dropdown-menu {
        z-index: 999999999 !important;
    }
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 991px) {
    .dropdown-menu {
        position: static !important;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
        background: rgba(102, 126, 234, 0.03);
        margin-top: 0.3rem;
        border-radius: 6px;
        margin-bottom: 0.4rem;
    }
    
    .nav-item:hover .dropdown-menu {
        transform: none;
    }
}

