:root {
    --dr-red: #ce1126;
    --dr-blue: #002d62;
    --dr-white: #ffffff;
    --text-dark: #111827;
    --text-gray: #6b7280;
    --bg-light: #f3f4f6;
    --card-bg: #ffffff;
    --font-main: 'Inter', sans-serif;
}

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

html,
body {
    font-family: var(--font-main);
    background-color: #f8f9fa;
    color: #333;
    /* overflow-x: hidden; */
    overflow-x: clip;
    width: 100%;
    max-width: 100%;
    position: relative;
}

/* --- Bootstrap Overrides & Utilities --- */

.fw-black {
    font-weight: 900;
}

.text-primary-dark {
    color: var(--dr-blue) !important;
}

.ls-1 {
    letter-spacing: 1px;
}

/* --- High-End Buttons with Glow --- */
.btn-red {
    background: linear-gradient(135deg, var(--dr-red) 0%, #a30013 100%);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(206, 17, 38, 0.35);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-red:hover {
    background: linear-gradient(135deg, #e61e36 0%, #b80017 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(206, 17, 38, 0.5);
}

/* Add a subtle shine animation on click */
.btn-red:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(206, 17, 38, 0.3);
}

.text-red {
    color: var(--dr-red);
}

.bg-brand-dark {
    background: linear-gradient(180deg, #001e42 0%, #000b1a 100%) !important;
    color: white;
}

/* --- Header Styling --- */

.logo-wrapper {
    position: absolute;
    left: 20px;
    top: -5px;
    z-index: 100;
    transition: transform 0.3s ease;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.2));
}

.logo-wrapper:hover {
    transform: scale(1.02);
}

.main-logo {
    width: 200px;
    border-radius: 0 0 40px 40px;
    border: 3px solid white;
    background: #000;
}

/* --- Glowing Header --- */
.blue-nav-bar {
    background:
        radial-gradient(circle at 2px 2px, rgba(255, 255, 255, 0.1) 1px, transparent 0),
        linear-gradient(90deg, #002d62 0%, #001a3a 100%);
    background-size: 20px 20px, 100% 100%;
    min-height: 60px;
    display: flex;
    align-items: center;
    box-shadow: 0 5px 20px rgba(0, 45, 98, 0.2);
    position: relative;
    z-index: 5;
}

.red-stripe {
    height: 6px;
    background: linear-gradient(90deg, #a30013, var(--dr-red), #ff2b42, var(--dr-red), #a30013);
    background-size: 200% 100%;
    width: 100%;
    box-shadow: 0 2px 10px rgba(206, 17, 38, 0.4);
}

.nav-link {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.85) !important;
    position: relative;
    transition: color 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: white !important;
}

/* Underline effect for nav items */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--dr-red);
    transition: width 0.3s;
}

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

/* --- Hero Section Animation --- */

.hero-section {
    min-height: 80vh;
    overflow: hidden;
    text-align: center;
}

.hero-section .row {
    justify-content: center;
}

.hero-bg-anim {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?q=80&w=2000') center/cover no-repeat;
    z-index: 1;
    animation: slowZoom 25s infinite alternate ease-in-out;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 45, 98, 0.95) 0%, rgba(0, 45, 98, 0.4) 100%);
    z-index: 2;
}

@keyframes slowZoom {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.15);
    }
}

/* Hero Badge */
.hero-badge {
    background: linear-gradient(135deg, var(--dr-red), #ff4d61);
    box-shadow: 0 0 15px rgba(206, 17, 38, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Floating Search Bar */
.search-bar-floating {
    margin-top: -60px;
    background: white;
    box-shadow: 0 15px 40px rgba(0, 45, 98, 0.1), 0 5px 15px rgba(0, 0, 0, 0.05);
    border-bottom: 4px solid var(--dr-red);
}

/* --- High-End CTA Section --- */

.cta-section {
    background-color: #ffffff;
    /* Use CSS to create a technical grid pattern */
    background-image:
        linear-gradient(rgba(0, 45, 98, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 45, 98, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    /* Size of the grid squares */
    position: relative;
}

/* Optional: Add a subtle vignette to focus the center */
.cta-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, transparent 40%, rgba(255, 255, 255, 0.8) 90%);
    pointer-events: none;
    z-index: 1;
}

/* --- Floating Glow Orbs (The "Secret Sauce") --- */
.glow-orb {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(80px);
    /* This makes it a soft glow, not a circle */
    opacity: 0.08;
    /* Very subtle */
    z-index: 0;
}

/* Blue Glow on Top Left */
.orb-1 {
    background: var(--dr-blue);
    top: -100px;
    left: -100px;
}

/* Red Glow on Bottom Right */
.orb-2 {
    background: var(--dr-red);
    bottom: -100px;
    right: -100px;
}


/* --- FEATURES SECTION (Updated) --- */
.features-diagonal {
    /* Deep Blue Gradient */
    background: linear-gradient(135deg, #001e42 0%, #001229 100%);
    clip-path: polygon(0 5%, 100% 0, 100% 95%, 0 100%);
    /* Inner shadow for depth */
    box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.5);
}

/* Subtle dots texture overlay */
.diagonal-bg-texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 30px 30px;
    opacity: 0.6;
    pointer-events: none;
}

/* THE GLASS CARD */
.glass-feature-card {
    /* background: rgba(255, 255, 255, 0.03); */
    /* Very transparent white */
    backdrop-filter: blur(10px);
    /* The "Frosted" effect */
    /* border: 1px solid rgba(255, 255, 255, 0.08); */
    /* Subtle border */
    transition: transform 0.3s ease, background 0.3s;
}

.glass-feature-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Icon Styling */
.icon-glow-wrapper {
    display: inline-block;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.3));
    /* Glow behind icon */
    transition: transform 0.3s;
}

.glass-feature-card:hover .icon-glow-wrapper {
    transform: scale(1.1) translateY(-2px);
}

/* --- FOOTER (Updated) --- */
.footer-custom {
    /* Richer, darker red gradient */
    background: linear-gradient(180deg, #a30013 0%, #4a0009 100%);
    color: white;
    border-top: 8px solid white;
}

/* World Map Pattern Overlay */
.footer-map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Creates a dotted map effect using CSS radial gradients */
    background-image:
        radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
    mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 100%);
    opacity: 0.5;
    pointer-events: none;
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: 0.3s;
    font-size: 0.95rem;
}

.footer-link:hover {
    color: white;
    padding-left: 8px;
    /* Slide effect */
}

/* Social Buttons */
.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-btn:hover {
    background: white;
    color: var(--dr-red);
    transform: translateY(-3px);
}

/* Contact Icons */
.icon-circle {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.border-white-10 {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Mobile Tweak for Features diagonal gap */
@media (max-width: 991px) {
    .features-diagonal {
        clip-path: none;
        /* Remove diagonal cut on mobile for more space */
        padding-top: 60px;
        padding-bottom: 60px;
    }
}

.hover-underline:hover {
    text-decoration: underline !important;
}

/* --- NEW SLIDER CARD STYLES --- */
.car-card-slider {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.car-card-slider:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1) !important;
}

.img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, 0.3) 100%);
    pointer-events: none;
}

/* Navigation Buttons (Arrows) */
.swiper-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid var(--dr-blue);
    background: white;
    color: var(--dr-blue);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: 0.3s;
}

.swiper-btn:hover {
    background: var(--dr-blue);
    color: white;
}

/* Pagination Dots */
.swiper-pagination-bullet {
    background: var(--dr-blue);
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    background: var(--dr-red);
    opacity: 1;
}

/* Button Custom in Card */
.btn-sm-custom {
    font-size: 0.85rem;
    padding: 10px 0;
    border-width: 2px;
}

.btn-sm-custom:hover {
    background: var(--dr-blue);
    border-color: var(--dr-blue);
}

/* --- Header Contact Links --- */
.contact-link {
    font-size: 0.9rem;
    /* Matches the clean Inter look */
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
}

/* Hover effect: Icon and Text turn Red */
.contact-link:hover {
    color: var(--dr-red) !important;
}

.contact-link:hover i {
    transform: scale(1.1);
    /* Subtle pop effect */
    transition: transform 0.2s;
}

/* Ensure Logo stays centered on mobile */
@media (max-width: 991px) {
    .logo-wrapper {
        left: 50%;
        transform: translateX(-50%);
        top: -10px;
        width: 160px;
        /* Slightly smaller on mobile */
    }

    .main-logo {
        width: 100%;
        border-width: 2px;
    }
}

@media (max-width: 991px) {

    .features-diagonal {
        clip-path: none;
        padding-top: 50px;
        padding-bottom: 50px;
    }
}

@media (max-width: 768px) {

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

    .hero-section .row {
        justify-content: center;
    }

    .search-bar-floating {
        margin-top: 0;
    }
}

/* --- GRID INVENTORY STYLES --- */

/* The Card Container */
.car-card-grid {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
    /* Ensure cards are aligned perfectly in grid */
    height: 100%;
    display: flex;
    flex-direction: column;
}

.car-card-grid:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 45, 98, 0.1) !important;
    border-color: rgba(0, 0, 0, 0.05) !important;
}

/* Make image overlay strictly defined */
.img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient from bottom up to make text legible if you put text over image */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 60%, rgba(0, 0, 0, 0.05) 100%);
    pointer-events: none;
    transition: background 0.3s;
}

.car-card-grid:hover .img-overlay {
    background: rgba(0, 0, 0, 0.02);
    /* Slight tint on hover */
}

/* Typography Tweaks */
.x-small {
    font-size: 0.75rem;
    font-weight: 500;
}

/* Load More Button Animation */
.load-more-btn {
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(206, 17, 38, 0.4);
}

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


/* / */

/* --- FEATURED SECTION (Unique Dark Theme) --- */
.featured-section-dark {
    /* Brand Dark Gradient */
    background: linear-gradient(135deg, #001e42 0%, #001024 100%);
    position: relative;
    /* Optional: Separation margin */
    margin-top: 80px;
}

/* Background Pattern (Subtle Hexagons or Lines) */
.featured-bg-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.03) 0px, rgba(255, 255, 255, 0.03) 1px, transparent 1px, transparent 10px);
    pointer-events: none;
}

/* Floating Color Glows */
.featured-glow-red,
.featured-glow-blue {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.15;
    pointer-events: none;
    z-index: 1;
}

.featured-glow-red {
    background: var(--dr-red);
    top: -100px;
    right: -50px;
}

.featured-glow-blue {
    background: #0044cc;
    bottom: -100px;
    left: -50px;
}

/* Swiper Controls on Dark Background */
.featured-section-dark .swiper-btn {
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.featured-section-dark .swiper-btn:hover {
    background: white;
    color: var(--dr-blue);
    border-color: white !important;
}

/* --- LATEST INVENTORY (Clean Grid) --- */
.car-card-grid {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: white;
}

.car-card-grid:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
    border-color: var(--dr-blue) !important;
}

.x-small {
    font-size: 0.75rem;
    font-weight: 500;
}


/* --- LEADERBOARD SECTION (New Top 5) --- */

.leaderboard-section {
    background-color: #ffffff;
    padding-bottom: 80px;
}

/* Background Decoration */
.leaderboard-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(0, 45, 98, 0.04), transparent 60%);
    z-index: 0;
    pointer-events: none;
}

/* --- THE LEADER CARD --- */
.leader-card {
    background: white;
    border-radius: 20px;
    padding: 15px;
    /* Soft neumorphic-style shadow */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Ensure card is tall enough */
    min-height: 340px;
    display: flex;
    flex-direction: column;
}

.leader-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(206, 17, 38, 0.1);
    /* Red glow on hover */
}

/* 1. The Rank Number (Gradient Text) */
.rank-badge {
    font-size: 4rem;
    /* Big but contained */
    font-weight: 900;
    line-height: 1;
    position: absolute;
    top: -20px;
    left: 20px;
    z-index: 10;
    font-family: 'Inter', sans-serif;

    /* The "Liquid Metal" Gradient Effect */
    background: linear-gradient(135deg, var(--dr-blue) 30%, var(--dr-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;

    /* Subtle shadow to separate from background */
    filter: drop-shadow(2px 4px 6px rgba(255, 255, 255, 0.8));
}

/* 2. Image Area */
.card-image-box {
    height: 180px;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    margin-bottom: 15px;
    background: #f0f0f0;
}

.card-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.leader-card:hover .card-image-box img {
    transform: scale(1.05);
}

/* 3. Content Area */
.card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 5px;
}

.price-tag {
    font-weight: 800;
    color: var(--dr-blue);
    font-size: 1.1rem;
}

.spec-row {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-gray);
    font-weight: 600;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 8px;
}

/* --- SPECIAL RANKS (1, 2, 3) --- */

/* Gold Rank #1 */
.leader-card.rank-1 {
    border: 2px solid #ffd700;
    /* Gold Border */
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.15);
}

.rank-1 .rank-badge {
    background: linear-gradient(135deg, #ffd700 0%, #d4af37 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.crown-icon {
    position: absolute;
    top: -15px;
    right: -10px;
    background: #ffd700;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transform: rotate(15deg);
    z-index: 10;
}

/* Silver Rank #2 */
.leader-card.rank-2 {
    border-top: 4px solid #c0c0c0;
}

.rank-2 .rank-badge {
    background: linear-gradient(135deg, #c0c0c0 0%, #8a8a8a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Bronze Rank #3 */
.leader-card.rank-3 {
    border-top: 4px solid #cd7f32;
}

.rank-3 .rank-badge {
    background: linear-gradient(135deg, #cd7f32 0%, #8b4513 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navigation Buttons */
.leaderboard-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #eee;
    background: white;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}

.leaderboard-btn:hover {
    background: var(--dr-blue);
    color: white;
    border-color: var(--dr-blue);
}

/* --- HEADER AUTH & DROPDOWN STYLES --- */

/* Align buttons nicely in the navbar */
@media (min-width: 992px) {
    .navbar-nav {
        align-items: center;
    }
}

/* Premium Dropdown Animation & Styling */
.auth-dropdown {
    animation: fadeInDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    min-width: 240px;
}

@keyframes fadeInDown {
    0% {
        opacity: 0;
        transform: translateY(-15px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-dropdown .dropdown-item {
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.auth-dropdown .dropdown-item:hover {
    background-color: rgba(0, 45, 98, 0.05);
    /* Very light brand blue */
    color: var(--dr-blue);
    transform: translateX(5px);
    /* Slide effect */
}

.auth-dropdown .dropdown-item.text-danger:hover {
    background-color: rgba(206, 17, 38, 0.05);
    /* Very light brand red */
    color: var(--dr-red) !important;
}

/* Helper to align icons perfectly in dropdown */
.w-20px {
    width: 20px;
    display: inline-block;
}

/* Ensure mobile dropdown isn't constrained by navbar hidden overflow */
@media (max-width: 991px) {
    .auth-dropdown {
        background-color: #1a2a40;
        /* Darker blue for mobile inline menu */
    }

    .auth-dropdown .dropdown-item,
    .auth-dropdown .dropdown-item i {
        color: white !important;
    }

    .auth-dropdown .dropdown-item:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .auth-dropdown .bg-light {
        background-color: rgba(255, 255, 255, 0.1) !important;
        border-color: rgba(255, 255, 255, 0.1) !important;
    }

    .auth-dropdown .bg-light span {
        color: white !important;
    }

    .auth-dropdown .text-danger {
        color: #ff6b6b !important;
    }
}