/*
 * Free Market Automotives public/member theme layer
 * Base framework: StartBootstrap Modern Business (local copy)
 * Admin Site Styles inject the CSS variables used below.
 */

:root {
    --site-bg-color: #f3f5f8;
    --site-navbar-color: #1f2937;
    --site-card-color: #ffffff;
    --site-footer-color: #111827;
    --site-font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    --site-hero-bg-image: none;
}

.site-modern {
    --bs-body-font-family: var(--site-font-family);
    --bs-body-bg: var(--site-bg-color);
    --bs-body-color: #1f2937;
    --bs-link-color: var(--site-navbar-color);
    --bs-link-hover-color: #0f172a;
    background:
        radial-gradient(1200px 320px at 12% -10%, rgba(255, 255, 255, 0.35), transparent 62%),
        radial-gradient(1200px 320px at 88% -12%, rgba(0, 0, 0, 0.08), transparent 65%),
        var(--site-bg-color);
    color: var(--bs-body-color);
}

.site-modern .text-muted {
    color: #667085 !important;
}

.site-modern .site-navbar {
    background: linear-gradient(120deg, #111827, var(--site-navbar-color)) !important;
    box-shadow: 0 10px 24px rgba(3, 8, 20, 0.26);
    position: sticky;
    top: 0;
    z-index: 3000;
    overflow: visible;
}

.site-modern .site-navbar .container {
    overflow: visible;
}

.site-modern .navbar-brand {
    flex: 0 0 auto;
    margin-right: 0.65rem;
}

.site-modern .site-logo {
    display: block;
    width: auto;
    height: var(--site-logo-height-px, 52px);
    max-width: var(--site-logo-width-px, 280px);
    object-fit: contain;
}

.site-modern .site-top-nav {
    display: flex;
    align-items: center;
    list-style: none;
    margin-bottom: 0;
    padding-left: 0;
    gap: 0.2rem;
}

.site-modern .site-top-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600;
    font-size: 0.98rem;
    padding: 0.5rem 0.7rem;
    text-decoration: none;
    white-space: nowrap;
}

.site-modern .site-top-nav .nav-link:hover,
.site-modern .site-top-nav .nav-link:focus {
    color: #ffffff !important;
}

.site-modern .site-top-nav .btn {
    border-radius: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
}

.site-modern .site-top-nav .btn-outline-light {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.65);
}

.site-modern .site-top-nav .btn-outline-light:hover,
.site-modern .site-top-nav .btn-outline-light:focus {
    color: #0f172a;
    background: #fff;
    border-color: #fff;
}

.site-modern .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.6);
}

.site-modern .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.18);
}

.site-modern .dropdown-menu {
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: 0.7rem;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.24);
    padding: 0.35rem;
    min-width: 14rem;
    z-index: 4000;
}

.site-modern .dropdown-item {
    border-radius: 0.45rem;
    padding: 0.48rem 0.65rem;
    color: #1f2937;
}

.site-modern .dropdown-item:hover,
.site-modern .dropdown-item:focus,
.site-modern .dropdown-item:active {
    background: rgba(31, 41, 55, 0.1);
    color: #0f172a;
}

.site-modern .hero-shell {
    margin-top: 0.3rem;
}

.site-modern .home-main {
    --home-side-gap: clamp(12px, 2.2vw, 30px);
    overflow-x: hidden;
}

.site-modern .home-main > section,
.site-modern .home-main > .row,
.site-modern .home-main > .card {
    margin-bottom: 1rem;
}

.site-modern .home-main > section:not(.hero-shell),
.site-modern .home-main > .row,
.site-modern .home-main > .card {
    width: auto;
    margin-left: var(--home-side-gap);
    margin-right: var(--home-side-gap);
}

.site-modern .home-main .hero-shell {
    margin-top: 0;
    margin-bottom: 0.9rem;
    margin-left: 0;
    margin-right: 0;
}

.site-modern .home-main .hero-inner {
    border-radius: 0 !important;
    padding-left: clamp(16px, 4vw, 56px) !important;
    padding-right: clamp(16px, 4vw, 56px) !important;
    border: 0 !important;
}

.site-modern .home-main .hero-copy {
    max-width: min(1040px, 100%);
    margin: 0 auto;
    text-align: center;
}

.site-modern .home-main .hero-copy .lead {
    max-width: min(920px, 100%);
    margin-left: auto;
    margin-right: auto;
}

.site-modern .home-main .hero-copy .d-flex {
    justify-content: center;
}

.site-modern .home-main .hero-search-wrap {
    max-width: min(760px, 100%);
    margin: 0 auto;
}

.site-modern .home-main > section:not(.hero-shell) .card,
.site-modern .home-main > .row .card {
    border-radius: 0.9rem;
}

.site-modern .hero-inner {
    background-image:
        linear-gradient(120deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.76) 58%, rgba(51, 65, 85, 0.8)),
        var(--site-hero-bg-image),
        linear-gradient(120deg, #0f172a, #1e293b 58%, #334155);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.95rem !important;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.24);
}

.site-modern .hero-eyebrow {
    color: rgba(255, 255, 255, 0.7) !important;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 600;
}

.site-modern .hero-inner .display-6,
.site-modern .hero-inner .lead {
    color: #fff;
}

.site-modern .hero-search {
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 1.25rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
    background: var(--site-card-color);
}

.site-modern .page-hero-small {
    margin-top: 0.25rem;
}

.site-modern .page-hero-small__inner {
    background:
        linear-gradient(120deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.78) 58%, rgba(51, 65, 85, 0.8)),
        linear-gradient(120deg, #0f172a, #1e293b 58%, #334155);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.9rem;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.2);
    padding: clamp(16px, 3vw, 26px);
}

.site-modern .page-hero-small__eyebrow {
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.site-modern .page-hero-small__inner h1,
.site-modern .page-hero-small__desc {
    color: #fff;
}

.site-modern .page-content-card {
    border: 1px solid rgba(15, 23, 42, 0.11);
    border-radius: 0.9rem;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.1);
}

.site-modern .home-main .hero-search .card-body {
    padding: clamp(14px, 2vw, 24px);
}

.site-modern .browse-links-section {
    background: linear-gradient(120deg, #0f172a, #1e293b 58%, #334155);
    border-radius: 0.9rem;
    padding: 0.35rem 0.45rem;
}

.site-modern .browse-links-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.25rem;
}

.site-modern .browse-link-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-radius: 0.55rem;
    font-weight: 600;
    padding: 0.7rem 0.8rem;
    text-align: center;
    font-size: 1.02rem;
    line-height: 1.2;
    color: #ffffff;
    text-decoration: none;
    background: transparent;
    border: 0;
}

.site-modern .browse-link-inline:hover,
.site-modern .browse-link-inline:focus {
    color: #fff;
    text-decoration: underline;
    background: rgba(255, 255, 255, 0.08);
}

.site-modern .feature-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
}

.site-modern .feature-grid .feature-card {
    height: 100%;
}

.site-modern .find-next-section {
    background: linear-gradient(120deg, #0f172a, #1e293b 58%, #334155);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0.95rem;
    padding: 1.1rem;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.2);
}

.site-modern .find-next-section h2 {
    color: #fff;
}

.site-modern .find-next-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
}

.site-modern .find-next-card {
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.8rem;
    padding: 0.82rem;
    background: var(--site-card-color);
}

.site-modern .find-next-parent {
    display: inline-block;
    margin-bottom: 0.5rem;
    color: #0f172a;
    font-weight: 700;
    text-decoration: none;
}

.site-modern .find-next-parent:hover {
    text-decoration: underline;
}

.site-modern .find-next-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
}

.site-modern .find-next-link {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(15, 23, 42, 0.2);
    border-radius: 999px;
    padding: 0.25rem 0.56rem;
    font-size: 0.82rem;
    text-decoration: none;
    color: #1f2937;
    background: rgba(255, 255, 255, 0.86);
}

.site-modern .find-next-link:hover {
    background: rgba(255, 255, 255, 1);
}

.site-modern .card,
.site-modern .feature-card,
.site-modern .listing-card {
    background: var(--site-card-color) !important;
}

.site-modern .feature-card {
    border: 1px solid rgba(15, 23, 42, 0.11);
    border-radius: 0.9rem;
    box-shadow: 0 7px 16px rgba(15, 23, 42, 0.08);
}

.site-modern .feature-card h2 {
    font-weight: 700;
}

.site-modern .listing-card {
    border: 1px solid rgba(15, 23, 42, 0.11);
    border-radius: 0.9rem;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.1);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.site-modern .listing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
}

.site-modern .listing-thumb {
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.site-modern .article-image-frame {
    position: relative;
    overflow: hidden;
}

.site-modern .article-image-frame-preview::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    pointer-events: none;
}

.site-modern .article-preview-image {
    filter: blur(26px) saturate(0.28) brightness(0.68) contrast(0.86);
    transform: scale(1.14);
}

.site-modern .article-image-lock {
    position: absolute;
    left: 0.6rem;
    top: 0.6rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.22rem 0.52rem;
    font-size: 0.74rem;
    font-weight: 700;
    color: #fff;
    background: rgba(2, 6, 23, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.site-modern .article-preview-note {
    margin-top: 0.55rem;
    margin-bottom: 0;
    text-align: center;
    color: #dc2626;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.site-modern .step-block {
    background: var(--site-card-color);
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 0.82rem;
    padding: 0.8rem;
    height: 100%;
}

.site-modern .step-block span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.site-modern .how-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.site-modern .how-works-section {
    background: linear-gradient(120deg, #0f172a, #1e293b 58%, #334155) !important;
    border: 1px solid rgba(255, 255, 255, 0.14) !important;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.2) !important;
    border-radius: 0.95rem;
}

.site-modern .how-works-section .card-body > h2 {
    color: #fff;
}

.site-modern .site-footer {
    background: var(--site-footer-color);
    color: rgba(255, 255, 255, 0.88);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-modern .site-footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
    align-items: start;
}

.site-modern .site-footer-col {
    min-width: 0;
}

.site-modern .site-footer-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.site-modern .site-footer-logo {
    height: min(var(--site-logo-height-px, 52px), 60px);
    max-width: min(var(--site-logo-width-px, 280px), 300px);
    width: auto;
    object-fit: contain;
}

.site-modern .site-footer-title {
    margin: 0 0 0.55rem;
    color: #fff;
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.site-modern .site-footer-link-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem 0.9rem;
}

.site-modern .site-footer-link-list a {
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
}

.site-modern .site-footer-link-list a:hover,
.site-modern .site-footer-link-list a:focus {
    color: #fff;
    text-decoration: underline;
}

.site-modern .site-footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.site-modern .site-footer-copy {
    color: rgba(255, 255, 255, 0.72);
}

.site-modern .site-footer a {
    color: #fff;
    text-decoration: none;
}

.site-modern .site-footer a:hover {
    text-decoration: underline;
}

/* Keep member layout structure but align with the new theme */
.site-modern.member-modern .member-sidebar,
.site-modern.member-modern .member-sidebar-offcanvas {
    background: linear-gradient(180deg, #0f172a, var(--site-navbar-color) 70%, #1e293b) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.12) !important;
    color: rgba(255, 255, 255, 0.92);
}

.site-modern.member-modern .member-sidebar-offcanvas {
    --bs-offcanvas-width: min(84vw, 320px);
    z-index: 3006 !important;
}

.site-modern.member-modern .member-sidebar-offcanvas .offcanvas-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.site-modern.member-modern .member-mobile-topbar {
    position: sticky;
    top: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    padding: 0.55rem 0.75rem;
    background: linear-gradient(120deg, #111827, var(--site-navbar-color));
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.site-modern.member-modern .member-mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-color: rgba(255, 255, 255, 0.65);
    color: #fff;
}

.site-modern.member-modern .member-mobile-menu-btn:hover,
.site-modern.member-modern .member-mobile-menu-btn:focus {
    color: #0f172a;
    background: #fff;
    border-color: #fff;
}

.site-modern.member-modern .member-menu-icon {
    display: inline-block;
    font-size: 1.1rem;
    line-height: 1;
    font-weight: 700;
}

.site-modern.member-modern .member-mobile-logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.site-modern.member-modern .member-mobile-logo {
    display: block;
    width: auto;
    max-width: min(100%, var(--site-logo-width-px, 280px));
    height: min(var(--site-logo-height-px, 52px), 38px);
    object-fit: contain;
}

.site-modern.member-modern .member-panel-logo-link {
    display: inline-flex;
    margin-bottom: 0.75rem;
    text-decoration: none;
}

.site-modern.member-modern .member-panel-logo {
    display: block;
    width: auto;
    max-width: min(100%, var(--site-logo-width-px, 280px));
    height: min(var(--site-logo-height-px, 52px), 58px);
    object-fit: contain;
}

.site-modern.member-modern .member-sidebar h2,
.site-modern.member-modern .member-sidebar-offcanvas h2 {
    color: #fff;
    letter-spacing: 0.06em;
    margin-bottom: 0.25rem;
}

.site-modern.member-modern .member-sidebar p.small,
.site-modern.member-modern .member-sidebar-offcanvas p.small {
    color: rgba(255, 255, 255, 0.78);
}

.site-modern.member-modern .member-sidebar .nav-link,
.site-modern.member-modern .member-sidebar-offcanvas .nav-link {
    color: rgba(255, 255, 255, 0.92);
    font-weight: 600;
    border-radius: 0.45rem;
    padding: 0.35rem 0.45rem !important;
}

.site-modern.member-modern .member-sidebar .nav-link:hover,
.site-modern.member-modern .member-sidebar .nav-link:focus,
.site-modern.member-modern .member-sidebar-offcanvas .nav-link:hover,
.site-modern.member-modern .member-sidebar-offcanvas .nav-link:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.11);
}

.site-modern.member-modern .member-sidebar .nav-link.text-danger,
.site-modern.member-modern .member-sidebar-offcanvas .nav-link.text-danger {
    color: #fecaca !important;
}

.site-modern.member-modern .member-sidebar .nav-link.text-warning,
.site-modern.member-modern .member-sidebar-offcanvas .nav-link.text-warning {
    color: #fde68a !important;
}

.site-modern.member-modern .member-sidebar .nav-link i,
.site-modern.member-modern .member-sidebar-offcanvas .nav-link i {
    color: rgba(255, 255, 255, 0.86);
}

.site-modern.member-modern main {
    background: transparent;
}

.site-modern.member-modern .member-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.45);
    z-index: 3004;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.site-modern.member-modern .member-sidebar-backdrop.show {
    opacity: 1;
}

.site-modern.member-modern.member-drawer-open {
    overflow: hidden;
}

@media (max-width: 991.98px) {
    .site-modern .home-main {
        --home-side-gap: 12px;
    }

    .site-modern .home-main .hero-inner {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .site-modern .site-logo {
        height: min(var(--site-logo-height-px, 52px), 42px);
        max-width: min(var(--site-logo-width-px, 280px), 220px);
    }

    .site-modern .site-top-nav {
        align-items: stretch;
        gap: 0.2rem;
        padding-top: 0.5rem;
    }

    .site-modern .site-top-nav .nav-item {
        width: 100%;
    }

    .site-modern .site-top-nav .btn {
        width: 100%;
    }

    .site-modern .dropdown-menu {
        position: static;
        border-color: rgba(255, 255, 255, 0.24);
        background: rgba(15, 23, 42, 0.95);
    }

    .site-modern .dropdown-item {
        color: rgba(255, 255, 255, 0.92);
    }

    .site-modern .hero-inner {
        border-radius: 0.78rem !important;
    }

    .site-modern .site-footer-link-list {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) {
    .site-modern .browse-links-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .site-modern .feature-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .site-modern .how-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }
}

@media (min-width: 1200px) {
    .site-modern .browse-links-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .site-modern .site-footer-grid {
        grid-template-columns: 1fr 1.4fr 1fr;
        gap: 1.4rem;
    }

    .site-modern .how-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
