/* ATV & QUAD Magazin — Modern layout (2026) */

:root {
  --color-primary: #e87500;
  --color-primary-light: #ff9900;
  --color-primary-dark: #c45f00;
  --color-navy: #0f2744;
  --color-navy-mid: #1a3a6b;
  --color-navy-light: #305497;
  --color-slate: #3c5977;
  --color-bg: #f4f6f9;
  --color-surface: #ffffff;
  --color-text: #1a2332;
  --color-text-muted: #5a6578;
  --color-border: #dde3ec;
  --color-accent-yellow: #ffff66;
  --font-sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(15, 39, 68, 0.08);
  --shadow-md: 0 4px 20px rgba(15, 39, 68, 0.12);
  --shadow-lg: 0 12px 40px rgba(15, 39, 68, 0.16);
  --header-height: 72px;
  --sidebar-width: 280px;
  --transition: 0.25s ease;
  --max-width: 1280px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-navy-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover,
a:focus-visible {
  color: var(--color-primary);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
}

/* ── Site header ── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-navy);
  box-shadow: var(--shadow-md);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.5rem 1.5rem;
  min-height: var(--header-height);
}

.brand-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo {
  height: 56px;
  width: auto;
  object-fit: contain;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 1rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}

.header-nav a:hover,
.header-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-primary-light);
}

.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

/* ── Hero ── */

.hero {
  position: relative;
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-mid) 50%, var(--color-slate) 100%);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/header-bg.jpg") repeat;
  opacity: 0.15;
}

.hero-inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem 1.5rem 3.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.hero-content h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
}

.hero-content h1 span {
  color: var(--color-primary-light);
}

.hero-content p {
  margin: 0 0 1.75rem;
  font-size: 1.125rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 42ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.75rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
  color: #fff;
}

.hero-visual {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 16 / 10;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15, 39, 68, 0.4) 0%, transparent 50%);
  pointer-events: none;
}

/* ── Layout shell ── */

.layout {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 2rem;
  align-items: start;
}

/* ── Sidebar navigation ── */

.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
}

.sidebar-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.sidebar-header {
  background: linear-gradient(135deg, var(--color-navy-mid), var(--color-slate));
  padding: 1rem 1.25rem;
  color: #fff;
}

.sidebar-header h2 {
  margin: 0;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
}

.nav-menu > li {
  border-bottom: 1px solid var(--color-border);
}

.nav-menu > li:last-child {
  border-bottom: none;
}

.nav-menu a {
  display: block;
  padding: 0.75rem 1.25rem;
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  transition: background var(--transition), color var(--transition), padding-left var(--transition);
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  background: rgba(48, 84, 151, 0.06);
  color: var(--color-navy-light);
  padding-left: 1.5rem;
}

.nav-menu .nav-highlight a {
  color: var(--color-primary-dark);
  font-weight: 600;
}

.nav-submenu {
  list-style: none;
  margin: 0;
  padding: 0 0 0.5rem;
  background: rgba(48, 84, 151, 0.04);
}

.nav-submenu a {
  padding: 0.5rem 1.25rem 0.5rem 2rem;
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.nav-submenu a::before {
  content: "›";
  margin-right: 0.35rem;
  color: var(--color-primary);
}

.nav-group-label {
  display: block;
  padding: 0.75rem 1.25rem 0.25rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* ── Partner banners ── */

.partners {
  margin-top: 1.5rem;
}

.partners-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  padding: 1rem;
}

.partners-card h3 {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.partner-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.partner-list a {
  display: block;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--color-border);
  transition: box-shadow var(--transition), transform var(--transition);
}

.partner-list a:hover,
.partner-list a:focus-visible {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.partner-list img {
  width: 100%;
  height: auto;
}

/* ── Main content ── */

.main-content {
  min-width: 0;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.section-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-navy);
}

.section-header a {
  font-size: 0.875rem;
  font-weight: 600;
}

.section-header a:hover {
  text-decoration: underline;
}

/* ── News grid ── */

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.news-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}

.news-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.news-card-image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-navy-mid);
}

.news-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.news-card:hover .news-card-image img {
  transform: scale(1.04);
}

.news-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.news-card-meta {
  font-size: 0.8125rem;
  color: var(--color-navy-light);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.news-card-body h3 {
  margin: 0 0 0.75rem;
  font-size: 1.0625rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--color-navy);
}

.news-card-body h3 a {
  color: inherit;
}

.news-card-body h3 a:hover {
  color: var(--color-primary);
}

.news-card-body p {
  margin: 0 0 1rem;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  flex: 1;
}

.news-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.8125rem;
  color: var(--color-text-muted);
}

.read-more {
  font-weight: 600;
  color: var(--color-primary) !important;
}

.read-more:hover {
  text-decoration: underline;
}

/* ── Info cards ── */

.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.info-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
}

.info-card h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-navy);
}

.info-card p {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--color-text-muted);
}

/* ── Content page (kontakt, links) ── */

.page-content {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  padding: 2rem;
}

.page-content h1 {
  margin: 0 0 1.5rem;
  font-size: 1.75rem;
  color: var(--color-navy);
}

.page-content h2 {
  margin: 2rem 0 1rem;
  font-size: 1.25rem;
  color: var(--color-primary-dark);
}

.page-content h2:first-of-type {
  margin-top: 0;
}

.contact-box {
  background: linear-gradient(135deg, rgba(48, 84, 151, 0.06), rgba(232, 117, 0, 0.06));
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  max-width: 520px;
  margin: 0 auto;
}

.contact-box p {
  margin: 0 0 1rem;
  line-height: 1.7;
}

.contact-box a {
  font-weight: 600;
}

.links-table {
  width: 100%;
  border-collapse: collapse;
}

.links-table td {
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}

.links-table tr:last-child td {
  border-bottom: none;
}

.links-table a {
  word-break: break-all;
}

/* ── Footer ── */

.site-footer {
  background: var(--color-navy);
  color: rgba(255, 255, 255, 0.75);
  padding: 2.5rem 1.5rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.footer-brand {
  font-weight: 700;
  color: var(--color-primary-light);
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.site-footer p {
  margin: 0 0 0.5rem;
  font-size: 0.9375rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.85);
}

.site-footer a:hover {
  color: var(--color-primary-light);
}

.footer-bottom {
  max-width: var(--max-width);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8125rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.5);
}

/* ── Mobile ── */

@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding: 2rem 1.5rem;
  }

  .hero-visual {
    order: -1;
    max-height: 220px;
    aspect-ratio: auto;
  }

  .layout {
    grid-template-columns: 1fr;
    padding: 1.5rem 1rem 3rem;
  }

  .sidebar {
    position: static;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .header-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--color-navy);
    padding: 0.5rem 1rem 1rem;
    box-shadow: var(--shadow-md);
    gap: 0;
  }

  .header-nav.is-open {
    display: flex;
  }

  .header-nav a {
    width: 100%;
    border-radius: var(--radius-sm);
  }

  .site-header {
    position: relative;
  }

  .header-inner {
    position: relative;
    flex-wrap: wrap;
  }

  .footer-inner {
    grid-template-columns: 1fr;
  }
}

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

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}
