/* Custom styles for Jessy's Beauty Salon */

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

/* Navbar styles */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile menu animations */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Hamburger animation */
#menuBtn.active #bar1 {
    transform: translateY(8px) rotate(45deg);
}

#menuBtn.active #bar2 {
    opacity: 0;
    transform: translateX(-10px);
}

#menuBtn.active #bar3 {
    transform: translateY(-8px) rotate(-45deg);
}

/* Service cards */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #a11537 0%, #851434 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: inherit;
    z-index: 0;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card > * {
    position: relative;
    z-index: 1;
}

/* Gallery hover effects */
.gallery-item {
    position: relative;
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(161, 21, 55, 0.4) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Testimonial cards */
.testimonial-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(161, 21, 55, 0.12);
}

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

.reveal.hidden-reveal {
    opacity: 0;
    transform: translateY(30px);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .reveal.hidden-reveal {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Selection color */
::selection {
    background-color: rgba(161, 21, 55, 0.2);
    color: #a11537;
}

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

::-webkit-scrollbar-track {
    background: #0f0f1a;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #c22148;
}

/* Light scrollbar for light sections */
body:not(.dark) ::-webkit-scrollbar-track {
    background: #f5f5f5;
}

body:not(.dark) ::-webkit-scrollbar-thumb {
    background: #db3a62;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #a11537;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Nav links underline animation */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #f6a5b8;
    transition: width 0.3s ease;
}

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

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

/* Counter animation */
.counter {
    display: inline-block;
}

/* Gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, #a11537 0%, #db3a62 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Pulse animation for CTA */
@keyframes pulse-soft {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(161, 21, 55, 0.4);
    }
    50% {
        box-shadow: 0 0 0 12px rgba(161, 21, 55, 0);
    }
}

.cta-pulse {
    animation: pulse-soft 2s infinite;
}

/* Image loading placeholder */
img {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

img.loaded {
    animation: none;
    background: none;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-display {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }
}
