﻿/* Header Animations */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Header Styling */
.modern-header {
    background: white;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.6s ease-out;
    transition: all 0.3s ease;
}

    .modern-header.scrolled {
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12);
    }

.modern-navbar {
    padding: 1rem 0;
    transition: padding 0.3s ease;
}

.modern-header.scrolled .modern-navbar {
    padding: 0.5rem 0;
}

/* Logo Styling */
.navbar-brand {
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
}

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

    .navbar-brand img {
        transition: all 0.3s ease;
        animation: fadeIn 0.8s ease-out;
    }

.modern-header.scrolled .navbar-brand img {
    height: 40px;
}

/* Navigation Items */
.navbar-nav {
    gap: 0.5rem;
}

.nav-item {
    animation: fadeIn 0.8s ease-out backwards;
}

    .nav-item:nth-child(1) {
        animation-delay: 0.1s;
    }

    .nav-item:nth-child(2) {
        animation-delay: 0.2s;
    }

    .nav-item:nth-child(3) {
        animation-delay: 0.3s;
    }

    .nav-item:nth-child(4) {
        animation-delay: 0.4s;
    }

.nav-link {
    position: relative;
    padding: 0.7rem 1.2rem !important;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    color: #1E5959 !important;
}

    /* Normal Nav Link Hover Effect */
    .nav-link:not(.active-link)::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 3px;
        background: linear-gradient(90deg, #89D99D 0%, #3B8C6E 100%);
        transform: translateX(-50%);
        transition: width 0.3s ease;
        border-radius: 3px;
    }

    .nav-link:not(.active-link):hover::before {
        width: 80%;
    }

    .nav-link:not(.active-link):hover {
        color: #3B8C6E !important;
        transform: translateY(-2px);
    }

/* Active Link - Index Page */
.active-link-index {
    background: linear-gradient(135deg, #e7343f 0%, #c62828 100%) !important;
    color: white !important;
    border-radius: 25px;
    padding: 0.7rem 1.5rem !important;
    box-shadow: 0 4px 15px rgba(231, 52, 63, 0.3);
    transition: all 0.3s ease;
}

    .active-link-index:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(231, 52, 63, 0.4);
    }

/* Active Link - Other Pages */
.active-link-secondary {
    background: linear-gradient(135deg, #1E5959 0%, #3B8C6E 100%) !important;
    color: #89D99D !important;
    border-radius: 25px;
    padding: 0.7rem 1.5rem !important;
    box-shadow: 0 4px 15px rgba(30, 89, 89, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .active-link-secondary::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: rgba(137, 217, 157, 0.1);
        transition: left 0.5s ease;
    }

    .active-link-secondary:hover::before {
        left: 100%;
    }

    .active-link-secondary:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(30, 89, 89, 0.4);
        color: white !important;
    }

/* Mobile Toggle Button */
.navbar-toggler {
    border: 2px solid #89D99D;
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
}

    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.2rem rgba(137, 217, 157, 0.25);
    }

    .navbar-toggler:hover {
        background-color: rgba(137, 217, 157, 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='%231E5959' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Mobile Menu */
@media (max-width: 991px) {
    .navbar-collapse {
        background: white;
        margin-top: 1rem;
        padding: 1.5rem;
        border-radius: 15px;
        box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
        animation: slideDown 0.3s ease-out;
    }

    .navbar-nav {
        gap: 0.8rem;
    }

    .nav-link {
        text-align: center;
        padding: 0.8rem 1rem !important;
    }

    .active-link-index,
    .active-link-secondary {
        width: 100%;
        display: block;
    }
}

/* Desktop Hover Effects */
@media (min-width: 992px) {
    .nav-item {
        position: relative;
    }

        .nav-item::after {
            content: '';
            position: absolute;
            bottom: -5px;
            left: 50%;
            width: 0;
            height: 2px;
            background: #89D99D;
            transform: translateX(-50%);
            transition: width 0.3s ease;
        }

        .nav-item:hover::after {
            width: 100%;
        }
}

/* CTA Button Style (if needed) */
.nav-cta {
    background: linear-gradient(135deg, #89D99D 0%, #3B8C6E 100%);
    color: white !important;
    border-radius: 25px;
    padding: 0.7rem 1.8rem !important;
    box-shadow: 0 4px 15px rgba(137, 217, 157, 0.3);
    transition: all 0.3s ease;
    font-weight: 700;
}

    .nav-cta:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(137, 217, 157, 0.4);
        color: white !important;
    }

    .nav-cta::before {
        display: none;
    }
