/* ===== Custom Styles for Q House Custom Upholstery ===== */

/* Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Hero animations */
.hero-title {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease-out 0.1s both;
}

.hero-desc {
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

.hero-cta {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

/* Section animations */
.section-label {
    animation: fadeInUp 0.6s ease-out both;
}

.section-title {
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.section-desc {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* Service cards stagger */
.service-card {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out both;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.15s; }
.service-card:nth-child(3) { animation-delay: 0.2s; }
.service-card:nth-child(4) { animation-delay: 0.25s; }
.service-card:nth-child(5) { animation-delay: 0.3s; }
.service-card:nth-child(6) { animation-delay: 0.35s; }

/* Scroll-triggered animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

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

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

#navbar.scrolled {
    background-color: rgba(248, 246, 243, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(44, 62, 80, 0.08);
}

.nav-link {
    position: relative;
}

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

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

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

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

.menu-line {
    transition: all 0.3s ease;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    margin-left: 0;
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-link {
    transition: opacity 0.3s ease;
}

/* ===== Service Cards ===== */
.service-card {
    will-change: transform;
}

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

/* ===== Section Labels ===== */
.section-label {
    display: inline-block;
}

/* ===== Smooth image loading ===== */
img {
    image-rendering: auto;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #0f4c5c;
}

/* ===== Selection ===== */
::selection {
    background-color: #0f4c5c;
    color: #f8f6f3;
}

/* ===== Focus styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0f4c5c;
    outline-offset: 2px;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 768px) {
    .service-card:hover {
        transform: none;
    }
}

/* ===== Print styles ===== */
@media print {
    #navbar,
    #backToTop {
        display: none;
    }
}
