/*
Theme Name: Will Reisen ÖPNV
Theme URI: https://example.com/will-reisen-oepnv
Author: Will Reisen
Description: WordPress-Theme für Busunternehmen im öffentlichen Personennahverkehr (Linienverkehr). Mit Linien- und Fahrplanverwaltung, Tarifen, Verkehrsmeldungen, Jobs und Kontakt. Farbwelt: Nahverkehrsblau & Gelb.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: will-reisen-oepnv
Tags: business, transportation, custom-menu, custom-logo, featured-images, translation-ready
*/

:root {
  --wr-blue: #0b4fa0;
  --wr-blue-dark: #10243d;
  --wr-blue-soft: #f2f6fb;
  --wr-yellow: #ffc425;
  --wr-text: #10243d;
  --wr-muted: #5b6b80;
  --wr-border: #d8e2ef;
  --wr-white: #ffffff;
  --wr-radius: 10px;
  --wr-shadow: 0 6px 24px rgba(16, 36, 61, 0.08);
  --wr-maxw: 1180px;
}

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

body {
  margin: 0;
  font-family: "Source Sans 3", "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--wr-text);
  background: var(--wr-white);
}

h1, h2, h3, h4 {
  font-family: "Barlow Condensed", "Segoe UI", Arial, sans-serif;
  line-height: 1.15;
  margin: 0 0 .5em;
  letter-spacing: .01em;
}
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); }
h3 { font-size: 1.3rem; }

a { color: var(--wr-blue); }
img { max-width: 100%; height: auto; }

.wr-container {
  width: 100%;
  max-width: var(--wr-maxw);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 12px; top: 12px; z-index: 999;
  background: var(--wr-yellow); color: var(--wr-blue-dark);
  padding: 10px 16px; border-radius: 6px;
}

/* ---------- Topbar ---------- */
.wr-topbar {
  background: var(--wr-blue-dark);
  color: #cfe0f5;
  font-size: .9rem;
}
.wr-topbar .wr-container {
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: center; justify-content: space-between;
  min-height: 42px;
}
.wr-topbar a { color: #cfe0f5; text-decoration: none; }
.wr-topbar a:hover { color: var(--wr-yellow); }

/* ---------- Header ---------- */
.wr-header {
  background: var(--wr-white);
  border-bottom: 3px solid var(--wr-yellow);
  position: sticky; top: 0; z-index: 50;
}
.wr-header .wr-container {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; min-height: 84px;
}
.wr-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--wr-blue-dark); }
.wr-brand__mark {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--wr-blue); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 1.1rem;
  font-family: "Barlow Condensed", sans-serif; letter-spacing: .06em;
}
.wr-brand__name { font-family: "Barlow Condensed", sans-serif; font-size: 1.6rem; font-weight: 700; line-height: 1; }
.wr-brand__claim { display: block; font-size: .8rem; color: var(--wr-muted); letter-spacing: .08em; text-transform: uppercase; }

.wr-nav ul { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.wr-nav li { position: relative; }
.wr-nav a {
  display: block; padding: 10px 14px; text-decoration: none;
  color: var(--wr-blue-dark); font-weight: 600; border-radius: 8px;
}
.wr-nav a:hover,
.wr-nav .current-menu-item > a { background: var(--wr-blue-soft); color: var(--wr-blue); }
.wr-nav ul ul {
  display: none; position: absolute; left: 0; top: 100%;
  background: #fff; box-shadow: var(--wr-shadow); border: 1px solid var(--wr-border);
  border-radius: var(--wr-radius); min-width: 230px; flex-direction: column; padding: 6px;
}
.wr-nav li:hover > ul, .wr-nav li:focus-within > ul { display: flex; }

.wr-nav-toggle {
  display: none; background: var(--wr-blue); color: #fff; border: 0;
  padding: 10px 14px; border-radius: 8px; font-weight: 700; cursor: pointer;
}

/* ---------- Buttons ---------- */
.wr-btn {
  display: inline-block; padding: 12px 22px; border-radius: 8px;
  font-weight: 700; text-decoration: none; border: 2px solid transparent;
  cursor: pointer; font-size: 1rem;
}
.wr-btn--primary { background: var(--wr-blue); color: #fff; }
.wr-btn--primary:hover { background: var(--wr-blue-dark); }
.wr-btn--accent { background: var(--wr-yellow); color: var(--wr-blue-dark); }
.wr-btn--accent:hover { background: #ffd45c; }
.wr-btn--ghost { border-color: var(--wr-blue); color: var(--wr-blue); background: transparent; }
.wr-btn--ghost:hover { background: var(--wr-blue-soft); }

/* ---------- Hero ---------- */
.wr-hero {
  position: relative; color: #fff;
  background: linear-gradient(120deg, rgba(11,79,160,.94), rgba(16,36,61,.88));
  background-size: cover; background-position: center;
}
.wr-hero__inner { padding: 72px 0 84px; max-width: 720px; }
.wr-hero h1 { color: #fff; }
.wr-hero p { font-size: 1.15rem; color: #dbe7f6; }
.wr-hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ---------- Störungsband ---------- */
.wr-alerts { background: var(--wr-yellow); color: var(--wr-blue-dark); }
.wr-alerts .wr-container { padding-top: 14px; padding-bottom: 14px; }
.wr-alerts__item { display: flex; gap: 10px; align-items: baseline; font-weight: 600; }
.wr-alerts__item + .wr-alerts__item { margin-top: 6px; }
.wr-alerts__date { font-size: .85rem; opacity: .75; white-space: nowrap; }
.wr-alerts a { color: var(--wr-blue-dark); }

/* ---------- Sections ---------- */
.wr-section { padding: 64px 0; }
.wr-section--soft { background: var(--wr-blue-soft); }
.wr-section__head { max-width: 720px; margin-bottom: 32px; }
.wr-section__head p { color: var(--wr-muted); margin: 0; }

.wr-grid { display: grid; gap: 22px; }
.wr-grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.wr-grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.wr-card {
  background: #fff; border: 1px solid var(--wr-border);
  border-radius: var(--wr-radius); padding: 24px; box-shadow: var(--wr-shadow);
}
.wr-card h3 { margin-bottom: .35em; }
.wr-card p { color: var(--wr-muted); margin: 0 0 14px; }
.wr-card__thumb img { border-radius: 8px; margin-bottom: 14px; display: block; }

/* ---------- Linien ---------- */
.wr-line { display: flex; gap: 16px; align-items: flex-start; }
.wr-line__badge {
  flex: 0 0 auto; min-width: 62px; text-align: center;
  background: var(--wr-blue); color: #fff; font-weight: 700;
  font-family: "Barlow Condensed", sans-serif; font-size: 1.5rem;
  padding: 8px 10px; border-radius: 8px; letter-spacing: .02em;
}
.wr-line__meta { font-size: .9rem; color: var(--wr-muted); margin: 0 0 8px; }
.wr-line__links { display: flex; flex-wrap: wrap; gap: 10px; }
.wr-line__links a { font-weight: 600; text-decoration: none; }
.wr-line__links a::before { content: "↓ "; }

/* ---------- Tarife ---------- */
.wr-fare {
  border: 1px solid var(--wr-border); border-radius: var(--wr-radius);
  background: #fff; padding: 26px; text-align: center;
}
.wr-fare--featured { border-color: var(--wr-blue); border-width: 2px; }
.wr-fare__price {
  font-family: "Barlow Condensed", sans-serif; font-size: 2.6rem;
  color: var(--wr-blue); line-height: 1; margin: 6px 0 4px;
}
.wr-fare__note { color: var(--wr-muted); font-size: .9rem; }
.wr-fare ul { list-style: none; padding: 0; margin: 16px 0; text-align: left; }
.wr-fare li { padding-left: 24px; position: relative; margin-bottom: 8px; }
.wr-fare li::before { content: "✓"; position: absolute; left: 0; color: var(--wr-blue); font-weight: 700; }

/* ---------- Content / Posts ---------- */
.wr-main { padding: 48px 0 64px; }
.wr-entry { margin-bottom: 40px; }
.wr-entry__meta { color: var(--wr-muted); font-size: .9rem; margin-bottom: 10px; }
.wr-entry__title a { text-decoration: none; }
.wr-content > * + * { margin-top: 1em; }
.wr-content ul, .wr-content ol { padding-left: 1.3em; }
.wr-content blockquote {
  margin: 0; padding: 12px 20px; border-left: 4px solid var(--wr-yellow);
  background: var(--wr-blue-soft); border-radius: 0 8px 8px 0;
}
.wr-content table { width: 100%; border-collapse: collapse; }
.wr-content th, .wr-content td { border: 1px solid var(--wr-border); padding: 10px 12px; text-align: left; }
.wr-content th { background: var(--wr-blue-soft); }

.wr-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; }
.wr-sidebar .widget {
  background: var(--wr-blue-soft); border-radius: var(--wr-radius);
  padding: 20px; margin-bottom: 20px;
}
.wr-sidebar .widget ul { list-style: none; padding: 0; margin: 0; }
.wr-sidebar .widget li + li { margin-top: 8px; }

.wr-pagination { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }
.wr-pagination .page-numbers {
  padding: 8px 14px; border: 1px solid var(--wr-border); border-radius: 8px;
  text-decoration: none;
}
.wr-pagination .current { background: var(--wr-blue); color: #fff; border-color: var(--wr-blue); }

/* ---------- Jobs ---------- */
.wr-job { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }

/* ---------- Kontakt ---------- */
.wr-contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.wr-form label { display: block; font-weight: 600; margin-bottom: 6px; }
.wr-form input, .wr-form textarea, .wr-form select {
  width: 100%; padding: 12px 14px; border: 1px solid var(--wr-border);
  border-radius: 8px; font: inherit; margin-bottom: 16px; background: #fff;
}
.wr-form input:focus, .wr-form textarea:focus { outline: 3px solid rgba(11,79,160,.25); border-color: var(--wr-blue); }
.wr-notice { padding: 14px 18px; border-radius: 8px; margin-bottom: 20px; }
.wr-notice--ok { background: #e6f4ec; border: 1px solid #a9d8bd; }
.wr-notice--error { background: #fdeceb; border: 1px solid #f0b3ae; }

/* ---------- Footer ---------- */
.wr-footer { background: var(--wr-blue-dark); color: #c6d7ec; padding: 56px 0 24px; margin-top: 60px; }
.wr-footer h3 { color: #fff; font-size: 1.15rem; }
.wr-footer a { color: #c6d7ec; text-decoration: none; }
.wr-footer a:hover { color: var(--wr-yellow); }
.wr-footer ul { list-style: none; padding: 0; margin: 0; }
.wr-footer li + li { margin-top: 8px; }
.wr-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.15); margin-top: 36px; padding-top: 18px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .9rem;
}

/* ---------- Accessibility / responsive ---------- */
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
:focus-visible { outline: 3px solid var(--wr-yellow); outline-offset: 2px; }

@media (max-width: 900px) {
  .wr-layout { grid-template-columns: 1fr; }
  .wr-nav-toggle { display: block; }
  .wr-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--wr-border); padding: 12px 20px;
  }
  .wr-nav.is-open { display: block; }
  .wr-nav ul { flex-direction: column; }
  .wr-nav ul ul { position: static; display: flex; box-shadow: none; border: 0; padding-left: 14px; }
}
