/* Minimal, readable theme + W3CSS baseline */
/* PWA & App-Icon Support */
@media (display-mode: standalone) {

  /* Styles für wenn die App installiert ist */
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }

  .hero {
    margin-top: 0;
  }
}

/* iOS Safari Styling für Add to Homescreen */
@supports (-webkit-touch-callout: none) {
  .sticky-nav {
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
  }
}

html,
body {
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f6f7fb;
  color: #24323f;
  overflow-x: hidden;
  /* Verhindert horizontales Scrollen */
}

h1,
h2,
h3 {
  margin-top: 0;
}

a {
  color: #0b79d0;
  text-decoration: none;

  &:hover {
    text-decoration: underline;
  }
}

header.hero {
  min-height: 70vh;
  background-image: url('https://assets.adac.de/image/upload/ar_16:9,c_fill,f_auto,g_auto,q_auto:eco,w_2000/v1/ADAC-eV/KOR/Bilder/RF/istanbul-sehenswuerdigkeiten-bosporusfahrt-2411_nkzof1');
  background-size: cover;
  background-position: center;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: inset 0 0 0 1000px rgba(0, 0, 0, .25);

  .inner {
    padding: 60px 20px;
    max-width: 1000px;
  }

  h1 {
    font-size: 40px;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .5);
    margin-bottom: 8px;
  }

  p {
    font-size: 18px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .5);
  }
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
  width: 100%;
  box-sizing: border-box;
}

.day {
  margin: 28px 0;
  padding: 20px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(9, 30, 66, .06);
}

.spot {
  display: grid;
  grid-template-columns: 260px 1fr 200px;
  gap: 16px;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 1px solid #eef1f5;

  &:last-child {
    border-bottom: 0;
  }

  >img {
    width: 100%;
    max-width: 400px;
    max-height: 400px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    cursor: pointer;
    transition: transform 0.3s ease;

    &:hover {
      transform: scale(1.05);
    }
  }

  .text {
    flex: 1;
  }

  .traveler-images>img {
    max-width: 100px;
    max-height: 100px;
  }

  .food {
    min-width: 200px;

    h4 {
      margin: 0 0 8px 0;
      color: #0b79d0;
      font-size: 14px;
      font-weight: 600;
    }

    ul {
      margin: 0;
      padding: 0;
      list-style: none;
    }

    li {
      margin: 6px 0;
      padding: 8px 10px;
      background: #f8f9fa;
      border-radius: 6px;
      font-size: 12px;
      cursor: pointer;
      transition: all 0.2s ease;
      border-left: 3px solid #28a745;

      &:hover {
        background: #e9ecef;
        transform: translateX(2px);
      }

      &.vegan {
        border-left-color: #28a745;
      }

      &.vegetarian {
        border-left-color: #ffc107;
      }

      &.mixed {
        border-left-color: #6c757d;
      }
    }
  }
}

.spot-upload {
  grid-column: 1 / -1;
  margin-top: 10px;
}

.mapframe {
  width: 100%;
  height: 420px;
  border: 0;
  border-radius: 10px;
  background: #e9eef5;
}

.note {
  font-size: 14px;
  color: #506172;
}

/* Lightbox Styles */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(5px);
}

.lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.lightbox-content img {
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Mobile Lightbox Adjustments */
@media screen and (max-width: 768px) {
  .lightbox-close {
    top: 10px;
    right: 10px;
    font-size: 24px;
    width: 35px;
    height: 35px;
  }

  .lightbox-content {
    max-width: 95%;
    max-height: 95%;
  }
}

.footer {
  background: #121821;
  color: #cfd8e3;
  padding: 24px;
  text-align: center;
  margin-top: 30px;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: #e9f6ff;
  color: #0b79d0;
  font-weight: 600;
  margin-left: 6px;
  font-size: 12px;
}

/* Sticky Navigation */
.sticky-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid #eef1f5;
  box-shadow: 0 2px 8px rgba(9, 30, 66, .08);
  padding: 12px 0;
  margin-bottom: 20px;
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 12px;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  align-items: center;
  padding: 8px 0;
}

.nav-link {
  padding: 6px 12px;
  background: #f6f7fb;
  color: #24323f;
  text-decoration: none;
  border-radius: 16px;
  font-size: 13px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  white-space: nowrap;

  &:hover {
    background: #0b79d0;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
  }

  &.active {
    background: #0b79d0;
    color: #fff;
  }
}

/* Lightbox Styles (bereits vorhanden - alte Modal styles entfernt) */

/* Restaurant Modal Styles */
.restaurant-modal {
  display: flex;
  position: fixed;
  z-index: 1001;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  animation: fadeIn 0.3s;
  justify-content: center;
  align-items: center;
}

.restaurant-modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  overflow-y: auto;

  .restaurant-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
  }

  h3 {
    margin: 0 0 10px 0;
    color: #24323f;
    font-size: 18px;
  }

  .restaurant-type {
    margin: 10px 0;
    color: #6c757d;
    font-size: 14px;
    font-weight: 500;
  }

  .restaurant-description {
    margin: 15px 0;
    color: #495057;
    font-size: 14px;
    line-height: 1.5;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #0b79d0;
  }

  .restaurant-links {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
  }

  .maps-link {
    display: inline-block;
    padding: 8px 16px;
    background: #28a745;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.2s ease;

    &:hover {
      background: #218838;
    }
  }

  .tripadvisor-link {
    display: inline-block;
    padding: 8px 16px;
    background: #ff6b35;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: background 0.2s ease;

    &:hover {
      background: #e55a2b;
    }
  }
}

.restaurant-close {
  position: absolute;
  top: 10px;
  right: 15px;
  color: #aaa;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;

  &:hover,
  &:focus {
    color: #000;
    text-decoration: none;
  }
}

/* Upload Styles */
.upload-section {
  margin-top: 12px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px dashed #dee2e6;
}

.upload-btn {
  background: #0b79d0;
  color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s ease;

  &:hover {
    background: #096bb3;
  }

  &:disabled {
    background: #6c757d;
    cursor: not-allowed;
  }
}

.upload-input {
  display: none;
}

.upload-progress {
  margin-top: 8px;
  height: 4px;
  background: #e9ecef;
  border-radius: 2px;
  overflow: hidden;
  display: none;
}

.upload-progress-bar {
  height: 100%;
  background: #0b79d0;
  width: 0%;
  transition: width 0.3s ease;
}

.upload-status {
  margin-top: 8px;
  font-size: 12px;
  color: #6c757d;

  &.success {
    color: #28a745;
  }

  &.error {
    color: #dc3545;
  }
}

.uploaded-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.uploaded-image {
  width: 60px;
  height: 60px;
  border-radius: 4px;
  object-fit: cover;
  border: 2px solid #dee2e6;
  cursor: pointer;
}

/* Traveler Selection Styles */
.traveler-selection {
  margin-bottom: 10px;
  padding: 12px;
  background: #fff;
  border-radius: 8px;
  border: 2px solid #0b79d0;
  box-shadow: 0 2px 8px rgba(11, 121, 208, 0.1);

  h4 {
    margin: 0 0 10px 0;
    color: #0b79d0;
    font-size: 14px;
    text-align: center;
  }
}

.traveler-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.traveler-btn {
  background: #f8f9fa;
  color: #495057;
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: all 0.2s ease;
  text-align: center;

  &:hover {
    background: #0b79d0;
    color: white;
    border-color: #0b79d0;
    transform: translateY(-1px);
  }
}

/* Travelers Gallery Styles */
.travelers-gallery {
  margin-top: 15px;
}

.traveler-section {
  display: none;
  margin-bottom: 15px;
  padding: 10px;
  background: #fff;
  border-radius: 8px;
  border-left: 4px solid #0b79d0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.traveler-title {
  font-size: 16px;
  margin: 0 0 10px 0;
  color: #24323f;
  font-weight: 600;
}

.traveler-images {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.traveler-thumbnail {
  width: 100px;
  height: 100px;
  border-radius: 6px;
  object-fit: cover;
  border: 2px solid #dee2e6;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);

  &:hover {
    border-color: #0b79d0;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(11, 121, 208, 0.3);
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 12px;
  }

  .spot {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 24px;
    padding: 16px 0;

    img {
      width: 100%;
      height: auto;
      max-height: 250px;
      object-fit: cover;
      order: 1;
    }

    .text {
      order: 2;
    }

    .upload-section {
      order: 3;
    }
  }

  .nav-container {
    padding: 0 8px;
  }

  .nav-links {
    gap: 3px;
    padding: 6px 0;
  }

  .nav-link {
    padding: 5px 8px;
    font-size: 12px;
    border-radius: 12px;
  }

  .hero {
    min-height: 50vh;
    padding: 20px 12px;
  }

  .hero h1 {
    font-size: 1.8rem;
    margin-bottom: 8px;
  }

  .hero p {
    font-size: 14px;
  }

  .traveler-buttons {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .traveler-btn {
    font-size: 11px;
    padding: 8px 6px;
  }

  .traveler-thumbnail {
    width: 80px;
    height: 80px;
  }
}

@media screen and (max-width: 480px) {
  .nav-container {
    padding: 0 4px;
  }

  .nav-links {
    gap: 2px;
    padding: 4px 0;
  }

  .nav-link {
    padding: 4px 6px;
    font-size: 11px;
    border-radius: 10px;
  }

  .hero {
    min-height: 40vh;
    padding: 15px 8px;
  }

  .hero h1 {
    font-size: 1.5rem;
    line-height: 1.2;
  }

  .hero p {
    font-size: 13px;
    line-height: 1.3;
  }

  .container {
    padding: 0 8px;
  }

  .day h2 {
    font-size: 1.3rem;
    margin-bottom: 12px;
  }

  .spot {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px 0;

    img {
      width: 100%;
      height: auto;
      max-height: 200px;
      object-fit: cover;
    }

    .text {
      margin-top: 8px;
    }
  }

  .spot h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
  }

  .traveler-buttons {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }

  .traveler-btn {
    font-size: 10px;
    padding: 6px 4px;
  }
}

@media screen and (max-width: 700px) {
  .restaurant-modal-content {
    max-width: 95%;
    width: 95%;
    max-height: 90vh;
    padding: 15px;

    .restaurant-image {
      height: 150px;
    }

    .restaurant-links {
      flex-direction: column;
      gap: 8px;

      a {
        text-align: center;
      }
    }
  }
}

/* ==========================================================================
   ACCORDION SYSTEM - Collapsible Sections
   ========================================================================== */

/* Section Headers - Klickbar machen */
.day h2 {
  cursor: pointer;
  position: relative;
  padding-right: 40px;
  transition: all 0.3s ease;
  border-radius: 8px;
  padding: 16px 40px 16px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  margin-bottom: 0;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.day h2:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Accordion Pfeil Icon */
.day h2::after {
  content: '▼';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  transition: transform 0.3s ease;
  font-size: 0.8em;
  opacity: 0.8;
}

/* Eingeklappter Zustand */
.day.collapsed h2::after {
  transform: translateY(-50%) rotate(-90deg);
}

/* Section Content */
.section-content {
  overflow: hidden;
  transition: all 0.4s ease;
  background: white;
  border-radius: 0 0 12px 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Eingeklappter Zustand - Content verstecken */
.day.collapsed .section-content {
  max-height: 0;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}

/* Aufgeklappter Zustand */
.day:not(.collapsed) .section-content {
  max-height: none;
  opacity: 1;
  padding: 20px;
  margin-bottom: 20px;
}

/* Navigation Link aktiv */
.nav-link.active-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

/* Smooth Animations */
.day {
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.day.collapsed {
  margin-bottom: 8px;
}

.day:not(.collapsed) {
  margin-bottom: 20px;
}