/* ==========================================================
   RIDENEST HOMEPAGE
   Premium vehicle rental marketplace
   Uses design tokens from site.css (--color-*, --font-*,
   --space-*, --radius-*, --shadow-*). No new token system.
========================================================== */

/* ==========================================================
   BASE
========================================================== */

.hero-section,
.search-wrapper,
.home-section,
.cta-banner {
    overflow-x: hidden;
}

.home-section {
    padding: 88px 0;
}

.home-section-muted {
    background: var(--color-surface-soft, #f1f5f9);
}

.section-header {
    max-width: 640px;
    margin-bottom: 36px;
}

.section-kicker {
    display: block;
    margin: 0 0 8px;
    color: var(--color-primary);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.section-header h2 {
    margin: 0;
    color: var(--color-text);
    font-family: var(--font-heading);
    font-size: clamp(1.85rem, 3vw, 2.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
}

.section-header > p:last-of-type {
    max-width: 580px;
    margin: 10px 0 0;
    color: var(--color-muted);
    font-size: 0.98rem;
    line-height: 1.65;
}

/* Section header stays left-aligned by default; testimonials centers it */
.testimonials-section .section-header {
    display: block;
    text-align: center;
}

.testimonials-section .section-header > p:last-of-type {
    margin-left: auto;
    margin-right: auto;
}


/* ==========================================================
   SCROLL REVEAL (matches JS .reveal-el / .is-visible toggle)
========================================================== */

.reveal-el {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 600ms ease, transform 600ms ease;
}

.reveal-el.is-visible {
    opacity: 1;
    transform: none;
}


/* ==========================================================
   HERO
========================================================== */

.hero-section {
    position: relative;
    padding: 64px 0 110px;
    background:
        radial-gradient(circle at 88% 8%, rgba(37, 99, 235, 0.12), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}

.hero-section::before {
    content: "";
    position: absolute;
    width: 480px;
    height: 480px;
    top: -260px;
    right: -140px;
    background: rgba(37, 99, 235, 0.05);
    border-radius: 50%;
    pointer-events: none;
}

/* Left column */
.hero-section .row > div:first-child {
    padding-top: 12px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 18px;
    padding: 7px 14px 7px 10px;
    background: var(--color-primary-soft);
    border-radius: var(--radius-full);
    color: var(--color-primary-hover);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.hero-title {
    max-width: 640px;
    margin: 0;
    color: var(--color-text);
    font-family: var(--font-heading);
    font-size: clamp(2.9rem, 4.6vw, 4.2rem);
    font-weight: 800;
    line-height: 1.03;
    letter-spacing: -0.03em;
}

.hero-title span {
    color: var(--color-primary);
}

.hero-description {
    max-width: 560px;
    margin: 22px 0 0;
    color: var(--color-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 30px;
}

.hero-buttons .btn {
    min-height: 52px;
    padding-inline: 24px;
    border-radius: var(--radius-md);
    font-weight: 700;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 30px;
    margin: 38px 0 0;
}

.hero-stats > div {
    position: relative;
}

.hero-stats > div + div::before {
    content: "";
    position: absolute;
    left: -16px;
    top: 50%;
    width: 1px;
    height: 32px;
    background: var(--color-border);
    transform: translateY(-50%);
}

.hero-stats dt {
    margin: 0;
    color: var(--color-text);
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
}

.hero-stats dd {
    margin: 7px 0 0;
    color: var(--color-muted);
    font-size: 0.76rem;
}

/* Right column */
.hero-image-frame {
    position: relative;
    overflow: hidden;
    min-height: 460px;
    border-radius: var(--radius-xl);
    background: var(--color-primary-soft);
    box-shadow: 0 35px 80px rgba(15, 23, 42, 0.18);
}

.hero-image-frame img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 460px;
    object-fit: cover;
}

.hero-floating-badge {
    position: absolute;
    left: 20px;
    bottom: 20px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.97);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(10px);
}

.hero-floating-badge > i {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    background: var(--color-success-soft);
    border-radius: 50%;
    color: var(--color-success);
    font-size: 1rem;
}

.hero-floating-badge-text {
    display: flex;
    flex-direction: column;
}

.hero-floating-badge-text strong {
    color: var(--color-text);
    font-size: 0.8rem;
    font-weight: 800;
}

.hero-floating-badge-text small {
    margin-top: 2px;
    color: var(--color-muted);
    font-size: 0.7rem;
}


/* ==========================================================
   SEARCH
========================================================== */

.search-wrapper {
    position: relative;
    z-index: 20;
    margin-top: -64px;
    padding-bottom: 4px;
}

.search-card {
    padding: 28px 30px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: 0 25px 65px rgba(15, 23, 42, 0.14);
}

.search-card-heading {
    margin-bottom: 20px;
}

.search-card-heading h2 {
    margin: 0;
    color: var(--color-text);
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.search-card-heading p {
    margin: 5px 0 0;
    color: var(--color-muted);
    font-size: 0.86rem;
}

.search-card .form-label {
    display: block;
    margin-bottom: 7px;
    color: var(--color-text-secondary);
    font-size: 0.76rem;
    font-weight: 700;
}

.search-card .form-select {
    height: 50px;
    padding: 0 14px;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
}

.search-card .form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-card button.btn-primary {
    height: 50px;
    padding-inline: 24px;
    border-radius: var(--radius-md);
    font-weight: 700;
    white-space: nowrap;
}


/* ==========================================================
   CATEGORIES
========================================================== */

.category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    padding: 24px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: transform var(--transition-base), border-color var(--transition-base), box-shadow var(--transition-base);
}

.category-card:hover {
    transform: translateY(-5px);
    border-color: #bfdbfe;
    box-shadow: var(--shadow-md);
}

.category-card > i:first-child {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    background: var(--color-primary-soft);
    border-radius: var(--radius-md);
    color: var(--color-primary);
    font-size: 1.2rem;
}

.category-card h3 {
    margin: 20px 0 6px;
    color: var(--color-text);
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
}

.category-card p {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.82rem;
    line-height: 1.55;
}

.category-card > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: auto;
    padding-top: 16px;
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 700;
}

.category-card > span i {
    font-size: 0.75rem;
    transition: transform var(--transition-base);
}

.category-card:hover > span i {
    transform: translateX(3px);
}


/* ==========================================================
   FEATURED VEHICLES
========================================================== */

.vehicle-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.vehicle-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.vehicle-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: var(--color-surface-soft);
}

.vehicle-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 450ms ease;
}

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

.vehicle-card-noimage {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--color-light);
    font-size: 0.82rem;
}

.availability {
    position: absolute;
    top: 13px;
    left: 13px;
    display: inline-flex;
    align-items: center;
    padding: 6px 11px;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 800;
    box-shadow: 0 5px 15px rgba(15, 23, 42, 0.1);
}

.availability.available {
    background: var(--color-success-soft);
    color: var(--color-success);
}

.vehicle-fav-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 50%;
    color: var(--color-text-secondary);
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(15, 23, 42, 0.12);
}

.vehicle-fav-btn.is-active {
    color: #e11d48;
}

.vehicle-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 20px;
}

.vehicle-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.vehicle-card-top h3 {
    margin: 0;
    color: var(--color-text);
    font-family: var(--font-heading);
    font-size: 1.12rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.vehicle-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    color: #b45309;
    font-size: 0.8rem;
    font-weight: 700;
}

.vehicle-rating i {
    color: #f59e0b;
}

.vehicle-location {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0 0;
    color: var(--color-muted);
    font-size: 0.8rem;
}

.vehicle-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.vehicle-specs span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 9px;
    background: var(--color-surface-soft);
    border-radius: var(--radius-sm);
    color: var(--color-text-secondary);
    font-size: 0.72rem;
}

.vehicle-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.vehicle-price {
    margin: 0;
    color: var(--color-text);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
}

.vehicle-price small {
    color: var(--color-muted);
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
}


/* ==========================================================
   DESTINATIONS
========================================================== */

.destination-card {
    position: relative;
    display: block;
    height: 320px;
    overflow: hidden;
    background: var(--color-border-dark);
    border-radius: var(--radius-lg);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
}

.destination-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 500ms ease;
}

.destination-card:hover .destination-image {
    transform: scale(1.06);
}

.destination-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.02) 30%, rgba(15, 23, 42, 0.82) 100%);
}

.destination-content {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 21px;
    z-index: 2;
}

.destination-content h3 {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.destination-content h3 i {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
}

.destination-content p {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.82rem;
}


/* ==========================================================
   WHY RIDENEST (dark trust section, targeted via #trust-section
   since that id already exists in home.html)
========================================================== */

#trust-section {
    background:
        radial-gradient(circle at 85% 15%, rgba(37, 99, 235, 0.16), transparent 32%),
        #0f172a;
    color: #ffffff;
}

#trust-section .section-kicker {
    color: #60a5fa;
}

#trust-section .section-header h2 {
    color: #ffffff;
}

#trust-section .section-header > p:last-of-type {
    color: #94a3b8;
}

.trust-card {
    height: 100%;
    padding: 26px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: var(--radius-lg);
    transition: background var(--transition-base);
}

.trust-card:hover {
    background: rgba(255, 255, 255, 0.06);
}

.trust-card > i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 22px;
    background: rgba(96, 165, 250, 0.14);
    border-radius: var(--radius-md);
    color: #60a5fa;
    font-size: 1.1rem;
}

.trust-card h3 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
}

.trust-card p {
    margin: 0;
    color: #94a3b8;
    font-size: 0.82rem;
    line-height: 1.65;
}


/* ==========================================================
   BOOKING REQUIREMENTS
========================================================== */

.requirements-card {
    height: 100%;
    padding: 24px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.requirements-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.requirements-card > i {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background: var(--color-primary-soft);
    border-radius: var(--radius-md);
    color: var(--color-primary);
    font-size: 1.1rem;
}

.requirements-card h4 {
    margin: 18px 0 8px;
    color: var(--color-text);
    font-size: 1rem;
    font-weight: 800;
}

.requirements-card p {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.82rem;
    line-height: 1.65;
}

.requirements-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    margin-top: 28px;
    padding: 28px 32px;
    background: var(--color-primary);
    border-radius: var(--radius-lg);
    color: #ffffff;
}

.requirements-banner-text h4 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #ffffff;
    font-size: 1.05rem;
    font-weight: 800;
}

.requirements-banner-text p {
    max-width: 560px;
    margin: 8px 0 0;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.86rem;
    line-height: 1.6;
}

.requirements-banner .btn-light {
    flex-shrink: 0;
    color: var(--color-primary-hover);
    font-weight: 700;
}


/* ==========================================================
   HOW RIDENEST WORKS
========================================================== */

.process-route {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 10px;
}

.process-route-line {
    position: absolute;
    top: 22px;
    left: 0;
    width: 100%;
    height: 40px;
    z-index: 0;
    pointer-events: none;
}

.process-step {
    position: relative;
    z-index: 1;
}

.process-step-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    background: var(--color-primary);
    border: 5px solid var(--color-primary-soft);
    border-radius: 50%;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 800;
}

.process-step-body i {
    display: block;
    margin-bottom: 12px;
    color: var(--color-primary);
    font-size: 1.3rem;
}

.process-step-body h3 {
    margin: 0 0 8px;
    color: var(--color-text);
    font-size: 1.1rem;
    font-weight: 800;
}

.process-step-body p {
    max-width: 280px;
    margin: 0;
    color: var(--color-muted);
    font-size: 0.86rem;
    line-height: 1.65;
}


/* ==========================================================
   TESTIMONIALS
========================================================== */

.testimonial-trust-badges {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.testimonial-trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    font-size: 0.78rem;
    font-weight: 700;
}

.testimonial-trust-badge i {
    color: var(--color-primary);
}

.testimonial-trust-badge .muted-slash {
    color: var(--color-muted);
    font-weight: 500;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.testimonial-card {
    display: flex;
    flex-direction: column;
    min-height: 220px;
    padding: 26px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

.testimonial-rating {
    display: flex;
    gap: 3px;
    margin-bottom: 15px;
    color: #f59e0b;
    font-size: 0.78rem;
}

.testimonial-card > p {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid var(--color-border);
}

.testimonial-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    background: var(--color-primary-soft);
    border-radius: 50%;
    color: var(--color-primary-hover);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
}

.testimonial-author strong {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--color-text);
    font-size: 0.84rem;
}

.testimonial-verified {
    color: var(--color-primary);
    font-size: 0.72rem;
}

.testimonial-author span {
    display: block;
    margin-top: 2px;
    color: var(--color-light);
    font-size: 0.72rem;
}


/* ==========================================================
   FINAL CTA
========================================================== */

.cta-banner {
    position: relative;
    margin: 20px 0 90px;
    padding: 72px 0;
    background: linear-gradient(135deg, var(--color-primary-hover), var(--color-primary));
    color: #ffffff;
}

.cta-banner::before {
    content: "";
    position: absolute;
    width: 380px;
    height: 380px;
    right: 8%;
    top: -220px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.cta-banner-inner {
    position: relative;
    z-index: 2;
    max-width: 680px;
}

.cta-banner h2 {
    margin: 0;
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: clamp(2rem, 3.6vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.cta-banner > .container > .cta-banner-inner > p {
    max-width: 540px;
    margin: 16px 0 26px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.98rem;
    line-height: 1.7;
}

.cta-banner .btn-light {
    min-height: 50px;
    padding-inline: 24px;
    color: var(--color-primary-hover);
    font-weight: 700;
}


/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 1199.98px) {

    .category-card {
        min-height: 180px;
    }
}

@media (max-width: 991.98px) {

    .home-section {
        padding: 68px 0;
    }

    .hero-section {
        padding: 48px 0 90px;
    }

    .hero-section .row > div:first-child {
        padding-top: 0;
        text-align: center;
    }

    .hero-title,
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

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

    .hero-stats {
        justify-content: center;
    }

    .hero-image-frame,
    .hero-image-frame img {
        min-height: 380px;
    }

    .hero-image-frame {
        margin-top: 36px;
    }

    .search-wrapper {
        margin-top: -40px;
    }

    .search-card .row > div:last-child {
        margin-top: 4px;
    }

    .destination-card {
        height: 280px;
    }

    .process-route {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .process-route-line {
        display: none;
    }

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

@media (max-width: 767.98px) {

    .home-section {
        padding: 54px 0;
    }

    .section-header {
        display: block;
    }

    .hero-title {
        font-size: 2.5rem;
    }

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

    .hero-stats {
        flex-wrap: wrap;
        row-gap: 18px;
    }

    .search-card {
        padding: 22px;
    }

    .category-card {
        min-height: 165px;
    }

    .vehicle-card-image {
        height: 200px;
    }

    .destination-card {
        height: 260px;
    }

    .requirements-banner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .requirements-banner .btn-light {
        width: 100%;
    }

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

    .cta-banner {
        padding: 52px 0;
        text-align: center;
    }

    .cta-banner-inner {
        margin-inline: auto;
    }

    .cta-banner > .container > .cta-banner-inner > p {
        margin-inline: auto;
    }
}

@media (max-width: 480px) {

    .hero-title {
        font-size: 2.15rem;
    }

    .hero-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .hero-stats > div + div::before {
        display: none;
    }

    .destination-card {
        height: 230px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .reveal-el {
        opacity: 1;
        transform: none;
        transition: none;
    }
}