.directory-container {
    max-width: 1240px;
}

.directory-hero {
    min-height: 330px;
    display: flex;
    align-items: end;
    padding: 110px 1rem 62px;
    color: #fff;
    background:
        linear-gradient(90deg, rgb(0 0 0 / 82%), rgb(0 0 0 / 28%)),
        url("../assets/home/register-circuit.jpg") center 58% / cover no-repeat;
}

.directory-hero .container {
    max-width: 1240px;
}

.directory-eyebrow,
.filter-kicker,
.profile-kicker {
    margin: 0 0 .45rem;
    color: var(--mx-red);
    font-family: "DIN MX", Arial, sans-serif;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.directory-hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(2.4rem, 5vw, 4.5rem);
    line-height: .92;
}

.directory-hero p:last-child {
    max-width: 720px;
    margin: 1rem 0 0;
    font-size: 1.08rem;
    line-height: 1.55;
}

.filter-section {
    padding: 42px 1rem;
    background: #f2f2f2;
    border-bottom: 1px solid #ddd;
}

.circuit-filters h2,
.profile-section h2 {
    margin: 0;
    font-size: 1.75rem;
}

.circuit-filters .form-label {
    margin-bottom: .4rem;
    color: #252525;
    font-size: .8rem;
    font-weight: 700;
}

.circuit-filters .form-control,
.circuit-filters .form-select,
.sort-form .form-select {
    min-height: 48px;
    border-color: #c9c9c9;
    border-radius: 3px;
    box-shadow: none;
}

.circuit-filters .form-control:focus,
.circuit-filters .form-select:focus,
.sort-form .form-select:focus {
    border-color: var(--mx-red);
    box-shadow: 0 0 0 .2rem rgb(242 13 22 / 12%);
}

.clear-filters {
    color: #333;
    font-size: .85rem;
    font-weight: 700;
    text-underline-offset: 3px;
}

.filter-services {
    display: flex;
    align-items: center;
    margin-top: 22px;
    gap: 20px;
}

.filter-services > .form-label {
    margin: 0;
}

.service-checks {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    gap: 10px 22px;
}

.service-checks .form-check {
    margin: 0;
}

.form-check-input:checked {
    border-color: var(--mx-red);
    background-color: var(--mx-red);
}

.filter-submit {
    min-width: 190px;
}

.results-section {
    padding: 50px 1rem 80px;
}

.results-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    gap: 24px;
}

.results-count {
    margin: 0;
    font-family: "DIN MX", Arial, sans-serif;
    font-size: 1.45rem;
    text-transform: uppercase;
}

.results-count strong {
    color: var(--mx-red);
}

.results-context {
    margin: .2rem 0 0;
    color: #696969;
    font-size: .88rem;
}

.sort-form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sort-form label {
    white-space: nowrap;
    font-size: .8rem;
    font-weight: 700;
}

.sort-form .form-select {
    min-width: 175px;
}

.directory-card {
    display: block;
    height: 100%;
    overflow: hidden;
    color: var(--mx-ink);
    background: #fff;
    border: 1px solid #dedede;
    border-radius: 5px;
    text-decoration: none;
    transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}

.directory-card:hover {
    color: var(--mx-ink);
    border-color: #aaa;
    box-shadow: 0 12px 26px rgb(0 0 0 / 10%);
    transform: translateY(-3px);
}

.directory-card-media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #222;
}

.directory-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.directory-card:hover .directory-card-media img {
    transform: scale(1.035);
}

.directory-new {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 9px;
    color: #fff;
    background: var(--mx-red);
    border-radius: 2px;
    font-family: "DIN MX", Arial, sans-serif;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.directory-card-body {
    display: flex;
    min-height: 176px;
    flex-direction: column;
    padding: 18px;
}

.directory-location {
    color: var(--mx-red);
    font-size: .74rem;
    font-weight: 700;
    text-transform: uppercase;
}

.directory-name {
    margin: .35rem 0;
    font-family: "DIN MX", Arial, sans-serif;
    font-size: 1.35rem;
    line-height: 1.05;
    text-transform: uppercase;
}

.directory-types {
    color: #666;
    font-size: .83rem;
}

.directory-meta {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 20px;
    color: #555;
    border-top: 1px solid #ececec;
    font-size: .78rem;
    font-weight: 700;
}

.directory-meta > span:last-child {
    color: #171717;
    text-transform: uppercase;
}

.rating {
    color: #b20b12;
}

.rating small {
    color: #777;
}

.directory-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 45px;
    gap: 6px;
}

.directory-pagination a,
.directory-pagination span {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    color: #222;
    border: 1px solid #d6d6d6;
    border-radius: 3px;
    font-weight: 700;
    text-decoration: none;
}

.directory-pagination a:hover,
.directory-pagination a.active {
    color: #fff;
    background: var(--mx-red);
    border-color: var(--mx-red);
}

.directory-pagination .disabled {
    pointer-events: none;
    opacity: .35;
}

.directory-pagination span {
    border-color: transparent;
}

.empty-results {
    padding: 80px 1rem;
    text-align: center;
}

.empty-results h2 {
    font-size: 2rem;
}

.empty-results p {
    margin-bottom: 1.5rem;
    color: #666;
}

.profile-hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: end;
    color: #fff;
    background: var(--profile-image) center / cover no-repeat;
}

.profile-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgb(0 0 0 / 18%) 20%, rgb(0 0 0 / 88%) 100%);
}

.profile-hero-content {
    position: relative;
    z-index: 1;
    max-width: 1240px;
    padding: 115px 1rem 55px;
}

.profile-breadcrumb {
    display: flex;
    margin-bottom: 42px;
    gap: 8px;
    font-size: .8rem;
}

.profile-breadcrumb a {
    color: #fff;
    text-decoration: none;
}

.profile-breadcrumb a:hover {
    color: var(--mx-red);
}

.profile-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 30px;
}

.profile-heading p {
    margin: 0 0 .4rem;
    color: #fff;
    font-size: .88rem;
    font-weight: 700;
    text-transform: uppercase;
}

.profile-heading h1 {
    max-width: 850px;
    margin: 0;
    font-size: clamp(2.5rem, 5vw, 5rem);
    line-height: .9;
}

.profile-types {
    margin-top: .8rem;
    color: #ddd;
    font-size: .92rem;
}

.profile-rating {
    min-width: 140px;
    padding: 14px 16px;
    text-align: center;
    background: rgb(0 0 0 / 64%);
    border: 1px solid rgb(255 255 255 / 28%);
    border-radius: 4px;
}

.profile-rating strong,
.profile-rating span {
    display: block;
}

.profile-rating strong {
    color: #fff;
    font-size: 1.65rem;
}

.profile-rating span {
    margin-top: 2px;
    color: #ddd;
    font-size: .72rem;
}

.profile-content {
    padding: 68px 1rem 85px;
}

.profile-section {
    margin-bottom: 64px;
}

.profile-section:last-child {
    margin-bottom: 0;
}

.profile-description {
    margin-top: 20px;
    color: #444;
    font-size: 1.02rem;
    line-height: 1.75;
}

.profile-video,
.profile-map {
    margin-top: 22px;
    overflow: hidden;
    border-radius: 5px;
}

.profile-map {
    height: 430px;
    background: #e2e2e2;
}

.map-address {
    margin: 12px 0 0;
    color: #555;
}

.directions-link {
    display: inline-block;
    margin-top: 14px;
    color: #171717;
    font-weight: 700;
    text-underline-offset: 3px;
}

.booking-list {
    margin-top: 22px;
    border-top: 1px solid #ddd;
}

.booking-row {
    display: grid;
    grid-template-columns: 110px 1fr auto;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid #ddd;
    gap: 22px;
}

.booking-row time {
    display: flex;
    align-items: center;
    gap: 9px;
}

.booking-row time strong {
    color: var(--mx-red);
    font-family: "DIN MX", Arial, sans-serif;
    font-size: 2rem;
}

.booking-row time span,
.booking-row > div span {
    display: block;
    color: #777;
    font-size: .76rem;
}

.profile-sidebar {
    position: sticky;
    top: 24px;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.circuit-logo {
    display: grid;
    min-height: 190px;
    padding: 25px;
    place-items: center;
    background: #f3f3f3;
}

.circuit-logo img {
    max-width: 220px;
    max-height: 150px;
    object-fit: contain;
}

.sidebar-section {
    padding: 26px;
    border-top: 1px solid #ddd;
}

.sidebar-section h2 {
    margin: 0 0 20px;
    font-size: 1.35rem;
}

.detail-list {
    margin: 0;
}

.detail-list > div {
    display: grid;
    grid-template-columns: 105px 1fr;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    gap: 12px;
}

.detail-list > div:last-child {
    border-bottom: 0;
}

.detail-list dt {
    color: #777;
    font-size: .76rem;
    text-transform: uppercase;
}

.detail-list dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    font-size: .9rem;
}

.detail-list a {
    color: #171717;
}

.sidebar-section .btn {
    margin-top: 22px;
}

.rating-breakdown {
    max-width: 650px;
    margin-top: 22px;
}

.rating-row {
    display: grid;
    grid-template-columns: 125px 1fr 36px;
    align-items: center;
    margin-bottom: 14px;
    gap: 14px;
    font-size: .88rem;
}

.rating-track {
    height: 8px;
    overflow: hidden;
    background: #e5e5e5;
    border-radius: 2px;
}

.rating-track span {
    display: block;
    height: 100%;
    background: var(--mx-red);
}

@media (max-width: 991.98px) {
    .filter-services {
        align-items: start;
        flex-wrap: wrap;
    }

    .filter-services > .form-label {
        width: 100%;
    }

    .filter-submit {
        width: 100%;
    }

    .profile-sidebar {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .directory-hero {
        min-height: 300px;
        padding-top: 95px;
        padding-bottom: 42px;
        background-position: 62% center;
    }

    .directory-hero h1 {
        font-size: 2.55rem;
    }

    .directory-hero p:last-child {
        font-size: .95rem;
    }

    .filter-section,
    .results-section,
    .profile-content {
        padding-right: .75rem;
        padding-left: .75rem;
    }

    .service-checks {
        display: grid;
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .results-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .sort-form {
        justify-content: space-between;
    }

    .sort-form .form-select {
        min-width: 0;
        flex: 1;
    }

    .directory-card-body {
        min-height: 165px;
    }

    .profile-hero {
        min-height: 460px;
    }

    .profile-hero-content {
        padding-bottom: 36px;
    }

    .profile-breadcrumb {
        margin-bottom: 70px;
    }

    .profile-heading {
        align-items: start;
        flex-direction: column;
    }

    .profile-heading h1 {
        font-size: 2.7rem;
    }

    .profile-rating {
        min-width: 0;
        text-align: left;
    }

    .profile-rating strong,
    .profile-rating span {
        display: inline;
    }

    .profile-rating span {
        margin-left: 7px;
    }

    .booking-row {
        grid-template-columns: 90px 1fr;
    }

    .booking-row .btn {
        grid-column: 1 / -1;
    }

    .profile-map {
        height: 350px;
    }
}
