/* ========================================
   Dodge Rover - Mobile-First Design
   Optimized for iOS/Android
   ======================================== */

:root {
    --primary-blue: #0057B7;
    --dark-blue: #003d80;
    --primary-yellow: #FFDD00;
    --dark-yellow: #e6c700;
    --white: #ffffff;
    --light-gray: #f5f7fa;
    --text-dark: #1a1a1a;
    --text-light: #666;
    --success: #28a745;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

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

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
    color: var(--text-dark);
    background: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

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

/* Mobile Container */
.container {
    width: 100%;
    max-width: 100%;
    padding: 0 16px;
    margin: 0 auto;
}

/* ========================================
   LOADER - Mobile Optimized
   ======================================== */

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.car-animation {
    position: relative;
    margin-bottom: 20px;
}

.car-animation i {
    font-size: 4rem;
    color: var(--primary-yellow);
    animation: drive 1.5s ease-in-out infinite;
}

@keyframes drive {
    0%, 100% { transform: translateX(-20px); }
    50% { transform: translateX(20px); }
}

.road {
    width: 120px;
    height: 3px;
    background: rgba(255,255,255,0.3);
    margin: 10px auto 0;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.road::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 100%;
    background: var(--primary-yellow);
    animation: roadLine 0.5s linear infinite;
}

@keyframes roadLine {
    0% { left: -30px; }
    100% { left: 100%; }
}

.loader-text {
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ========================================
   NAVBAR - Mobile First
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--primary-blue);
    z-index: 1000;
    padding: 12px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--white);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.logo i {
    color: var(--primary-yellow);
    font-size: 1rem;
}

.logo .highlight {
    color: var(--primary-yellow);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Language Switcher */
.language-switcher {
    display: flex;
    gap: 4px;
}

.lang-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 1.2rem;
}

.lang-btn.active {
    border-color: var(--primary-yellow);
    background: rgba(255,221,0,0.2);
}

/* Menu Toggle */
.menu-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all 0.3s;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--dark-blue);
    padding: 16px;
    display: none;
    flex-direction: column;
    gap: 0;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    color: var(--white);
    text-decoration: none;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-weight: 500;
    font-size: 0.95rem;
}

.mobile-menu a:last-child {
    border-bottom: none;
}

/* ========================================
   HERO SECTION - Mobile
   ======================================== */

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    padding-top: 56px;
}

.hero-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0,87,183,0.7) 0%,
        rgba(0,87,183,0.5) 30%,
        rgba(0,61,128,0.8) 70%,
        rgba(0,61,128,0.95) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 80px 20px 120px;
    color: var(--white);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-yellow);
    color: var(--primary-blue);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 24px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.hero-title {
    margin-bottom: 16px;
}

.hero-title .year {
    display: block;
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.9;
    letter-spacing: 3px;
}

.hero-title .model {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 8px 0;
}

.hero-title .trim {
    display: block;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-yellow);
}

.hero-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 32px;
    font-weight: 400;
}

.hero-price {
    margin-bottom: 32px;
}

.hero-price .price-label {
    display: block;
    font-size: 0.8rem;
    letter-spacing: 2px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.hero-price .price-amount {
    display: block;
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-yellow);
    line-height: 1;
}

.hero-price .price-note {
    display: block;
    font-size: 0.85rem;
    opacity: 0.8;
    margin-top: 8px;
}

.hero-cta {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 340px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
}

.btn-primary {
    background: var(--primary-yellow);
    color: var(--primary-blue);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: rgba(255,255,255,0.15);
    color: var(--white);
    border: 2px solid var(--white);
}

.hero-dots {
    position: absolute;
    bottom: 140px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
}

.dot.active {
    background: var(--primary-yellow);
}

/* ========================================
   STATS SECTION - Horizontal Scroll
   ======================================== */

.stats-section {
    background: var(--primary-blue);
    padding: 20px 0;
    position: relative;
    z-index: 3;
}

.stats-scroll {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 16px;
    gap: 12px;
}

.stats-scroll::-webkit-scrollbar {
    display: none;
}

.stat-card {
    flex: 0 0 auto;
    scroll-snap-align: start;
    width: 100px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    color: var(--white);
}

.stat-card i {
    font-size: 1.5rem;
    color: var(--primary-yellow);
    margin-bottom: 8px;
}

.stat-card .stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary-yellow);
}

.stat-card .stat-label {
    display: block;
    font-size: 0.7rem;
    opacity: 0.8;
    margin-top: 4px;
}

/* ========================================
   SECTION STYLES
   ======================================== */

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 24px;
    color: var(--text-dark);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-top: -16px;
    margin-bottom: 24px;
}

/* Value Section */
.value-section {
    padding: 48px 0;
    background: var(--light-gray);
}

.value-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.value-item {
    background: var(--white);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.value-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 1.2rem;
    color: var(--white);
}

.value-item h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-blue);
}

.value-item p {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.6;
}

/* Gallery Section */
.gallery-section {
    padding: 48px 0;
    background: var(--white);
}

.gallery-main {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 12px;
    background: var(--light-gray);
}

.gallery-main img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.9);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    color: var(--primary-blue);
    transition: all 0.2s;
}

.gallery-btn.prev { left: 12px; }
.gallery-btn.next { right: 12px; }

.gallery-btn:active {
    background: var(--primary-yellow);
}

.gallery-counter {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0,0,0,0.6);
    color: var(--white);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.gallery-thumbs img {
    width: 100%;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    opacity: 0.6;
    transition: all 0.2s;
}

.gallery-thumbs img.active {
    opacity: 1;
    border: 2px solid var(--primary-yellow);
}

/* Price Section */
.price-section {
    padding: 48px 0;
    background: var(--primary-blue);
}

.price-section .section-title {
    color: var(--white);
}

.price-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.price-card {
    background: rgba(255,255,255,0.1);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    color: var(--white);
    position: relative;
}

.price-card.featured {
    background: var(--primary-yellow);
    color: var(--primary-blue);
    transform: scale(1.02);
}

.card-badge {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--dark-blue);
    color: var(--white);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
}

.card-label {
    display: block;
    font-size: 0.8rem;
    opacity: 0.8;
    margin-bottom: 4px;
}

.card-price {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 4px;
}

.card-price.main {
    font-size: 2.5rem;
}

.card-note {
    display: block;
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Specs Section */
.specs-section {
    padding: 48px 0;
    background: var(--light-gray);
}

.specs-list {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--light-gray);
}

.spec-item:last-child {
    border-bottom: none;
}

.spec-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.spec-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
}

.spec-value.highlight {
    color: var(--success);
}

/* Condition Section */
.condition-section {
    padding: 48px 0;
    background: var(--white);
}

.condition-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.condition-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--light-gray);
    border-radius: 12px;
}

.condition-item i {
    color: var(--success);
    font-size: 1.2rem;
    margin-top: 2px;
}

.condition-item span {
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Contact Section */
.contact-section {
    padding: 48px 0 100px;
    background: var(--light-gray);
}

.contact-card {
    background: var(--white);
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.contact-card h2 {
    font-size: 1.5rem;
    margin-bottom: 24px;
}

.final-price {
    margin-bottom: 24px;
}

.final-price .label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-light);
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.final-price .amount {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-blue);
    line-height: 1;
}

.final-price .note {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 8px;
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.btn-call, .btn-email {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    border-radius: 12px;
    text-decoration: none;
}

.btn-call {
    background: var(--success);
    color: var(--white);
}

.btn-email {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-call i, .btn-email i {
    font-size: 1.3rem;
}

.btn-call span, .btn-email span {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.btn-call strong, .btn-email strong {
    font-size: 1rem;
}

.btn-call small, .btn-email small {
    font-size: 0.75rem;
    opacity: 0.8;
}

.location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-light);
    font-size: 0.85rem;
}

.location i {
    color: var(--primary-blue);
}

/* Sticky CTA */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    padding: 12px 16px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 100;
}

.sticky-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--success);
    color: var(--white);
    padding: 14px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
}

.sticky-btn i {
    font-size: 1.1rem;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: var(--white);
    padding: 32px 0 100px;
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 800;
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.footer-logo i {
    color: var(--primary-yellow);
}

.footer-logo .highlight {
    color: var(--primary-yellow);
}

.footer-vin {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--primary-yellow);
    margin-bottom: 8px;
}

.footer-copy {
    font-size: 0.75rem;
    opacity: 0.6;
}

/* ========================================
   TABLET & DESKTOP (min-width: 768px)
   ======================================== */

@media (min-width: 768px) {
    .container {
        max-width: 720px;
        padding: 0 24px;
    }
    
    .hero-title .model {
        font-size: 3rem;
    }
    
    .hero-title .trim {
        font-size: 1.6rem;
    }
    
    .hero-price .price-amount {
        font-size: 4rem;
    }
    
    .value-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-main img {
        height: 400px;
    }
    
    .price-cards {
        flex-direction: row;
        align-items: center;
        justify-content: center;
    }
    
    .price-card {
        flex: 0 0 200px;
    }
    
    .contact-buttons {
        flex-direction: row;
    }
    
    .sticky-cta {
        display: none;
    }
    
    .footer {
        padding-bottom: 32px;
    }
}

/* ========================================
   LARGE DESKTOP (min-width: 1024px)
   ======================================== */

@media (min-width: 1024px) {
    .container {
        max-width: 960px;
    }
    
    .nav-container {
        padding: 0 24px;
    }
    
    .mobile-menu {
        display: none;
    }
    
    .menu-toggle {
        display: none;
    }
    
    .nav-links {
        display: flex;
        gap: 32px;
    }
    
    .nav-links a {
        color: var(--white);
        text-decoration: none;
        font-size: 0.9rem;
        font-weight: 500;
    }
    
    .gallery-main img {
        height: 500px;
    }
    
    .gallery-thumbs img {
        height: 80px;
    }
}

/* ========================================
   SAFARI & iOS FIXES
   ======================================== */

@supports (-webkit-touch-callout: none) {
    .hero {
        min-height: -webkit-fill-available;
    }
}

/* Prevent text zoom on iOS */
input, textarea, select, button {
    font-size: 16px;
}

/* Smooth scrolling for iOS */
* {
    -webkit-overflow-scrolling: touch;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .navbar, .sticky-cta, .loader {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: 40px 0;
    }
    
    body {
        font-size: 12pt;
    }
}
