/* ============================================================
   MAM - خدمات النقل وتجارة السيارات | Custom Styles
   Color Identity: Crimson Red + Charcoal Black + White
   ============================================================ */

:root {
    /* Primary: Deep Crimson (from logo) */
    --mam-red:        #9B1C1C;
    --mam-red-dark:   #6B1010;
    --mam-red-light:  #C0392B;
    --mam-red-soft:   rgba(155, 28, 28, 0.10);
    --mam-red-glow:   rgba(155, 28, 28, 0.25);

    /* Neutral: Charcoal (from logo text) */
    --mam-dark:       #1A1A1A;
    --mam-dark-mid:   #2D2D2D;
    --mam-dark-soft:  #3D3D3D;

    /* Accent: Off-White & Light Gray */
    --mam-white:      #FFFFFF;
    --mam-offwhite:   #F8F5F2;
    --mam-gray-light: #F0ECEC;
    --mam-gray-mid:   #E5E0E0;
    --mam-gray-text:  #6B6B6B;

    /* Legacy aliases (kept for backwards compatibility) */
    --mam-navy:       #1A1A1A;
    --mam-navy-dark:  #111111;
    --mam-navy-light: #2D2D2D;
    --mam-gold:       #9B1C1C;
    --mam-gold-dark:  #6B1010;
    --mam-gold-soft:  rgba(155, 28, 28, 0.10);
    --mam-blue:       #0369a1;

    /* Typography */
    --font-main: 'Cairo', sans-serif;

    /* Shadows */
    --shadow-sm:  0 2px 8px rgba(155,28,28,0.08);
    --shadow-md:  0 8px 24px rgba(155,28,28,0.12);
    --shadow-lg:  0 20px 48px rgba(155,28,28,0.18);
}

/* ============================================================
   BASE
   ============================================================ */
* { font-family: var(--font-main) !important; }
body {
    background-color: var(--mam-offwhite);
    color: var(--mam-dark);
    line-height: 1.7;
}

/* ============================================================
   COLOR UTILITIES
   ============================================================ */
.bg-mam-navy       { background-color: var(--mam-dark) !important; }
.bg-mam-navy-dark  { background-color: #111111 !important; }
.text-mam-navy     { color: var(--mam-dark) !important; }
.text-mam-gold     { color: var(--mam-red) !important; }
.bg-mam-gold-soft  { background-color: var(--mam-red-soft) !important; }
.border-mam-gold   { border-color: var(--mam-red) !important; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-mam-gold {
    background: linear-gradient(135deg, var(--mam-red) 0%, var(--mam-red-light) 100%);
    color: #fff; font-weight: 700; border: none;
    transition: all 0.25s ease;
}
.btn-mam-gold:hover {
    background: linear-gradient(135deg, var(--mam-red-dark) 0%, var(--mam-red) 100%);
    color: #fff; transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(155,28,28,0.35);
}
.btn-mam-navy {
    background-color: var(--mam-dark);
    color: #fff; font-weight: 700; border: none;
    transition: all 0.25s ease;
}
.btn-mam-navy:hover {
    background-color: var(--mam-dark-mid);
    color: #fff; transform: translateY(-1px);
}
.fw-black { font-weight: 900; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    background: linear-gradient(135deg, #111111 0%, var(--mam-dark) 100%) !important;
    border-bottom: 3px solid var(--mam-red) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4) !important;
}
.navbar-dark .nav-link {
    color: rgba(255,255,255,0.82) !important;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
    padding-bottom: 0.35rem;
}
.navbar-dark .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%; right: 50%;
    height: 2px;
    background: var(--mam-red);
    transition: all 0.25s ease;
    border-radius: 2px;
}
.navbar-dark .nav-link:hover::after,
.navbar-dark .nav-link.active::after { left: 0; right: 0; }
.navbar-dark .nav-link:hover,
.navbar-dark .nav-link.active { color: #fff !important; }
.logo-icon { width: 44px; height: 44px; }

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
    background: linear-gradient(145deg, #0D0D0D 0%, #1A0404 40%, #2A0808 70%, #1A0404 100%);
    min-height: 78vh;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -10%; right: -5%;
    width: 55%; height: 130%;
    background: linear-gradient(160deg, rgba(155,28,28,0.18) 0%, rgba(155,28,28,0.04) 60%, transparent 100%);
    transform: skewX(-8deg);
    pointer-events: none;
}
.hero-section::after {
    content: '';
    position: absolute; inset: 0;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(155,28,28,0.10) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(155,28,28,0.06) 0%, transparent 45%);
    pointer-events: none;
}
.hero-content { position: relative; z-index: 2; }
.hero-badge {
    background: rgba(155,28,28,0.18);
    color: #ff9090;
    border: 1px solid rgba(155,28,28,0.4);
    backdrop-filter: blur(8px);
}
.hero-stat {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.10);
    border-top: 2px solid var(--mam-red);
    transition: all 0.25s ease;
}
.hero-stat:hover {
    background: rgba(155,28,28,0.12);
    transform: translateY(-3px);
}

/* Hero Logo */
.hero-logo-wrap {
    position: relative;
    z-index: 2;
    animation: heroLogoFloat 4s ease-in-out infinite;
}
.hero-logo-img {
    width: 320px;
    max-width: 90%;
    border-radius: 24px;
    background: rgba(255,255,255,0.96);
    padding: 28px;
    box-shadow:
        0 0 0 1px rgba(155,28,28,0.25),
        0 0 40px rgba(155,28,28,0.30),
        0 24px 60px rgba(0,0,0,0.55);
    filter: drop-shadow(0 0 20px rgba(155,28,28,0.35));
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.hero-logo-img:hover {
    transform: scale(1.04);
    box-shadow:
        0 0 0 2px rgba(155,28,28,0.4),
        0 0 60px rgba(155,28,28,0.45),
        0 30px 70px rgba(0,0,0,0.6);
}
@keyframes heroLogoFloat {
    0%,100% { transform: translateY(0px);   }
    50%      { transform: translateY(-12px); }
}


/* ============================================================
   VEHICLE CARDS
   ============================================================ */
.card-vehicle {
    transition: all 0.32s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid var(--mam-gray-mid);
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow-sm);
}
.card-vehicle:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-lg);
    border-color: var(--mam-red);
}
.card-vehicle .card-img-top {
    height: 220px; object-fit: cover;
    transition: transform 0.45s ease;
}
.card-vehicle:hover .card-img-top { transform: scale(1.06); }
.card-img-wrapper { overflow: hidden; position: relative; }
.badge-reefer  { background-color: #0369a1 !important; }
.badge-featured {
    background: linear-gradient(135deg, var(--mam-red), var(--mam-red-light)) !important;
}
.price-tag { font-size: 1.35rem; font-weight: 900; color: var(--mam-red-dark); }

/* ============================================================
   CATEGORY CARDS
   ============================================================ */
.category-card {
    border-radius: 20px; overflow: hidden;
    transition: all 0.32s ease;
    cursor: pointer; border: none;
    box-shadow: var(--shadow-sm);
}
.category-card:hover { transform: translateY(-9px); box-shadow: var(--shadow-lg); }
.category-card .overlay {
    background: linear-gradient(0deg, rgba(26,4,4,0.92) 0%, rgba(26,4,4,0.25) 100%);
}
.category-card img { height: 200px; object-fit: cover; }

/* ============================================================
   SECTION TITLES
   ============================================================ */
.section-title { position: relative; }
.section-title::after {
    content: ''; display: block;
    width: 56px; height: 4px;
    background: linear-gradient(90deg, var(--mam-red), var(--mam-red-light));
    border-radius: 2px; margin: 8px 0 0;
}

/* ============================================================
   INSPECTION SCORE
   ============================================================ */
.score-circle {
    width: 80px; height: 80px; border-radius: 50%;
    border: 5px solid var(--mam-red);
    background: var(--mam-red-soft);
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 1.3rem; color: var(--mam-red-dark);
}

/* ============================================================
   SPEC TABLE
   ============================================================ */
.spec-row { border-bottom: 1px solid var(--mam-gray-light); padding: 10px 0; }
.spec-label { color: var(--mam-gray-text); font-size: 0.85rem; font-weight: 600; }
.spec-value { font-weight: 700; color: var(--mam-dark); }

/* ============================================================
   IMAGE GALLERY
   ============================================================ */
.img-thumb {
    cursor: pointer; border-radius: 10px; overflow: hidden;
    border: 3px solid transparent; transition: all 0.22s ease;
}
.img-thumb:hover, .img-thumb.active {
    border-color: var(--mam-red);
    transform: scale(1.05);
    box-shadow: 0 0 0 2px var(--mam-red-glow);
}
.main-image {
    border-radius: 16px; width: 100%;
    max-height: 450px; object-fit: cover;
    box-shadow: var(--shadow-md);
}

/* ============================================================
   SIDEBAR FILTERS
   ============================================================ */
.filter-card {
    background: #fff; border-radius: 16px;
    border: 1px solid var(--mam-gray-mid);
    box-shadow: var(--shadow-sm);
}
.filter-card .form-label { font-weight: 700; color: var(--mam-dark); }

/* ============================================================
   ADMIN PANEL
   ============================================================ */
.admin-sidebar {
    background: linear-gradient(180deg, #111111 0%, var(--mam-dark) 100%);
    border-left: 3px solid var(--mam-red);
    min-height: 100vh; width: 260px;
}
.admin-nav-link {
    color: rgba(255,255,255,0.72); padding: 10px 20px;
    border-radius: 8px; transition: all 0.2s;
    display: flex; align-items: center; gap: 10px; text-decoration: none;
}
.admin-nav-link:hover, .admin-nav-link.active {
    background: rgba(155,28,28,0.18); color: #ff9999;
}
.stat-card { border-radius: 16px; padding: 20px; border: none; }

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-card {
    background: #fff; border-radius: 20px;
    border: 1px solid var(--mam-gray-mid);
    box-shadow: var(--shadow-md);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.hover-gold:hover { color: var(--mam-red) !important; }
.text-truncate-2 {
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.rounded-xl  { border-radius: 16px !important; }
.rounded-2xl { border-radius: 20px !important; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-up { animation: fadeInUp 0.55s ease forwards; }

@keyframes pulse-gold {
    0%,100% { box-shadow: 0 0 0 0 rgba(155,28,28,0.4); }
    50%      { box-shadow: 0 0 0 14px rgba(155,28,28,0); }
}
.pulse-gold { animation: pulse-gold 2.2s infinite; }

/* ============================================================
   FOOTER
   ============================================================ */
footer.bg-mam-navy {
    background: linear-gradient(180deg, #111111 0%, #0D0D0D 100%) !important;
    border-top: 3px solid var(--mam-red);
}
footer h6.text-mam-gold { color: #e05555 !important; }
footer i.text-mam-gold  { color: #e05555 !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
    .hero-section { min-height: 65vh; }
}
@media (max-width: 768px) {
    .hero-section { min-height: 55vh; }
    .admin-sidebar { width: 100%; min-height: auto; border-left: none; border-bottom: 3px solid var(--mam-red); }
}
@media (max-width: 576px) {
    .hero-section { min-height: auto; padding: 3rem 0; }
}

/* ============================================================
   COMPARE FLOATING BAR
   ============================================================ */
.compare-bar {
    position: fixed; bottom: 20px; right: 50%; transform: translateX(50%);
    background: linear-gradient(135deg, var(--mam-dark), var(--mam-dark-mid));
    color: #fff; border-radius: 50px; padding: 12px 24px;
    border: 2px solid var(--mam-red);
    box-shadow: var(--shadow-lg);
    z-index: 1050; display: flex; align-items: center; gap: 12px;
    transition: all 0.3s ease;
}

/* ============================================================
   DROPDOWN MENU
   ============================================================ */
.dropdown-menu {
    border-radius: 14px;
    border: 1px solid var(--mam-gray-mid);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.dropdown-item { padding: 9px 18px; transition: background 0.15s; }
.dropdown-item:hover {
    background: var(--mam-red-soft);
    color: var(--mam-red-dark);
}

/* ============================================================
   FORM CONTROLS
   ============================================================ */
.form-control, .form-select {
    border-radius: 10px;
    border-color: var(--mam-gray-mid);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--mam-red);
    box-shadow: 0 0 0 3px var(--mam-red-soft);
    outline: none;
}