/* Custom styles for Hair One Beauty Shop */

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

/* Prevent scroll on mobile menu open */
body.menu-open {
    overflow: hidden;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
    border-radius: 1px;
}

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

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(253, 251, 247, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(163, 53, 25, 0.08);
}

.nav-scrolled .nav-link {
    color: #a33519;
}

.nav-scrolled .nav-link:hover {
    color: #d95a2e;
}

.nav-scrolled .brand-text {
    color: #a33519;
}

/* Mobile menu */
.mobile-link {
    position: relative;
    padding-left: 0;
}

.mobile-link::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 100%;
    background: rgba(217, 90, 46, 0.1);
    border-radius: 4px;
    transition: width 0.2s ease;
}

.mobile-link:hover::before {
    width: calc(100% + 24px);
}

/* Scroll reveal animations */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Default state for reduced motion - ensure content is visible */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* At rest (before JS reveals) */
.reveal {
    opacity: 1;
}

/* Service card hover */
.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-icon {
    transition: transform 0.3s ease;
}

/* Image hover */
.gallery-img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

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

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

/* Selection color */
::selection {
    background: #f8c4b0;
    color: #6c2617;
}

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

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a33519' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* Animation keyframes */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-soft {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}

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

#mobile-menu.hidden {
    animation: slideUp 0.2s ease forwards;
}

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

/* Responsive adjustments */
@media (max-width: 640px) {
    .font-serif {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }

    section {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Print styles */
@media print {
    nav, #back-to-top, .reveal {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}
