/* ============================================
   CHPOS NEW & USED TIRE — Custom Styles
   ============================================ */

/* Base & Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection Color */
::selection {
    background-color: rgba(123, 45, 59, 0.2);
    color: #7B2D3B;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDFCF9;
}
::-webkit-scrollbar-thumb {
    background: #D4A078;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7B2D3B;
}

/* Navbar Scroll State */
.navbar-scrolled {
    background-color: rgba(253, 252, 249, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(123, 45, 59, 0.08);
}

/* Service Card Hover Glow */
.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.service-card {
    position: relative;
    overflow: hidden;
}

.service-card:hover::before {
    opacity: 1;
}

/* Intersection Observer Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.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; }

/* Mobile Menu */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: auto !important;
}

body.menu-open {
    overflow: hidden;
}

/* Back to Top */
.back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

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

.back-to-top:not(.visible) {
    transform: translateY(10px);
}

/* Hero Image Parallax Subtle */
.hero-image {
    will-change: transform;
}

/* Decorative line animation */
@keyframes growWidth {
    from { width: 0; }
    to { width: 48px; }
}

/* Floating animation for decorative elements */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

/* Gradient text utility */
.text-gradient {
    background: linear-gradient(135deg, #7B2D3B 0%, #C21F47 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Focus visible styles */
:focus-visible {
    outline: 2px solid #7B2D3B;
    outline-offset: 2px;
}

/* Select dropdown styling */
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='%237B2D3B' stroke-width='2.5' 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 1rem center;
    padding-right: 2.5rem;
}

/* Form input autofill */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #FDFCF9 inset !important;
    -webkit-text-fill-color: #1a0a0e !important;
}

/* Print styles */
@media print {
    header, .back-to-top, #backToTop {
        display: none !important;
    }
    body {
        color: #000;
        background: #fff;
    }
}
