/* ========================================================
   pages.css — Shared styles for all KBA inner pages
   ======================================================== */

:root {
  --blue:     #003366;
  --blue-mid: #0044cc;
  --link:     #005EA8;
  --yellow:   #f7a800;
  --green:    #2e7d32;
  --grey-bg:  #f5f6f7;
  --border:   #dde1e6;
  --text:     #1a1a1a;
  --text-sm:  #555;
}

/* ── Breadcrumb ─────────────────────────────────────────── */
.breadcrumb {
  background: #f0f2f5;
  border-bottom: 1px solid var(--border);
  font-size: .82rem;
  color: var(--text-sm);
  padding: .55rem 0;
}
.breadcrumb .wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .25rem;
}
.breadcrumb a {
  color: var(--link);
  text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: #999; }
.breadcrumb span:last-child { color: var(--text-sm); font-weight: 500; }

/* ── Page layout ────────────────────────────────────────── */
.page-main {
  padding: 2rem 0 3.5rem;
}
.page-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* ── Sidebar navigation ─────────────────────────────────── */
.page-sidebar {
  position: sticky;
  top: 80px;
}
.side-nav {
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  font-size: .88rem;
}
.side-nav__title {
  background: var(--blue);
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  padding: .7rem 1rem;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.side-nav > ul,
.side-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.side-nav > ul > li > a {
  display: block;
  padding: .55rem 1rem;
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background .15s;
}
.side-nav > ul > li:last-child > a { border-bottom: none; }
.side-nav > ul > li > a:hover { background: var(--grey-bg); }
.side-nav > ul > li.active > a {
  color: var(--blue);
  font-weight: 600;
  background: #e8eef5;
  border-left: 3px solid var(--blue);
  padding-left: calc(1rem - 3px);
}
.side-nav__sub {
  background: var(--grey-bg);
  border-top: 1px solid var(--border);
}
.side-nav__sub li a {
  display: block;
  padding: .45rem 1rem .45rem 1.4rem;
  color: var(--link);
  text-decoration: none;
  font-size: .83rem;
  border-bottom: 1px solid #e8eaed;
}
.side-nav__sub li:last-child a { border-bottom: none; }
.side-nav__sub li a:hover { background: #dde4ed; }
.side-nav__sub li.active a {
  font-weight: 600;
  color: var(--blue);
}

/* ── Page content area ─────────────────────────────────── */
.page-content { min-width: 0; }

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--blue);
  margin: 0 0 .75rem;
  padding-bottom: .5rem;
  border-bottom: 3px solid var(--yellow);
  display: inline-block;
}
.page-intro {
  font-size: 1rem;
  color: #444;
  line-height: 1.65;
  margin: 0 0 1.75rem;
}
.page-quote {
  border-left: 4px solid var(--yellow);
  padding: .75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--grey-bg);
  font-style: italic;
  color: #444;
  border-radius: 0 4px 4px 0;
}
.page-quote cite {
  display: block;
  font-size: .85rem;
  margin-top: .5rem;
  font-style: normal;
  font-weight: 600;
  color: var(--blue);
}
.content-section {
  margin-top: 2.25rem;
}
.content-section h2 {
  font-size: 1.2rem;
  color: var(--blue);
  margin: 0 0 .85rem;
  padding-bottom: .35rem;
  border-bottom: 2px solid #dde4ed;
}
.content-section p { line-height: 1.65; color: #333; margin-bottom: .8rem; }

/* ── KBA Buttons ────────────────────────────────────────── */
.kba-btn {
  display: inline-block;
  background: var(--blue);
  color: #fff !important;
  padding: .6rem 1.4rem;
  border: none;
  border-radius: 3px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s;
}
.kba-btn:hover { background: #002244; }
.kba-btn--sm { padding: .4rem .95rem; font-size: .82rem; }
.kba-btn--outline {
  background: transparent;
  border: 2px solid var(--blue);
  color: var(--blue) !important;
}
.kba-btn--outline:hover { background: var(--blue); color: #fff !important; }

/* ── Utility ────────────────────────────────────────────── */
.mt-16 { margin-top: 1rem; }
.all-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--link);
  font-size: .9rem;
  text-decoration: none;
}
.all-link:hover { text-decoration: underline; }
.results-count {
  font-size: .82rem;
  font-weight: 400;
  color: var(--text-sm);
}
.nav__item--active > .nav__link {
  color: var(--yellow) !important;
  border-bottom: 3px solid var(--yellow);
}

/* ── Image placeholders ─────────────────────────────────── */
.img-ph-tall,
.img-ph-wide {
  border-radius: 4px;
  background: linear-gradient(135deg, #d1dae8 0%, #b8c8e0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7a90a8;
  font-size: .85rem;
}
.img-ph-tall { height: 280px; margin-bottom: 1.5rem; }
.img-ph-wide { height: 180px; margin-bottom: 1.5rem; }
.img-ph-tall::after { content: "Photo unavailable"; }
.img-ph-wide::after { content: "Photo unavailable"; }

/* ── Press page ─────────────────────────────────────────── */
.press-filter {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}
.press-filter label { font-size: .88rem; font-weight: 600; color: var(--blue); }
.press-filter select {
  padding: .35rem .65rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: .88rem;
  color: #333;
}
.press-list { list-style: none; margin: 0; padding: 0; }
.press-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}
.press-item:last-child { border-bottom: none; }
.press-item__img {
  flex-shrink: 0;
  width: 100px;
  height: 70px;
  border-radius: 3px;
  object-fit: cover;
  background: #d1dae8;
}
.press-item__img.img-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  color: #8a99b0;
}
.press-item__body { flex: 1; min-width: 0; }
.press-item__date { font-size: .78rem; color: var(--text-sm); margin-bottom: .2rem; }
.press-item__title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--link);
  text-decoration: none;
  line-height: 1.4;
  display: block;
  margin-bottom: .3rem;
}
.press-item__title:hover { text-decoration: underline; }
.press-item__teaser { font-size: .83rem; color: #555; line-height: 1.5; }

/* ── Pagination ─────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}
.pag-btn {
  padding: .4rem .75rem;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 3px;
  font-size: .85rem;
  color: var(--link);
  cursor: pointer;
  transition: background .15s;
}
.pag-btn:hover { background: var(--grey-bg); }
.pag-btn--active {
  background: var(--blue);
  color: #fff;
  border-color: var(--blue);
}
.pag-btn--next { border-color: var(--link); }

/* ── Info cards (grid) ─────────────────────────────────── */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: .75rem;
}
.info-card {
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1.1rem;
  background: #fff;
  text-align: center;
}
.info-card__icon { font-size: 2rem; margin-bottom: .5rem; }
.info-card h3 { font-size: .95rem; color: var(--blue); margin: 0 0 .4rem; }
.info-card p { font-size: .83rem; color: #555; line-height: 1.5; margin: 0; }

/* ── Person card ────────────────────────────────────────── */
.person-card {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  background: var(--grey-bg);
  border-radius: 5px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}
.person-card img {
  width: 110px;
  height: 140px;
  object-fit: cover;
  border-radius: 3px;
  flex-shrink: 0;
  background: #c5d0e0;
}
.person-card h3 { font-size: 1.1rem; color: var(--blue); margin: 0 0 .25rem; }
.person-card .title { font-size: .85rem; color: var(--text-sm); margin-bottom: .6rem; }
.person-card p { font-size: .88rem; color: #333; line-height: 1.6; margin: 0; }

/* ── Timeline ───────────────────────────────────────────── */
.timeline { margin-top: .75rem; }
.timeline-item {
  display: flex;
  gap: 1.25rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--border);
}
.timeline-item:last-child { border-bottom: none; }
.timeline-item__year {
  flex-shrink: 0;
  width: 56px;
  font-size: .95rem;
  font-weight: 700;
  color: var(--blue);
  padding-top: .05rem;
}
.timeline-item__text { font-size: .9rem; color: #444; line-height: 1.55; }

/* ── Locations grid ─────────────────────────────────────── */
.locations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: .75rem;
}
.location-card {
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
  background: #fff;
}
.location-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  background: #c5d0e0;
}
.location-card__body { padding: .85rem; }
.location-card h3 { font-size: .95rem; color: var(--blue); margin: 0 0 .35rem; }
.location-card p { font-size: .82rem; color: #555; margin: 0; line-height: 1.5; }

/* ── Hours table ────────────────────────────────────────── */
.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
  margin-top: .75rem;
}
.hours-table th, .hours-table td {
  padding: .55rem .85rem;
  border: 1px solid var(--border);
  text-align: left;
}
.hours-table th { background: var(--blue); color: #fff; font-weight: 600; }
.hours-table tr:nth-child(even) td { background: var(--grey-bg); }

/* ── Statistics ─────────────────────────────────────────── */
.stat-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-box {
  text-align: center;
  background: var(--blue);
  color: #fff;
  border-radius: 5px;
  padding: 1.25rem 1rem;
}
.stat-box__num { font-size: 1.7rem; font-weight: 700; line-height: 1.1; }
.stat-box__label { font-size: .78rem; margin-top: .3rem; opacity: .85; line-height: 1.4; }

/* ── Publication list ───────────────────────────────────── */
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
  gap: 1rem;
}
.pub-list li:last-child { border-bottom: none; }
.pub-list a { color: var(--link); text-decoration: none; }
.pub-list a:hover { text-decoration: underline; }
.pub-list__format {
  font-size: .75rem;
  background: var(--grey-bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: .15rem .45rem;
  color: var(--text-sm);
  white-space: nowrap;
}

/* ── App requirement cards ─────────────────────────────── */
.req-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: .75rem;
}
.req-card {
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1.1rem;
  background: var(--grey-bg);
}
.req-card__header {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--blue);
  margin-bottom: .75rem;
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--border);
}
.req-card ul { padding-left: 1.15rem; margin: 0 0 .85rem; font-size: .87rem; color: #444; }
.req-card ul li { margin-bottom: .3rem; }

/* ── Feature list (i-Kfz) ─────────────────────────────── */
.feature-list { margin-top: .75rem; }
.feature-item {
  display: flex;
  gap: 1rem;
  padding: .9rem 0;
  border-bottom: 1px solid var(--border);
}
.feature-item:last-child { border-bottom: none; }
.feature-item__icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  width: 40px;
  text-align: center;
}
.feature-item h3 { font-size: .95rem; color: var(--blue); margin: 0 0 .3rem; }
.feature-item p { font-size: .87rem; color: #555; margin: 0; line-height: 1.5; }

/* ── Contact block ─────────────────────────────────────── */
.contact-block {
  background: var(--grey-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1rem 1.25rem;
  font-size: .9rem;
  line-height: 1.65;
  margin-bottom: .75rem;
}
.contact-block p { margin: 0 0 .25rem; }
.contact-block a { color: var(--link); }

/* ── Job cards ─────────────────────────────────────────── */
.job-list { display: flex; flex-direction: column; gap: 1rem; margin-top: .75rem; }
.job-card {
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1.1rem 1.25rem;
  background: #fff;
}
.job-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: .5rem;
}
.job-card h3 { font-size: 1rem; color: var(--blue); margin: 0; }
.job-card__badge {
  background: #e6f4ea;
  color: var(--green);
  font-size: .74rem;
  font-weight: 700;
  padding: .2rem .55rem;
  border-radius: 20px;
  white-space: nowrap;
  border: 1px solid #b8dcbf;
}
.job-card p { font-size: .87rem; color: #444; margin: 0 0 .5rem; line-height: 1.5; }
.job-card ul { padding-left: 1.1rem; margin: 0 0 .75rem; font-size: .85rem; color: #555; }
.job-card ul li { margin-bottom: .2rem; }

/* ── Benefits grid ─────────────────────────────────────── */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .85rem;
  margin-top: .75rem;
}
.benefit-item {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  background: var(--grey-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .75rem;
  font-size: .85rem;
  color: #333;
  line-height: 1.5;
}
.benefit-item span { font-size: 1.35rem; flex-shrink: 0; }
.benefit-item p { margin: 0; }

/* ── Open Data hero ────────────────────────────────────── */
.opendata-hero-img { margin-bottom: 1.5rem; }
.opendata-hero-img img {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 5px;
  display: block;
}

/* ── i-Kfz hero ────────────────────────────────────────── */
.ikfz-hero { margin-bottom: 1.5rem; }
.ikfz-hero img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 5px;
  display: block;
}

/* ── Data table (Open Data) ─────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .87rem;
  margin-top: .75rem;
}
.data-table th, .data-table td {
  padding: .6rem .9rem;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.data-table th { background: var(--blue); color: #fff; font-weight: 600; }
.data-table tr:nth-child(even) td { background: var(--grey-bg); }
.data-table td:first-child { color: var(--link); font-weight: 500; }

/* ── Licence box ────────────────────────────────────────── */
.licence-box {
  background: var(--grey-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .9rem 1.1rem;
  font-size: .87rem;
  margin-top: .75rem;
}
.licence-box strong { display: block; margin-bottom: .35rem; color: var(--blue); }
.licence-box p { margin: 0; color: #444; font-family: monospace; font-size: .83rem; }

/* ── Recall search form ─────────────────────────────────── */
.recall-search-box {
  background: var(--grey-bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}
.recall-search-box h2 {
  font-size: 1rem;
  color: var(--blue);
  margin: 0 0 1rem;
}
.recall-form { display: flex; flex-direction: column; gap: .75rem; }
.recall-form__row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: .75rem;
}
.recall-form__group { display: flex; flex-direction: column; gap: .3rem; }
.recall-form__group label { font-size: .82rem; font-weight: 600; color: #444; }
.recall-form__group input,
.recall-form__group select {
  padding: .45rem .7rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: .87rem;
  color: #333;
  background: #fff;
}
.recall-form__group--vin { grid-column: span 2; }
.recall-form__actions { display: flex; gap: .75rem; padding-top: .25rem; }

/* ── Recall results table ───────────────────────────────── */
.recall-results h2 {
  font-size: 1.1rem;
  color: var(--blue);
  margin: 0 0 .85rem;
}
.recall-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.recall-table th, .recall-table td {
  padding: .55rem .75rem;
  border: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.recall-table th {
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
}
.recall-table tr:nth-child(even) td { background: var(--grey-bg); }
.recall-table td:first-child a { color: var(--link); font-weight: 600; text-decoration: none; }
.recall-table td:first-child a:hover { text-decoration: underline; }

/* ── Info / highlight box ─────────────────────────────── */
.info-box {
  border-radius: 5px;
  padding: 1.1rem 1.25rem;
  margin-top: 2rem;
  font-size: .9rem;
  line-height: 1.6;
  border-left: 4px solid var(--yellow);
  background: #fffbec;
}
.info-box h3 { font-size: 1rem; margin: 0 0 .5rem; color: var(--blue); }
.info-box p { margin: 0 0 .5rem; }
.info-box p:last-of-type { margin-bottom: .75rem; }
.info-box--blue {
  border-left-color: var(--blue-mid);
  background: #eef3fb;
}
.info-box--blue h3 { color: var(--blue); }

/* ── Online Services grid ───────────────────────────────── */
.svc-full-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1rem;
  margin-top: .85rem;
}
.svc-full-card {
  display: flex;
  gap: .85rem;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1rem;
  background: #fff;
  text-decoration: none;
  color: inherit;
  transition: box-shadow .2s, border-color .2s;
  align-items: flex-start;
}
.svc-full-card:hover {
  box-shadow: 0 3px 12px rgba(0,51,102,.1);
  border-color: #b0c4de;
}
.svc-full-card__icon {
  width: 52px;
  height: 52px;
  object-fit: contain;
  flex-shrink: 0;
  border-radius: 3px;
}
.svc-full-card__body h3 {
  font-size: .92rem;
  color: var(--blue);
  margin: 0 0 .35rem;
  line-height: 1.35;
}
.svc-full-card__body p {
  font-size: .82rem;
  color: #555;
  margin: 0 0 .45rem;
  line-height: 1.5;
}
.svc-full-card__link {
  font-size: .8rem;
  color: var(--link);
  font-weight: 600;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 960px) {
  .page-layout {
    grid-template-columns: 1fr;
  }
  .page-sidebar {
    position: static;
    order: -1;
  }
  .side-nav > ul { display: flex; flex-wrap: wrap; gap: 0; }
  .side-nav > ul > li > a { border-right: 1px solid var(--border); }
  .side-nav__sub { display: none; }
  .req-grid { grid-template-columns: 1fr 1fr; }
  .recall-form__group--vin { grid-column: span 1; }
}

@media (max-width: 640px) {
  .press-item { flex-direction: column; }
  .press-item__img { width: 100%; height: 140px; }
  .req-grid { grid-template-columns: 1fr; }
  .recall-table { font-size: .78rem; }
  .recall-table th:nth-child(4),
  .recall-table td:nth-child(4) { display: none; }
  .svc-full-grid { grid-template-columns: 1fr; }
  .person-card { flex-direction: column; }
  .person-card img { width: 100%; height: 160px; }
  .stat-highlights { grid-template-columns: repeat(2, 1fr); }
}
