@font-face {
  font-family: "Spline Sans";
  src: url("./font/Spline_Sans/SplineSans-VariableFont_wght.ttf")
    format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Roboto";
  src: url("./font/Roboto/Roboto-Black.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

* {
  font-family: "Spline Sans", Roboto, Arial, sans-serif;
  touch-action: pan-x pan-y;
}

/* Remove tap highlights on all buttons and interactive elements */
button,
.button,
[role="button"],
.nav-btn,
.home-btn,
.back-to-map-button,
.cta-button {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  outline: none !important;
}

button:focus,
.button:focus,
[role="button"]:focus {
  outline: none !important;
  box-shadow: none !important;
}

body,
html {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100dvh;
  margin: 0;
  padding: 0;
  color: var(--text-color);
  overflow: hidden;
  scroll-behavior: smooth;
  background-color: white;
}

main {
  position: relative;
  flex-grow: 1;
}

footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 4rem;
  background-color: #1e1e1e;
  padding: 0 1rem;
}

footer p {
  font-size: 16px;
}

.container {
  max-height: 100%;
}

:root {
  --primary-color: #ca2474;
  --secondary-color: #1e1e1e;
  --background-color: #faf5f5;
  --text-color: #1e1e1e;
  --visited-color: #4caf50;
  --progress-color: #4caf50;
  --marker-color: #ca2474;
  --marker-visited-color: #04c;
  --highlight-overlay-color: rgb(255 255 255 / 40%);
  --highlight-border-color: #fc0;
  --animation-duration: 0.4s;
  --animation-easing: ease-in-out;
  --hexagon-color: #abf8ff;
  --hexagon-fade-color: #389ca6;
  --loading-title-color: #ca2474;
  --loading-subtitle-color: #1e1e1e;
  --loading-title-size: 3rem;
  --loading-subtitle-size: 2rem;
  --transition-timing: 0.3s ease-in-out;
  --cube-primary: #ca2474;
  --cube-shadow: rgb(202 36 116 / 50%);
  --cube-border: rgb(255 255 255 / 10%);
  --loading-bg: #1a1a1a;
  --particle-color: #ca2474;
}

.start-tour {
  font-weight: 700;
}

.divider {
  width: 80%;
  height: 2rem;
  margin: 0 auto;
  border-top: 1px solid #ccc;
}

.info-section {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
}

.footer-links a {
  color: #faf5f5;
  text-decoration: none;
  font-size: 12px;
  margin: 0 0.5rem 0 0.5rem;
}

.footer-links {
  display: flex;
  font-size: 14px;
}

.app-header {
  position: absolute;
  right: 0;
  left: 0;
  z-index: 1000;
  padding: 1rem;
  background-color: var(--background-color);
  color: var(--primary-color);
  text-align: center;
}

#cityspots-paderborn {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.app-title {
  margin: 0;
  font-size: 1.5rem;
}

.main-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-btn {
  padding: 0.5rem;
  border: none;
  border-radius: 50%;
  background-color: var(--background-color);
  color: black !important;
  font-size: 1rem;
  text-decoration: underline;
  transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
  cursor: pointer;
  will-change: background-color, color, transform;
}

.nav-btn:hover {
  border: none !important;
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease forwards;
}

.front {
  transform: translateZ(50px);
}

.back {
  transform: rotateY(180deg) translateZ(50px);
}

.right {
  transform: rotateY(90deg) translateZ(50px);
}

.left {
  transform: rotateY(-90deg) translateZ(50px);
}

.top {
  transform: rotateX(90deg) translateZ(50px);
}

.bottom {
  transform: rotateX(-90deg) translateZ(50px);
}

.loading-text {
  margin-top: 40px;
  text-align: center;
}

.select-header {
  text-align: center;
}

.content-section {
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.content-section.fade-out {
  transform: translateY(-20px);
  opacity: 0;
}

.content-section.fade-in {
  transform: translateY(0);
  opacity: 1;
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease forwards;
}

#storyline-selection {
  height: 100%;
  background-color: var(--background-color);
  overflow-y: auto;
}

.storyline-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.storyline-item {
  display: flex;
  align-items: center;
  margin: 1rem;
  padding: 1rem;
  border-radius: 8px;
  background-color: var(--primary-color);
  color: var(--background-color);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  will-change: transform, box-shadow;
}

.storyline-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgb(0 0 0 / 30%);
}

.storyline-icon {
  width: 50px;
  height: 50px;
  margin-right: 1rem;
  border-radius: 50%;
  transition: transform 0.3s ease;
  overflow: hidden;
}

.storyline-item:hover .storyline-icon {
  transform: scale(1.1);
}

.author-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.storyline-content {
  flex: 1;
}

.storyline-item h3 {
  margin: 0 0 0.5rem;
}

.storyline-item p {
  margin: 0;
  font-size: 0.9rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.cta-button,
.carousel-nav-btn,
.nav-btn {
  min-width: 44px;
  min-height: 44px;
}

.location-marker,
.cta-button,
.carousel-nav-btn {
  transition: background-color 0.3s ease, color 0.3s ease;
}

.rathaustuer-image {
  width: 48%;
  height: 100%;
  border-radius: 8px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  will-change: transform, box-shadow;
}

.left-door {
  background-image: url("images/rathaustuer-links.webp");
}

.right-door {
  background-image: url("images/rathaustuer-rechts.webp");
}

.rathaustuer-image:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgb(0 0 0 / 30%);
}

.rathaustuer-image:active {
  transform: scale(0.98);
  box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
}

.section.content-section {
  transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

.section.content-section.scrolled-left {
  transform: translateX(-100%);
  opacity: 0;
}

.section.content-section.scrolled-right {
  transform: translateX(100%);
  opacity: 0;
}

.section.content-section.active {
  transform: translateX(0);
  opacity: 1;
}

.hardware-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

.location-marker.highlighted div {
  transform: scale(1.2);
  transition: transform 0.3s;
}

#location-carousel {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 9999;
  width: 100%;
  transform: translateX(-50%);
}

#location-title {
  margin: 0 auto; /* Auto-margin für perfekte Zentrierung */
  padding-top: 2rem;
  font-size: 2rem;
  text-align: center;
  text-transform: uppercase;
  padding-bottom: 1rem;
  line-height: 1.1;
}

#location-subtitle {
  margin: 0 0.5rem;
  font-weight: 100;
  text-align: center;
  font-size: 16px;
}

#continue-btn {
  margin: 0;
  background-color: transparent;
}

.story-slide {
  position: relative;
  width: 100%;
  height: 100%;
}

.back-to-map-btn {
  display: block;
  width: 100%;
  margin-top: 1rem;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 8px;
  background: var(--primary-color);
  color: white;
  font-size: 1rem;
  cursor: pointer;
}

.back-to-map-btn:hover {
  background: var(--primary-color-dark);
}

.door-story-container {
  z-index: 1000;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background-color: #000;
}

.nav-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  border: none;
  background: transparent;
  color: white;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.nav-btn:disabled {
  cursor: not-allowed;
}

.nav-btn:disabled svg path {
  fill: #b2afaf !important;
}

.disabled {
  cursor: not-allowed;
}

.disabled svg path {
  fill: #b2afaf !important;
}

.story-progress-fill {
  height: 100%;
  background-color: var(--primary-color);
  transition: width 0.3s ease;
}

#home {
  overflow-y: auto !important;
  background-color: white;
  height: 100dvh !important;
  max-height: 940px;
}

.back-to-map-button + .navigation-controls {
  margin-top: 0.5rem;
}

.content-section {
  height: 100dvh;
  overflow: hidden;
  overscroll-behavior: none;
}

.fade-out {
  transition: opacity 0.5s ease-out;
  opacity: 0;
}

.location-detail {
  position: relative;
  width: 100%;
  height: 100%;
}

.navigation-controls {
  position: fixed !important;
  bottom: 0;
  left: 0;
  right: 0;
  /* padding-bottom: 20px; */
}

/* ===== SWIPE TUTORIAL OVERLAY ===== */
.swipe-tutorial-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10001; /* Higher than story container */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  pointer-events: none;
  backdrop-filter: blur(3px);
}

.swipe-tutorial-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.swipe-tutorial-content {
  text-align: center;
  color: white;
  padding: 2rem;
  max-width: 320px;
  animation: tutorialContentSlideIn 0.5s ease-out both;
}

.swipe-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
}

.swipe-icon img {
  width: 80px;
  height: 80px;
  opacity: 1;
  animation: swipeAnimation 2s infinite ease-in-out;
  filter: brightness(0) invert(1); /* Makes the icon white */
}

.swipe-tutorial-text {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0rem;
  font-family: "Spline Sans", sans-serif;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  color: white;
}

.swipe-tutorial-subtitle {
  font-size: 1rem;
  opacity: 0.85;
  line-height: 1.4;
  font-family: "Spline Sans", sans-serif;
  font-weight: 300;
  color: white;
  margin-top: 0.5rem;
}

/* Animationen */
@keyframes tutorialContentSlideIn {
  from {
    transform: translateY(20px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes swipeAnimation {
  0% {
    transform: translateX(20px) scale(1);
    opacity: 0.6;
  }
  25% {
    transform: translateX(10px) scale(1.1);
    opacity: 0.9;
  }
  50% {
    transform: translateX(-10px) scale(1.2);
    opacity: 1;
  }
  75% {
    transform: translateX(-20px) scale(1.1);
    opacity: 0.9;
  }
  100% {
    transform: translateX(20px) scale(1);
    opacity: 0.6;
  }
}

/* Fade out Animation */
.swipe-tutorial-overlay.fade-out {
  opacity: 0;
  transition: opacity 0.6s ease-out;
  pointer-events: none;
}

/* Responsive Anpassungen */
@media (max-width: 480px) {
  .swipe-tutorial-content {
    padding: 1.5rem;
    max-width: 280px;
  }

  .swipe-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 1.5rem;
  }

  .swipe-icon img {
    width: 70px;
    height: 70px;
  }

  .swipe-tutorial-text {
    font-size: 1.3rem;
  }
}

/* Reduzierte Animation für Nutzer mit Motion-Präferenzen */
@media (prefers-reduced-motion: reduce) {
  .swipe-icon img {
    animation: simpleSwipeHint 2s infinite ease-in-out;
  }

  .swipe-tutorial-content {
    animation: none;
    opacity: 1;
    transform: none;
  }

  @keyframes simpleSwipeHint {
    0%,
    70%,
    100% {
      transform: translateX(0);
      opacity: 1;
    }
    35% {
      transform: translateX(-15px);
      opacity: 0.8;
    }
  }
}

#datenschutz,
#impressum {
  opacity: 1 !important;
  overflow-y: auto !important;
  transform: none !important;
}

.location-permission-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10002;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(3px);
}

.location-permission-overlay.show {
  opacity: 1;
  visibility: visible;
}

.location-permission-modal {
  background: white;
  border-radius: 16px;
  max-width: 340px;
  width: 90%;
  padding: 0;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.4s ease-out;
  overflow: hidden;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(20px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.location-permission-content {
  padding: 24px 24px 16px 24px;
  text-align: center;
}

.location-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border-radius: 50%;
}

.location-permission-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 12px 0;
  color: #1e1e1e;
  line-height: 1.3;
}

.location-permission-description {
  font-size: 14px;
  color: #666;
  line-height: 1.4;
  margin: 0 0 24px 0;
}

.location-permission-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 24px 24px 24px;
}

.location-permission-button {
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: block;
  text-align: center;
}

.location-permission-primary {
  background: #0066cc;
  color: white;
}

.location-permission-primary:hover {
  background: #0052a3;
  transform: translateY(-1px);
}

.location-permission-link {
  margin-top: 8px;
  padding: 8px;
  background: transparent;
  color: #0066cc;
  text-decoration: underline;
  font-size: 14px;
  font-weight: 500;
}

.location-permission-link:hover {
  color: #0052a3;
  background: transparent;
}

@media (max-width: 480px) {
  .location-permission-modal {
    max-width: 320px;
  }

  .location-permission-content {
    padding: 20px 20px 12px 20px;
  }

  .location-permission-buttons {
    padding: 0 20px 20px 20px;
  }
}

/* ===== ERGÄNZUNGEN FÜR STYLES.CSS ===== */
/* Füge diese Styles zu deiner bestehenden styles.css hinzu: */

/* Tour-Nummern in den Cards */
.card-tour-number {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #1e1e1e;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  border: 2px solid white;
  transition: all 0.3s ease;
}

.location-card {
  position: relative; /* Wichtig für absolute positioning der Nummer */
}

.location-card.highlighted .card-tour-number {
  background: #1e1e1e;
  transform: scale(1);
}

.location-card.visited .card-tour-number {
  background: var(--visited-color);
}

.location-card.visited.highlighted .card-tour-number {
  background: #1e1e1e;
}

.location-card.disabled .card-tour-number {
  background: #cccccc;
  opacity: 0.6;
}

/* Animation für Card-Nummern */
@keyframes cardNumberAppear {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.card-tour-number {
  animation: cardNumberAppear 0.5s ease-out 0.2s both;
}

/* Responsive Anpassungen */
@media (max-width: 480px) {
  .card-tour-number {
    width: 28px;
    height: 28px;
    font-size: 14px;
    top: 10px;
    left: 10px;
  }
}

/* Verbesserte Sichtbarkeit auf verschiedenen Bildern */
.card-tour-number::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  z-index: -1;
}

/* Hover-Effekte für die Cards - alle gleich groß halten */
.location-card:hover .card-tour-number {
  transform: scale(1);
}

.location-card.highlighted:hover .card-tour-number {
  transform: scale(1);
}

/* Cookie Consent erweiterte Styles */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  padding: 20px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  transform: translateY(100%);
  transition: transform 0.4s ease-out;
  border-top: 1px solid #e0e0e0;
}

.cookie-consent.show {
  transform: translateY(0);
}

.cookie-consent-content {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

.cookie-consent-text {
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}

.cookie-consent-text strong {
  font-weight: 600;
}

.cookie-consent-text a {
  color: var(--primary-color);
  text-decoration: underline;
}

.cookie-consent-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.cookie-consent-button {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 120px;
}

.cookie-consent-accept {
  background: var(--primary-color);
  color: white;
}

.cookie-consent-accept:hover {
  background: #b91e5e;
}

.cookie-consent-settings {
  background: #f5f5f5;
  color: #333;
  border: 1px solid #ddd;
}

.cookie-consent-settings:hover {
  background: #e8e8e8;
}

.cookie-consent-decline {
  background: transparent;
  color: #666;
  border: 1px solid #ccc;
}

.cookie-consent-decline:hover {
  background: #f9f9f9;
}

.cookie-settings-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10003;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  backdrop-filter: blur(3px);
}

.cookie-settings-overlay.show {
  opacity: 1;
  visibility: visible;
}

.cookie-settings-modal {
  background: white;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(20px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.cookie-settings-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 20px 0;
  padding: 24px 24px 0 24px;
  color: #333;
}

.cookie-category {
  padding: 16px 24px;
  border-bottom: 1px solid #f0f0f0;
}

.cookie-category:last-of-type {
  border-bottom: none;
}

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.cookie-category-title {
  font-size: 16px;
  font-weight: 600;
  color: #333;
}

.cookie-toggle {
  width: 50px;
  height: 26px;
  background: #ccc;
  border-radius: 13px;
  position: relative;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.cookie-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cookie-toggle.active {
  background: var(--primary-color);
}

.cookie-toggle.active::after {
  transform: translateX(24px);
}

.cookie-toggle.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.cookie-category-description {
  font-size: 14px;
  color: #666;
  line-height: 1.4;
  margin: 0;
}

.cookie-settings-buttons {
  display: flex;
  gap: 12px;
  padding: 20px 24px 24px 24px;
  justify-content: flex-end;
}

.cookie-settings-button {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cookie-settings-save {
  background: var(--primary-color);
  color: white;
}

.cookie-settings-save:hover {
  background: #b91e5e;
}

.cookie-settings-cancel {
  background: transparent;
  color: #666;
  border: 1px solid #ccc;
}

.cookie-settings-cancel:hover {
  background: #f9f9f9;
}

/* Mobile Anpassungen für Cookie-Modals */
@media (max-width: 768px) {
  .cookie-consent-content {
    text-align: left;
  }

  .cookie-consent-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-consent-button {
    min-width: auto;
  }

  .cookie-settings-modal {
    margin: 20px;
    width: calc(100% - 40px);
  }

  .cookie-settings-buttons {
    flex-direction: column;
  }
}
