
/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Enhanced Header Glow Effect */
.header {
    position: relative;
}

.header.scrolled::after {
    opacity: 1;
}

/* Floating Elements Animation */
@keyframes float-gentle {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-8px) translateX(5px);
    }
    50% {
        transform: translateY(0) translateX(-5px);
    }
    75% {
        transform: translateY(8px) translateX(5px);
    }
}

/* Nav Link Ripple Effect */
.nav-link {
    overflow: hidden;
}

.nav-link::after {
    opacity: 0;
}

.nav-link:active::after {
    animation: ripple 0.6s ease-out;
}

@keyframes ripple {
    0% {
        opacity: 0.5;
        transform: scale(0);
    }
    100% {
        opacity: 0;
        transform: scale(2.5);
    }
}

/* Dropdown Menu Cascading Animation */
.dropdown-menu.show {
    animation: dropdown-cascade 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dropdown-cascade {
    0% {
        opacity: 0;
        transform: translateY(-15px) rotateX(-10deg);
    }
    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

.dropdown-item {
    opacity: 0;
    animation: fade-in-up 0.3s ease forwards;
}

.dropdown-item:nth-child(1) { animation-delay: 0.05s; }
.dropdown-item:nth-child(2) { animation-delay: 0.1s; }
.dropdown-item:nth-child(3) { animation-delay: 0.15s; }
.dropdown-item:nth-child(4) { animation-delay: 0.2s; }
.dropdown-item:nth-child(5) { animation-delay: 0.25s; }
.dropdown-item:nth-child(6) { animation-delay: 0.3s; }
.dropdown-item:nth-child(7) { animation-delay: 0.35s; }
.dropdown-item:nth-child(8) { animation-delay: 0.4s; }

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Social Icons Pulse on Hover */
.social-link,
.social-link-mobile,
.btn-search {
    position: relative;
}

.social-link::after,
.social-link-mobile::after,
.btn-search::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.social-link:hover::after,
.social-link-mobile:active::after,
.btn-search:hover::after {
    opacity: 1;
    animation: pulse-ring 1.5s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 currentColor;
        opacity: 0.6;
    }
    100% {
        box-shadow: 0 0 0 15px currentColor;
        opacity: 0;
    }
}

/* Glass Reflection Effect */
.nav-link::before,
.dropdown-menu::before,
.btn-search::before,
.social-link::before,
.navbar-toggler::before {
    background-image: 
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.5) 0%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0) 100%
        );
}

/* Liquid Glass Shine Effect */
@keyframes glass-shine {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

.header {
    background-size: 200% 100%;
}

/* Menu Item Magnetic Effect */
.nav-link,
.dropdown-item {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Frost Effect Intensifier */
.navbar-collapse.show {
    animation: frost-in 0.5s ease;
}

@keyframes frost-in {
    0% {
        backdrop-filter: blur(0px);
        -webkit-backdrop-filter: blur(0px);
        opacity: 0;
    }
    100% {
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        opacity: 1;
    }
}

/* Parallax Bubble Effect on Scroll */
@media (prefers-reduced-motion: no-preference) {
    .header::before,
    .header::after {
        animation-play-state: running;
    }
}

@media (prefers-reduced-motion: reduce) {
    .header::before,
    .header::after {
        animation: none;
    }
}

/* Mobile Touch Feedback */
@media (hover: none) and (pointer: coarse) {
    .nav-link:active,
    .dropdown-item:active,
    .social-link-mobile:active {
        transform: scale(0.96);
        transition: transform 0.1s ease;
    }
}

/* Logo Liquid Effect */
.logo {
    filter: drop-shadow(0 4px 12px rgba(199, 162, 89, 0.2));
    animation: logo-float 3s ease-in-out infinite;
}

@keyframes logo-float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-5px) scale(1.02);
    }
}

.logo:hover {
    animation: logo-bounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes logo-bounce {
    0%, 100% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.1) rotate(-3deg);
    }
    50% {
        transform: scale(1.05) rotate(3deg);
    }
    75% {
        transform: scale(1.08) rotate(-2deg);
    }
}

/* Navbar Brand Glow */
.navbar-brand {
    position: relative;
}

.navbar-brand::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(199, 162, 89, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    filter: blur(20px);
}

.navbar-brand:hover::after {
    opacity: 1;
    animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.3;
    }
}

/* Gradient Border Animation */
.nav-link.active::before {
    background: linear-gradient(
        135deg,
        rgba(199, 162, 89, 0.25) 0%,
        rgba(217, 182, 109, 0.15) 50%,
        rgba(199, 162, 89, 0.25) 100%
    );
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Sticky Header Enhancement - Ultra Transparent */
.header.sticky-top {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    position: fixed;
}

.header.scrolled {
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.10) 0%,
        rgba(255, 255, 255, 0.06) 50%,
        rgba(255, 255, 255, 0.10) 100%
    );
    backdrop-filter: blur(35px) saturate(200%) brightness(1.12);
    -webkit-backdrop-filter: blur(35px) saturate(200%) brightness(1.12);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08),
                0 2px 8px rgba(0, 0, 0, 0.04),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-bottom-color: rgba(255, 255, 255, 0.22);
}

/* Search Button Glow */
.btn-search:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(199, 162, 89, 0.2),
                0 6px 20px rgba(199, 162, 89, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

/* Mobile Menu Slide In */
@media (max-width: 991.98px) {
    .navbar-collapse {
        animation: slide-down 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    
    @keyframes slide-down {
        from {
            opacity: 0;
            transform: translateY(-20px) scale(0.95);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }
}

/* Nav Items Stagger Animation on Load */
.nav-item {
    animation: nav-fade-in 0.6s ease backwards;
}

.nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-item:nth-child(2) { animation-delay: 0.15s; }
.nav-item:nth-child(3) { animation-delay: 0.2s; }
.nav-item:nth-child(4) { animation-delay: 0.25s; }
.nav-item:nth-child(5) { animation-delay: 0.3s; }
.nav-item:nth-child(6) { animation-delay: 0.35s; }

@keyframes nav-fade-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Accessibility: Focus Visible Enhancement */
.nav-link:focus-visible,
.dropdown-item:focus-visible,
.social-link:focus-visible,
.btn-search:focus-visible {
    outline: 3px solid rgba(199, 162, 89, 0.5);
    outline-offset: 2px;
    border-radius: inherit;
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
    .header {
        background: rgba(20, 30, 45, 0.5);
        border-bottom-color: rgba(199, 162, 89, 0.2);
    }
    
    .nav-link {
        color: rgba(255, 255, 255, 0.9) !important;
    }
    
    .dropdown-menu {
        background: rgba(30, 40, 55, 0.9);
        border-color: rgba(199, 162, 89, 0.25);
    }
    
    .dropdown-item {
        color: rgba(255, 255, 255, 0.85);
    }
}

/* Performance Optimization */
.header,
.nav-link,
.dropdown-menu,
.social-link,
.btn-search {
    will-change: transform;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
