/* ============================================
   NAVIGATION - FRONTEND STYLES
   Path: /assets/css/navigation.css
   ============================================ */

:root {
    --primary: #d32f2f;
    --dark-light: #1e1e1e;
    --white: #ffffff;
    --text-dark: #333333;
    --overlay: rgba(0, 0, 0, 0.5);
    --bell-active: #ffd700;
}

/* Basic Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ======================== NAVBAR STYLES ======================== */
.navbar {
    background-color: var(--dark-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    height: 60px;
}

.container {
    max-width: 1350px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ======================== NAV MENU DESKTOP ======================== */
.nav-menu {
    display: flex;
    list-style: none;
    height: 100%;
    transition: all 0.3s ease;
}

.nav-item {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    padding: 0 25px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    border-right: 1px solid rgba(255,255,255,0.05);
    transition: background-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
    white-space: nowrap;
    gap: 8px;
}

.nav-item:hover > .nav-link { 
    background-color: var(--primary); 
}

.nav-link i.fa-angle-down {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

@media (min-width: 993px) {
    .nav-item:hover .nav-link i.fa-angle-down { 
        transform: rotate(180deg); 
    }
}

/* ======================== DROPDOWN MENU ======================== */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    min-width: 240px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
    border-top: 4px solid var(--primary);
    border-radius: 0 0 8px 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    list-style: none;
    padding: 10px 0;
    z-index: 1100;
}

@media (min-width: 993px) {
    .nav-item:hover .dropdown { 
        opacity: 1; 
        visibility: visible; 
        transform: translateY(0); 
    }
}

.dropdown li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    border-bottom: 1px solid #f5f5f5;
    transition: all 0.2s ease;
}

.dropdown li:last-child a { 
    border-bottom: none; 
}

.dropdown li a:hover {
    background-color: #fff5f5;
    color: var(--primary);
    padding-left: 25px;
}

.dropdown li a i { 
    font-size: 12px; 
    color: #ccc; 
    transition: color 0.2s; 
}

.dropdown li a:hover i { 
    color: var(--primary); 
}

/* ======================== NOTIFICATION BELL ======================== */
.nav-right {
    display: flex;
    align-items: center;
    height: 100%;
}

.bell-wrap {
    position: relative;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    border-left: 1px solid rgba(255,255,255,0.1);
    cursor: pointer;
    color: white;
    transition: 0.3s;
}

.bell-wrap:hover {
    background-color: rgba(255,255,255,0.05);
}

.bell-wrap.subscribed {
    color: var(--bell-active);
}

.bell-wrap.subscribed .bell-dot {
    display: none;
}

.bell-wrap i { 
    font-size: 20px; 
    transition: transform 0.3s; 
}

.bell-wrap:hover i {
    animation: shake 0.5s;
}

@keyframes shake {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(15deg); }
    50% { transform: rotate(-15deg); }
    75% { transform: rotate(5deg); }
    100% { transform: rotate(0deg); }
}

.bell-dot {
    position: absolute;
    top: 18px;
    right: 15px;
    width: 10px;
    height: 10px;
    background-color: var(--primary);
    border: 2px solid var(--dark-light);
    border-radius: 50%;
    animation: blink 2s infinite;
}

@keyframes blink { 
    50% { opacity: 0.5; } 
}

/* ======================== HAMBURGER ======================== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 100%;
    cursor: pointer;
    padding: 0 10px;
    margin-left: 10px;
    z-index: 1200;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--white);
    margin: 2px 0;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* ======================== MOBILE RESPONSIVE ======================== */
@media (max-width: 992px) {
    .hamburger { 
        display: flex; 
    }
    
    .nav-menu {
        position: fixed; 
        top: 0; 
        left: -100%; 
        width: 280px; 
        height: 100vh;
        background-color: var(--dark-light); 
        flex-direction: column; 
        align-items: flex-start;
        padding-top: 80px; 
        box-shadow: 5px 0 15px rgba(0,0,0,0.5); 
        overflow-y: auto; 
        z-index: 1000;
    }
    
    .nav-menu.active { 
        left: 0; 
    }
    
    .nav-item { 
        width: 100%; 
        height: auto; 
        flex-direction: column; 
        align-items: flex-start; 
        border-bottom: 1px solid rgba(255,255,255,0.05); 
    }
    
    .nav-link { 
        width: 100%; 
        padding: 15px 25px; 
        height: auto; 
        justify-content: space-between; 
        border-right: none; 
    }
    
    .dropdown {
        position: static; 
        width: 100%; 
        opacity: 1; 
        visibility: visible; 
        transform: none;
        background-color: #252525; 
        border-top: none; 
        border-radius: 0;
        box-shadow: inset 0 5px 10px rgba(0,0,0,0.2); 
        max-height: 0; 
        overflow: hidden; 
        padding: 0; 
        transition: max-height 0.4s ease-in-out;
    }
    
    .nav-item.dropdown-active .dropdown { 
        max-height: 500px; 
    }
    
    .nav-item.dropdown-active .nav-link i.fa-angle-down { 
        transform: rotate(180deg); 
        color: var(--primary); 
    }
    
    .dropdown li a { 
        background-color: transparent; 
        color: #ddd; 
        padding-left: 35px; 
        border-bottom: 1px solid rgba(255,255,255,0.05); 
    }
    
    .dropdown li a:hover { 
        background-color: rgba(255,255,255,0.05); 
        color: var(--primary); 
        padding-left: 45px; 
    }
    
    .overlay {
        position: fixed; 
        top: 0; 
        left: 0; 
        width: 100%; 
        height: 100%; 
        background-color: var(--overlay);
        z-index: 900; 
        opacity: 0; 
        visibility: hidden; 
        transition: 0.3s; 
        backdrop-filter: blur(2px);
    }
    
    .overlay.active { 
        opacity: 1; 
        visibility: visible; 
    }
    
    .hamburger.active .bar:nth-child(1) { 
        transform: translateY(7px) rotate(45deg); 
        background-color: var(--primary); 
    }
    
    .hamburger.active .bar:nth-child(2) { 
        opacity: 0; 
    }
    
    .hamburger.active .bar:nth-child(3) { 
        transform: translateY(-7px) rotate(-45deg); 
        background-color: var(--primary); 
    }
}

/* ======================== ACCESSIBILITY ======================== */
.nav-link:focus,
.bell-wrap:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .nav-link,
    .dropdown,
    .bell-wrap i,
    .bar {
        transition: none;
        animation: none;
    }
}