/* ========================================
   Mid City Auto Repair — Custom Styles
   ======================================== */

/* Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: #c6dfc0;
    color: #1e301a;
}

/* ========================================
   Navigation
   ======================================== */
.nav-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(250, 250, 247, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 212, 204, 0.5);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-fixed.scrolled {
    background: rgba(250, 250, 247, 0.95);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-link {
    position: relative;
}

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

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

/* Mobile Menu Button */
.mobile-menu-btn {
    position: relative;
}

.menu-line {
    display: block;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center;
}

.mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

.mobile-menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.25rem;
    margin: 0;
}

/* Mobile Menu */
.mobile-menu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.hidden {
    animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

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

.mobile-nav-link {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid rgba(212, 212, 204, 0.5);
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-title {
    animation: heroFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

.hero-badge {
    animation: heroFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-section p:first-of-type {
    animation: heroFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-section .flex.flex-wrap {
    animation: heroFadeUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
    opacity: 0;
    transform: translateY(20px);
}

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

/* Floating Cards */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.card-1 {
    animation-delay: 0s;
}

.card-2 {
    animation-delay: -2s;
}

.card-3 {
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Scroll Indicator */
.scroll-indicator {
    animation: fadeIn 1s ease 1.2s forwards;
    opacity: 0;
}

.scroll-line {
    animation: scrollLine 1.8s ease-in-out infinite;
}

@keyframes scrollLine {
    0% { top: -12px; opacity: 0; }
    50% { opacity: 1; }
    100% { top: 20px; opacity: 0; }
}

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

/* ========================================
   Section Styles
   ======================================== */
.section-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #787870;
}

.section-title {
    font-size: 2.25rem;
    line-height: 1.15;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 3rem;
    }
}

@media (min-width: 1024px) {
    .section-title {
        font-size: 3.375rem;
    }
}

/* ========================================
   Service Cards
   ======================================== */
.service-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s ease,
                border-color 0.4s ease;
}

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

/* ========================================
   Feature Cards
   ======================================== */
.feature-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

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

/* ========================================
   Gallery Scroll
   ======================================== */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-scroll {
    display: flex;
    gap: 1rem;
    animation: scroll 30s linear infinite;
}

.animate-scroll:hover {
    animation-play-state: paused;
}

/* ========================================
   Contact Form
   ======================================== */
.success-message {
    animation: successFade 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes successFade {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========================================
   Utility
   ======================================== */
@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;
    }
    
    .animate-scroll {
        animation: none;
    }
}
