/* ================================================================
   Autoaudio — aa6light Theme
   SilverStripe 6 + Bootstrap 5
   Light professional design, red accent, Roboto
   Header: real JVC DIN image left, brand text right
   ================================================================ */

:root {
    --red:           #cc1616;
    --red-dark:      #a51010;
    --red-light:     #f8e8e8;
    --dark:          #1a1a1a;
    --dark-2:        #3a3a3a;
    --grey-800:      #444444;
    --grey-600:      #666666;
    --grey-400:      #999999;
    --grey-200:      #e0e0e0;
    --grey-100:      #f2f2f2;
    --grey-50:       #f8f8f8;
    --white:         #ffffff;

    --sidebar-width: 230px;
    --nav-font-size: 12px;

    --header-height: 210px;
    --header-bg:     #3d3d3d;

    --container-max: 1200px;

    --footer-bg:     #1a1a1a;

    --font-body:     'Roboto', system-ui, sans-serif;
    --font-cond:     'Roboto Condensed', 'Roboto', sans-serif;
    --trans:         0.15s ease;
}

/* ── Reset ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
body { font-family: var(--font-body); font-size: 14px; line-height: 1.65; color: var(--grey-800); background: var(--grey-100); margin: 0; padding: 0; }
a { color: var(--red); text-decoration: none; }
a:hover { color: var(--red-dark); text-decoration: underline; }
img { border: 0; max-width: 100%; height: auto; }
p { margin: 0 0 1em; }
form { margin: 0; padding: 0; }

/* ── Top bar ────────────────────────────────────────────────────── */
#topbar {
    background: var(--dark);
    color: var(--grey-400);
    font-size: 12px;
    padding: 5px 0;
    border-bottom: 1px solid #333;
}

#topbar-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#topbar a { color: var(--grey-400); }
#topbar a:hover { color: var(--white); text-decoration: none; }
.topbar-phone { color: #ccc; font-weight: 500; }
.topbar-phone .bi { color: var(--red); margin-right: 4px; }

/* ── Header ─────────────────────────────────────────────────────── */
#site-header {
    background: var(--header-bg);
    height: var(--header-height);
    position: relative;
    overflow: hidden;
}

/*
 * The JVC DIN image sits on the LEFT — it faces right into the page.
 * Width ~56% of container so it bleeds nicely into the gradient.
 * The gradient fades from transparent to header-bg colour
 * creating a smooth transition to the brand text on the right.
 */
#site-header::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 55%;
    background: url('../images/header-din.jpg') no-repeat left center;
    background-size: cover;
    z-index: 0;
}

/* Gradient fade: image fades into background from left to right */
#site-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        transparent 0%,
        transparent 30%,
        rgba(61,61,61,0.6) 50%,
        var(--header-bg) 68%
    );
    z-index: 1;
    pointer-events: none;
}

#header-inner {
    max-width: var(--container-max);
    height: 100%;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: relative;
    z-index: 2;
}

#header-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

#header-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: right;
}

/* AA logo mark */
#header-logo {
    font-family: var(--font-cond);
    font-weight: 700;
    font-size: 58px;
    letter-spacing: -2px;
    line-height: 1;
    display: flex;
    align-items: baseline;
}

.logo-a1 { color: var(--red); }
.logo-a2 { color: rgba(255,255,255,0.9); }

#header-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-start;
}

#header-name {
    font-family: var(--font-cond);
    font-size: 34px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1;
}

#header-tagline {
    font-size: 11px;
    font-weight: 300;
    color: rgba(255,255,255,0.6);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ── Red nav bar ────────────────────────────────────────────────── */
#site-navbar {
    background: var(--red);
    border-bottom: 3px solid var(--red-dark);
}

#navbar-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
}

.navbar-item {
    display: inline-block;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    transition: background var(--trans);
}

.navbar-item:hover,
.navbar-item[aria-current="page"] {
    background: rgba(0,0,0,0.15);
    color: var(--white);
    text-decoration: none;
}

/* ── Mobile toggle ──────────────────────────────────────────────── */
#mobile-menu-bar {
    display: none;
    background: var(--grey-800);
}

#sidebar-toggle {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: transparent;
    color: var(--white);
    border: none;
    text-align: left;
    font-family: var(--font-body);
    font-size: 14px;
    cursor: pointer;
}

#sidebar-toggle:hover { background: rgba(255,255,255,0.1); }
#sidebar-toggle .bi { margin-right: 6px; }

/* ── Site body ──────────────────────────────────────────────────── */
#site-body {
    background: var(--grey-100);
    padding: 20px 0;
}

#site-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 20px;
    align-items: stretch;
}

/* ── Sidebar ────────────────────────────────────────────────────── */
#sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: 4px;
    overflow: visible;
    position: relative;
    z-index: 100;
}

.nav-header {
    background: var(--red);
    color: var(--white);
    font-family: var(--font-cond);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 12px 14px;
    border-radius: 4px 4px 0 0;
}

/* ── Navigation ─────────────────────────────────────────────────── */
.sf-vertical { list-style: none; margin: 0; padding: 0; width: var(--sidebar-width); position: relative; z-index: 100; }
.sf-vertical ul { list-style: none; margin: 0; padding: 0; }
.sf-vertical li { position: relative; }

.sf-vertical .nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: var(--sidebar-width);
    box-sizing: border-box;
    padding: 6px 10px 6px 12px;
    font-size: var(--nav-font-size);
    color: var(--grey-800);
    background: var(--white);
    border-bottom: 1px solid var(--grey-200);
    text-decoration: none;
    transition: background var(--trans), color var(--trans), padding-left var(--trans);
}

.sf-vertical .nav-link:hover,
.sf-vertical .nav-link:focus {
    background: var(--red-light);
    color: var(--red);
    padding-left: 16px;
    text-decoration: none;
}

.sf-vertical li.current > .nav-link {
    background: var(--red);
    color: var(--white);
    font-weight: 500;
}

.sf-vertical li.section > .nav-link {
    background: var(--red-light);
    color: var(--red);
    font-weight: 500;
    border-left: 3px solid var(--red);
    padding-left: 9px;
}

.nav-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-arrow { font-size: 9px; flex-shrink: 0; margin-left: 4px; opacity: 0.4; transition: transform var(--trans); }
.sf-vertical li.section > .nav-link .nav-arrow,
.sf-vertical li.current > .nav-link .nav-arrow { opacity: 0.7; }

/* ── Desktop flyouts ─────────────────────────────────────────────── */
.sf-vertical > li > .sub-menu {
    display: block; visibility: hidden; opacity: 0;
    position: absolute; top: 0; left: var(--sidebar-width);
    width: 220px;
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-left: 3px solid var(--red);
    border-radius: 0 4px 4px 0;
    box-shadow: 4px 4px 16px rgba(0,0,0,0.12);
    z-index: 200;
    transition: opacity var(--trans), visibility var(--trans);
    pointer-events: none;
}

.sf-vertical > li:hover > .sub-menu,
.sf-vertical > li.section > .sub-menu {
    visibility: visible; opacity: 1; pointer-events: auto;
}

.sf-vertical > li > .sub-menu .nav-link {
    width: 220px; padding-left: 14px; font-size: 12px;
    color: var(--grey-800); background: var(--white);
    border-bottom: 1px solid var(--grey-200);
}

.sf-vertical > li > .sub-menu .nav-link:hover {
    background: var(--red-light); color: var(--red); padding-left: 18px;
}

.sf-vertical > li > .sub-menu > li > .sub-menu {
    display: block; visibility: hidden; opacity: 0;
    position: absolute; top: 0; left: 220px; width: 210px;
    background: var(--white); border: 1px solid var(--grey-200);
    border-left: 3px solid var(--red-dark);
    border-radius: 0 4px 4px 0;
    box-shadow: 4px 4px 16px rgba(0,0,0,0.12);
    z-index: 300; transition: opacity var(--trans), visibility var(--trans); pointer-events: none;
}

.sf-vertical > li > .sub-menu > li:hover > .sub-menu {
    visibility: visible; opacity: 1; pointer-events: auto;
}

.sf-vertical > li > .sub-menu > li > .sub-menu .nav-link {
    width: 210px; background: var(--white); padding-left: 14px; font-size: 12px;
}

.sf-vertical > li > .sub-menu > li > .sub-menu > li > .sub-menu {
    display: block; visibility: hidden; opacity: 0;
    position: absolute; top: 0; left: 210px; width: 200px;
    background: var(--grey-50); border: 1px solid var(--grey-200);
    border-left: 3px solid var(--grey-400);
    border-radius: 0 4px 4px 0;
    box-shadow: 4px 4px 16px rgba(0,0,0,0.12);
    z-index: 400; transition: opacity var(--trans), visibility var(--trans); pointer-events: none;
}

.sf-vertical > li > .sub-menu > li > .sub-menu > li:hover > .sub-menu {
    visibility: visible; opacity: 1; pointer-events: auto;
}

.sf-vertical > li > .sub-menu > li > .sub-menu > li > .sub-menu .nav-link {
    width: 200px; background: var(--grey-50); font-size: 12px; padding-left: 14px;
}

/* ── Sidebar pods ────────────────────────────────────────────────── */
.sidebar-pod { border-top: 2px solid var(--grey-100); margin-top: 4px; }

.sidebar-pod-title {
    background: var(--grey-50);
    font-family: var(--font-cond);
    font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase;
    color: var(--grey-600);
    padding: 8px 14px;
    border-bottom: 1px solid var(--grey-200);
}

.sidebar-pod-body { padding: 10px 14px; font-size: 12px; color: var(--grey-600); line-height: 1.6; }

.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { padding: 7px 14px; border-bottom: 1px solid var(--grey-100); }
.news-list li:last-child { border-bottom: none; }
.news-link { display: block; font-size: 12px; color: var(--grey-800); line-height: 1.4; }
.news-link:hover { color: var(--red); text-decoration: none; }
.news-date { display: block; font-size: 10px; color: var(--grey-400); margin-top: 2px; }

/* ── Content area ────────────────────────────────────────────────── */
#content {
    flex: 1;
    min-width: 0;
    background: var(--white);
    border: 1px solid var(--grey-200);
    border-radius: 4px;
    padding: 24px 28px;
    /* Prevent collapse when content is sparse */
    min-height: 400px;
}

.page-title {
    font-family: var(--font-cond);
    font-size: 26px; font-weight: 700; color: var(--dark);
    margin: 0 0 4px; padding-bottom: 12px;
    border-bottom: 3px solid var(--red);
    line-height: 1.2;
}

/* ── Breadcrumbs ─────────────────────────────────────────────────── */
#breadcrumbs {
    font-size: 12px; color: var(--grey-400);
    margin-bottom: 14px;
    display: flex; align-items: center; gap: 5px; flex-wrap: wrap;
}
#breadcrumbs a { color: var(--grey-400); }
#breadcrumbs a:hover { color: var(--red); }
.bc-sep { font-size: 9px; }
.bc-current { color: var(--dark); font-weight: 500; }

/* ── Typography ──────────────────────────────────────────────────── */
.typography h1 { font-size: 22px; color: var(--red); font-weight: 700; margin: 0 0 14px; }
.typography h2 { font-size: 18px; color: var(--dark); font-weight: 700; margin: 20px 0 10px; }
.typography h3 { font-size: 16px; color: var(--grey-800); font-weight: 500; margin: 16px 0 8px; }
.typography h4 { font-size: 14px; color: var(--grey-600); font-weight: 500; margin: 14px 0 6px; }
.typography p { margin: 0 0 1em; }
.typography a { color: var(--red); }
.typography a:hover { color: var(--red-dark); }
.typography ul, .typography ol { padding-left: 1.4em; margin-bottom: 1em; }
.typography table { width: auto; margin-bottom: 1em; border-collapse: collapse; }
.typography table td, .typography table th { padding: 7px 12px; border: 1px solid var(--grey-200); font-size: 13px; }
.typography table th { background: var(--grey-50); font-weight: 500; }
.typography blockquote { border-left: 4px solid var(--red); padding-left: 16px; color: var(--grey-600); margin: 1em 0; }

/* ── News listing ────────────────────────────────────────────────── */
.news-list-full { margin-top: 16px; }
.news-item-full { padding: 18px 0; border-bottom: 1px solid var(--grey-100); }
.news-item-full:last-child { border-bottom: none; }
.news-item-thumb { float: left; margin: 0 16px 8px 0; }
.news-item-thumb img { border-radius: 3px; border: 1px solid var(--grey-200); }
.news-item-title { font-size: 17px; font-weight: 700; margin: 0 0 4px; }
.news-item-title a { color: var(--dark); }
.news-item-title a:hover { color: var(--red); text-decoration: none; }
.news-item-date { font-size: 12px; color: var(--grey-400); margin-bottom: 8px; }
.news-item-summary { font-size: 13px; color: var(--grey-600); margin-bottom: 8px; line-height: 1.6; }
.news-read-more { font-size: 13px; color: var(--red); font-weight: 500; }
.news-read-more:hover { color: var(--red-dark); text-decoration: none; }

/* ── News article ────────────────────────────────────────────────── */
.news-article-date { font-size: 12px; color: var(--grey-400); margin-bottom: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--grey-100); }
.news-article-summary { font-size: 15px; font-weight: 500; color: var(--grey-600); margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--grey-100); line-height: 1.6; }
.news-article-thumb { float: right; margin: 0 0 16px 20px; }
.news-article-thumb img { border-radius: 3px; border: 1px solid var(--grey-200); }

/* ── Other pages ─────────────────────────────────────────────────── */
.news-articles { list-style: none; padding: 0; margin: 0; }
.news-item { padding: 16px 0; border-bottom: 1px solid var(--grey-100); }
.news-item:last-child { border-bottom: none; }
.news-item h3 { margin: 0 0 6px; font-size: 16px; }
.news-item h3 a { color: var(--dark); }
.news-item h3 a:hover { color: var(--red); }
.news-meta { font-size: 12px; color: var(--grey-400); margin-bottom: 10px; }
.news-thumb { float: left; margin: 0 12px 8px 0; }
.read-more { font-size: 13px; color: var(--red); font-weight: 500; }

#search-results { list-style: none; padding: 0; }
#search-results li { padding: 14px 0; border-bottom: 1px solid var(--grey-100); }
#search-results h3 { margin: 0 0 6px; font-size: 16px; }
#search-results h3 a { color: var(--dark); }
#search-results h3 a:hover { color: var(--red); }

.content-split { display: flex; gap: 24px; }
.content-body { flex: 1; }
.content-form { flex: 1; }

.pagination-nav { margin-top: 20px; display: flex; align-items: center; gap: 6px; }
.page-btn { padding: 6px 14px; background: var(--grey-800); color: var(--white); border-radius: 3px; font-size: 13px; font-weight: 500; }
.page-btn:hover { background: var(--red); color: var(--white); text-decoration: none; }
.page-numbers { font-size: 13px; color: var(--grey-400); margin-left: 6px; }
.page-numbers a { color: var(--dark); margin: 0 3px; }
.page-numbers a:hover { color: var(--red); }
.page-numbers strong { color: var(--red); margin: 0 3px; }

#map_canvas { margin-bottom: 16px; border-radius: 4px; }

/* ── Footer ──────────────────────────────────────────────────────── */
#site-footer {
    background: var(--footer-bg);
    border-top: 4px solid var(--red);
    padding: 16px 0;
    margin-top: 20px;
}

#footer-inner {
    max-width: var(--container-max);
    margin: 0 auto; padding: 0 20px;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 8px;
}

#footer-brand { font-size: 13px; color: #666; }
#footer-brand strong { color: #ccc; font-family: var(--font-cond); font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.footer-sep { margin: 0 8px; opacity: 0.2; }
#footer-meta { font-size: 12px; color: #555; }
#footer-meta a { color: #555; }
#footer-meta a:hover { color: var(--red); }

/* ── Utility ─────────────────────────────────────────────────────── */
.clearfix::after { content: ''; display: table; clear: both; }

/* ── Responsive (< 992px) ───────────────────────────────────────── */
@media (max-width: 991.98px) {
    #mobile-menu-bar { display: block; }
    #site-navbar { display: none; }
    #topbar { display: none; }

    #site-header { height: 100px; }
    #site-header::before { width: 40%; }
    #site-header::after {
        background: linear-gradient(to right, transparent 0%, transparent 20%, rgba(61,61,61,0.7) 40%, var(--header-bg) 60%);
    }
    #header-logo { font-size: 40px; }
    #header-name { font-size: 24px; }
    #header-tagline { font-size: 10px; }

    #site-container { flex-direction: column; padding: 0 12px; gap: 12px; }
    #sidebar { width: 100%; display: none; }
    #sidebar.is-open { display: block; }

    .sf-vertical, .sf-vertical ul { width: 100%; }
    .sf-vertical .nav-link { width: 100%; white-space: normal; }

    .sf-vertical > li > .sub-menu,
    .sf-vertical > li > .sub-menu > li > .sub-menu,
    .sf-vertical > li > .sub-menu > li > .sub-menu > li > .sub-menu {
        position: static; width: 100%;
        visibility: hidden; opacity: 0; display: none; pointer-events: none;
        box-shadow: none; border: none;
        border-left: 3px solid var(--red); transition: none;
    }

    .sf-vertical li.is-open > .sub-menu,
    .sf-vertical li.section > .sub-menu,
    .sf-vertical li.current > .sub-menu {
        visibility: visible; opacity: 1; display: block; pointer-events: auto;
    }

    .sf-vertical > li > .sub-menu .nav-link { width: 100%; padding-left: 24px; }
    .sf-vertical > li > .sub-menu > li > .sub-menu .nav-link { width: 100%; padding-left: 36px; }
    .sf-vertical > li > .sub-menu > li > .sub-menu > li > .sub-menu .nav-link { width: 100%; padding-left: 48px; }

    .sf-vertical li.is-open > .nav-link .nav-arrow { transform: rotate(90deg); opacity: 0.7; }

    #content { width: 100%; padding: 16px; }
    .content-split { flex-direction: column; }
    #footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 575.98px) {
    #site-header { height: 80px; }
    #site-header::before { display: none; }
    #site-header::after { display: none; }
    #header-logo { font-size: 34px; }
    #header-name { font-size: 20px; }
    #header-tagline { display: none; }
    #header-inner { justify-content: center; }
}


/* ── Catalogue grid ──────────────────────────────────────────────── */
/* 3 columns desktop, 2 tablet, 1 mobile                              */
.catalogue-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 16px;
}

.catalogue-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.catalogue-thumb-link { display: block; text-decoration: none; }

.catalogue-thumb-link img {
    display: block;
    width: 100%;
    max-width: 200px;
    height: 260px;
    object-fit: cover;
    border: 1px solid var(--grey-200);
    border-radius: 3px;
    box-shadow: 2px 2px 6px rgba(0,0,0,0.10);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.catalogue-thumb-link:hover img {
    box-shadow: 3px 3px 10px rgba(0,0,0,0.20);
    transform: translateY(-2px);
}

/* Placeholder shown when no thumbnail available */
.catalogue-placeholder {
    width: 100%;
    max-width: 200px;
    height: 260px;
    background: var(--grey-100);
    border: 1px solid var(--grey-200);
    border-radius: 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--grey-400);
}

.catalogue-placeholder .bi { font-size: 36px; color: var(--red); opacity: 0.6; }
.catalogue-placeholder span { font-size: 11px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }

.catalogue-item-info { margin-top: 8px; width: 100%; max-width: 200px; text-align: center; }

.catalogue-item-title {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--dark);
    line-height: 1.4;
    word-break: break-word;
}

.catalogue-item-title:hover { color: var(--red); text-decoration: none; }

.catalogue-item-badge {
    display: inline-block;
    margin-top: 3px;
    padding: 1px 5px;
    background: var(--red-light);
    color: var(--red);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 2px;
}

.catalogue-item-desc { font-size: 11px; color: var(--grey-600); margin-top: 4px; line-height: 1.4; }

@media (max-width: 767.98px) {
    .catalogue-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 479.98px) {
    .catalogue-grid { grid-template-columns: 1fr; }
}

@media print {
    #topbar, #site-navbar, #site-header, #mobile-menu-bar, #sidebar, #site-footer { display: none !important; }
    #site-container { display: block; padding: 0; }
    #content { border: none; padding: 0; }
}
