/* Modern Professional Design with Dark Mode - CANLI VERSİYON */
:root {
    /* Brand Colors - Daha Canlı */
    --primary: #00d4ff;
    --primary-dark: #00a8cc;
    --secondary: #ff6b35;
    --accent: #f72585;
    --success: #06ffa5;
    --dark: #0a2463;
    
    /* Light Theme - Daha Az Beyaz */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e2e8f0;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    
    /* Shadows - Daha Belirgin */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.18);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.22);
    --shadow-colored: 0 8px 32px rgba(0, 212, 255, 0.25);
    
    /* Transitions */
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
}

[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-gradient: linear-gradient(135deg, #1e3a8a 0%, #312e81 100%);
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border: #334155;
    --shadow-colored: 0 8px 32px rgba(0, 212, 255, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   HEADER STYLES - CANLI TASARIM
   ======================================== */
.site-header {
    background: var(--bg-secondary);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.header-top {
    background: linear-gradient(135deg, #00d4ff 0%, #667eea 50%, #764ba2 100%);
    padding: 12px 0;
    position: relative;
    overflow: hidden;
}

.header-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

.header-top-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-contact {
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    font-size: 1rem;
    font-weight: 500;
}

.header-contact i {
    font-size: 1.2rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.phone-number {
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.15rem;
    transition: var(--transition);
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.phone-number:hover {
    transform: scale(1.05);
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.header-main {
    padding: 20px 0;
    background: var(--bg-secondary);
}

.header-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 2rem;
    font-weight: 700;
    text-decoration: none;
    background: linear-gradient(135deg, #00d4ff, #667eea);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: var(--transition);
}

.brand:hover {
    transform: scale(1.05);
}

[data-theme="dark"] .brand {
    background: linear-gradient(135deg, #00d4ff, #06ffa5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand .logo-text {
    color: #06ffa5;
}

.main-nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.main-nav > a,
.nav-dropdown > a {
    padding: 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 12px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    overflow: hidden;
}

.main-nav > a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.2), transparent);
    transition: var(--transition);
}

.main-nav > a:hover::before {
    left: 100%;
}

.main-nav > a:hover,
.nav-dropdown > a:hover,
.main-nav > a.active {
    background: linear-gradient(135deg, #00d4ff, #667eea);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-colored);
}

/* ========================================
   DROPDOWN MENU - MODERN & CANLI
   ======================================== */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: 16px;
    min-width: 240px;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px);
    transition: var(--transition);
    margin-top: 8px;
    z-index: 100;
    backdrop-filter: blur(20px);
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.nav-dropdown .dropdown-menu::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 0;
    width: 100%;
    height: 20px;
    display: block;
    background: transparent;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    border-color: var(--primary);
}

.dropdown-menu a {
    display: block;
    padding: 14px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
    border-left: 3px solid transparent;
}

.dropdown-menu a:hover {
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.1), transparent);
    color: var(--primary);
    border-left-color: var(--primary);
    padding-left: 28px;
    transform: translateX(5px);
}

/* ========================================
   MEGA MENU - GENİŞ DROPDOWN
   ======================================== */
.nav-dropdown-large .dropdown-menu-large,
.nav-dropdown-large .dropdown-menu-mega {
    min-width: 700px;
    max-width: 800px;
    left: 50%;
    transform: translateX(-50%) translateY(-15px);
    padding: 30px;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border: 2px solid var(--primary);
}

.nav-dropdown-large .dropdown-menu-mega::before {
    content: "";
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    height: 20px;
    display: block;
    background: transparent;
}

.nav-dropdown-large:hover .dropdown-menu-large,
.nav-dropdown-large:hover .dropdown-menu-mega {
    transform: translateX(-50%) translateY(0);
}

.dropdown-grid,
.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.dropdown-column,
.mega-column {
    min-width: 0;
}

.dropdown-column h4,
.mega-column-title {
    color: var(--primary);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, var(--primary), var(--accent)) 1;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-column a,
.mega-column-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.9rem;
    border-radius: 10px;
    margin-bottom: 4px;
    border-left: 3px solid transparent;
}

.dropdown-column a:hover,
.mega-column-links a:hover {
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.15), transparent);
    color: var(--primary);
    transform: translateX(8px);
    border-left-color: var(--primary);
}

/* ========================================
   4 SEVİYELI MENÜ - MODERN
   ======================================== */
.dropdown-section {
    padding: 20px 0;
    border-bottom: 2px solid var(--border);
}

.dropdown-section:last-child {
    border-bottom: none;
}

.dropdown-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
    padding: 12px 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.1), transparent);
    border-radius: 10px;
    margin-bottom: 10px;
}

.dropdown-submenu {
    position: absolute !important;
    top: 0 !important;
    width: 280px !important;
    background: var(--bg-secondary) !important;
    border: 1px solid var(--primary) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 15px !important;
    z-index: 9999 !important;
    
    /* Kasma yapan 'all' yerine sadece görünürlüğü tetikliyoruz */
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.15s ease-out, visibility 0.15s ease-out !important;
    
    /* Tarayıcıya bu öğenin değişeceğini önceden bildirerek GPU desteği alıyoruz */
    will-change: opacity;
    border-radius: 8px !important;
    pointer-events: none; /* Menü kapalıyken yanlışlıkla tıklanmayı önler */
}

.dropdown-submenu::before {
    content: "";
    position: absolute;
    left: -20px;
    top: 0;
    width: 20px;
    height: 100%;
    display: block;
    background: transparent;
}

.nav-dropdown-nested:hover .dropdown-submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.dropdown-submenu-item {
    display: block;
    padding: 12px 16px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    border-radius: 8px;
    border-left: 3px solid transparent;
    margin-bottom: 4px;
}

.dropdown-submenu-item:hover {
    background: linear-gradient(90deg, rgba(0, 212, 255, 0.15), transparent);
    color: var(--primary);
    border-left-color: var(--primary);
    padding-left: 24px;
}

.submenu-arrow,
.fa-chevron-right,
.fa-chevron-left {
    pointer-events: none;
    transition: var(--transition);
}

.dropdown-item-with-submenu:hover .submenu-arrow {
    transform: translateX(5px);
}

/* ========================================
   MOBILE MENU
   ======================================== */
.mobile-menu-toggle {
    display: none;
    background: linear-gradient(135deg, #00d4ff, #667eea);
    border: none;
    color: white;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.3rem;
    transition: var(--transition);
    flex-shrink: 0;
    box-shadow: var(--shadow-colored);
}

.mobile-menu-toggle:hover {
    transform: scale(1.05) rotate(90deg);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   FOOTER - CANLI TASARIM
   ======================================== */
.site-footer {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="footer-grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.08)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23footer-grid)"/></svg>');
    opacity: 0.5;
}

[data-theme="dark"] .site-footer {
    background: linear-gradient(135deg, #1e3a8a 0%, #312e81 100%);
}

.footer-main {
    padding: 70px 0 40px;
    position: relative;
    z-index: 1;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 50px;
    margin-bottom: 50px;
}

.footer-logo {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 25px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.footer-logo .logo-text {
    color: #06ffa5;
}

.footer-logo-img {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    transition: var(--transition);
}

[data-theme="dark"] .footer-logo-img {
    filter: brightness(0) invert(1) drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}

.footer-description {
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.8;
    margin-bottom: 30px;
    font-size: 1.05rem;
}

.footer-section h3 {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 25px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    padding-bottom: 12px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #06ffa5, transparent);
}

[data-theme="dark"] .footer-section h3 {
    color: #06ffa5;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 14px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
}

.footer-section a::before {
    content: '→';
    opacity: 0;
    transform: translateX(-10px);
    transition: var(--transition);
}

.footer-section a:hover {
    color: #06ffa5;
    transform: translateX(8px);
}

.footer-section a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.footer-social {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.footer-social a {
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
}

.footer-social a:hover {
    background: #06ffa5;
    border-color: #06ffa5;
    transform: translateY(-5px) rotate(360deg);
    box-shadow: 0 8px 20px rgba(6, 255, 165, 0.4);
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 18px;
    color: rgba(255, 255, 255, 0.95);
    font-size: 1rem;
}

.footer-contact i {
    color: #06ffa5;
    margin-top: 3px;
    font-size: 1.2rem;
    min-width: 20px;
}

.footer-bottom {
    border-top: 2px solid rgba(255, 255, 255, 0.15);
    padding: 30px 0;
    position: relative;
    z-index: 1;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.footer-bottom-links {
    display: flex;
    gap: 25px;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 1rem;
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    color: #06ffa5;
    transform: translateY(-2px);
}

/* ========================================
   LANGUAGE SWITCHER - CANLI
   ======================================== */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lang-flag {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    object-fit: cover;
    box-shadow: var(--shadow-sm);
}

.lang-flag:hover {
    transform: scale(1.15);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lang-flag.active {
    border-color: white;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

/* ========================================
   SVG LOGO STYLES
   ======================================== */
.brand-logo {
    height: 65px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 212, 255, 0.3));
    transition: var(--transition);
}

[data-theme="dark"] .brand-logo {
    filter: brightness(0) invert(1) drop-shadow(0 2px 8px rgba(0, 212, 255, 0.5));
}

.brand:hover .brand-logo {
    transform: scale(1.08);
}

/* ========================================
   CARD & FORM STYLES
   ======================================== */
.card {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 20px;
    padding: 35px;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.card:hover {
    box-shadow: var(--shadow-colored);
    transform: translateY(-8px);
    border-color: var(--primary);
}

.contact-form input,
.contact-form textarea {
    padding: 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.15);
    transform: translateY(-2px);
}

.contact-form button {
    background: linear-gradient(135deg, #00d4ff 0%, #667eea 100%);
    border: none;
    color: white;
    padding: 16px 40px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.05rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-colored);
}

.contact-form button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 212, 255, 0.4);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-about {
        grid-column: 1 / -1;
    }
    
    .dropdown-grid,
    .mega-menu-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-main .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 15px;
    }
    
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        order: 2;
    }
    
    .brand {
        order: 1;
        flex-shrink: 0;
    }
    
    .main-nav {
        position: fixed;
        top: 140px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
        flex-direction: column;
        padding: 25px;
        box-shadow: var(--shadow-xl);
        transform: translateX(-100%);
        transition: var(--transition);
        z-index: 999;
        max-height: calc(100vh - 140px);
        overflow-y: auto;
        order: 3;
        backdrop-filter: blur(20px);
    }
    
    .main-nav.active {
        transform: translateX(0);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .brand-logo {
        height: 45px;
    }
    
    .lang-flag {
        width: 32px;
        height: 32px;
    }
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center { text-align: center; }
.mb-5 { margin-bottom: 3rem; }
.text-muted { color: var(--text-muted); }

/* ========================================
   FLASH MESSAGES - CANLI
   ======================================== */
.flash {
    padding: 18px 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    border-left: 4px solid;
    background: linear-gradient(90deg, rgba(40, 167, 69, 0.15), transparent);
    color: #28a745;
    border-left-color: #28a745;
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .flash {
    background: linear-gradient(90deg, rgba(40, 167, 69, 0.25), transparent);
    color: #4ade80;
}

.flash.error {
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.15), transparent);
    color: #dc3545;
    border-left-color: #dc3545;
}

[data-theme="dark"] .flash.error {
    background: linear-gradient(90deg, rgba(220, 53, 69, 0.25), transparent);
    color: #fca5a5;
}

/* ========================================
   ÜRÜNLER MEGA MENU - AKILLI KONUMLANDIRMA
   ======================================== */

/* ========================================
   ÜRÜNLER MEGA MENU - FİNAL STABİL VERSİYON
   ======================================== */

/* 1. Ana Konteynır Ayarları */
.nav-dropdown-large .dropdown-menu {
    min-width: 950px !important; 
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    padding: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    overflow: visible !important;
}

/* 2. Temel Alt Menü (Submenu) Yapısı */
.nav-dropdown-nested { position: relative !important; }

.dropdown-submenu {
    position: absolute !important;
    top: 0 !important;
    width: 280px !important;
    background: var(--bg-secondary) !important;
    border: 1px solid var(--primary) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 15px !important;
    z-index: 9999 !important;
    visibility: hidden;
    opacity: 0;
    transition: all 0.2s ease-in-out !important;
    border-radius: 8px !important;
}

.nav-dropdown-nested:hover > .dropdown-submenu {
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* 3. Hikvision (SOL) - Sağa Doğru Yakın Açılış */
.dropdown-section:first-child .dropdown-submenu {
    left: 95% !important; /* Başlığa yakın olması için %95 */
    right: auto !important;
    margin-left: -5px;
}

/* 4. Dahua (SAĞ) - Sola Doğru Yakın Açılış */
.dropdown-section:last-child .dropdown-submenu {
    right: 95% !important; /* Simetrik yakınlık */
    left: auto !important;
    margin-right: -5px;
}

/* 5. Taşma Çözümü - Son 4 Öğeyi Yukarı Yönlendir */
/* Bu kısımda left/right değerlerini yukarıdaki yakınlık değerleriyle (%95) eşitledik */
.dropdown-section .nav-dropdown-nested:nth-last-child(-n+4) .dropdown-submenu {
    top: auto !important;
    bottom: 0 !important;
}

.dropdown-section:first-child .nav-dropdown-nested:nth-last-child(-n+4) .dropdown-submenu {
    left: 95% !important;
}

.dropdown-section:last-child .nav-dropdown-nested:nth-last-child(-n+4) .dropdown-submenu {
    right: 95% !important;
}

/* 6. Görsel İyileştirmeler */
.dropdown-section-title {
    text-align: center;
    border-bottom: 2px solid var(--primary) !important;
    margin-bottom: 15px !important;
    padding-bottom: 8px !important;
    font-weight: 800 !important;
}

.dropdown-item-with-submenu {
    padding: 12px 15px !important;
    display: flex !important;
    justify-content: space-between;
    align-items: center;
}

/* Dahua oklarını sola bakacak şekilde çevir */
.dropdown-section:last-child .dropdown-item-with-submenu i {
    transform: rotate(180deg);
}

/* 7. Mobil Uyumluluk */
@media (max-width: 991px) {
    .nav-dropdown-large .dropdown-menu {
        grid-template-columns: 1fr !important;
        min-width: 100% !important;
    }
    .dropdown-submenu {
        position: static !important;
        width: 100% !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: none;
    }
    .nav-dropdown-nested.active .dropdown-submenu {
        display: block;
    }
}
