/* ====== kmsauto2020 dimension override ====== */

/* Make main article visible from the start, not hidden */
#main > article {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    height: auto !important;
    overflow: visible !important;
    padding: 3.5em 3em !important;
    max-width: none !important;
    width: auto !important;
    background-color: rgba(27, 31, 34, 0.85);
    transform: none !important;
    position: relative !important;
    z-index: 1 !important;
}

/* On inner pages, allow the wrapper to scroll naturally instead of fixed viewport centering. */
body.page-service #wrapper,
body.page-page #wrapper,
body.page-article #wrapper,
body.page-blog-index #wrapper {
    justify-content: flex-start !important;
    min-height: 100vh;
    height: auto !important;
    padding: 3em 1em !important;
}
body.page-service,
body.page-page,
body.page-article,
body.page-blog-index {
    overflow-y: auto !important;
}

/* Wider content on inner pages */
#main.main-service > article,
#main.main-page > article,
#main.main-article > article {
    max-width: 62em !important;
    width: 90vw !important;
}
#main.main-blog-index > article {
    max-width: 80em !important;
    width: 92vw !important;
}
#main.main-landing > article {
    max-width: 48em !important;
    width: 90vw !important;
}

/* Header nav — highlight active */
#header nav ul li.active a {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.5);
}

/* ============ WRAPPER: allow inner pages to flow top-to-bottom ============ */
body.page-service #wrapper > *,
body.page-page #wrapper > *,
body.page-article #wrapper > *,
body.page-blog-index #wrapper > * {
    flex: 0 0 auto !important;
}
body.page-service #wrapper,
body.page-page #wrapper,
body.page-article #wrapper,
body.page-blog-index #wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    padding: 2em 1.5em !important;
    min-height: 100vh;
    height: auto !important;
}
body.page-service #main,
body.page-page #main,
body.page-article #main,
body.page-blog-index #main {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: none;
}
body.page-service #main > article,
body.page-page #main > article,
body.page-article #main > article,
body.page-blog-index #main > article {
    width: 100%;
    max-width: 60em;
    box-sizing: border-box;
}
body.page-blog-index #main > article {
    max-width: 80em !important;
}

/* ============ COMPACT HEADER on inner pages ============ */
/* Dimension's default: huge circle logo + centered h1 + column layout.
   For content pages we want a slim horizontal strip: brand-link | nav. */

body.page-service #header,
body.page-page #header,
body.page-article #header,
body.page-blog-index #header {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1.5em;
    padding: 1em 2em !important;
    background-color: rgba(27, 31, 34, 0.9);
    border-radius: 6px;
    margin-bottom: 2em;
    width: 100%;
    max-width: 80em;
    align-self: center;
    flex: 0 0 auto !important;
}

/* Kill the huge logo circle on inner pages, show only the car icon */
body.page-service #header .logo,
body.page-page #header .logo,
body.page-article #header .logo,
body.page-blog-index #header .logo {
    width: auto !important;
    height: auto !important;
    line-height: 1 !important;
    border: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    background: none !important;
    border-radius: 0 !important;
}
body.page-service #header .logo .icon,
body.page-page #header .logo .icon,
body.page-article #header .logo .icon,
body.page-blog-index #header .logo .icon {
    font-size: 1.5em !important;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1 !important;
}

/* Brand text — inline, small */
body.page-service #header .content,
body.page-page #header .content,
body.page-article #header .content,
body.page-blog-index #header .content {
    border: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    flex: 0 0 auto !important;
}
body.page-service #header .content .inner,
body.page-page #header .content .inner,
body.page-article #header .content .inner,
body.page-blog-index #header .content .inner {
    padding: 0 !important;
    margin: 0 !important;
}
body.page-service #header .content h1,
body.page-page #header .content h1,
body.page-article #header .content h1,
body.page-blog-index #header .content h1 {
    font-size: 1em !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    letter-spacing: 0.2em !important;
    line-height: 1 !important;
}
body.page-service #header .content h1 a,
body.page-page #header .content h1 a,
body.page-article #header .content h1 a,
body.page-blog-index #header .content h1 a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-bottom: 0 !important;
}

/* Nav — inline row */
body.page-service #header nav,
body.page-page #header nav,
body.page-article #header nav,
body.page-blog-index #header nav {
    border: 0 !important;
    padding: 0 !important;
    margin: 0 0 0 auto !important;
    flex: 0 0 auto !important;
}
body.page-service #header nav ul,
body.page-page #header nav ul,
body.page-article #header nav ul,
body.page-blog-index #header nav ul {
    display: flex !important;
    gap: 1.2em;
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}
body.page-service #header nav ul li,
body.page-page #header nav ul li,
body.page-article #header nav ul li,
body.page-blog-index #header nav ul li {
    padding: 0 !important;
    border: 0 !important;
}
body.page-service #header nav ul li a,
body.page-page #header nav ul li a,
body.page-article #header nav ul li a,
body.page-blog-index #header nav ul li a {
    font-size: 0.75em !important;
    letter-spacing: 0.2em;
    padding: 0.4em 0 !important;
    color: rgba(255, 255, 255, 0.7);
    border-bottom: 2px solid transparent !important;
    text-decoration: none;
}
body.page-service #header nav ul li a:hover,
body.page-page #header nav ul li a:hover,
body.page-article #header nav ul li a:hover,
body.page-blog-index #header nav ul li a:hover {
    color: #fff !important;
    border-bottom-color: rgba(255, 255, 255, 0.4) !important;
}
body.page-service #header nav ul li.active a,
body.page-page #header nav ul li.active a,
body.page-article #header nav ul li.active a,
body.page-blog-index #header nav ul li.active a {
    color: #fff !important;
    border-bottom-color: #fff !important;
}

/* Neutralize dimension's "middle" gap on inner pages — nav should be a plain row */
body.page-service #header nav.use-middle .is-middle,
body.page-page #header nav.use-middle .is-middle,
body.page-article #header nav.use-middle .is-middle,
body.page-blog-index #header nav.use-middle .is-middle {
    margin: 0 !important;
    padding: 0 !important;
}
body.page-service #header nav.use-middle,
body.page-page #header nav.use-middle,
body.page-article #header nav.use-middle,
body.page-blog-index #header nav.use-middle {
    margin-left: auto !important;
    margin-right: 0 !important;
}

body.page-service #main,
body.page-page #main,
body.page-article #main,
body.page-blog-index #main {
    padding-top: 0 !important;
    padding-bottom: 2em;
}

/* ============ ARTICLE TITLE — no more overflow ============ */
#main .page-article h1.major {
    font-size: 2em !important;
    line-height: 1.15;
    padding: 0.4em 0.8em 0.3em !important;
    display: inline-block !important;
    max-width: 100%;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}
@media (max-width: 736px) {
    #main .page-article h1.major {
        font-size: 1.5em !important;
        padding: 0.3em 0.6em !important;
    }
}

/* Footer stays at bottom of the wrapper on inner pages */
body.page-service #footer,
body.page-page #footer,
body.page-article #footer,
body.page-blog-index #footer {
    margin: 3em auto 0;
    padding: 1em 2em;
    max-width: 80em;
    align-self: center;
    width: 100%;
    box-sizing: border-box;
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.75em;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 1.5em;
}
.breadcrumbs a {
    color: rgba(255, 255, 255, 0.7);
    border-bottom-color: rgba(255, 255, 255, 0.2);
}
.breadcrumbs span {
    margin: 0 0.4em;
    color: rgba(255, 255, 255, 0.4);
}

/* Landing: services grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5em;
    margin: 2.5em 0 1em;
}
@media (max-width: 736px) {
    .services-grid { grid-template-columns: 1fr; }
}
.service-card {
    display: block;
    padding: 1.5em 1.4em;
    background-color: rgba(255, 255, 255, 0.075);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: inherit;
    text-decoration: none;
    border-bottom: 0 !important;
    transition: background-color 0.2s ease-in-out;
}
.service-card:hover {
    background-color: rgba(255, 255, 255, 0.15);
}
.service-card h3 {
    margin-bottom: 0.5em;
    font-size: 1.1em;
}
.service-card h3 .icon {
    margin-right: 0.4em;
    color: rgba(255, 255, 255, 0.55);
}
.service-card p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9em;
    margin: 0;
}

/* Blog index: card grid */
.blog-cluster {
    margin: 3em 0;
}
.cluster-heading {
    font-size: 1.4em !important;
    margin-bottom: 0.3em !important;
}
.cluster-lead {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.95em;
    max-width: 46em;
    margin-bottom: 1.5em;
}
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18em, 1fr));
    gap: 1.5em;
}
.blog-card {
    display: block;
    color: inherit;
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;
    overflow: hidden;
    border-bottom: 0 !important;
    text-decoration: none;
    transition: transform 0.2s, background-color 0.2s;
}
.blog-card:hover {
    background-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}
.blog-card .image {
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.3);
}
.blog-card .image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.blog-card h3 {
    font-size: 1em;
    margin: 1em 1em 0.4em;
    line-height: 1.35;
}
.blog-card p {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.65);
    margin: 0 1em 1em;
}

/* Article meta */
.article-meta {
    display: flex;
    align-items: center;
    gap: 0.75em;
    font-size: 0.8em;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5em;
    letter-spacing: 0.05em;
}
.article-meta .tag {
    display: inline-block;
    padding: 0.2em 0.8em;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 3px;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}
.article-meta .tag.category {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Article body typography tweaks */
#main .page-article h2 { margin-top: 1.8em; font-size: 1.4em; }
#main .page-article h3 { margin-top: 1.5em; font-size: 1.15em; }
#main .page-article ul li,
#main .page-article ol li { margin-bottom: 0.4em; }
#main .page-article blockquote {
    border-left: 3px solid rgba(255, 255, 255, 0.35);
    margin: 1.5em 0;
    padding: 0.5em 1.2em;
    background-color: rgba(255, 255, 255, 0.05);
    font-style: italic;
}
#main .page-article a {
    border-bottom-color: rgba(255, 255, 255, 0.35);
}

/* Article tags at bottom */
.article-tags {
    margin-top: 3em;
    padding-top: 1.2em;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5em;
}
.article-tags .tag {
    padding: 0.25em 0.75em;
    background-color: rgba(255, 255, 255, 0.08);
    font-size: 0.8em;
    letter-spacing: 0.1em;
    border-radius: 3px;
}

/* Footer positioning on inner pages */
body.page-service #footer,
body.page-page #footer,
body.page-article #footer,
body.page-blog-index #footer {
    margin-top: 2em;
    align-self: stretch;
}
#footer .copyright a {
    color: rgba(255, 255, 255, 0.7);
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

/* Brand link (car icon) at top */
.brand-link {
    color: inherit;
    border-bottom: 0 !important;
    text-decoration: none;
}
