/* Custom styles for B Berry Scuba */

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

/* Navigation transitions */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #D4A017, #B8860B);
    transition: width 0.3s ease;
}

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

/* Mobile menu animation */
#bar1 {
    transform-origin: left center;
}

#bar2 {
    transform-origin: left center;
}

#bar3 {
    transform-origin: left center;
}

body.menu-open #bar1 {
    transform: rotate(45deg) translate(5px, 5px);
}

body.menu-open #bar2 {
    opacity: 0;
}

body.menu-open #bar3 {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Course card hover */
.course-card {
    transform: translateY(0);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.course-card:hover {
    transform: translateY(-4px);
}

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

#hero {
    background-size: 200% 200%;
}

/* Floating animation for decorative elements */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Navbar background transition */
.nav-scrolled {
    background: rgba(245, 240, 247, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 20px rgba(91, 44, 111, 0.1);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #F5F0F7;
}

::-webkit-scrollbar-thumb {
    background: #B085C0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #8B5E9B;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #D4A017;
    outline-offset: 2px;
}

/* Mobile menu link hover */
.mobile-link {
    position: relative;
}

/* Button ripple effect */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Selection color */
::selection {
    background-color: #D4A017;
    color: #2A1435;
}
