/* ===== Base & Reset ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== Scroll Reveal (Progressive Enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .service-card,
    .testimonial-card {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.5s ease, border-color 0.5s ease, background 0.5s ease;
    }

    .service-card.reveal,
    .testimonial-card.reveal {
        opacity: 0;
        transform: translateY(30px);
    }

    .service-card.reveal.revealed,
    .testimonial-card.reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Navbar Scroll State ===== */
#navbar.scrolled {
    background: rgba(15, 15, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#navbar.scrolled #nav-logo-text {
    color: #ffffff;
}

/* ===== Custom Selection ===== */
::selection {
    background: #b51f43;
    color: #ffffff;
}

/* ===== Smooth Focus ===== */
:focus-visible {
    outline: 2px solid #b51f43;
    outline-offset: 2px;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f0f1a;
}
::-webkit-scrollbar-thumb {
    background: #b51f43;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #db3a60;
}

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

#mobile-menu.open {
    max-height: 500px;
    padding-top: 0;
}

/* ===== Testimonial Quote Icon ===== */
.testimonial-card::before {
    content: '';
}

/* ===== Button Hover Glow ===== */
a[href="tel:+13093412899"] {
    position: relative;
}

/* ===== Image Hover Zoom Container ===== */
.rounded-2xl.overflow-hidden {
    will-change: transform;
}

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

    .service-card,
    .testimonial-card {
        opacity: 1;
        transform: none;
    }
}
