/* Navbar üst seviye güçlendirme */
html body * {
    z-index: auto;
}

/* Navbar basit ve sade - Chrome ve Firefox'ta test edilmiş sürüm */
.main-nav,
html body .main-nav,
body .main-nav {
    /* Temel Pozisyon - (!) bu kısmı sabitledim */
    position: fixed !important; 
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 999999 !important; /* Yüksek z-index ama cursor'dan düşük */
    
    /* Görünürlük Garantisi */
    visibility: visible !important;
    opacity: 1 !important;
    transform: none !important;
    
    /* Stillemeler */
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 2rem !important;
    background-color: transparent !important;
    transition: background-color 0.2s ease, padding 0.2s ease !important;
    
    /* CSS Reset Önlemleri */
    margin: 0 !important;
    max-height: none !important;
    min-height: auto !important;
    border: none !important;
    box-shadow: none !important;
    
    /* Taşma Problemlerini Önleme - Güçlendirilmiş */
    pointer-events: auto !important;
    clip-path: none !important;
    -webkit-clip-path: none !important;
    transform-style: flat !important;
    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;
    perspective: none !important;
    overflow: visible !important;
    isolation: isolate !important; /* Z-index bağlamını izole eder */
}

/* Scrolled durumu */
.main-nav.scrolled,
html body .main-nav.scrolled,
body .main-nav.scrolled {
    background-color: #0000004d !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1) !important;
    padding: 1rem 2rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    z-index: 999999 !important;
}

/* Mobil görünüm düzeltmeleri */
@media (max-width: 768px) {
    .main-nav,
    html body .main-nav,
    body .main-nav {
        padding: 1.5rem !important;
        z-index: 999999 !important;
    }
    
    .main-nav.scrolled,
    html body .main-nav.scrolled,
    body .main-nav.scrolled {
        padding: 0.75rem 1.5rem !important;
        z-index: 999999 !important;
    }
}

/* Bu stil navbar'ın project-idea-section ve diğer section'ların üstünde durmasını sağlar */
#main-content section,
#main-content div,
#main-content article {
    z-index: auto !important; /* Section z-index'lerini varsayılana ayarla */
}

/* Logo Stilleri */
.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    width: 100px;
    height: 100px;
    margin-right: 0; /* Margin kaldırıldı çünkü yanında yazı olmayacak */
}

.logo span {
    display: none; /* Span etiketini gizle */
}

/* Nav Right - Sabit Genişlik */
.nav-right {
    display: flex !important;
    align-items: center !important;
    width: auto !important;
    min-width: 180px !important; /* Sabit minimum genişlik */
    justify-content: flex-end !important;
}

/* Contact Button */
.contact-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.8rem 1.5rem;
    border: 2px solid #fff;
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-right: 1.5rem;
    position: relative;
    overflow: hidden;
    color: #ffffff;
    height: 45px;
    text-decoration: none;
    line-height: 1;
    cursor: none !important;
}

.contact-btn .word {
    display: inline-flex;
    position: relative;
    line-height: 1;
    overflow: hidden;
    align-items: center;
    height: 100%;
}

.contact-btn .char {
    display: inline-block;
    transition: transform 0.3s ease, color 0.3s ease;
    position: relative;
    transform: translateY(0);
    line-height: 1;
}

.contact-btn:hover {
    background-color: #fff;
    color: #000;
    border-color: #fff;
}

.contact-btn:hover .char {
    color: #000;
    transform: translateY(0);
}

/* Menu Text - Sabit Genişlik */
.menu-text {
    margin-right: 0.5rem;
    font-weight: 500;
    opacity: 0.85;
    transition: opacity 0.2s ease;
    color: #ffffff;
    width: 50px !important; /* Sabit genişlik */
    text-align: right;
    position: relative !important;
    cursor: none !important;
}

.menu-text:hover, .menu-icon:hover + .menu-text {
    opacity: 1;
}

/* Menu Icon - Sabit Konum ve Genişlik */
.menu-icon {
    position: relative;
    width: 50px !important;
    height: 50px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.2s ease;
    margin-left: auto; /* Sağda sabit konum */
    cursor: none !important;
}

.menu-icon:hover {
    transform: scale(1.05);
}

.menu-dots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 3px;
    width: 12px;
    height: 12px;
}

.dot {
    width: 4px;
    height: 4px;
    background-color: #000;
    border-radius: 50%;
}

/* Navbar Responsive Düzenlemeleri */
@media (max-width: 992px) {
    .main-nav {
        padding: 1.5rem !important;
    }
    
    .logo span {
        font-size: 1.6rem;
        font-weight: 400;
    }
    
    .logo img {
        width: 80px;
        height: 80px;
    }
    
    .nav-right {
        min-width: 160px !important;
    }
    
    .contact-btn {
        height: 40px;
        padding: 0.6rem 1.2rem;
    }
    
    .menu-text {
        width: 45px !important;
        font-size: 0.9rem;
    }
    
    .menu-icon {
        width: 45px !important;
        height: 45px !important;
    }
}

@media (max-width: 768px) {
    .main-nav {
        padding: 1rem !important;
    }
    
    .logo span {
        font-size: 1.4rem;
        font-weight: 400;
    }
    
    .logo img {
        width: 70px;
        height: 70px;
    }
    
    .nav-right {
        min-width: 140px !important;
    }
    
    .contact-btn {
        height: 38px;
        padding: 0.5rem 1rem;
    }
    
    .menu-text {
        width: 40px !important;
        font-size: 0.8rem;
    }
    
    .menu-icon {
        width: 40px !important;
        height: 40px !important;
    }
    
    .menu-dots {
        width: 10px;
        height: 10px;
        grid-gap: 2px;
    }
    
    .dot {
        width: 3px;
        height: 3px;
    }
}

@media (max-width: 576px) {
    .main-nav {
        padding: 0.8rem !important;
    }
    
    .logo span {
        font-size: 1.3rem;
        font-weight: 400;
    }
    
    .logo img {
        width: 60px;
        height: 60px;
    }
    
    .nav-right {
        min-width: 120px !important;
    }
    
    .contact-btn {
        height: 35px;
        padding: 0.4rem 0.8rem;
    }
    
    .menu-text {
        width: 35px !important;
        font-size: 0.75rem;
    }
    
    .menu-icon {
        width: 35px !important;
        height: 35px !important;
    }
}

@media (max-width: 360px) {
    .main-nav {
        padding: 0.6rem !important;
    }
    
    .logo span {
        font-size: 1.2rem;
        font-weight: 400;
    }
    
    .logo img {
        width: 50px;
        height: 50px;
    }
    
    .nav-right {
        min-width: 100px !important;
    }
    
    .contact-btn {
        height: 32px;
        padding: 0.3rem 0.7rem;
    }
    
    .menu-text {
        width: 30px !important;
        font-size: 0.7rem;
    }
    
    .menu-icon {
        width: 30px !important;
        height: 30px !important;
    }
}

/* Tablet Yatay Mod için Özel Düzenlemeler */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .main-nav {
        padding: 1.2rem !important;
    }
    
    .logo span {
        font-size: 1.7rem;
        font-weight: 400; /* Regular */
    }
    
    .logo img {
        width: 75px; /* 52px'den 75px'e büyütüldü */
        height: 75px; /* 52px'den 75px'e büyütüldü */
    }
    
    .nav-right {
        min-width: 170px !important;
    }
    
    .contact-btn {
        padding: 0.7rem 1.3rem;
        font-size: 0.95rem;
        margin-right: 1.2rem;
        border-width: 1.5px;
    }
    
    .menu-text {
        width: 48px !important;
        font-size: 0.95rem;
    }
    
    .menu-icon {
        width: 48px !important;
        height: 48px !important;
    }
}

/* Yüksek DPI Ekranlar için Özel Düzenlemeler */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Karanlık Mod Desteği */
@media (prefers-color-scheme: dark) {
    .main-nav.scrolled {
        background-color: rgba(0, 0, 0, 0.8) !important;
    }
}

/* Dokunmatik Cihazlar için Özel Düzenlemeler */
@media (hover: none) and (pointer: coarse) {
    .contact-btn,
    .menu-icon,
    .menu-text {
        cursor: pointer !important;
    }
    
    .contact-btn:hover,
    .menu-icon:hover,
    .menu-text:hover {
        transform: none;
    }
}
