/* MotorwayInfo DE – main.css (STACK_PROFILE: pico + custom overrides) */
:root {
  --primary: #2E8B57;
  --primary-dark: #1a5c38;
  --accent: #FFA500;
  --bg: #f8fff8;
  --text: #1a2e1a;
  --border: #b2d8b2;
  --pico-primary: #2E8B57;
  --pico-primary-hover: #1a5c38;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, sans-serif;
}

/* Sidebar layout */
.site-wrapper {
  display: grid;
  grid-template-columns: 240px 1fr;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "header header"
    "sidebar main"
    "footer footer";
  min-height: 100vh;
}

.site-header {
  grid-area: header;
  background: var(--primary);
  color: #fff;
  padding: .75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
}

.site-header .brand {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--accent);
  text-decoration: none;
}

.site-header .header-contact {
  font-size: .85rem;
  color: #c8e6c9;
}

.site-header .header-contact a {
  color: var(--accent);
}

.site-sidebar {
  grid-area: sidebar;
  background: var(--primary-dark);
  color: #c8e6c9;
  padding: 1.5rem 1rem;
  min-height: 100%;
}

.site-sidebar nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-sidebar nav ul li {
  margin-bottom: .25rem;
}

.site-sidebar nav ul li a {
  display: block;
  padding: .5rem .75rem;
  color: #c8e6c9;
  text-decoration: none;
  border-radius: 4px;
  transition: background .2s;
}

.site-sidebar nav ul li a:hover,
.site-sidebar nav ul li a[aria-current="page"] {
  background: var(--primary);
  color: var(--accent);
  font-weight: bold;
}

.site-sidebar .sidebar-contact {
  margin-top: 2rem;
  font-size: .82rem;
  color: #a8c8a8;
  border-top: 1px solid #2E8B57;
  padding-top: 1rem;
}

.site-sidebar .sidebar-contact a {
  color: var(--accent);
}

.site-main {
  grid-area: main;
  padding: 2rem 1.5rem;
  max-width: 900px;
}

.site-footer {
  grid-area: footer;
  background: var(--primary-dark);
  color: #c8e6c9;
  padding: 1.5rem 1.5rem;
}

.site-footer a {
  color: var(--accent);
}

/* TOC (toc-everywhere) */
.toc-box {
  background: #e8f5e9;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.toc-box h3 {
  color: var(--primary);
  margin: 0 0 .5rem;
  font-size: .95rem;
}

.toc-box ol {
  margin: 0;
  padding-left: 1.25rem;
}

.toc-box ol li a {
  color: var(--primary);
  text-decoration: none;
}

.toc-box ol li a:hover {
  text-decoration: underline;
  color: var(--accent);
}

/* Info panels */
.info-panel {
  background: #e8f5e9;
  border-left: 4px solid var(--primary);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  border-radius: 4px;
}

.info-panel h3 {
  margin: 0 0 .5rem;
  color: var(--primary);
  font-size: 1rem;
}

/* Warning box */
.warn-box {
  background: #fff8e1;
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  border-radius: 4px;
}

/* Sequential nav */
.seq-nav {
  display: flex;
  justify-content: space-between;
  margin: 2rem 0;
  gap: 1rem;
  flex-wrap: wrap;
}

.seq-nav a {
  background: var(--primary);
  color: #fff;
  padding: .5rem 1.2rem;
  border-radius: 4px;
  text-decoration: none;
  font-size: .9rem;
}

.seq-nav a:hover {
  background: var(--primary-dark);
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

th {
  background: var(--primary);
  color: #fff;
  padding: .5rem .75rem;
  text-align: left;
}

td {
  padding: .45rem .75rem;
  border-bottom: 1px solid var(--border);
}

tr:nth-child(even) td {
  background: #f0fff4;
}

/* Hero */
.page-hero {
  background: linear-gradient(135deg, var(--primary) 50%, #52b788 100%);
  color: #fff;
  padding: 2.5rem 1.5rem;
}

.page-hero h1 {
  color: var(--accent);
  margin: 0 0 .5rem;
}

/* Stars */
.stars { color: var(--accent); font-size: 1.2rem; }

/* Review card */
.review-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: #fff;
}

.review-card .avatar {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
}

/* Form errors */
#form-errors {
  display: none;
  background: #ffe0e0;
  border: 1px solid #c00;
  border-radius: 4px;
  padding: .75rem 1rem;
  color: #800;
  margin-bottom: 1rem;
}

/* Cookie banner */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--primary-dark);
  color: #c8e6c9;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .75rem;
  z-index: 9999;
  font-size: .9rem;
}

#cookie-banner a { color: var(--accent); }

#cookie-accept {
  background: var(--accent);
  color: var(--primary-dark);
  border: none;
  padding: .5rem 1.2rem;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}

/* Responsive: collapse sidebar on small screens */
@media (max-width: 700px) {
  .site-wrapper {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "sidebar"
      "main"
      "footer";
  }
  .site-sidebar {
    padding: .75rem 1rem;
  }
  .site-sidebar nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem;
  }
  .site-sidebar nav ul li a {
    padding: .3rem .6rem;
    font-size: .85rem;
  }
}
