/* ============================================
   Ben & Ben Oriental Rugs — Custom Styles
   ============================================ */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #230f2c;
}
::-webkit-scrollbar-thumb {
    background: #5B2C6F;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7b3f7e;
}

/* Selection color */
::selection {
    background: #D4A017;
    color: #230f2c;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    background: transparent;
    transition: background 0.5s ease, box-shadow 0.5s ease, backdrop-filter 0.5s ease;
}

#navbar.scrolled {
    background: rgba(35, 15, 44, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(212, 160, 23, 0.1);
}

/* ============================================
   Mobile Menu
   ============================================ */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu .mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* Hamburger animation */
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-btn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ============================================
   Gallery
   ============================================ */
.gallery-item {
    position: relative;
    overflow: hidden;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid transparent;
    border-radius: inherit;
    transition: border-color 0.4s ease;
    pointer-events: none;
}

.gallery-item:hover::after {
    border-color: rgba(212, 160, 23, 0.3);
}

/* ============================================
   Scroll Reveal (progressive enhancement)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

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

    html {
        scroll-behavior: auto;
    }
}

/* ============================================
   Form Styles
   ============================================ */
select option {
    background: #3a1a47;
    color: #f3eaf6;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 767px) {
    #hero h1 {
        font-size: 3rem;
    }

    @supports (font-size: clamp(2.5rem, 10vw, 4rem)) {
        #hero h1 {
            font-size: clamp(2.5rem, 10vw, 4rem);
        }
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .service-card {
        padding: 2rem;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar, #mobile-menu, .gallery-item::after {
        display: none !important;
    }

    body {
        background: white;
        color: #1a1a1a;
    }

    section {
        page-break-inside: avoid;
    }
}
