/* MotorGT HTML mockups — shared */
:root {
  --blue: #1d89fd;
  --blue-hover: #0b6fe0;
  --blue-soft: #e8f3ff;
  --text: #0f1b2d;
  --text-2: #3a4a5c;
  --muted: #7a8798;
  --line: #e6ebf1;
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --footer: #0b1520;
  --container: 1500px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 8px 28px rgba(15, 27, 45, 0.08);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--blue);
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select {
  font: inherit;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 30px;
}

/* —— Header —— */
.site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  color: #fff;
}

.site-header--solid {
  position: sticky;
  background: #fff;
  color: var(--text);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.logo img {
  height: 44px;
  width: auto;
}

.site-header--solid .logo img {
  /* logo is white-on-dark source; invert for light header */
  filter: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px 14px;
  flex-wrap: nowrap;
  justify-content: center;
  flex: 1;
}

.nav a {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  opacity: 0.92;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.site-header:not(.site-header--solid) .nav a:hover,
.site-header:not(.site-header--solid) .nav a.is-active {
  color: #fff;
  border-bottom-color: var(--blue);
  opacity: 1;
}

.site-header--solid .nav a.is-active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.site-header--solid .icon-btn {
  background: var(--bg-soft);
  color: var(--text);
}

.icon-btn svg {
  width: 18px;
  height: 18px;
}

/* —— Footer —— */
.site-footer {
  background: var(--footer);
  color: #c9d2dc;
  margin-top: 64px;
}

.site-footer__top {
  display: grid;
  grid-template-columns: 220px 1fr auto;
  gap: 32px;
  align-items: center;
  padding: 40px 0 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer .logo img {
  height: 40px;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
}

.site-footer__social {
  display: flex;
  gap: 10px;
}

.site-footer__social a {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.site-footer__social a:hover {
  background: var(--blue);
  color: #fff;
}

.site-footer__mid {
  padding: 18px 0;
  text-align: center;
  font-size: 14px;
  color: #8b98a8;
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 18px 0 28px;
  font-size: 13px;
  color: #7d8a99;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.site-footer__bottom nav {
  display: flex;
  gap: 18px;
}

/* —— Shared UI —— */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 22px;
}

.section-head h2 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.link-all {
  color: var(--blue);
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}

.link-all:hover {
  color: var(--blue-hover);
}

.badge {
  display: inline-block;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  color: var(--muted);
  font-size: 13px;
}

.meta svg {
  width: 14px;
  height: 14px;
  vertical-align: -2px;
  margin-right: 4px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 10px;
  border: 0;
  background: var(--blue);
  color: #fff !important;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s;
}

.btn:hover {
  background: var(--blue-hover);
}

.btn svg {
  width: 16px;
  height: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card__img {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #dbe3ec;
}

.card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card__title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.card:hover .card__title {
  color: var(--blue);
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 650;
}

.tag:hover {
  background: var(--blue);
  color: #fff;
}

.sidebar-box {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 20px;
}

.sidebar-box + .sidebar-box {
  margin-top: 18px;
}

.sidebar-box h3 {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 800;
}

.popular-tabs {
  display: flex;
  gap: 16px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.popular-tabs button {
  border: 0;
  background: none;
  padding: 0 0 10px;
  font-weight: 700;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.popular-tabs button.is-active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.popular-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: pop;
}

.popular-list li {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  counter-increment: pop;
}

.popular-list li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.popular-list li::before {
  content: counter(pop);
  font-weight: 800;
  color: var(--blue);
  font-size: 15px;
}

.popular-list .t {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.popular-list .v {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .nav {
    display: none;
  }
  .site-footer__top {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }
}

/* —— Cookie banner —— */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  padding: 16px 0;
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 36px rgba(15, 27, 45, 0.14);
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
}

.cookie-banner__text {
  margin: 0;
  flex: 1;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}

.cookie-banner__text a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner__btn {
  flex-shrink: 0;
  cursor: pointer;
  padding: 10px 22px;
}

.site-footer__bottom nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
}

@media (max-width: 768px) {
  .cookie-banner__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-banner__btn {
    width: 100%;
    justify-content: center;
  }
}
