/* ============================================
   ID Auto Service and Sales — Custom Styles
   Classic & Elegant | Burgundy + Blush
   ============================================ */

/* ---------- Base & Typography ---------- */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: #7B2D3B;
    color: #fdf8f6;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf8f6;
}
::-webkit-scrollbar-thumb {
    background: #7B2D3B;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #5c1f2b;
}

/* ---------- Navbar ---------- */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(253, 248, 246, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(123, 45, 59, 0.08);
}

/* ---------- Hero Animations ---------- */
.hero-line {
    transform: translateY(105%);
    animation: heroLineReveal 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-line:nth-child(1) { animation-delay: 0.15s; }
.hero-line:nth-child(2) { animation-delay: 0.3s; }
.hero-line:nth-child(3) { animation-delay: 0.45s; }
.hero-line:nth-child(4) { animation-delay: 0.6s; }

@keyframes heroLineReveal {
    to { transform: translateY(0); }
}

.hero-subtitle {
    animation: fadeInDown 0.8s 0.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero-line-scale {
    transform: scaleX(0);
    animation: lineExpand 0.8s 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes lineExpand {
    to { transform: scaleX(1); }
}

.hero-fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-float-card {
    opacity: 0;
    transform: translateY(30px);
    animation: floatCardIn 0.8s 1.3s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes floatCardIn {
    to { opacity: 1; transform: translateY(0); }
}

.hero-img-wrap {
    transform: scale(0.92);
    opacity: 0;
    animation: imgReveal 1s 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes imgReveal {
    to { opacity: 1; transform: scale(1); }
}

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

@keyframes fadeInUp {
    to { opacity: 1; transform: translateY(0); }
}

/* ---------- Scroll Indicator ---------- */
@keyframes scrollIndicator {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(200%); }
}

.animate-scroll-indicator {
    animation: scrollIndicator 1.5s ease-in-out infinite;
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: #7B2D3B;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* ---------- Reveal Animations ---------- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
                transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal:nth-child(5) { transition-delay: 0.4s; }

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

#mobile-menu.open .mobile-link {
    animation: mobileLinkIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

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

@keyframes mobileLinkIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hamburger Animation */
.menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
.menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.5rem;
}

/* ---------- Smooth anchor offset ---------- */
section[id] {
    scroll-margin-top: 80px;
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
    .hero-line {
        transform: translateY(105%);
        animation: heroLineReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }
    .hero-line:nth-child(1) { animation-delay: 0.1s; }
    .hero-line:nth-child(2) { animation-delay: 0.2s; }
    .hero-line:nth-child(3) { animation-delay: 0.3s; }
    .hero-line:nth-child(4) { animation-delay: 0.4s; }

    .hero-fade-in { animation-delay: 0.6s; }
    .hero-float-card { animation-delay: 0.9s; }
    .hero-img-wrap { animation-delay: 0.2s; }

    #mobile-menu.open .mobile-link {
        animation-duration: 0.4s;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    section[id] {
        scroll-margin-top: 96px;
    }
}
