/* Custom styles for Hibberts' Cabinet & Furniture */

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

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

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

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

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

/* Selection color */
::selection {
    background: #fce7eb;
    color: #640019;
}

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

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #800020, #d07050);
    transform: scaleX(0);
    transition: transform 0.5s ease;
    transform-origin: left;
}

.service-card:hover::after {
    transform: scaleX(1);
}

/* Gallery item transitions */
.gallery-item {
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(128, 0, 32, 0.15);
}

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

#navbar.scrolled {
    background-color: rgba(254, 253, 251, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 20px rgba(128, 0, 32, 0.08);
}

/* Back to top button */
#back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

#back-to-top:hover {
    box-shadow: 0 8px 25px rgba(128, 0, 32, 0.3);
}

/* Form focus states */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(128, 0, 32, 0.1);
}

/* Button animations */
a[href="#contact"],
button[type="submit"] {
    position: relative;
    overflow: hidden;
}

a[href="#contact"]::before,
button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

a[href="#contact"]:active::before,
button[type="submit"]:active::before {
    width: 300px;
    height: 300px;
}

/* 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;
    }
}

/* 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);
    }
}

/* Print styles */
@media print {
    #navbar,
    #back-to-top,
    .gallery-item::before {
        display: none !important;
    }
    
    body {
        color: #000 !important;
        background: #fff !important;
    }
    
    .bg-burgundy-950 {
        background: #fff !important;
        color: #000 !important;
    }
}

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

/* Large screen optimizations */
@media (min-width: 1920px) {
    .max-w-7xl {
        max-width: 80rem;
    }
}
