/* ============================================
   Car 2 Go Rent a Car — Custom Styles
   ============================================ */

/* CSS Custom Properties */
:root {
    --emerald-900: #064E3B;
    --emerald-800: #065F46;
    --emerald-700: #047857;
    --emerald-600: #059669;
    --emerald-500: #10B981;
    --emerald-100: #D1FAE5;
    --emerald-50: #ECFDF5;
    --cream: #F5F0E8;
    --dark: #1A1A1A;
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', system-ui, sans-serif;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background-color: var(--cream);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: var(--emerald-200);
    color: var(--emerald-900);
}

/* Smooth Scroll Offset for Fixed Nav */
section[id] {
    scroll-margin-top: 80px;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    background: transparent;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(245, 240, 232, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(26, 26, 26, 0.06);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--emerald-700);
    transition: width 0.3s ease;
}

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

/* Mobile Menu */
.menu-line {
    transition: all 0.3s ease;
}

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

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

#mobile-menu-btn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(4px, -4px);
}

.mobile-nav-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobile-menu.open .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* ============================================
   Hero Section
   ============================================ */
.hero-tag {
    animation: fadeInUp 0.8s ease forwards;
}

/* ============================================
   Fleet Cards
   ============================================ */
.fleet-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

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

.fleet-card:hover .fleet-card-img {
    transform: scale(1.05);
}

/* ============================================
   Feature Cards
   ============================================ */
.feature-card {
    padding: 2rem 1.5rem;
    border-radius: 1.5rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: translateY(-4px);
}

/* ============================================
   Contact Form
   ============================================ */
#contact-form input,
#contact-form textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#contact-form input:focus,
#contact-form textarea:focus {
    border-color: var(--emerald-600);
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.1);
}

/* ============================================
   Back to Top Button
   ============================================ */
#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

#back-to-top:not(.visible) {
    opacity: 0;
    pointer-events: none;
}

#back-to-top:hover {
    transform: translateY(-2px);
}

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

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .hero-tag {
        font-size: 0.75rem;
    }
}

@media (max-width: 640px) {
    html {
        font-size: 14px;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar,
    #back-to-top,
    #mobile-menu {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* ============================================
   Reduced Motion
   ============================================ */
@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;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}
