/* HEADER/NAVBAR - MODERN DESIGN */
.navbar-custom {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: none;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    padding-top: 1rem;
    padding-bottom: 1rem;
    transition: all 0.3s ease;
}

.navbar-custom::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-red) 0%, #ff6b6b 50%, var(--primary-red) 100%);
    background-size: 200% 100%;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 5px 0;
    position: relative;
}

/* Logo Wrapper with Modern Glow Effect */
.logo-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 3px solid var(--primary-red);
    box-shadow: 
        0 4px 15px rgba(211, 47, 47, 0.2),
        0 0 0 0 rgba(211, 47, 47, 0.4);
    animation: pulse 2s infinite;
    transition: all 0.3s ease;
    overflow: hidden;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 
            0 4px 15px rgba(211, 47, 47, 0.2),
            0 0 0 0 rgba(211, 47, 47, 0.4);
    }
    50% {
        box-shadow: 
            0 4px 20px rgba(211, 47, 47, 0.3),
            0 0 0 10px rgba(211, 47, 47, 0);
    }
}

.logo-wrapper:hover {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 6px 25px rgba(211, 47, 47, 0.4);
}

/* Logo Image */
.logo-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo-wrapper:hover .logo-image {
    transform: scale(1.1);
}

/* Brand Text with Modern Typography */
.brand-text {
    display: flex;
    flex-direction: column;
    font-weight: 700;
    color: var(--dark-gray);
    line-height: 1.2;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
}

.brand-text small {
    font-size: 0.7rem;
    color: var(--medium-gray);
    font-weight: 500;
    display: block;
    margin-top: 2px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ENHANCED NAVIGATION LINKS - More Prominent & Interactive */
.nav-link {
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0 0.75rem;
    color: var(--dark-gray) !important;
    position: relative;
    padding: 0.75rem 1.5rem !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    background: transparent;
    overflow: hidden;
}

/* Animated Background Effect */
.nav-link::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(211, 47, 47, 0.1), rgba(255, 107, 107, 0.15));
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 12px;
    z-index: -1;
}

/* Underline Effect */
.nav-link::before {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 70%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-red), #ff6b6b, var(--primary-red));
    background-size: 200% 100%;
    border-radius: 2px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.3);
}

/* Hover State */
.nav-link:hover {
    color: var(--primary-red) !important;
    transform: translateY(-2px);
    text-shadow: 0 2px 4px rgba(211, 47, 47, 0.1);
}

.nav-link:hover::after {
    opacity: 1;
    transform: scale(1);
}

.nav-link:hover::before {
    transform: translateX(-50%) scaleX(1);
    animation: gradientSlide 1.5s ease infinite;
}

@keyframes gradientSlide {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Active State - More Prominent */
.nav-link.active {
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--primary-red) 0%, #ff6b6b 100%);
    box-shadow: 
        0 4px 15px rgba(211, 47, 47, 0.3),
        0 2px 8px rgba(211, 47, 47, 0.2);
    transform: translateY(-2px);
}

.nav-link.active::before {
    display: none;
}

.nav-link.active::after {
    display: none;
}

/* Icon Addition (Optional Enhancement) */
.nav-link i {
    margin-right: 6px;
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.nav-link:hover i {
    transform: scale(1.15) rotate(5deg);
}

/* Navbar Toggler Modern Style */
.navbar-toggler {
    border: 2px solid var(--primary-red);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
}

.navbar-toggler:hover {
    background: rgba(211, 47, 47, 0.1);
    transform: scale(1.05);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(211, 47, 47, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Fixed Navbar Scroll Effect */
.navbar-custom.scrolled {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
}

/* Responsive Design */
@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        margin-top: 1rem;
        padding: 1.5rem;
        border-radius: 16px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }
    
    .nav-link {
        margin: 0.5rem 0;
        padding: 1rem 1.25rem !important;
        font-size: 1.15rem;
    }
    
    .nav-link::before {
        bottom: auto;
        left: 0;
        top: 50%;
        transform: translateY(-50%) scaleY(0);
        height: 60%;
        width: 4px;
    }
    
    .nav-link:hover::before,
    .nav-link.active::before {
        transform: translateY(-50%) scaleY(1);
        width: 4px;
    }

    .nav-link.active::before {
        display: block;
        background: #ffffff;
    }
}

@media (max-width: 768px) {
    .logo-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .brand-text {
        font-size: 1rem;
    }
    
    .brand-text small {
        font-size: 0.65rem;
    }

    .nav-link {
        font-size: 1.05rem;
    }
}

@media (max-width: 576px) {
    .navbar-custom {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
    
    .logo-wrapper {
        width: 50px;
        height: 50px;
    }
    
    .brand-text {
        font-size: 0.9rem;
    }
    
    .brand-text small {
        font-size: 0.6rem;
    }

    .nav-link {
        font-size: 1rem;
        padding: 0.9rem 1rem !important;
    }
}

/* Navbar Auto-hide Animation */
.navbar-custom {
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease;
    transform: translateY(0);
}

.navbar-hidden {
    transform: translateY(-100%);
}

.navbar-visible {
    transform: translateY(0);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color, #dc3545);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark, #c82333);
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Smooth transitions for navbar items */
.navbar-custom .nav-link {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure navbar stays on top when shown */
.navbar-custom.navbar-visible {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}