/* Global: kein Scrollen */
html,
body {
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden; /* verhindert Scrollen */
  box-sizing: border-box;
}

/* Header */
.intro-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 95vw;
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 0;
  position: relative;
  z-index: 10;
  flex-shrink: 0; /* verhindert, dass Header schrumpft */
}

/* Rechte Header-Seite */
.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Mehrere Sections im Wrapper übereinandergelegt */
.intro-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
}

/* Jede Section nimmt den ganzen Raum ein */
.intro-section {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  padding: 0 16px;
}

/* Nur aktive Section sichtbar */
.intro-section.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Bildbereich passt sich dynamisch an */
.intro-image {
  position: relative;
  width: 100%;
  max-width: 1400px;
  height: 100%;
  max-height: 80vh;
  border-radius: 16px;
  overflow: hidden;
}

/* Image itself */
.intro-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* Text overlay - responsive */
.intro-text {
  position: absolute;
  top: clamp(20px, 5%, 40px);
  left: clamp(20px, 5%, 40px);
  max-width: clamp(300px, 35%, 500px);
  text-align: left;
}

/* Responsive Text Sizes */
.intro-text h1 {
  margin: 0 0 clamp(8px, 2vw, 16px) 0;
  font-size: clamp(var(--text-2xl), 4vw, var(--text-5xl));
  line-height: 1.2;
}

.intro-text p {
  margin: 0;
  font-size: clamp(var(--text-sm), 2vw, var(--text-base));
  line-height: 1.5;
}

/* Mobile Optimizations */
@media (max-width: 768px) {

  .intro-section {
    padding: 16px;
  }
  
  .intro-image {
    max-height: 70vh;
    border-radius: 12px;
  }
  
  .intro-text {
    top: clamp(16px, 3%, 24px);
    left: clamp(16px, 3%, 24px);
    max-width: calc(100% - 32px);
    padding: clamp(12px, 2vw, 16px);
  }
  
  .intro-text h1 {
    font-size: clamp(var(--text-xl), 5vw, var(--text-3xl));
  }
  
  .intro-text p {
    font-size: clamp(var(--text-xs), 2.5vw, var(--text-sm));
  }
}

@media (max-width: 480px) {
  
  .intro-image {
    max-height: 60vh;
    border-radius: 8px;
  }
  
  .intro-text {
    top: 12px;
    left: 12px;
    right: 12px;
    max-width: none;
    padding: 12px;
  }
}

/* Navigation fix unten */
.intro-nav {
  flex-shrink: 0; /* nicht schrumpfen */
  width: clamp(320px, 95vw, 1400px);
  margin: 0 auto;
  padding: 16px 0; /* etwas Innenabstand */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* Responsive Navigation */
@media (max-width: 768px) {
  .intro-nav {
    padding: 12px 0;
    gap: 12px;
  }
  
  .nav-prev,
  .nav-next {
    font-size: var(--text-sm);
    gap: 8px;
  }
  
  .nav-prev .btn-icon,
  .nav-next .btn-icon {
    width: 10px !important;
    height: 18px !important;
  }
}

@media (max-width: 480px) {
  .intro-nav {
    padding: 8px 0;
    gap: 8px;
  }
  
  .nav-prev,
  .nav-next {
    font-size: var(--text-xs);
    gap: 6px;
    padding: 8px 12px;
  }
  
  .nav-prev .btn-icon,
  .nav-next .btn-icon {
    width: 8px !important;
    height: 16px !important;
  }
}

/* Steps / Dots */
.intro-steps {
  display: flex;
  align-items: center;
  gap: 14px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.step {
  width: clamp(40px, 8vw, 80px);
  height: clamp(4px, 0.6vw, 6px);
  border-radius: 100px;
  background: var(--primary-100);
  opacity: 0.6;
  transition: all 0.2s ease;
}

.step.is-active {
  background: var(--color-primary);
  opacity: 1;
}

.next-icon {
  transform: rotate(180deg);
}

.nav-prev,
.nav-next {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--color-primary);
  background-color: transparent;
}

/* === Community Card Styles === */
.community-card {
  display: flex;
  gap: 24px;
  background-color: var(--grayscale-50);
  border-radius: 20px;
  padding: 16px 16px 16px 24px;
  width: 100%;
  max-width: 1400px;
  height: 100%;
  box-sizing: border-box;
}

.community-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding: 16px 0;
  min-width: 0; /* Allows flex item to shrink below content size */
  height: 100%;
  position: relative;
}

.community-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  width: 100%;
}

.vote-count {
  font-family: var(--font-family);
  font-weight: var(--weight-normal);
  font-size: var(--text-lg);
  line-height: var(--leading-normal);
  color: var(--grayscale-900);
}

.community-name {
  font-family: var(--font-family);
  font-weight: var(--weight-bold);
  font-size: var(--text-3xl);
  line-height: var(--leading-none);
  color: var(--grayscale-900);
  margin: 0;
}

.community-description {
  width: 100%;
}

.community-description p {
  font-family: var(--font-family);
  font-weight: var(--weight-normal);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--grayscale-900);
  margin: 0;
}

.impressions-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.impressions-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.impressions-title {
  font-family: var(--font-family);
  font-weight: var(--weight-medium);
  font-size: var(--text-2xl);
  line-height: var(--leading-normal);
  color: var(--grayscale-900);
  margin: 0;
}

.photostory-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 4px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.photostory-link span {
  font-family: var(--font-family);
  font-weight: var(--weight-normal);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-primary);
}

.photostory-link:hover {
  transform: translateY(-1px);
}

.photostory-link:active {
  transform: translateY(0);
}

.impressions-grid {
  display: flex;
  gap: 8px;
  width: 100%;
  height: 317px;
}

.impressions-column {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.impression-image {
  flex: 1;
  border-radius: 12px;
  background-color: var(--grayscale-200);
  min-height: 0;
}

.impression-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* sorgt für gleichmäßiges Zuschneiden */
  border-radius: 12px; /* passt sich der Box an */
  display: block;
}

.placeholder-image {
  background: linear-gradient(45deg, var(--grayscale-200) 25%, transparent 25%), 
              linear-gradient(-45deg, var(--grayscale-200) 25%, transparent 25%), 
              linear-gradient(45deg, transparent 75%, var(--grayscale-200) 75%), 
              linear-gradient(-45deg, transparent 75%, var(--grayscale-200) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.community-data-btn {
  align-self: flex-start;
  font-size: var(--text-lg);
  font-weight: var(--weight-medium);
  padding: 12px 8px;
  margin-top: auto;
  margin-left: 0;
  position: absolute;
  bottom: 0px;
  background-color: transparent;
  color: var(--primary-500);
  border: none;
  border-radius: 12px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.2s ease;
}

.community-data-btn:hover {
  transform: translateY(-1px);
}

.community-data-btn:active {
  transform: translateY(0);
}

.map-container {
  height: 100%;
  border-radius: 20px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
}

.map-image {
  height: 100%;
  width: auto;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* === Layoutsteuerung === */
body {
  display: flex;
  flex-direction: column;
  height: 100vh;
}
