/* ===== Custom Styles for KB Beauty Salon ===== */

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

/* ===== Navbar Scroll Effect ===== */
.nav-scrolled {
    background: rgba(253, 251, 247, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(123, 46, 58, 0.08);
}

.nav-scrolled .nav-link {
    color: #2D2024;
}

.nav-scrolled .mobile-link {
    color: #2D2024;
}

/* ===== Hero Animations ===== */
.hero-bg {
    transform: scale(1.05);
    animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
    0% { transform: scale(1.05); }
    100% { transform: scale(1.12); }
}

.hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(92, 31, 42, 0.9) 0%,
        rgba(123, 46, 58, 0.75) 50%,
        rgba(158, 69, 82, 0.6) 100%
    );
}

.hero-fade-in {
    animation: heroFadeIn 0.8s ease-out forwards;
    opacity: 0;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Initial state for reveal elements (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Service Cards ===== */
.service-card {
    border: 1px solid rgba(244, 208, 208, 0.5);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

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

/* ===== Gallery Items ===== */
.gallery-item {
    height: 250px;
    cursor: pointer;
}

.gallery-item img {
    transition: transform 0.7s ease;
}

@media (min-width: 768px) {
    .gallery-item {
        height: 300px;
    }
}

/* ===== Mobile Menu ===== */
.mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.mobile-menu.active {
    max-height: 400px;
}

/* ===== Back to Top ===== */
#backToTop {
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

#backToTop.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

#backToTop:hover {
    box-shadow: 0 8px 25px rgba(123, 46, 58, 0.35);
}

/* ===== Button Focus States ===== */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #7B2E3A;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== Input Focus ===== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* ===== Selection Color ===== */
::selection {
    background: #F9E4E4;
    color: #7B2E3A;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #7B2E3A;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .hero-bg {
        animation: none;
        transform: scale(1);
    }
}
