﻿/* Home page */

.home-page {
    margin: 28px auto 40px;
    color: #edf2fb;
    overflow-wrap: anywhere;
}

.home-masthead {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 28px;
}

    .home-masthead h1 {
        margin: 0 0 8px;
        font-size: clamp(2rem, 5vw, 3.5rem);
        font-weight: 800;
        letter-spacing: -0.05em;
    }

    .home-masthead p {
        margin: 0;
        color: #a9b6c9;
    }

.home-gallery-link {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 44px;
    color: #b5caff;
    text-decoration: none;
    font-weight: 600;
}

    .home-gallery-link:hover {
        color: #fff;
    }

/* Main editorial cover */

.home-feature-layout {
    display: grid;
    gap: 18px;
}

    .home-feature-layout.has-supporting-photos {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    }

.home-cover {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-width: 0;
    min-height: 680px;
    padding: 180px 32px 32px;
    overflow: hidden;
    border: 1px solid #435b7e;
    border-radius: 24px;
    background: #152236;
}

.home-cover-image {
    position: absolute;
    inset: 0;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
}

.home-cover::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient( 180deg, rgb(5 10 18 / 20%) 0%, rgb(5 10 18 / 5%) 25%, rgb(5 10 18 / 65%) 55%, rgb(5 10 18 / 96%) 100% );
    content: "";
}

.home-cover-badge {
    position: absolute;
    top: 24px;
    left: 24px;
    padding: 10px 14px;
    border: 1px solid #7899ff;
    border-radius: 8px;
    background: #345cff;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.home-cover-content {
    max-width: 680px;
}

.home-cover-vehicle {
    margin-bottom: 22px;
    color: #c1d3ff;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
}

.home-cover h2 {
    margin: 0 0 22px;
    font-size: clamp(3.5rem, 7.5vw, 6.8rem);
}

.home-cover-nickname {
    margin: 0 0 8px;
    color: #fff;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.home-cover-introduction {
    max-width: 54ch;
    margin-bottom: 18px;
    color: #d2dceb;
    line-height: 1.65;
    white-space: pre-line;
}

.home-cover-owner {
    margin-bottom: 22px;
    color: #bdcbe0;
    font-size: 0.9rem;
}

    .home-cover-owner a {
        color: #fff;
        font-weight: 600;
        text-decoration: underline;
        text-underline-offset: 4px;
    }

        .home-cover-owner a:hover {
            color: #b5caff;
        }

.home-cover-cta {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 48px;
    padding: 12px 20px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: #345cff;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

    .home-cover-cta:hover {
        background: #4b70ff;
        color: #fff;
    }

/* Supporting photo tiles */

.home-supporting-photos {
    display: grid;
    grid-auto-rows: minmax(0, 1fr);
    gap: 18px;
    min-width: 0;
}

.home-photo-tile {
    position: relative;
    display: block;
    min-width: 0;
    min-height: 220px;
    overflow: hidden;
    border: 1px solid #354964;
    border-radius: 20px;
    background: #172232;
    color: #fff;
    text-decoration: none;
}

    .home-photo-tile > img {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .home-photo-tile > span {
        position: absolute;
        right: 0;
        bottom: 0;
        left: 0;
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 12px;
        padding: 50px 18px 18px;
        background: linear-gradient(transparent, rgb(5 10 18 / 90%));
        font-size: 0.9rem;
        font-weight: 600;
    }

    .home-photo-tile:hover {
        border-color: #8caaff;
        color: #fff;
    }

/* Community invitation */

.home-community-callout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    margin-top: 24px;
    padding: 28px;
    border: 1px solid #30415a;
    border-radius: 20px;
    background: #101927;
}

    .home-community-callout h2 {
        margin-bottom: 8px;
        font-size: 1.6rem;
        font-weight: 700;
    }

    .home-community-callout p {
        margin: 0;
        color: #a9b6c9;
    }

.home-feature-empty {
    padding: clamp(28px, 6vw, 64px);
    border: 1px solid #354964;
    border-radius: 24px;
    background: linear-gradient(140deg, #203452, #101927);
}

    .home-feature-empty h2 {
        max-width: 20ch;
        margin-bottom: 18px;
        font-size: clamp(2rem, 5vw, 3.5rem);
        font-weight: 750;
        letter-spacing: -0.04em;
    }

    .home-feature-empty p {
        max-width: 52ch;
        margin-bottom: 24px;
        color: #bdcbe0;
        line-height: 1.7;
    }

.home-page a:focus-visible {
    outline: 2px solid #a7bdff;
    outline-offset: 4px;
}

/* Tablet and mobile */

@media (max-width: 900px) {
    .home-feature-layout.has-supporting-photos {
        grid-template-columns: minmax(0, 1fr);
    }

    .home-supporting-photos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-auto-rows: auto;
    }

    .home-photo-tile {
        min-height: 0;
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 600px) {
    .home-masthead {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 20px;
    }

    .home-cover {
        min-height: 600px;
        padding: 220px 20px 24px;
        border-radius: 20px;
    }

    .home-cover-badge {
        top: 16px;
        left: 16px;
        padding: 9px 11px;
        font-size: 0.65rem;
    }

    .home-cover h2 {
        font-size: clamp(3rem, 13vw, 4.8rem);
    }

    .home-cover-vehicle {
        font-size: 0.75rem;
    }

    .home-cover-introduction {
        font-size: 0.9rem;
    }

    .home-supporting-photos {
        gap: 12px;
    }

    .home-photo-tile {
        border-radius: 14px;
    }

        .home-photo-tile > span {
            gap: 6px;
            padding: 30px 12px 12px;
            font-size: 0.75rem;
        }

    .home-community-callout {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
        padding: 22px;
    }
}

/* Feature management */

.home-feature-management-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: 12px;
    padding: 8px 14px;
    border: 1px solid #435d81;
    border-radius: 10px;
    color: #b5caff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

    .home-feature-management-link:hover {
        border-color: #8caaff;
        background: #20314a;
        color: #fff;
    }

.feature-management-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
}

    .feature-management-heading h1 {
        margin-bottom: 8px;
        font-size: clamp(2rem, 4vw, 2.7rem);
        font-weight: 750;
        letter-spacing: -0.04em;
    }

    .feature-management-heading p,
    .feature-schedule-help {
        color: #a9b6c9;
    }

.feature-management-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

    .feature-management-actions .btn,
    .feature-schedule-card .btn {
        min-height: 44px;
    }

.feature-schedule-help {
    margin-bottom: 24px;
    font-size: 0.85rem;
}

.feature-schedule {
    display: grid;
    gap: 18px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.feature-schedule-card {
    padding: 24px;
    border: 1px solid #354964;
    border-radius: 18px;
    background: #172232;
}

.feature-schedule-card-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 12px;
}

.feature-schedule-card h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
}

.feature-status {
    flex-shrink: 0;
    padding: 5px 10px;
    border: 1px solid #435878;
    border-radius: 999px;
    color: #b9c6db;
    font-size: 0.75rem;
}

    .feature-status[data-status="Live"] {
        border-color: #30836f;
        background: #123d34;
        color: #8ce5c8;
    }

    .feature-status[data-status="Scheduled"] {
        border-color: #536bba;
        background: #25345c;
        color: #bdceff;
    }

    .feature-status[data-status="Unavailable"] {
        border-color: #925064;
        background: #432634;
        color: #ffb0c0;
    }

.feature-schedule-vehicle {
    margin-bottom: 6px;
    color: #c5d6ee;
}

.feature-schedule-dates {
    margin-bottom: 18px;
    color: #a7bdff;
    font-size: 0.85rem;
}

.feature-schedule-introduction {
    margin-bottom: 20px;
    color: #b9c6db;
    white-space: pre-line;
}

.feature-schedule-empty {
    padding: 36px 24px;
    border: 1px dashed #435878;
    border-radius: 18px;
    text-align: center;
}

    .feature-schedule-empty h2 {
        font-size: 1.5rem;
    }

    .feature-schedule-empty p {
        margin-bottom: 0;
        color: #a9b6c9;
    }

#featureFormError {
    white-space: pre-line;
}

#featureFormModal .form-text {
    color: #a9b6c9;
}

#featureFormModal .modal-footer .btn {
    min-height: 44px;
    white-space: nowrap;
}

@media (max-width: 600px) {
    .feature-management-heading {
        flex-direction: column;
        gap: 16px;
    }

    .feature-schedule-card {
        padding: 18px;
    }

    .feature-schedule-card-heading {
        flex-direction: column;
        gap: 10px;
    }

    .feature-schedule-card h2 {
        font-size: 1.15rem;
    }
}

/* Headline styling: Magazine is the default */

.home-cover,
.feature-cover-preview,
.feature-story {
    --headline-primary: #ffffff;
    --headline-secondary: #101927;
    --headline-font: Impact, "Arial Narrow", sans-serif;
    --headline-slant: italic;
    --headline-weight: 900;
    --headline-line-height: 0.95;
    --headline-spacing: -0.025em;
    --headline-case: uppercase;
    --headline-shadow-offset: 5px;
}

    /* Bold */

    .home-cover[data-headline-style="1"],
    .feature-cover-preview[data-headline-style="1"],
    .feature-story[data-headline-style="1"] {
        --headline-font: Arial, Helvetica, sans-serif;
        --headline-slant: normal;
        --headline-weight: 900;
        --headline-line-height: 1;
        --headline-spacing: -0.05em;
        --headline-case: uppercase;
    }

    /* Editorial */

    .home-cover[data-headline-style="2"],
    .feature-cover-preview[data-headline-style="2"],
    .feature-story[data-headline-style="2"] {
        --headline-font: Georgia, "Times New Roman", serif;
        --headline-slant: normal;
        --headline-weight: 700;
        --headline-line-height: 1.05;
        --headline-spacing: -0.035em;
        --headline-case: none;
        --headline-shadow-offset: 3px;
    }

    /* Shared headline treatment */

    .home-cover h2,
    .feature-preview-headline,
    .feature-story-title {
        color: var(--headline-primary);
        font-family: var(--headline-font);
        font-style: var(--headline-slant);
        font-weight: var(--headline-weight);
        line-height: var(--headline-line-height);
        letter-spacing: var(--headline-spacing);
        text-transform: var(--headline-case);
        text-wrap: balance;
        -webkit-text-stroke: 0.6px #101927;
        text-shadow: 2px 2px 0 #101927, var(--headline-shadow-offset) var(--headline-shadow-offset) 0 var(--headline-secondary), 0 8px 24px rgb(0 0 0 / 60%);
    }

/* Supporting text stays neutral */

.home-cover-vehicle {
    color: #dce3ed;
}

.home-cover-nickname,
.home-cover-owner a {
    color: #fff;
}

.home-cover-introduction,
.home-cover-owner {
    color: #c6d0df;
}

    .home-cover-owner a:hover {
        color: #b5caff;
    }

/* Live headline preview */

.feature-cover-preview {
    min-width: 0;
    padding: 24px;
    overflow-wrap: anywhere;
    border: 1px solid #435878;
    border-radius: 16px;
    background: linear-gradient(135deg, #263447, #0b111c);
}

.feature-preview-accent {
    margin-bottom: 14px;
    color: #dce3ed;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.feature-preview-headline {
    margin: 0 0 18px;
    font-size: clamp(2rem, 5vw, 3rem);
}

.feature-preview-introduction {
    margin: 0;
    color: #c6d0df;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-line;
}

#featurePrimaryColour,
#featureSecondaryColour {
    height: 48px;
    cursor: pointer;
}

/* Car of the Week masthead */

.home-masthead .home-cover-title {
    margin: 0 0 12px;
    font-family: Impact, "Arial Narrow", sans-serif;
    font-size: clamp(2.6rem, 6vw, 5rem);
    font-style: italic;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.025em;
    text-transform: uppercase;
}

.home-cover-title span {
    color: #91b0ff;
}

.home-cover-title::after {
    display: block;
    width: 72px;
    height: 4px;
    margin-top: 14px;
    border-radius: 2px;
    background: #527aff;
    content: "";
}

.home-business-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid #30415a;
}

    .home-business-section .home-business-cover {
        min-height: 400px;
        margin-bottom: 0;
    }

.home-business-content {
    position: relative;
    z-index: 1;
    width: 100%;
    padding: 40px 32px;
}

.home-business-identity {
    display: flex;
    align-items: center;
    gap: 18px;
}

    .home-business-identity > div {
        min-width: 0;
    }

.home-business-name {
    margin: 8px 0;
    color: #fff;
    font-size: clamp(1.6rem, 4vw, 2.8rem);
    font-weight: 800;
    line-height: 1.15;
    overflow-wrap: anywhere;
    text-shadow: 0 2px 8px rgb(0 0 0 / 50%);
}

.home-business-location {
    margin: 0;
    color: #dce5f5;
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}

.home-business-description {
    display: -webkit-box;
    max-width: 65ch;
    margin: 20px 0 24px;
    overflow: hidden;
    color: #e0e8f5;
    font-size: 0.95rem;
    line-height: 1.7;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.home-business-directory-link {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    min-height: 44px;
    margin-top: 12px;
    color: #abc5ff;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
}

    .home-business-directory-link:hover {
        color: #fff;
    }

@media (max-width: 600px) {
    .home-business-content {
        padding: 28px 20px;
    }

    .home-business-identity {
        gap: 12px;
    }

    .home-business-section .home-cover-title {
        font-size: 2.4rem;
    }
}

.home-weekly-heading {
    margin-bottom: 22px;
}

    .home-weekly-heading h1 {
        margin: 10px 0 14px;
        color: #fff;
        font-family: Impact, "Arial Narrow", sans-serif;
        font-size: clamp(2rem, 5.5vw, 4.5rem);
        font-style: italic;
        font-weight: 900;
        line-height: 1;
        letter-spacing: -0.025em;
        text-transform: uppercase;
    }

        .home-weekly-heading h1::after {
            content: "";
            display: block;
            width: 72px;
            height: 4px;
            margin-top: 14px;
            border-radius: 2px;
            background: #527aff;
        }

        .home-weekly-heading h1 span {
            color: #a7bdff;
        }

    .home-weekly-heading p {
        margin: 0;
        color: #aebfd6;
        font-size: 0.9rem;
    }

.home-weekly-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.home-spotlight-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #354b6b;
    border-radius: 18px;
    background: #152232;
    color: #fff;
    text-decoration: none;
}

    .home-spotlight-card:hover {
        border-color: #9bbaff;
        color: #fff;
    }

    .home-spotlight-card:focus-visible {
        outline: 2px solid #a7bdff;
        outline-offset: 4px;
    }

.home-spotlight-image {
    position: relative;
    flex-shrink: 0;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #294878, #101927);
    overflow: hidden;
}

    .home-spotlight-image > img {
        position: absolute;
        inset: 0;
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.home-spotlight-label {
    position: absolute;
    top: 12px;
    right: 12px;
    left: 12px;
    width: fit-content;
    padding: 7px 10px;
    border: 1px solid #526fa4;
    border-radius: 8px;
    background: rgb(16 30 52 / 94%);
    color: #e1ebff;
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1.3;
}

.home-spotlight-logo {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: grid;
    place-items: center;
    width: 80px;
    height: 80px;
    padding: 0;
    overflow: hidden;
    border: 1px solid #94a9c7;
    border-radius: 12px;
    background: #101927;
}

    .home-spotlight-logo img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.home-spotlight-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 20px;
}

    .home-spotlight-body h2 {
        margin: 0 0 10px;
        color: #fff;
        font-size: 1.4rem;
        font-weight: 800;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

.home-spotlight-meta {
    color: #b7c7de;
    font-size: 0.85rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

    .home-spotlight-meta > span {
        display: block;
    }

        .home-spotlight-meta > span + span {
            margin-top: 5px;
        }

.home-spotlight-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 18px;
    color: #abc5ff;
    font-size: 0.85rem;
    font-weight: 800;
}

.home-business-search {
    margin-top: 24px;
    padding: 24px;
    border: 1px solid #354b6b;
    border-radius: 18px;
    background: #152232;
}

    .home-business-search h2 {
        margin: 0 0 18px;
        color: #fff;
        font-size: 1.25rem;
        font-weight: 800;
    }

.home-business-search-fields {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
}

    .home-business-search-fields > div {
        min-width: 0;
    }

    .home-business-search-fields label {
        display: block;
        margin-bottom: 6px;
        color: #c8d5e9;
        font-size: 0.75rem;
        font-weight: 700;
    }

    .home-business-search-fields .form-control,
    .home-business-search-fields .form-select,
    .home-business-search-fields > button {
        min-height: 46px;
    }

.home-admin-tools {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #30415a;
    color: #aebfd6;
    font-size: 0.85rem;
}

    .home-admin-tools summary {
        cursor: pointer;
    }

.home-admin-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

@media (max-width: 900px) {
    .home-business-search-fields {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .home-weekly-grid {
        gap: 12px;
    }

    .home-spotlight-card {
        border-radius: 14px;
    }

    .home-spotlight-image {
        aspect-ratio: 4 / 5;
    }

    .home-spotlight-label {
        top: 8px;
        right: 8px;
        left: 8px;
        padding: 6px 7px;
        font-size: 0.65rem;
    }

    .home-spotlight-logo {
        bottom: 8px;
        left: 8px;
        width: 64px;
        height: 64px;
        border-radius: 10px;
    }

    .home-spotlight-body {
        padding: 12px;
    }

        .home-spotlight-body h2 {
            font-size: 1rem;
        }

    .home-spotlight-meta {
        font-size: 0.72rem;
    }

    .home-spotlight-action {
        padding-top: 14px;
        font-size: 0.72rem;
    }

    .home-business-search {
        padding: 18px;
    }

    .home-business-search-fields > div,
    .home-business-search-fields > button {
        grid-column: 1 / -1;
    }
}

.home-service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.home-service-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 96px;
    padding: 12px 6px;
    border: 1px solid #2b3a50;
    border-radius: 12px;
    background: #101c2b;
    color: #9cacc3;
    text-align: center;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
}

    .home-service-link:hover {
        border-color: #587bff;
        background: #1b2d50;
        color: #fff;
    }

    .home-service-link:focus-visible {
        outline: 2px solid #a7bdff;
        outline-offset: 3px;
    }

.home-service-icon {
    width: 25px;
    height: 25px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-browse-businesses {
    display: inline-block;
    margin-top: 16px;
    color: #a7bdff;
    font-size: 0.85rem;
    font-weight: 600;
}

.home-weekly-heading .crew-heading-row h1,
.home-weekly-heading .garage-heading-top h1 {
    min-width: 0;
    margin: 0;
}

.home-weekly-heading .crew-heading-row {
    margin-bottom: 14px;
}

.garage-heading.home-weekly-heading {
    margin-bottom: 8px;
}