/* ===== IMPORTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800;900&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
    --fiat-red: #E60A47;
    --fiat-red-dark: #B80838;
    --fiat-red-glow: rgba(230, 10, 71, 0.25);
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-card: #ffffff;
    --bg-card-hover: #f9f9fb;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-muted: #999999;
    --border-color: rgba(0,0,0,0.1);
    --border-focus: rgba(230, 10, 71, 0.5);
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0,0,0,0.08);
    --gold: #B8860B;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
    --radius-xl: 32px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 8px 30px rgba(0,0,0,0.08);
    --shadow-lg: 0 16px 60px rgba(0,0,0,0.1);
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    direction: rtl;
    text-align: right;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #eee; }
::-webkit-scrollbar-thumb { background: var(--fiat-red); border-radius: 10px; }

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1000;
    padding: 16px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 10px 40px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.navbar-logo img {
    height: 42px;
    transition: var(--transition);
}

.navbar-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.navbar-links a {
    font-size: 0.95rem;
    font-weight: 600;
    color: #444;
    transition: var(--transition);
    position: relative;
}

.navbar-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--fiat-red);
    transition: var(--transition);
}

.navbar-links a:hover {
    color: var(--fiat-red);
}

.navbar-links a:hover::after {
    width: 100%;
}

.navbar-cta {
    background: var(--fiat-red);
    color: #fff !important;
    padding: 10px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition);
    border: none;
}

.navbar-cta:hover {
    background: var(--fiat-red-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--fiat-red-glow);
}

.navbar-cta::after { display: none !important; }

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 26px;
    height: 2.5px;
    background: #333;
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== HERO CAROUSEL ===== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 640px;
    overflow: hidden;
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 0;
}

.carousel-slide.active {
    opacity: 1;
    z-index: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0,0,0,0.85) 0%,
        rgba(0,0,0,0.5) 40%,
        rgba(0,0,0,0.2) 70%,
        rgba(0,0,0,0.4) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(230, 10, 71, 0.15);
    border: 1px solid rgba(230, 10, 71, 0.3);
    padding: 8px 22px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--fiat-red);
    margin-bottom: 24px;
    animation: fadeInDown 0.8s ease;
}

.hero-badge .dot {
    width: 8px;
    height: 8px;
    background: var(--fiat-red);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 16px;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-title span {
    color: var(--fiat-red);
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.35rem);
    color: rgba(255,255,255,0.8);
    max-width: 680px;
    margin-bottom: 12px;
    animation: fadeInUp 0.8s ease 0.4s both;
    font-weight: 400;
}

.hero-price {
    font-size: clamp(1.6rem, 3.5vw, 2.8rem);
    font-weight: 900;
    color: #FFD700;
    margin-bottom: 32px;
    animation: fadeInUp 0.8s ease 0.5s both;
    text-shadow: 0 2px 20px rgba(255, 215, 0, 0.4);
}

.hero-price small {
    font-size: 0.5em;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.6s both;
}

.btn-primary {
    background: var(--fiat-red);
    color: #fff;
    padding: 14px 40px;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 700;
    border: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.hero-title, .hero .btn-outline {
    color: #fff;
}

.btn-primary:hover {
    background: var(--fiat-red-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px var(--fiat-red-glow);
}

.btn-outline {
    background: transparent;
    color: #fff;
    padding: 14px 40px;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 700;
    border: 2px solid rgba(255,255,255,0.2);
    transition: var(--transition);
}

.btn-outline:hover {
    border-color: rgba(255,255,255,0.5);
    background: rgba(255,255,255,0.05);
    transform: translateY(-3px);
}

/* Carousel dots */
.carousel-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 5;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.25);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    background: var(--fiat-red);
    box-shadow: 0 0 12px var(--fiat-red-glow);
    transform: scale(1.2);
}

/* ===== SECTIONS COMMON ===== */
.section {
    padding: 100px 40px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    background: rgba(230, 10, 71, 0.1);
    color: var(--fiat-red);
    padding: 6px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 16px;
    border: 1px solid rgba(230, 10, 71, 0.2);
}

.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 12px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== CAR DETAILS ===== */
.details-section {
    background: #ffffff;
}

.details-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.details-image {
    position: relative;
}

.details-image img {
    border-radius: var(--radius-lg);
    box-shadow: none;
}

.details-image::after {
    display: none;
}

.details-content h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.details-content p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 24px;
    line-height: 1.9;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    background: #f8f8fa;
    border-radius: var(--radius-md);
    border: 1px solid rgba(0,0,0,0.06);
    transition: var(--transition);
}

.feature-item:hover {
    border-color: var(--fiat-red);
    transform: translateX(-6px);
    background: #fff0f3;
}

.feature-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(230, 10, 71, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.feature-text {
    font-weight: 600;
    font-size: 0.95rem;
}

/* ===== COLORS SECTION ===== */
.colors-section {
    background: var(--bg-primary);
}

.colors-grid {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.color-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    background: var(--bg-card);
}

.color-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--fiat-red);
}

.color-card img {
    width: 100%;
    height: 320px;
    object-fit: contain;
    padding: 20px;
    background: linear-gradient(135deg, #f8f8fa, #eeeef2);
}

.color-label {
    padding: 18px 24px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    border-top: 1px solid var(--border-color);
}

/* ===== FORM SECTION ===== */
.form-section {
    background: #f5f5f7;
    position: relative;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(230, 10, 71, 0.08), transparent 70%);
    opacity: 0.5;
    pointer-events: none;
}

.form-container {
    max-width: 780px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: var(--radius-xl);
    padding: 50px 44px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 10px 40px rgba(0,0,0,0.06);
    position: relative;
}

/* Client type toggle */
.client-type-toggle {
    display: flex;
    background: #f0f0f2;
    border-radius: 50px;
    padding: 4px;
    margin-bottom: 40px;
    border: 1px solid rgba(0,0,0,0.06);
}

.type-btn {
    flex: 1;
    padding: 12px 20px;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 50px;
    border: none;
    background: transparent;
    color: #666;
    transition: var(--transition);
    cursor: pointer;
}

.type-btn.active {
    background: var(--fiat-red);
    color: #fff;
    box-shadow: 0 4px 15px var(--fiat-red-glow);
}

/* Form groups */
.form-divider {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--fiat-red);
    margin: 36px 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-divider svg {
    width: 20px;
    height: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-group label .required {
    color: var(--fiat-red);
    margin-right: 2px;
}

.form-group input,
.form-group select {
    padding: 13px 18px;
    background: #f8f8fa;
    border: 1.5px solid rgba(0,0,0,0.1);
    border-radius: var(--radius-sm);
    color: #1a1a1a;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    direction: rtl;
    width: 100%;
}

.form-group input::placeholder {
    color: #aaa;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--fiat-red);
    box-shadow: 0 0 0 3px rgba(230, 10, 71, 0.12);
    background: #fff;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666666' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    padding-left: 36px;
}

.form-group select option {
    background: #fff;
    color: #1a1a1a;
}

/* Professional fields */
.professional-fields {
    display: none;
    animation: slideDown 0.4s ease;
}

.professional-fields.show {
    display: block;
}

/* Checkbox styles */
.checkbox-group {
    margin: 28px 0 10px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    font-weight: 500;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border: 2px solid rgba(0,0,0,0.15);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    margin-top: 2px;
    background: #f5f5f7;
}

.checkbox-label input:checked + .checkmark {
    background: var(--fiat-red);
    border-color: var(--fiat-red);
}

.checkbox-label input:checked + .checkmark::after {
    content: '✓';
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

/* Submit button */
.submit-section {
    margin-top: 36px;
    text-align: center;
}

.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--fiat-red), var(--fiat-red-dark));
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 35px var(--fiat-red-glow);
}

.btn-submit:active {
    transform: translateY(0);
}

.btn-submit.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-submit.loading::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 0%;
    background: rgba(255,255,255,0.15);
    animation: loadingBar 2s ease-in-out infinite;
}

.form-disclaimer {
    text-align: center;
    margin-top: 16px;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
}

/* Success / Error message */
.form-message {
    display: none;
    text-align: center;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    margin-top: 20px;
    font-weight: 600;
    font-size: 0.95rem;
    animation: fadeInUp 0.5s ease;
}

.form-message.success {
    display: block;
    background: #e8f9ef;
    color: #1a8a4a;
    border: 1px solid #b8e6cc;
}

.form-message.error {
    display: block;
    background: #fff0f3;
    color: var(--fiat-red);
    border: 1px solid #ffd0da;
}

/* ===== FOOTER ===== */
.footer {
    background: #0a0a0a;
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 40px;
    text-align: center;
}

.footer-logo img {
    height: 36px;
    margin: 0 auto 16px;
    opacity: 0.8;
}

.footer-text {
    color: #888;
    font-size: 0.85rem;
    font-weight: 500;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 12px;
}

.footer-links a {
    color: #aaa;
    font-size: 0.85rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--fiat-red);
}

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

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

@keyframes slideDown {
    from { opacity: 0; max-height: 0; transform: translateY(-10px); }
    to { opacity: 1; max-height: 400px; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(230, 10, 71, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(230, 10, 71, 0); }
}

@keyframes loadingBar {
    0% { width: 0; right: 0; left: auto; }
    50% { width: 100%; right: 0; left: auto; }
    51% { width: 100%; left: 0; right: auto; }
    100% { width: 0; left: 0; right: auto; }
}

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

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

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .details-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .details-image {
        order: -1;
        max-width: 500px;
        margin: 0 auto;
    }

    .section { padding: 80px 24px; }
}

@media (max-width: 768px) {
    .navbar {
        padding: 12px 20px;
    }

    .navbar-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 100px 30px 40px;
        gap: 24px;
        transition: var(--transition);
        border-left: 1px solid var(--border-color);
    }

    .navbar-links.open {
        right: 0;
    }

    .menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .hero-price {
        font-size: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        padding: 0 20px;
    }

    .btn-primary, .btn-outline {
        width: 100%;
        justify-content: center;
    }

    .colors-grid {
        grid-template-columns: 1fr;
    }

    .form-container {
        padding: 30px 20px;
        border-radius: var(--radius-lg);
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .section { padding: 60px 16px; }
}

@media (max-width: 480px) {
    .hero {
        min-height: 100svh;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 6px 16px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .client-type-toggle {
        flex-direction: column;
        border-radius: var(--radius-md);
    }

    .type-btn {
        border-radius: var(--radius-sm);
    }

    .color-card img {
        height: 220px;
    }
}
