/*
Theme Name:  Drive2Balkan
Theme URI:   https://drive2balkan.eu
Author:      Drive2Balkan Team
Author URI:  https://drive2balkan.eu
Description: Mitfahrplattform für die Balkan- und Diaspora-Community. Modern, mehrsprachig, mobilfreundlich.
Version:     1.0.0
License:     GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: drive2balkan
Tags:        custom-menu, custom-logo, featured-images, footer-widgets, full-width-template, responsive-layout, translation-ready
*/

/* ================================================================
   CSS CUSTOM PROPERTIES / VARIABLEN
   ================================================================ */
:root {
  --primary:        #1a6bb5;
  --primary-dark:   #145490;
  --primary-light:  #e8f0fb;
  --secondary:      #27ae60;
  --secondary-dark: #1e8449;
  --accent:         #f39c12;
  --accent-dark:    #d68910;
  --dark:           #2c3e50;
  --mid:            #555f6e;
  --gray:           #6c757d;
  --light:          #f8f9fa;
  --lighter:        #fdfdfd;
  --white:          #ffffff;
  --border:         #dee2e6;
  --border-light:   #f0f0f0;
  --shadow-sm:      0 1px 4px rgba(0,0,0,0.08);
  --shadow:         0 3px 14px rgba(0,0,0,0.10);
  --shadow-lg:      0 8px 30px rgba(0,0,0,0.14);
  --radius:         10px;
  --radius-sm:      6px;
  --radius-lg:      16px;
  --font-sans:      -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-size-base: 16px;
  --line-height:    1.65;
  --max-width:      1200px;
  --transition:     0.22s ease;
  --header-height:  68px;
}

/* ================================================================
   RESET / NORMALISIERUNG
   ================================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  line-height: var(--line-height);
  color: var(--dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, video, svg {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover { color: var(--primary-dark); }

ul, ol { list-style: none; }

button, input, select, textarea {
  font: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--dark);
}

h1 { font-size: clamp(1.8em, 4vw, 2.8em); }
h2 { font-size: clamp(1.4em, 3vw, 2em); }
h3 { font-size: clamp(1.15em, 2.5vw, 1.5em); }
h4 { font-size: 1.15em; }
h5 { font-size: 1em; }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* ================================================================
   LAYOUT UTILITIES / LAYOUT-HILFSKL.
   ================================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 70px 0;
}

.section--alt {
  background: var(--light);
}

.section--dark {
  background: var(--dark);
  color: var(--white);
}

.section__title {
  text-align: center;
  margin-bottom: 12px;
}

.section__subtitle {
  text-align: center;
  color: var(--gray);
  font-size: 1.05em;
  margin-bottom: 48px;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.flex   { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.text-center { text-align: center; }
.text-right  { text-align: right; }

/* Skip to content / Barrierefreiheit */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--primary);
  color: var(--white);
  padding: 8px 16px;
  z-index: 9999;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus { top: 0; }

/* ================================================================
   HEADER / KOPFZEILE
   ================================================================ */
.dwm-site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  box-shadow: var(--shadow-sm);
  height: var(--header-height);
  display: flex;
  align-items: center;
  transition: box-shadow var(--transition);
}

.dwm-site-header.is-scrolled {
  box-shadow: var(--shadow);
}

.dwm-site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Logo */
.dwm-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.dwm-logo__image img {
  height: 40px;
  width: auto;
}

.dwm-logo__text {
  font-size: 1.4em;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}

.dwm-logo__text span {
  color: var(--secondary);
}

/* Primary navigation */
.dwm-nav-primary {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dwm-nav-primary a {
  display: block;
  padding: 8px 14px;
  color: var(--dark);
  font-weight: 500;
  font-size: 0.95em;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}

.dwm-nav-primary a:hover,
.dwm-nav-primary .current-menu-item > a {
  background: var(--primary-light);
  color: var(--primary);
}

/* Language switcher */
.dwm-lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 8px;
}

.dwm-lang-switcher a {
  display: block;
  padding: 5px 8px;
  font-size: 0.75em;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gray);
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
  transition: background var(--transition), color var(--transition);
}

.dwm-lang-switcher a:hover,
.dwm-lang-switcher a.is-active {
  background: var(--primary);
  color: var(--white);
}

/* Header actions (login/user menu) */
.dwm-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 12px;
}

.dwm-user-menu {
  position: relative;
}

.dwm-user-menu__toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--light);
  border-radius: 24px;
  cursor: pointer;
  border: 1.5px solid var(--border);
  font-size: 0.9em;
  font-weight: 500;
  color: var(--dark);
  transition: border-color var(--transition);
}

.dwm-user-menu__toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.dwm-user-menu__toggle img {
  border-radius: 50%;
  width: 26px;
  height: 26px;
}

.dwm-user-menu__dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 8px 0;
  min-width: 180px;
  border: 1px solid var(--border-light);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
  z-index: 100;
}

.dwm-user-menu:hover .dwm-user-menu__dropdown,
.dwm-user-menu__dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dwm-user-menu__dropdown a {
  display: block;
  padding: 9px 16px;
  color: var(--dark);
  font-size: 0.9em;
  transition: background var(--transition);
}

.dwm-user-menu__dropdown a:hover {
  background: var(--light);
  color: var(--primary);
}

.dwm-user-menu__dropdown a.dwm-logout {
  color: #dc3545;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}

/* Hamburger / Mobile menu button */
.dwm-hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 20px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  margin-left: 10px;
}

.dwm-hamburger__line {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
  transform-origin: center;
}

.dwm-hamburger.is-active .dwm-hamburger__line:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.dwm-hamburger.is-active .dwm-hamburger__line:nth-child(2) {
  opacity: 0;
}

.dwm-hamburger.is-active .dwm-hamburger__line:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Mobile nav overlay */
.dwm-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 998;
}

.dwm-nav-overlay.is-visible { display: block; }

/* Mobile nav sidebar */
.dwm-mobile-nav {
  position: fixed;
  top: 0;
  right: -280px;
  width: 280px;
  height: 100vh;
  background: var(--white);
  z-index: 999;
  transition: right var(--transition);
  overflow-y: auto;
  padding: 20px;
  box-shadow: var(--shadow-lg);
}

.dwm-mobile-nav.is-open { right: 0; }

.dwm-mobile-nav__close {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 20px;
}

.dwm-mobile-nav ul { display: flex; flex-direction: column; gap: 4px; }
.dwm-mobile-nav ul a {
  display: block;
  padding: 12px 0;
  color: var(--dark);
  font-weight: 500;
  border-bottom: 1px solid var(--border-light);
}

.dwm-mobile-nav ul a:hover { color: var(--primary); }

/* ================================================================
   HERO SECTION
   ================================================================ */
.dwm-hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary) 0%, #2980b9 50%, var(--secondary-dark) 100%);
  min-height: 520px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 60px 0;
}

.dwm-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" d="M0,64L48,80C96,96,192,128,288,128C384,128,480,96,576,85.3C672,75,768,85,864,106.7C960,128,1056,160,1152,154.7C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
  background-size: cover;
  pointer-events: none;
}

.dwm-hero__content {
  position: relative;
  z-index: 1;
  color: var(--white);
  max-width: 700px;
}

.dwm-hero__badge {
  display: inline-block;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  padding: 5px 16px;
  font-size: 0.85em;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.3px;
}

.dwm-hero__title {
  font-size: clamp(1.8em, 4.5vw, 3em);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  color: var(--white);
}

.dwm-hero__subtitle {
  font-size: 1.1em;
  opacity: 0.9;
  margin-bottom: 32px;
  line-height: 1.6;
}

.dwm-hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Hero search overlay */
.dwm-hero__search {
  position: relative;
  z-index: 1;
  background: rgba(255,255,255,0.95);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-lg);
  margin-top: 40px;
  backdrop-filter: blur(10px);
}

/* ================================================================
   HOW IT WORKS / WIE FUNKTIONIERT ES
   ================================================================ */
.dwm-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.dwm-step {
  text-align: center;
  padding: 32px 24px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}

.dwm-step:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.dwm-step__number {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85em;
}

.dwm-step__icon {
  font-size: 3em;
  margin-bottom: 16px;
  margin-top: 8px;
}

.dwm-step__title {
  font-size: 1.1em;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--dark);
}

.dwm-step__desc {
  font-size: 0.9em;
  color: var(--gray);
  line-height: 1.6;
}

/* ================================================================
   FEATURES / WARUM DRIVEWITHME
   ================================================================ */
.dwm-features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.dwm-feature-card {
  text-align: center;
  padding: 28px 20px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1.5px solid var(--border);
  transition: border-color var(--transition), transform var(--transition);
}

.dwm-feature-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}

.dwm-feature-card__icon {
  font-size: 2.5em;
  margin-bottom: 12px;
}

.dwm-feature-card__title {
  font-size: 1em;
  font-weight: 700;
  margin-bottom: 8px;
}

.dwm-feature-card__desc {
  font-size: 0.88em;
  color: var(--gray);
  line-height: 1.6;
}

/* ================================================================
   CTA SECTION
   ================================================================ */
.dwm-cta-section {
  background: linear-gradient(135deg, var(--secondary-dark), var(--secondary));
  color: var(--white);
  padding: 70px 0;
  text-align: center;
}

.dwm-cta-section h2,
.dwm-cta-section p { color: var(--white); }

.dwm-cta-section p { opacity: 0.9; font-size: 1.05em; margin-bottom: 28px; }

/* ================================================================
   PAGE TEMPLATES
   ================================================================ */
.dwm-page-header {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 50px 0 40px;
}

.dwm-page-header h1,
.dwm-page-header p { color: var(--white); }
.dwm-page-header p { opacity: 0.85; margin-top: 8px; }

.dwm-page-content {
  padding: 48px 0;
}

/* ================================================================
   SINGLE RIDE / FAHRT-DETAILSEITE
   ================================================================ */
.dwm-ride-detail {
  max-width: 800px;
}

.dwm-ride-detail__header {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 24px;
}

.dwm-ride-detail__route {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.dwm-ride-detail__city {
  font-size: 1.5em;
  font-weight: 800;
  color: var(--dark);
}

.dwm-ride-detail__arrow {
  font-size: 1.5em;
  color: var(--primary);
}

.dwm-ride-detail__meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.dwm-ride-detail__meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px;
  background: var(--light);
  border-radius: var(--radius-sm);
}

.dwm-ride-detail__meta-label {
  font-size: 0.75em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray);
  font-weight: 600;
}

.dwm-ride-detail__meta-value {
  font-size: 1.05em;
  font-weight: 700;
  color: var(--dark);
}

.dwm-driver-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.dwm-driver-card__avatar img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 3px solid var(--primary-light);
}

.dwm-driver-card__name {
  font-size: 1.1em;
  font-weight: 700;
}

.dwm-driver-card__since {
  font-size: 0.85em;
  color: var(--gray);
}

/* ================================================================
   FOOTER
   ================================================================ */
.dwm-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.8);
  padding: 56px 0 0;
}

.dwm-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.dwm-footer__logo {
  font-size: 1.5em;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
}

.dwm-footer__logo span { color: var(--secondary); }

.dwm-footer__desc {
  font-size: 0.9em;
  line-height: 1.7;
  margin-bottom: 20px;
}

.dwm-footer__social {
  display: flex;
  gap: 10px;
}

.dwm-footer__social a {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1em;
  transition: background var(--transition);
}

.dwm-footer__social a:hover { background: var(--primary); }

.dwm-footer__col-title {
  font-size: 0.9em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--white);
  margin-bottom: 16px;
}

.dwm-footer__links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dwm-footer__links a {
  color: rgba(255,255,255,0.7);
  font-size: 0.9em;
  transition: color var(--transition);
}

.dwm-footer__links a:hover { color: var(--white); }

.dwm-footer__bottom {
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85em;
  flex-wrap: wrap;
  gap: 12px;
}

.dwm-footer__copyright {
  color: rgba(255,255,255,0.5);
}

.dwm-footer__legal {
  display: flex;
  gap: 20px;
}

.dwm-footer__legal a {
  color: rgba(255,255,255,0.5);
  transition: color var(--transition);
}

.dwm-footer__legal a:hover { color: var(--white); }

/* ================================================================
   BREADCRUMBS
   ================================================================ */
.dwm-breadcrumbs {
  font-size: 0.85em;
  color: var(--gray);
  padding: 10px 0;
}

.dwm-breadcrumbs a { color: var(--primary); }
.dwm-breadcrumbs span { margin: 0 6px; }

/* ================================================================
   BUTTONS (theme-level, supplement plugin CSS)
   ================================================================ */
.btn, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 0.95em;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  line-height: 1;
  font-family: var(--font-sans);
}

.btn--primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn--primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
  transform: translateY(-1px);
}

.btn--white {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
}

.btn--white:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.btn--outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}

.btn--outline-white:hover {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
}

.btn--secondary {
  background: var(--secondary);
  color: var(--white);
  border-color: var(--secondary);
}

.btn--secondary:hover {
  background: var(--secondary-dark);
  color: var(--white);
}

.btn--large {
  padding: 15px 32px;
  font-size: 1.05em;
}

/* ================================================================
   404 PAGE
   ================================================================ */
.dwm-404 {
  text-align: center;
  padding: 80px 20px;
}

.dwm-404__code {
  font-size: clamp(5em, 15vw, 10em);
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.dwm-404__title {
  font-size: 1.8em;
  margin-bottom: 12px;
}

.dwm-404__desc {
  color: var(--gray);
  margin-bottom: 28px;
  font-size: 1.05em;
}

/* ================================================================
   UTILITY CLASSES
   ================================================================ */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-5 { margin-top: 48px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ================================================================
   RESPONSIVE / MOBILFREUNDLICH
   ================================================================ */
@media (max-width: 1024px) {
  .dwm-features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dwm-footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root { --header-height: 60px; }

  .dwm-nav-primary,
  .dwm-lang-switcher,
  .dwm-header-actions {
    display: none;
  }

  .dwm-hamburger { display: flex; }

  .dwm-hero {
    min-height: auto;
    padding: 40px 0;
  }

  .dwm-hero__title { font-size: 1.8em; }
  .dwm-hero__actions { flex-direction: column; }
  .dwm-hero__actions .btn { text-align: center; }

  .dwm-steps { grid-template-columns: 1fr; gap: 40px; }
  .dwm-features-grid { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }

  .dwm-footer__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .dwm-footer__bottom {
    flex-direction: column;
    text-align: center;
  }

  .section { padding: 48px 0; }

  .dwm-ride-detail__meta-grid {
    grid-template-columns: 1fr 1fr;
  }

  .dwm-driver-card {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .container { padding: 0 14px; }

  .dwm-hero__badge { display: none; }
  .dwm-features-grid { grid-template-columns: 1fr; }
  .dwm-ride-detail__meta-grid { grid-template-columns: 1fr; }

  .dwm-footer__legal { flex-direction: column; gap: 8px; }
}
