@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=Noto+Kufi+Arabic:wght@500;600;700;800&display=swap");

/* CARS SPACE premium automotive identity layer */
:root {
    --cs-red: #c5161d;
    --cs-red-bright: #e21b2d;
    --cs-red-deep: #7e1015;
    --cs-charcoal: #0d1113;
    --cs-carbon: #151a1d;
    --cs-graphite: #242a2e;
    --cs-concrete: #e9ecec;
    --cs-concrete-2: #f6f7f7;
    --cs-ink: #111518;
    --cs-muted: #657076;
    --cs-line: rgba(17, 21, 24, 0.14);
    --cs-light-line: rgba(255, 255, 255, 0.12);
    --cs-panel-dark: linear-gradient(145deg, rgba(28, 34, 38, 0.98), rgba(10, 13, 15, 0.98));
    --cs-panel-light: rgba(255, 255, 255, 0.96);
    --primary-red: var(--cs-red);
    --light-red: var(--cs-red-bright);
    --dark-red: var(--cs-red-deep);
    --deep-black: var(--cs-charcoal);
    --rich-black: var(--cs-carbon);
    --text-primary: var(--cs-ink);
    --text-secondary: #2e363a;
    --text-muted: var(--cs-muted);
    --text-light: rgba(255, 255, 255, 0.84);
    --pure-white: #ffffff;
    --off-white: var(--cs-concrete-2);
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-xl: 8px;
    --radius-2xl: 8px;
    --shadow-lg: 0 22px 60px rgba(9, 12, 14, 0.18);
    --shadow-red: 0 18px 42px rgba(197, 22, 29, 0.22);
}

html {
    scroll-padding-top: 96px;
}

body {
    font-family: "IBM Plex Sans Arabic", "Cairo", sans-serif;
    color: var(--cs-ink);
    letter-spacing: 0;
    background:
        linear-gradient(90deg, rgba(197, 22, 29, 0.045), transparent 34%, rgba(17, 21, 24, 0.04)),
        repeating-linear-gradient(135deg, rgba(13, 17, 19, 0.045) 0 1px, transparent 1px 16px),
        linear-gradient(180deg, #ffffff 0%, var(--cs-concrete-2) 54%, var(--cs-concrete) 100%);
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -8;
    background:
        radial-gradient(circle at 82% 12%, rgba(197, 22, 29, 0.12), transparent 28%),
        linear-gradient(180deg, transparent, rgba(13, 17, 19, 0.04));
}

[data-aos],
.aos-init,
.aos-animate {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
}

.vip-popup-overlay,
.floating-orbs,
.luxury-lines,
.noise-overlay,
.spotlight,
.snow-toggle-btn,
.ads-creator-btn,
.custom-cursor,
.custom-cursor-follower,
.morphing-bg {
    display: none !important;
}

/* Subtle premium snow/particle layer restored on all pages. */
.interactive-stars {
    position: fixed;
    inset: 0;
    z-index: 7;
    pointer-events: none;
    overflow: hidden;
    mix-blend-mode: screen;
}

.interactive-star {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(245, 250, 255, 0.86);
    box-shadow:
        0 0 8px rgba(255, 255, 255, 0.75),
        0 0 18px rgba(197, 22, 29, 0.18);
    opacity: 0.62;
    transform: translate3d(0, 0, 0);
}

#snowCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 7;
    opacity: 0.42;
}

#preloader {
    background: var(--cs-charcoal);
}

.loader-logo {
    display: none;
}

.loader-logo-img {
    width: 240px;
    height: 110px;
    object-fit: cover;
    object-position: center 53%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.38);
}

.loader-bar {
    background: linear-gradient(90deg, var(--cs-red), #ffffff, var(--cs-red));
}

.scroll-progress {
    height: 3px;
    background: rgba(13, 17, 19, 0.18);
}

.scroll-progress-bar,
#scrollProgress {
    background: var(--cs-red);
    box-shadow: 0 0 18px rgba(197, 22, 29, 0.35);
}

.navbar {
    padding: 10px 5%;
    background: rgba(11, 14, 16, 0.94);
    border-bottom: 4px solid var(--cs-red);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.navbar.scrolled {
    padding: 8px 5%;
    background: rgba(11, 14, 16, 0.98);
}

.nav-container {
    max-width: 1320px;
    gap: clamp(18px, 3vw, 44px);
}

.logo {
    position: relative;
    flex: 0 0 auto;
    color: #fff;
    background: none;
    -webkit-text-fill-color: currentColor;
    gap: 0;
    min-width: 190px;
}

.logo .logo-img {
    width: clamp(170px, 13vw, 230px) !important;
    height: clamp(64px, 4.6vw, 84px) !important;
    object-fit: cover !important;
    object-position: center 53% !important;
    padding: 0 !important;
    background: transparent !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 8px !important;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.26) !important;
    filter: none !important;
}

.neon-glow {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.nav-links {
    gap: 4px;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.82);
    padding: 11px 13px;
    border-radius: 4px;
    font-family: "Noto Kufi Arabic", "IBM Plex Sans Arabic", sans-serif;
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: 0;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    background: rgba(197, 22, 29, 0.18);
}

.nav-links a::after {
    background: var(--cs-red);
}

.menu-toggle span {
    background: #fff;
}

.hero {
    min-height: 94vh;
    display: grid;
    align-items: center;
    padding: 120px 0 82px;
    overflow: hidden;
    background: var(--cs-charcoal);
}

.hero::before {
    background:
        linear-gradient(90deg, rgba(7, 9, 10, 0.9) 0%, rgba(12, 15, 17, 0.66) 48%, rgba(197, 22, 29, 0.34) 100%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 18px);
    opacity: 1;
}

.hero::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 54%;
    height: 8px;
    background: var(--cs-red);
    transform: skewX(-28deg);
    transform-origin: bottom right;
}

.hero-slide {
    filter: brightness(0.72) saturate(0.9) contrast(1.08);
}

.hero-bg,
.hero-overlay {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 8;
    width: min(100%, 1240px);
    margin-inline: auto;
    padding: 0 5%;
    text-align: right;
    box-sizing: border-box;
}

.hero h1 {
    display: block;
    max-width: 980px;
    margin: 0;
    padding: 0;
    font-family: "Noto Kufi Arabic", "IBM Plex Sans Arabic", sans-serif;
    font-size: clamp(3.6rem, 8vw, 7.4rem);
    font-weight: 800;
    line-height: 1.05;
    color: #fff;
    background: none;
    -webkit-text-fill-color: #fff;
    background-clip: border-box;
    letter-spacing: 0;
    text-shadow: 0 18px 38px rgba(0, 0, 0, 0.44);
}

.glitch::before,
.glitch::after,
.pulse-ring::after,
.pulse-ring-btn::after,
.hero h1::before,
.hero-subtitle::before,
.hero-description::before {
    display: none !important;
}

.hero-subtitle {
    display: inline-block;
    max-width: min(100%, 720px);
    margin-top: 18px;
    padding: 8px 16px;
    color: #fff;
    background: var(--cs-red);
    border-radius: 4px;
    font-family: "Noto Kufi Arabic", "IBM Plex Sans Arabic", sans-serif;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.45;
    text-transform: uppercase;
    box-shadow: 0 14px 36px rgba(197, 22, 29, 0.26);
    white-space: normal;
    overflow-wrap: anywhere;
}

.hero-description {
    display: block;
    max-width: 760px;
    margin: 24px 0 0;
    padding: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1.05rem, 1.55vw, 1.32rem);
    font-weight: 600;
    line-height: 2;
    text-shadow: 0 6px 24px rgba(0, 0, 0, 0.42);
}

.cta-buttons {
    justify-content: flex-start;
    gap: 12px;
    margin-top: 30px;
}

.cta-button,
.cta-button-secondary,
.btn-premium,
.btn-outline-premium {
    min-height: 54px;
    border-radius: 6px !important;
    font-family: "Noto Kufi Arabic", "IBM Plex Sans Arabic", sans-serif;
    font-weight: 800;
    letter-spacing: 0;
    box-shadow: none !important;
}

.cta-button,
.btn-premium {
    background: var(--cs-red) !important;
    color: #fff !important;
    border: 1px solid var(--cs-red) !important;
}

.cta-button:hover,
.btn-premium:hover {
    background: var(--cs-red-bright) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-red) !important;
}

.cta-button-secondary,
.btn-outline-premium {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.55) !important;
}

.hero-dots {
    z-index: 8;
    bottom: 34px;
}

.hero-dot {
    width: 36px;
    height: 4px;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.34);
}

.hero-dot.active {
    background: var(--cs-red);
}

.section {
    max-width: 1280px;
    padding: clamp(74px, 8vw, 118px) 5%;
}

.section-title {
    font-family: "Noto Kufi Arabic", "IBM Plex Sans Arabic", sans-serif;
    color: var(--cs-charcoal);
    letter-spacing: 0;
    text-align: right;
    text-shadow: none;
}

.section-title::after {
    right: 0;
    left: auto;
    width: 96px;
    height: 4px;
    border-radius: 0;
    background: var(--cs-red);
}

.section-subtitle {
    max-width: 760px;
    text-align: right;
    margin-inline: 0;
    color: var(--cs-muted);
    font-size: 1.08rem;
    font-weight: 600;
}

.glass-card,
.feature-item,
.testimonial-item,
.certificate-card,
.speedometer-card,
.premium-card,
.card-elevated {
    border-radius: 8px !important;
    background: var(--cs-panel-dark) !important;
    border: 1px solid var(--cs-light-line) !important;
    color: #fff !important;
    box-shadow: var(--shadow-lg) !important;
}

.glass-card:not(.department-card):not(.gallery-item) :is(h1, h2, h3, h4, h5, h6),
.feature-item :is(h1, h2, h3, h4, h5, h6),
.testimonial-item :is(h1, h2, h3, h4, h5, h6) {
    color: #fff !important;
    text-shadow: none !important;
}

.glass-card:not(.department-card):not(.gallery-item) :is(p, li, span),
.feature-item :is(p, li, span),
.testimonial-item :is(p, li, span) {
    color: rgba(255, 255, 255, 0.82) !important;
    text-shadow: none !important;
}

.glass-card strong,
.feature-item strong,
.testimonial-author,
.testimonial-role i {
    color: var(--cs-red-bright) !important;
}

.glass-card:hover,
.department-card:hover,
.feature-item:hover,
.gallery-item:hover,
.testimonial-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg), var(--shadow-red) !important;
    border-color: rgba(197, 22, 29, 0.34) !important;
}

.glass-card::before,
.department-card::before,
.feature-item::before,
.certificate-card::before {
    height: 4px;
    background: var(--cs-red);
}

.departments-grid,
.features-grid,
.gallery-grid {
    gap: 22px;
}

.department-card {
    min-height: 420px;
    border-radius: 8px !important;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    overflow: hidden;
}

.department-card::after {
    background:
        linear-gradient(180deg, rgba(7, 9, 10, 0.02) 0%, rgba(10, 13, 15, 0.54) 44%, rgba(8, 10, 12, 0.95) 100%),
        linear-gradient(90deg, rgba(197, 22, 29, 0.26), transparent);
}

.department-content {
    justify-content: flex-end;
    text-align: right;
}

.department-icon,
.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 82px;
    height: 64px;
    margin: 0 auto 1.4rem;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--cs-red), var(--cs-red-deep));
    color: #fff !important;
    box-shadow: 0 16px 32px rgba(197, 22, 29, 0.24);
    filter: none;
}

.feature-icon i,
.department-icon i {
    color: #fff !important;
    font-size: 2rem;
}

.department-card h3,
.gallery-overlay h3 {
    color: #fff;
    letter-spacing: 0;
}

.feature-item h3 {
    color: #fff !important;
    font-family: "Noto Kufi Arabic", "IBM Plex Sans Arabic", sans-serif;
}

.feature-item p,
.department-card p {
    color: rgba(255, 255, 255, 0.86) !important;
}

.stats-section {
    gap: 22px !important;
}

.speedometer-card {
    background:
        radial-gradient(circle at 50% 0%, rgba(197, 22, 29, 0.14), transparent 42%),
        var(--cs-panel-dark) !important;
}

.speedometer-label,
.center-display,
.scale-numbers span {
    color: #fff !important;
}

.testimonials {
    background:
        linear-gradient(90deg, rgba(197, 22, 29, 0.12), transparent 38%),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.04) 0 1px, transparent 1px 18px),
        var(--cs-charcoal) !important;
    padding: clamp(82px, 9vw, 128px) 5%;
}

.testimonials .section {
    padding-top: 0;
    padding-bottom: 0;
}

.testimonials .section-title,
.testimonials .section-subtitle {
    color: #fff;
}

.testimonial-slider {
    max-width: 960px;
}

.testimonial-item {
    padding: clamp(2rem, 5vw, 4rem) !important;
}

.testimonial-text {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: clamp(1.25rem, 2vw, 1.65rem);
    line-height: 2;
}

.testimonial-stars,
.testimonial-link {
    color: #fff !important;
}

.testimonial-stars i {
    color: #ffc13d !important;
}

.testimonial-link {
    border-radius: 6px !important;
    background: var(--cs-red) !important;
}

.gallery-item {
    border-radius: 8px !important;
    overflow: hidden;
}

.gallery-overlay {
    background: linear-gradient(180deg, transparent, rgba(8, 10, 12, 0.92));
}

.floating-contacts {
    inset: auto auto 24px 24px !important;
    align-items: flex-start !important;
    width: max-content;
    max-width: calc(100vw - 48px);
    z-index: 60;
    transform: none !important;
    opacity: 1 !important;
}

.contact-actions {
    align-items: flex-start !important;
}

.main-contact-btn,
.floating-btn {
    border-radius: 8px !important;
    background: var(--cs-red) !important;
    box-shadow: 0 14px 34px rgba(197, 22, 29, 0.25) !important;
}

.main-contact-btn {
    max-width: 100%;
    white-space: nowrap;
    transform: none !important;
    opacity: 1 !important;
}

.footer {
    background:
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 16px),
        var(--cs-charcoal) !important;
    border-top: 5px solid var(--cs-red);
}

.footer-section:first-child h3 {
    width: 240px;
    height: 112px;
    margin-bottom: 10px;
    overflow: hidden;
    color: transparent !important;
    background-image: url("../img/brand/cars-space-logo-official.png");
    background-size: 240px auto;
    background-position: center 53%;
    background-repeat: no-repeat;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
}

.footer-section h3 {
    color: #fff;
    font-family: "Noto Kufi Arabic", "IBM Plex Sans Arabic", sans-serif;
}

.footer-section p,
.footer-section a,
.footer-bottom {
    color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 1080px) {
    .navbar {
        padding: 9px 4%;
    }

    .nav-links {
        background: rgba(11, 14, 16, 0.98);
        border: 1px solid rgba(197, 22, 29, 0.28);
        border-radius: 8px;
        padding: 18px;
    }

    .logo {
        min-width: 150px;
    }

    .logo .logo-img {
        width: 150px !important;
        height: 62px !important;
    }

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

    .hero h1,
    .hero-description {
        margin-inline: auto;
    }

    .cta-buttons {
        justify-content: center;
    }
}

@media (max-width: 640px) {
    .navbar {
        border-bottom-width: 3px;
    }

    .logo {
        min-width: 116px;
    }

    .logo .logo-img {
        width: 116px !important;
        height: 52px !important;
    }

    .hero {
        min-height: 84vh;
        padding: 96px 0 86px;
    }

    .hero-content {
        width: min(100%, 382px);
        padding-inline: 18px;
    }

    .hero h1 {
        font-size: clamp(2.45rem, 13vw, 4.2rem);
        line-height: 1.15;
    }

    .hero-subtitle {
        width: 100%;
        max-width: 100%;
        font-size: 0.76rem;
        padding: 8px 10px;
    }

    .hero-description {
        width: 100%;
        max-width: 100%;
        font-size: 0.98rem;
        line-height: 1.85;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }

    .cta-button,
    .cta-button-secondary {
        justify-content: center;
        text-align: center;
    }

    .glass-card[style],
    .section [style*="padding: 4rem"],
    .section [style*="padding: 3rem"] {
        padding: 1.6rem !important;
    }

    .department-card {
        min-height: 360px;
    }

    .feature-item {
        padding: 2rem !important;
    }

    .floating-contacts {
        left: 16px !important;
        bottom: 16px !important;
        max-width: calc(100vw - 32px);
    }

    .interactive-star {
        opacity: 0.45;
    }
}
