/* =========================================
   German Modal Verbs – Layout
   ========================================= */

.site-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header a {
  color: #fff;
}

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

.brand {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand span {
  font-weight: 400;
  opacity: 0.9;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-link {
  padding: 0.35rem 0.65rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.2s ease;
}

.nav-link:hover,
.nav-link:focus {
  background: rgba(255, 255, 255, 0.15);
  text-decoration: none;
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.25);
}

/* Header dropdown for Learn */
.nav-dropdown {
  position: relative;
}

.nav-dropdown > .nav-link::after {
  content: "▼";
  font-size: 0.65rem;
  margin-left: 0.35rem;
  opacity: 0.8;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 200;
}

.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  display: block;
  padding: 0.55rem 1rem;
  color: var(--text) !important;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s ease;
}

.dropdown-link:hover,
.dropdown-link:focus {
  background: var(--bg);
  text-decoration: none;
}

.dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0.4rem 0;
}

.dropdown-label {
  display: block;
  padding: 0.35rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dropdown-verbs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.25rem;
  padding: 0 0.75rem 0.5rem;
}

.dropdown-verbs a {
  display: block;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-weight: 500;
  font-size: 0.9rem;
}

.dropdown-verbs a:hover {
  background: var(--bg);
  text-decoration: none;
}

@media (max-width: 720px) {
  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    background: rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-sm);
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
    margin-top: 0.25rem;
    min-width: auto;
  }

  .nav-dropdown:hover .dropdown-menu,
  .nav-dropdown:focus-within .dropdown-menu,
  .nav-dropdown.open .dropdown-menu {
    display: block;
  }

  .dropdown-link,
  .dropdown-label,
  .dropdown-verbs a {
    color: #fff !important;
  }

  .dropdown-verbs a:hover,
  .dropdown-link:hover {
    background: rgba(255, 255, 255, 0.15);
  }
}

.main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
  min-height: calc(100vh - 8rem);
}

.section-header {
  margin-bottom: 1.5rem;
}

.section-header h1,
.section-header h2 {
  margin-bottom: 0.25rem;
}

.section-header p {
  color: var(--muted);
  margin-bottom: 0;
}

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.875rem;
  text-align: center;
  padding: 1rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}
