/* Flohmarkt WBS - Stylesheet */

/* CSS Reset & Variables */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Custom Font - TTF/OTF Format */
@font-face {
  font-family: "Local Brewery Four";
  src: url("../fonts/LocalBreweryFour-Regular.otf") format("opentype"),
    url("../fonts/LocalBreweryFour-Regular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --primary: #1a5f7a;
  --secondary: #e91e8c;
  --yellow: #f4e409;
  --cyan: #3db3c5;
  --pink: #e91e8c;
  --pink-light: #e398b0;
  --dark: #1a5f7a;
  --light: #fffef7;
  --cream: #fdf8e8;
  --gray-light: #e2e8f0;
  --success: #10b981;
  --text: #2d2d2d;
}

/* Fix für Anchor-Links mit Fixed Header */
html {
  scroll-padding-top: 96px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text);
  max-width: 1400px;
  margin: 0 auto;
  background: var(--yellow);
  padding-top: 60px;
}

/* Headings verwenden Local Brewery */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Local Brewery Four", sans-serif;
  font-weight: normal;
}

/* Navigation verwendet Local Brewery */
.nav-links a {
  font-family: "Local Brewery Four", sans-serif;
  color: var(--dark);
  text-decoration: none;
  transition: color 0.3s;
  font-weight: normal;
  font-size: 1.5rem;
}

/* Buttons verwenden Local Brewery */
.btn {
  font-family: "Local Brewery Four", sans-serif;
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--pink);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: normal;
  transition: transform 0.3s, box-shadow 0.3s;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  text-transform: uppercase;
}

/* Card Titles verwenden Local Brewery */
.card h3 {
  font-family: "Local Brewery Four", sans-serif;
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--cyan);
  font-weight: normal;
}

/* Hero Date verwenden Local Brewery */
.hero-date {
  font-family: "Local Brewery Four", sans-serif;
  font-size: 2.4rem;
  color: var(--dark);
  margin: -1rem 0;
  font-weight: normal;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.hero-subtitle {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.6rem;
  margin-top: 1rem;
  margin-bottom: 0.7rem;
  color: var(--cyan);
  font-style: italic;
}

.hero-attention {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.8rem;
  margin-top: 1rem;
  margin-bottom: 0.1rem;
  color: var(--secondary);
  font-style: italic;
}

/* Section Headers verwenden Local Brewery */
.section h2 {
  font-family: "Local Brewery Four", sans-serif;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--dark);
  text-align: center;
  font-weight: normal;
}

/* Fließtext, Listen, Paragraphen bleiben lesbar mit System-Font */
p,
li,
.card p,
.card ul,
label,
input,
textarea,
select {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Header & Navigation */
header {
  background: var(--cream);
  color: var(--dark);
  padding: 0.75rem 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 60px;
}

nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 3rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 100%;
  gap: 2rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo img {
  height: 45px;
  width: auto;
  object-fit: contain;
}

.logo a {
  display: flex;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a:hover {
  color: var(--pink);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--dark);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  background: var(--yellow);
  color: var(--cyan);
  padding: 2rem 0 0 0;
  text-align: left;
  margin-top: 0;
  position: relative;
  overflow: visible;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  width: 100vw;
}

.hero-content {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  max-width: 1200px;
  margin: 0 auto;
  gap: 4rem;
  padding: 0 3rem;
}

.hero-text {
  flex: 0 0 auto;
  max-width: 500px;
}

.hero-image {
  flex: 0 0 300px;
  text-align: right;
  align-self: flex-start;
}

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

.hero h1 {
  font-family: "Local Brewery Four", sans-serif;
  font-size: 7rem;
  margin-bottom: 0.5rem;
  text-shadow: none;
  font-weight: normal;
  text-transform: uppercase;
  line-height: 0.85;
  letter-spacing: -0.02em;
  text-align: left;
}

.hero-location {
  font-size: 0.45em;
  display: block;
  margin-top: 0.3rem;
  padding-bottom: 1rem;
  letter-spacing: 0.1em;
}

.hero-badges {
  display: flex;
  justify-content: center;
  gap: 6rem;
  margin: 2rem auto -50px;
  flex-wrap: wrap;
  max-width: 1200px;
  padding: 0 3rem;
  position: relative;
  z-index: 10;
}

.badge {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.1);
}

.badge:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

a.badge,
a.badge:link,
a.badge:visited,
a.badge:hover,
a.badge:active {
  text-decoration: none;
}

a.badge.badge-pink,
a.badge.badge-pink:link,
a.badge.badge-pink:visited,
a.badge.badge-pink:hover,
a.badge.badge-pink:active {
  color: var(--dark);
}

a.badge.badge-cyan,
a.badge.badge-cyan:link,
a.badge.badge-cyan:visited,
a.badge.badge-cyan:hover,
a.badge.badge-cyan:active {
  color: var(--dark);
}

.badge-pink {
  background: var(--pink-light);
  color: var(--dark);
}

.badge-cyan {
  background: var(--cyan);
  color: var(--dark);
}

.badge-top {
  font-family: "Local Brewery Four", sans-serif;
  font-size: 1.4rem;
  text-transform: uppercase;
  margin-bottom: 0.1rem;
  line-height: 1;
}

.badge-mid {
  font-family: "Local Brewery Four", sans-serif;
  font-size: 1.7rem;
  text-transform: uppercase;
  font-weight: bold;
  line-height: 1;
  margin-bottom: 0.1rem;
}

.badge-bottom {
  font-family: "Local Brewery Four", sans-serif;
  font-size: 1.9rem;
  text-transform: uppercase;
  font-weight: bold;
  line-height: 1;
}

.badge-info {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1.35rem;
  margin-top: 0.3rem;
}

/* Circular Badge with curved text */
.badge-circular {
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.badge-svg {
  width: 100%;
  height: 100%;
}

.badge-svg .badge-mid {
  fill: var(--dark);
}

.badge-center-text {
  font-family: "Local Brewery Four", sans-serif;
  font-size: 1.6rem;
  text-transform: uppercase;
  fill: var(--dark);
  font-weight: bold;
}

.hero-bottom-image {
  width: 100%;
  margin-top: 0;
  position: relative;
  background: var(--cream);
}

.hero-bottom-image img {
  max-width: 1200px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  padding: 0 3rem;
  box-sizing: border-box;
}

/* Button */
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Container & Sections */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 3rem;
  background: var(--yellow);
}

.section {
  margin-bottom: 4rem;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.card {
  background: var(--cream);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.card ul {
  margin-top: 1rem;
  padding-left: 1.5rem;
}

.card-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--pink);
  text-decoration: none;
  font-weight: 600;
}

.card-link:hover {
  text-decoration: underline;
}

/* Gallery */
.tabs-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.tab-btn {
  font-family: "Local Brewery Four", sans-serif;
  font-size: 1.4rem;
  padding: 0.4rem 1.4rem;
  border: 2px solid var(--primary);
  border-radius: 6px;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.tab-btn.active,
.tab-btn:hover {
  background: var(--primary);
  color: var(--light);
}

.carousel-nav {
  display: flex;
  gap: 0.25rem;
  margin-left: auto;
}

.carousel-nav-btn {
  width: 36px;
  height: 36px;
  border: 2px solid var(--primary);
  border-radius: 6px;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s, color 0.2s;
}

.carousel-nav-btn:hover {
  background: var(--primary);
  color: var(--light);
}

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

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
}

.tab-panel.active::-webkit-scrollbar {
  height: 4px;
}

.tab-panel.active::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 2px;
}

.tab-panel.active .gallery-item {
  flex: 0 0 auto;
  width: 280px;
  height: 190px;
  aspect-ratio: unset;
  scroll-snap-align: start;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  aspect-ratio: 1;
  background: var(--gray-light);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.article-year {
  position: absolute;
  top: 8px;
  left: 8px;
  font-family: "Local Brewery Four", sans-serif;
  font-size: 1.3rem;
  color: var(--light);
  background: rgba(0, 0, 0, 0.55);
  padding: 2px 10px;
  border-radius: 4px;
  pointer-events: none;
  line-height: 1.4;
}

/* Forms */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group > label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--primary);
}

.radio-label,
.checkbox-label {
  font-weight: 400;
  font-size: 1rem;
  color: var(--dark);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--gray-light);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--pink);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.radio-group {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.5rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: normal;
}

.radio-label input[type="radio"] {
  width: auto;
  accent-color: var(--pink);
  cursor: pointer;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.5rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  accent-color: var(--pink);
  cursor: pointer;
}

.checkbox-group input[type="text"] {
  flex-basis: 100%;
  padding: 0.75rem;
  border: 2px solid var(--gray-light);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.checkbox-group input[type="text"]:focus {
  outline: none;
  border-color: var(--pink);
}

form .btn,
.contact-form .btn {
  display: block;
  margin: 1rem auto 0;
}

.success-message {
  display: none;
  background: var(--success);
  color: white;
  padding: 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  text-align: center;
}

.success-message.active {
  display: block;
}

/* Subpage Styles */
.subpage {
  padding-top: 3rem;
}

.subpage h1 {
  font-family: "Local Brewery Four", sans-serif;
  font-size: 2.5rem;
  color: var(--dark);
  text-align: center;
  margin-bottom: 1.5rem;
  font-weight: normal;
}

.intro-text {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 3rem;
  font-size: 1.1rem;
  line-height: 1.8;
}

.rules-container {
  max-width: 800px;
  margin: 0 auto;
}

.rule-item {
  background: var(--cream);
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.rule-item h3 {
  font-family: "Local Brewery Four", sans-serif;
  font-size: 1.5rem;
  color: var(--cyan);
  margin-bottom: 1rem;
  font-weight: normal;
}

.rule-item p {
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.rule-item p:last-child {
  margin-bottom: 0;
}

.rule-item ul {
  margin: 0.75rem 0;
  padding-left: 1.5rem;
}

.rule-item li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.rule-item li:last-child {
  margin-bottom: 0;
}

.standplan-image .gallery-item {
  aspect-ratio: auto;
  background: transparent;
  max-width: 100%;
}

.standplan-image .gallery-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* Footer */
footer {
  background: var(--dark);
  color: white;
  padding: 3rem 3rem;
  text-align: center;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
  width: 100vw;
}

.footer-links {
  margin-top: 1rem;
}

.footer-links a {
  color: white;
  text-decoration: none;
  margin: 0 1rem;
  transition: opacity 0.3s;
}

.footer-links a:hover {
  opacity: 0.7;
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: white;
  font-size: 3rem;
  cursor: pointer;
  background: none;
  border: none;
  transition: opacity 0.3s;
}

.lightbox-close:hover {
  opacity: 0.7;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  font-size: 2.5rem;
  padding: 1rem 1.2rem;
  cursor: pointer;
  transition: background 0.3s;
  z-index: 1001;
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.4);
}

@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    font-size: 1.8rem;
    padding: 0.8rem 1rem;
  }

  .lightbox-prev {
    left: 0.5rem;
  }

  .lightbox-next {
    right: 0.5rem;
  }
}

/* Interactive Map Styles */
.map-container {
  max-width: 800px;
  margin: 0 auto;
}

.map-container .main-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#map {
  width: 100%;
  height: 450px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  z-index: 1;
}

.map-container .sidebar {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 15px;
}

.map-container .sidebar .map-card {
  flex: 1;
  min-width: 250px;
}

.map-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.map-card h2 {
  color: var(--dark);
  font-size: 1.1rem;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.location-item {
  display: flex;
  align-items: center;
  padding: 12px;
  margin-bottom: 8px;
  background: #f7fafc;
  border-radius: 8px;
  transition: all 0.2s;
  cursor: pointer;
  gap: 12px;
}

.location-item:hover {
  background: #edf2f7;
  transform: translateX(5px);
}

.location-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.parking-icon {
  background: #c53030;
  color: white;
  font-weight: bold;
}

.poi-icon {
  background: #3182ce;
  color: white;
}

.closure-icon {
  background: #e67e22;
  color: white;
}

.location-info {
  flex: 1;
}

.location-name {
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 2px;
}

.location-desc {
  font-size: 0.8rem;
  color: #718096;
}

.google-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: #4285f4;
  color: white;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s;
  flex-shrink: 0;
}

.google-link:hover {
  background: #3367d6;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: #4a5568;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.popup-content {
  text-align: center;
  min-width: 180px;
}

.popup-content h3 {
  margin-bottom: 5px;
  color: var(--dark);
  font-size: 1rem;
}

.popup-content p {
  color: #718096;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.popup-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #4285f4;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  transition: background 0.2s;
}

.popup-link:hover {
  background: #3367d6;
}

/* Responsive Design */
@media (max-width: 768px) {
  header {
    height: 60px;
  }

  nav {
    padding: 0 1.5rem;
  }

  .container {
    padding: 3rem 1.5rem;
  }

  .hero {
    padding: 1rem 0 0 0;
  }

  .hero-content {
    flex-direction: column;
    align-items: center;
    padding: 0 1.5rem;
  }

  .hero-text {
    max-width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero h1 {
    font-size: 3.5rem;
    text-align: center;
  }

  .hero-date {
    font-size: 1.6rem;
    text-align: center;
    width: 100%;
    margin: -0.2rem 0;
  }

  .hero-subtitle {
    text-align: center;
    width: 100%;
    font-size: 1.1rem;
  }

  .hero-image {
    flex: 0 0 auto;
    max-width: 200px;
    margin: 0 auto;
  }

  .hero-badges {
    gap: 1rem;
    padding: 0 1rem;
    margin: 1rem auto 1.5rem;
  }

  .badge {
    width: 150px;
    height: 150px;
    padding: 1rem;
  }

  .badge-top {
    font-size: 0.8rem;
  }

  .badge-mid {
    font-size: 1rem;
  }

  .badge-bottom {
    font-size: 1.2rem;
  }

  .badge-info {
    font-size: 0.75rem;
  }

  .badge-center-text {
    font-size: 1.1rem;
  }

  footer {
    padding: 2rem 1.5rem;
  }

  .nav-links {
    position: fixed;
    top: 60px;
    left: -100%;
    flex-direction: column;
    background: white;
    width: 100%;
    padding: 2rem;
    transition: left 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  .nav-links.active {
    left: 0;
  }

  .menu-toggle {
    display: block;
  }

  .section h2 {
    font-size: 2rem;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  /* Subpage Mobile */
  .subpage {
    padding-top: 2rem;
  }

  .subpage h1 {
    font-size: 2rem;
  }

  .intro-text {
    font-size: 1rem;
    margin-bottom: 2rem;
  }

  .rule-item {
    padding: 1.5rem;
  }

  .rule-item h3 {
    font-size: 1.3rem;
  }

  /* Map Mobile */
  #map {
    height: 350px;
  }

  .map-container .sidebar {
    flex-direction: column;
  }

  .map-container .sidebar .map-card {
    min-width: 100%;
  }
}
