/* css/index.css */

/* UTILITY CLASSES */
.text-yellow {
    color: var(--primary-yellow);
}

.text-white {
    color: var(--text-light);
}

.text-gray {
    color: var(--text-gray);
}

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

.mt-30 {
    margin-top: 30px;
}

.mt-40 {
    margin-top: 40px;
}

.cta-wrapper {
    padding: 30px 0;
}

.btn-outline-dark {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--text-dark);
    color: var(--text-dark);
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline-dark:hover {
    background: var(--text-dark);
    color: var(--text-light);
}

.btn-outline-light {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--text-light);
    color: var(--text-light);
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 600;
    transition: var(--transition);
    background: transparent;
}

.btn-outline-light:hover {
    background: var(--text-light);
    color: var(--text-dark);
}

.btn-outline-dark-filled {
    display: inline-flex;
    align-items: center;
    background: var(--text-dark);
    color: var(--text-light);
    padding: 14px 28px;
    border-radius: 4px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline-dark-filled:hover {
    background: transparent;
    color: var(--text-dark);
    border: 1px solid var(--text-dark);
}

/* HERO SECTION */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    color: var(--text-light);
    overflow: hidden;
    /* Prevent 160% bg from causing horizontal scroll */
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 160%;
    height: 100%;
    z-index: -1;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-bg .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(17, 17, 17, 0.9) 0%, rgba(17, 17, 17, 0.4) 60%, rgba(17, 17, 17, 0.1) 100%);
}

.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding-top: 80px;
    /* Offset for navbar */
}

.hero-text {
    max-width: 600px;
}

.hero-text .subtitle {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.hero-text h1 {
    font-size: 54px;
    line-height: 1.1;
    margin-bottom: 30px;
}

.hero-text .description {
    font-size: 16px;
    color: #DDDDDD;
    margin-bottom: 40px;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

/* HERO CARDS */
.hero-cards {
    position: relative;
    width: 360px;
    height: 380px;
    margin-left: auto;
}

.location-card {
    position: absolute;
    background: #FFFFFF;
    border-radius: 6px;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    width: 220px;
    padding: 8px;
    /* Inner white border effect around image */
}

/* Card 1 (Bottom Left, Courgains) */
.location-card:not(.location-card-alt) {
    bottom: 0;
    left: 0;
    z-index: 1;
}

/* Card 2 (Top Right, Marolles) */
.location-card-alt {
    top: 0;
    left: 20vh;
    z-index: 2;
}

.location-card .card-img-wrapper {
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.location-card .card-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
}

.location-card .card-info {
    font-size: 14px;
    line-height: 1.4;
    padding: 0 6px 8px;
    text-align: left;
}

.location-card .card-info p {
    color: var(--text-dark);
    margin: 0;
}

/* VEHICLES PREVIEW */
.vehicles-preview {
    padding: 100px 0;
    background: var(--light-bg);
}

.vehicles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: start;
}

.vehicle-card {
    background: #FFFFFF;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.vehicle-card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-5px);
}

.vehicle-img-wrap {
    position: relative;
    height: 40vh;
    overflow: hidden;
}

.vehicle-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 4px;
    z-index: 10;
}

.badge.yellow {
    background: var(--primary-yellow);
    color: var(--text-dark);
}

/* CAROUSEL */
.vehicle-carousel {
    position: relative;
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.4s ease-in-out;
}

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

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-btn.prev {
    left: 10px;
}

.carousel-btn.next {
    right: 10px;
}

.carousel-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.indicator {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s;
}

.indicator.active {
    background: var(--primary-yellow);
}

.vehicle-body {
    padding: 20px;
}

.vehicle-body h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.vehicle-features {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-gray);
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.vehicle-feature-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.vehicle-feature-item img {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.vehicle-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vehicle-footer .price {
    font-size: 20px;
    font-weight: 800;
}

.vehicle-footer .details-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-gray);
}

.vehicle-footer .details-link:hover {
    color: var(--text-dark);
}

.vehicle-details-dropdown {
    position: relative;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out, margin-top 0.3s ease-in-out;
}

.vehicle-details-dropdown.expanded {
    max-height: 800px;
    margin-top: 15px;
    border-top: 1px dashed var(--border-color);
    padding-top: 15px;
}

.vehicle-details-list {
    list-style: none;
    font-size: 13px;
    color: var(--text-gray);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vehicle-details-list li {
    position: relative;
    padding-left: 15px;
}

.vehicle-details-list li::before {
    content: "•";
    color: var(--primary-yellow);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* SERVICES OVERVIEW */
.services-overview {
    padding: 100px 0;
    background: var(--dark-bg);
    color: var(--text-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.service-card {
    background: var(--darker-bg);
    padding: 30px 20px;
    border-radius: 12px;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.service-card:hover {
    border-color: var(--primary-yellow);
    transform: translateY(-5px);
}

.service-icon {
    font-size: 30px;
    margin-bottom: 20px;
    color: var(--primary-yellow);
}

.service-icon img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.service-card h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.service-card p {
    font-size: 14px;
    color: var(--text-gray);
}

/* STATS SECTION */
.stats {
    background: var(--primary-yellow);
    padding: 60px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 48px;
    font-weight: 800;
    color: var(--text-dark);
}

.stat-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

/* GARAGES SECTION */
.garages {
    padding: 100px 0;
    background: var(--light-bg);
}

.garages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.garage-detail-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.garage-detail-card h3 {
    font-size: 24px;
    margin-bottom: 30px;
}

.garage-info-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.garage-info-list li {
    display: flex;
    gap: 15px;
}

.garage-info-list .icon {
    font-size: 20px;
    color: var(--primary-yellow);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.garage-info-list .icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.info-label {
    font-size: 12px;
    color: var(--text-gray);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 5px;
    display: block;
}

.garage-info-list p {
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
}

/* FINAL CTA */
.final-cta {
    background: var(--primary-yellow);
    padding: 80px 0;
    color: var(--text-dark);
}

.final-cta h2 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 15px;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 100px 0 60px;
    }

    .hero-content {
        flex-direction: column;
        justify-content: center;
        text-align: center;
    }

    .hero-bg .overlay {
        background: rgba(17, 17, 17, 0.7);
    }

    .hero-actions {
        justify-content: center;
        margin-bottom: 50px;
    }

    .hero-cards {
        width: 360px;
        margin: auto;
    }

    .vehicles-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 20px;
        gap: 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .vehicles-grid::-webkit-scrollbar {
        display: none;
    }

    .vehicle-card {
        flex: 0 0 85%;
        scroll-snap-align: center;
    }

    .vehicle-features {
        margin-bottom: 10px;
        padding-bottom: 10px;
        font-size: 11px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {

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

    .garages-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .garage-detail-card {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero-text h1 {
        font-size: 32px;
    }

    .hero-text .description {
        font-size: 14px;
    }

    .hero-actions {
        flex-direction: column;
        gap: 15px;
        width: 100%;
        max-width: 300px;
        margin: 0 auto 40px auto;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .hero-cards {
        display: flex;
        flex-direction: column;
        align-items: center;
        height: auto;
        gap: 20px;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .location-card,
    .location-card-alt {
        position: static;
        width: 100%;
        max-width: 280px;
    }
}

/* DESKTOP > 1440px */
@media (min-width: 1440px) {
    .hero-text h1 {
        font-size: 64px;
    }

    .hero-text .description {
        font-size: 18px;
        max-width: 650px;
    }

    .hero-cards {
        width: 420px;
        height: 420px;
    }

    .location-card {
        width: 250px;
    }

    .location-card-alt {
        left: 24vh;
    }

    .vehicles-grid,
    .services-grid,
    .garages-grid,
    .stats-grid {
        gap: 40px;
    }
}