/* Navbar base */
.custom-nav {
    background-color: var(--color-brand-red);
    font-family: 'droid_sans', Arial, sans-serif;
    flex-shrink: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}
@media (max-width: 992px) {
    .navbar-collapse {
        padding: 0 !important;
    }
}

.navbar-toggler {
    border: none;
    box-shadow: none;
    padding: 0;
}
.navbar-toggler:focus {
    box-shadow: none;
}
.menu-text {
    font-size: 0.9rem;
    font-weight: 600;
}
@media (min-width: 992px) {
    .custom-nav .nav-item {
        margin-right: .25rem !important;
    }
}
@media (min-width: 1200px) {
    .custom-nav .nav-item {
        margin-right: 1.5rem !important;
    }
}
@media (min-width: 992px) {
    .menu-text, .navbar-toggler-icon {
        display: none;
    }
}
@media (max-width: 992px) {
    .custom-nav {
        position: relative;
    }
    .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1000;
        background-color: var(--color-brand-red);
        padding: 0.5rem 1rem;
    }
    .custom-nav .navbar-nav .nav-link {
        padding-left: 10px !important;
        padding-right:10px !important;
    }
}
@media (min-width: 992px) {
    .nav-form {
        margin-left: auto;
    }
}
.nav-form {
    margin-left: auto;
}
@media (max-width: 992px) {
    .nav-form {
        margin-left: 0;
    }
}
/* Nav links */
.custom-nav .navbar-nav .nav-link {
    color: var(--color-off-white);
    padding-top: .75rem !important;
    padding-bottom: .75rem !important;
}

/* Hover & focus */
.custom-nav .navbar-nav .nav-link:hover, .custom-nav .navbar-nav .nav-link:focus {
    color: var(--color-off-white);
    background-color: var(--color-dark-gray);
    padding-top: .75rem !important;
    padding-bottom: .75rem !important;
}
/* Active state */
.custom-nav .navbar-nav .nav-link.active, .custom-nav .navbar-nav .nav-link:active {
    color: var(--color-off-white);
    padding-top: .75rem !important;
    padding-bottom: .75rem !important;
}
/* Dropdown menu */
.custom-nav .dropdown-menu {
    background-color: var(--color-dark-gray);
    border: none;
    /* optional cleaner look */
    border-radius: 0;
    margin-top: 0 !important;
}
/* Dropdown items */
.custom-nav .dropdown-item {
    color: var(--color-off-white);
}
/* Dropdown hover/focus */
.custom-nav .dropdown-item:hover, .custom-nav .dropdown-item:focus {
    color: var(--color-off-white);
    background-color: var(--color-brand-red);
}
/* Optional: active dropdown item */
.custom-nav .dropdown-item.active, .custom-nav .dropdown-item:active {
    color: var(--color-off-white);
    background-color: var(--color-brand-red);
}
/* Toggler button border (optional to match light icon) */
.custom-nav .navbar-toggler {
    border-color: var(--color-off-white);
}
/* Toggler icon color */
.custom-nav .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,254,253,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.page-wrapper {
    display: flex;
    flex-direction: column;
}

.home-hero {
    height: 635px;
    flex: 1;
    overflow: hidden;
    padding-top: 100px;    
}
.home-hero-horse-trailer {
    background: var(--color-charcoal) url('https://media.equinemediaworld.com/horsetrailerworld/banners/hero/hero-desktop-horse-trailer.jpg') no-repeat center center;
    background-size: cover;
}

.home-hero-truck {
    background: var(--color-charcoal) url('https://media.equinemediaworld.com/horsetrailerworld/banners/hero/hero-desktop-truck.jpg') no-repeat center center;
    background-size: cover;
}

/* Swap the CTA buttons for each type of hero image */
.home-hero-horse-trailer .truck-cta {
    display: none;
}
.home-hero-truck .horse-trailer-cta {
    display: none;
}
.home-container {
    position: relative;
    height: 100%;
}

#hero-cta-image {
    position: absolute;
    bottom: 30px;
    left: 30px;
    width: 400px;
}

@media (max-width: 767px) {
    .home-hero {
        padding-top: 50px;
        padding-bottom: 30px;
        height: auto;
        min-height: 800px;
        overflow: visible;
    }
    .home-hero-horse-trailer {
        background: var(--color-charcoal) url('https://media.equinemediaworld.com/horsetrailerworld/banners/hero/hero-mobile-horse-trailer.jpg') no-repeat center top;
        background-size: cover;
    }
    .home-hero-truck {
        background: var(--color-charcoal) url('https://media.equinemediaworld.com/horsetrailerworld/banners/hero/hero-mobile-truck.jpg') no-repeat center top;
        background-size: cover;
    }
    .home-container {
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        min-height: 720px;
    }
    #hero-cta-image {
        position: absolute;
        top: 150px;
        left: 10px;
        width: 200px;
    }
}

/* Tabs */
.custom-tab-trailer {
    border-radius: 0px !important;
    border: 0 !important;
    background-color: var(--color-lightest-gray) !important;
    color: var(--color-charcoal);
    font-weight: 700;
    width: 50%;
}
.custom-tab-truck {
    border-radius: 0px !important;
    border: 0 !important;
    background-color: var(--color-charcoal) !important;
    color: var(--color-off-white) !important;
    font-weight: 700;
    width: 50%;
}
.custom-tabs .nav-link.active {
    padding-top: 0.9rem !important;
    padding-bottom: 0.5rem !important;
    margin-top: -0.4rem;
    /* pulls tab upward */
}
.custom-tabs .nav-link {
    padding-right: 5px;
    padding-left: 5px;
}
.home-search {
    width: 100%;
}
.custom-tabs {
    width: 100%;
}
.sign-in-dropdown .dropdown-item {
    color: var(--color-charcoal) !important;
    font-family: 'droid_sans', Arial, sans-serif !important;
    font-weight: 500;
}
.sign-in-dropdown li:not(:last-child) {
    border-bottom: 1px solid var(--color-charcoal) !important;
}
.sign-in-dropdown .dropdown-item:hover, .sign-in-dropdown .dropdown-item:focus {
    color: var(--color-brand-red) !important;
    background-color: var(--color-off-white) !important;
}
#homesearch .form-select, #homesearch-trucks .form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23000' d='M1.5 5l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    font-weight: bold;
}
#homesearch .form-control:focus, #homesearch-trucks .form-control:focus {
    color: var(--color-light-gray) !important;
}
#homesearch ::placeholder, #homesearch-trucks ::placeholder {
    color: var(--color-light-gray);
    opacity: 1;
}
#homesearch-submit, #homesearch-trucks-submit {
    border-radius: 2px;
}
#homesearch-trucks-submit:hover {
    border: 2px solid var(--color-brand-red);
    background-color: var(--color-light-gray);
    color: var(--color-charcoal);
}
#homesearch-submit:hover {
    border: 2px solid var(--color-brand-red);
    background-color: var(--color-charcoal);
    color: var(--color-off-white);
}

/* Listing cards */
.trailer-card-small {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.img-card {
    position: relative;
    display: inline-block;
    width: 100%;
}
.bookmark-icon {
    position: absolute;
    bottom: 8px;
    right: 8px;
    font-size: 16px;
    color: var(--color-white);
    cursor: pointer;
    line-height: 1;
}
.premium-image {
    border: 1px solid var(--color-light-gray);
    border-radius: 3px;
    aspect-ratio: 335/225;
    object-fit: cover;
    width: 100%;
}
.price-overlay {
    position: absolute;
    top: 10px;
    right: 0;
    background: var(--color-off-white);
    color: var(--color-black);
    padding: 6px 10px;
    font-weight: bold;
    font-size: 20px;
    border-radius: 3px;
}
@media (max-width: 992px) {
    .price-overlay {
        font-size: 16px;
    }
}
.home-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media (min-width: 768px) {
    .home-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Community */
.img-overlay {
    position: absolute;
    inset: 0;
    background: var(--color-overlay-dark-gray-50);
    z-index: 1;
    pointer-events: none;
}
/* text layer */
.img-text {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-white);
    font-weight: 700;
    text-align: center;
}
/* FAQ */
/* spacing + divider */
.faq-item {
    padding: .5rem 0;
    border-bottom: 1px solid var(--color-black);
}
/* button reset */
.faq-btn {
    width: 100%;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    text-align: left;
    color: var(--color-black);
}
/* caret animation */
.faq-btn i {
    transition: transform 0.2s ease;
}
/* rotate when open */
.faq-btn:not(.collapsed) i {
    transform: rotate(90deg);
}
/* body spacing */
.faq-body {
    margin-top: 0.75rem;
}
/* carousel */
.transition-slide {
    transition: transform 0.4s ease;
}
.slide-item {
    width: 100%;
    /* mobile: 1 per view */
}
.new-used-text, .city-text, .availability-text {
    font-size: 14px;
}
.price-text, .trailer-title-text {
    font-size: 14px;
    font-weight: 700;
}
.trailer-title-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sort-button {
    font-size: 14px;
}
@media (min-width: 992px) {
    .slide-item {
        width: 20%;
        /* desktop: 5 per view */
    }
    .new-used-text, .city-text, .availability-text, .availability-text-trailers {
        font-size: 18px !important;
    }
    .price-text, .trailer-title-text {
        font-size: 20px !important;
        font-weight: 700 !important;
    }
    .sort-button {
        font-size: 18px !important;
    }
    .new-used-text-trailers, .city-text-trailers {
        font-size: 16px !important;
    }
    .title-text-trailers {
        font-size: 18px !important;
        font-weight: 700 !important;
        line-height: 125% !important;
    }
    .social-text-links {
        font-weight: 700 !important;
    }
}
.btn-scroll-row {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    min-width: 0;
    /* prevents overflow beyond parent */
    max-width: 100%;
    /* clamps to parent width */
}
.btn-scroll-row::-webkit-scrollbar {
    display: none;
}
.new-used-text-trailers, .city-text-trailers, .availability-text-trailers {
    font-size: 10px;
}
.title-text-trailers {
    font-size: 12px;
    font-weight: bold;
    line-height: 125%;
    min-height: 50px;
}

/* Sidebar seller contact card */
.seller-contact-card {
    border: 2px solid var(--color-accent-blue);
    font-size: 16px;
}

.seller-contact-card .form-control {
    border: 1px solid var(--color-light-gray);
    font-size: 16px;
    padding: 0.35rem 0.5rem;
}

.seller-contact-card .seller-contact-message {
    min-height: 105px;
    resize: vertical;
}

.seller-contact-card .btn-red {
    font-size: 15px;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}

/* footer */
#footer {
    background-color: var(--color-charcoal);
    color: var(--color-white);
}

#footer .footer-logo img {
    max-width: 400px;
    height: auto;
}

/* Price range dual-handle slider */
.price-range-slider {
    position: relative;
    height: 2rem;
    margin-top: 0.25rem;
}

/* Shared track shown behind the two range inputs */
.price-range-slider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 4px;
    border-radius: 2px;
    background-color: var(--color-light-gray, #ced4da);
}

/* Both range inputs stack on top of each other so the handles overlap */
.price-range-slider__handle {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    margin: 0;
    height: 2rem;
    background: none;
    pointer-events: none; /* only the thumbs should capture clicks */
    -webkit-appearance: none;
    appearance: none;
}

.price-range-slider__handle:focus {
    outline: none;
}

/* Hide the native track; the shared ::before track is used instead */
.price-range-slider__handle::-webkit-slider-runnable-track {
    background: transparent;
    height: 4px;
}
.price-range-slider__handle::-moz-range-track {
    background: transparent;
    height: 4px;
}

/* Thumbs are interactive and sit above the track */
.price-range-slider__handle::-webkit-slider-thumb {
    pointer-events: auto;
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--color-brand-red, #c8102e);
    border: 2px solid #fff;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    margin-top: -7px;
}
.price-range-slider__handle::-moz-range-thumb {
    pointer-events: auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--color-brand-red, #c8102e);
    border: 2px solid #fff;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.4);
    cursor: pointer;
}

/* Pagination (search results, etc.) */
.pagination {
    --bs-pagination-color: var(--color-brand-red);
    --bs-pagination-hover-color: var(--color-brand-red);
    --bs-pagination-focus-color: var(--color-brand-red);
    --bs-pagination-active-color: var(--color-off-white);
    --bs-pagination-active-bg: var(--color-brand-red);
    --bs-pagination-active-border-color: var(--color-brand-red);
}
