/*
 * Dosya: /assets/css/components/_navigation.css
 * Amaç: Masaüstü ana navigasyon menüsü (.header-main-row) ve
 * açılır mega menü panellerinin stillerini yönetir.
 * Sürüm: 2.0 (PHP'den gelen span ikonu ile tam uyumlu)
 */

/* === 1. Genel Navigasyon Kuralları === */
.primary-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* === 2. Mega Menü Paneli (Tüm ekran boyutları için temel) === */
.bf-ally-megamenu-panel {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 9999;
    background-color: var(--theme-palette-color-7);
    box-shadow: 0 15px 30px rgba(41, 51, 61, 0.15);
    border-top: 1px solid var(--theme-palette-color-6);
    padding: 30px 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
}

.bf-ally-megamenu-panel.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.bf-ally-megamenu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.bf-ally-megamenu-column {
    list-style: none;
}

.bf-ally-megamenu-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1rem;
    color: var(--theme-palette-color-4);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--theme-palette-color-6);
    text-decoration: none;
    transition: color 0.2s ease;
}

.bf-ally-megamenu-heading:hover {
    color: var(--theme-palette-color-1);
}

.bf-ally-megamenu-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bf-ally-megamenu-links a {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: var(--border-radius-small);
    transition: background-color 0.2s ease, color 0.2s ease;
    font-size: 1rem;
    font-weight: 400;
    color: var(--theme-palette-color-3);
    text-decoration: none;
}

.bf-ally-megamenu-links a:hover {
    background-color: var(--theme-palette-color-8);
    color: var(--theme-palette-color-1);
}

.bf-ally-megamenu-links a:hover .material-symbols-rounded,
.bf-ally-megamenu-heading:hover .material-symbols-rounded {
    color: var(--theme-palette-color-1);
}


/* === 3. Masaüstü Navigasyon Stilleri === */
@media (min-width: 1000px) {
    .header-main-row {
        padding: 5px 0;
    }
    
    .primary-navigation {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    .bf-ally-main-menu {
        display: flex;
        gap: 25px;
    }

    .bf-ally-menu-item {
        flex-shrink: 0;
    }

    .bf-ally-menu-item > a {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 10px 0;
        font-weight: 600;
        font-size: 1.1rem;
        color: var(--theme-palette-color-3);
        position: relative;
        text-decoration: none !important;
        white-space: nowrap;
    }

    .bf-ally-menu-item > a:hover {
        color: var(--theme-palette-color-4);
    }

    /* Alt çizgi efekti (sadece alt menüsü olmayanlar için) */
    .bf-ally-menu-item:not(.bf-ally-menu-item--has-children) > a::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 3px;
        background: linear-gradient(to right, var(--theme-palette-color-1), var(--theme-palette-color-2));
        transition: width 0.3s ease-in-out;
    }

    .bf-ally-menu-item:not(.bf-ally-menu-item--has-children):hover > a::after {
        width: 100%;
    }
    
    /* PHP ile eklenen ok ikonu için stiller */
    .ally-menu-toggle-icon {
        font-size: 20px;
        margin-left: 4px;
        transition: transform 0.2s ease, color 0.2s ease;
        color: var(--theme-palette-color-5);
    }

    .bf-ally-menu-item:hover .ally-menu-toggle-icon {
        transform: rotate(180deg);
        color: var(--theme-palette-color-4);
    }

    /* Genel ikon stilleri */
    .bf-ally-menu-item a .material-symbols-rounded:not(.ally-menu-toggle-icon),
    .bf-ally-megamenu-links a .material-symbols-rounded,
    .bf-ally-megamenu-heading .material-symbols-rounded {
        font-size: 1.3em;
        color: var(--theme-palette-color-5);
        transition: color 0.2s ease;
    }

    /* Rozet Stilleri */
    .bf-ally-menu-badge {
        font-size: 9px;
        font-weight: 700;
        line-height: 1;
        color: var(--theme-palette-color-13);
        background-color: var(--theme-palette-color-15);
        border-radius: var(--border-radius-xs);
        padding: 3px 6px;
        margin-left: 8px;
        text-transform: uppercase;
    }
}