/* ================================================================
   FLEET.CSS — Fleets & Rates Page (3-Column Layout)
   Theme: Navy/Slate Blue (Screenshot match)
   Bootstrap 3.3.7 + jQuery
   ================================================================ */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    background: #151824; /* Dark Navy Base */
    color: #fff;
    overflow-x: hidden;
}

/* ---------- PAGE WRAPPER ---------- */
#fleet-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ================================================================
   HEADER
   ================================================================ */
#fleet-header {
    text-align: center;
    padding: 26px 20px 14px;
    position: relative;
    z-index: 20;
}

#fleet-header h1 {
    font-size: 34px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.service-area-label {
    font-size: 13px;
    color: #8a8a8a;
    margin-bottom: 8px;
}

.service-tabs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.service-tab {
    font-size: 13px;
    font-weight: 600;
    padding: 6px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    color: #a0a5b5;
}

.service-tab.active {
    background: #d4d4d4;
    color: #c00000;
}

/* ================================================================
   MAIN CONTENT AREA (FLEX 3 COLUMNS)
   ================================================================ */
#fleet-main {
    flex: 1;
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: 600px;
}

/* Diagonal Background Split */
#fleet-main::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #1c2030; /* Lighter Navy Split */
    clip-path: polygon(0 0, 48% 0, 36% 100%, 0 100%);
    z-index: 0;
}

#fleet-main-content {
    display: flex;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* ================================================================
   1. LEFT COLUMN — INFO PANEL
   ================================================================ */
#vehicle-info {
    width: 280px;
    flex-shrink: 0;
    padding: 30px 20px 30px 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* changed from space-between so it doesn't push to bottom */
}

/* Vehicle Name */
#vehicle-name {
    font-size: 24px;
    font-weight: 800;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    margin-bottom: 24px;
}

/* Features */
.vehicle-features {
    list-style: none;
    margin-bottom: 20px;
}

.vehicle-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: #e0e0e0;
    margin-bottom: 12px;
}

.feat-icon {
    color: #ffffff;
    font-size: 17px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.feat-small {
    font-size: 11.5px;
    color: #a0a5b5;
}

/* Rate Note & Description at bottom */
.info-bottom {
    margin-top: 30px;
}

#vehicle-rate-note {
    font-size: 14.5px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    line-height: 1.4;
}

#vehicle-rate-note .price-amount {
    color: #ffffff;
    font-size: 28px;
    font-weight: 800;
    margin-right: 4px;
}

#vehicle-rate-note .price-label {
    color: #a0a5b5;
    font-size: 13px;
    font-weight: 400;
}

#vehicle-description {
    font-size: 14.5px;
    color: #bbc1d1;
    line-height: 1.6;
}

#vehicle-description ul.list-group {
    list-style: none;
    padding: 0;
    margin: 0;
}

#vehicle-description ul.list-group li {
    font-size: 14.5px;
    color: #bbc1d1;
    padding: 4px 0;
    border: none;
    background: transparent;
}

#vehicle-description ul.list-group li .glyphicon {
    color: #ffffff;
    margin-right: 6px;
}

/* ================================================================
   2. CENTER COLUMN — IMAGE & THUMBNAILS
   ================================================================ */
#vehicle-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
}

#vehicle-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

#vehicle-main-img {
    max-width: 100%;
    max-height: 480px;
    object-fit: contain;
    filter: drop-shadow(0 18px 44px rgba(0,0,0,0.85));
    transition: opacity 0.3s ease;
    /* Soften edges to hide rectangular backgrounds / defects */
    -webkit-mask-image: radial-gradient(ellipse at center, black 65%, transparent 100%);
    mask-image: radial-gradient(ellipse at center, black 65%, transparent 100%);
}

/* Gallery Strip */
#gallery-wrap {
    margin-top: 20px;
    margin-bottom: 0px;
    padding: 0px 0 10px;
    display: flex;
    justify-content: center;
}

#gallery-thumbnails {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.thumb-img {
    width: 90px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: 0.65;
    transition: opacity 0.2s, border-color 0.2s, transform 0.2s;
}

.thumb-img:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.thumb-img.active {
    opacity: 1;
    border-color: #ffffff;
}

/* ================================================================
   3. RIGHT COLUMN — FLEET CARDS (2-column layout)
   ================================================================ */
#vehicle-rail {
    width: 380px;
    min-width: 320px;
    flex-shrink: 0;
    padding: 30px 20px 30px 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 14px;
    overflow-y: auto;
}

/* Custom rail scrollbar */
#vehicle-rail::-webkit-scrollbar { width: 5px; }
#vehicle-rail::-webkit-scrollbar-track { background: transparent; }
#vehicle-rail::-webkit-scrollbar-thumb { background: #4a526b; border-radius: 5px; }

/* 2 cards per row on desktop */
.vehicle-card {
    width: calc(50% - 7px);
    background: #2a3042;
    border: 1px solid #4a526b;
    border-radius: 6px;
    padding: 16px 12px 14px;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s, border-color 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.vehicle-card:hover:not(.active) {
    background: #353c52;
    transform: translateY(-3px);
}

/* ACTIVE (selected) card */
.vehicle-card.active {
    background: #434c67;
    border-color: #ffffff;
}

.vehicle-card-name {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 12px;
    line-height: 1.3;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
/* Tiny decorative line under title (matching screenshot) */
.vehicle-card-name::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 1px;
    background: #a0a5b5;
}

.vehicle-card img {
    width: 100%;
    max-width: 140px;
    height: 75px;
    object-fit: contain;
    border-radius: 4px;
    margin-top: 10px;
    filter: drop-shadow(0 6px 10px rgba(0,0,0,0.5));
}

.vehicle-card.active img {
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
}

/* Touch indicator */
.card-click-hint {
    margin-top: 8px;
    color: #8a91a6;
    font-size: 14px;
}

.vehicle-card.active .card-click-hint {
    color: #bbc1d1;
}

/* Get Quote Button inside Card */
.card-quote-btn {
    margin-top: auto; /* Push to bottom */
    background: #d4d4d4;
    color: #c00000;
    border: none;
    border-radius: 4px;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background 0.2s, transform 0.1s;
    width: 100%;
}

.card-quote-btn:hover {
    background: #e6e6e6;
    transform: scale(1.03);
}

/* ================================================================
   LOADING / ERROR
   ================================================================ */
#fleet-loader {
    text-align: center;
    padding: 100px 40px;
    color: #8a91a6;
    font-size: 16px;
    width: 100%;
    position: absolute;
    top: 0; left: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.spinner {
    width: 44px;
    height: 44px;
    border: 4px solid #2a3042;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ================================================================
   QUOTE MODAL
   ================================================================ */
#quoteModal .modal-dialog { max-width: 520px; margin: 40px auto; }
#quoteModal .modal-content { border-radius: 8px; border: none; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
#quoteModal .modal-header { background: #fff; border-bottom: 1px solid #e5e5e5; border-radius: 8px 8px 0 0; padding: 18px 24px; }
#quoteModal .modal-title { font-size: 18px; font-weight: 800; color: #151824; }
#quoteModal .close { font-size: 22px; color: #555; opacity: 1; }
#quoteModal .modal-body { padding: 20px 24px; background: #fff; color: #333; }

#quoteModal .form-group { margin-bottom: 15px; }
#quoteModal .form-group label { font-weight: 600; font-size: 13px; color: #333; margin-bottom: 5px; display: block; }
#quoteModal .form-control { height: 42px; border-radius: 5px; border: 1px solid #ccc; font-size: 14px; padding: 8px 12px; color: #111; }
#quoteModal .form-control:focus { border-color: #151824; box-shadow: 0 0 0 2px rgba(21,24,36,0.2); outline: none; }
#quoteModal textarea.form-control { height: auto; resize: vertical; }

#quoteModal .modal-footer { background: #fff; border-top: none; padding: 0 24px 24px; text-align: center; }
#btn-send-quote { background: #c00000; color: #fff; border: none; border-radius: 6px; padding: 12px 36px; font-size: 15px; font-weight: 700; cursor: pointer; transition: background 0.2s; }
#btn-send-quote:hover { background: #990000; }
#btn-send-quote:disabled { background: #888; cursor: not-allowed; }

#quote-success { display: none; text-align: center; padding: 40px 10px 20px; color: #2e7d32; }
#quote-success .glyphicon { font-size: 50px; display: block; margin-bottom: 16px; }
#quote-success h4 { font-weight: 800; margin-bottom: 8px; color: #111; }
#quote-success p { color: #555; font-size: 14px; }

/* ================================================================
   RESPONSIVE — TABLET (max 992px)
   ================================================================ */
@media (max-width: 992px) {
    #fleet-main-content {
        flex-wrap: wrap;
    }
    
    #vehicle-info {
        width: 35%;
        padding-right: 10px;
    }
    
    #vehicle-center {
        width: 65%;
    }
    
    #vehicle-rail {
        width: 100%;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 20px;
    }

    .vehicle-card {
        width: 200px;
        min-width: 200px;
        flex-shrink: 0;
    }

    #fleet-main::before {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
        background: #1c2030;
    }
}

/* ================================================================
   RESPONSIVE — MOBILE (max 768px)
   ================================================================ */
@media (max-width: 768px) {
    #fleet-header { padding: 16px 16px 10px; }
    #fleet-main-content { flex-direction: column; }
    
    #vehicle-info {
        width: 100%;
        padding: 20px 20px 0;
        text-align: center;
    }

    #vehicle-info .info-top, #vehicle-info .info-bottom { margin-top: 0; }
    .vehicle-features li { justify-content: center; }

    #vehicle-center {
        padding: 0 10px;
    }

    #vehicle-main-img {
        max-height: 240px;
    }

    #gallery-wrap {
        padding: 10px 0 20px;
    }

    .thumb-img {
        width: 70px;
        height: 48px;
    }

    .vehicle-card {
        width: 150px;
        min-width: 150px;
    }
}
