/* ===== Optimiert: media.css ===== */

.main-content {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Media Tabs */
.media-tabs {
  display: flex !important;
  justify-content: space-between;
  background-color: #313131;
  padding: 4px;
  border-radius: 10px;
  margin-bottom: 14px;
  width: 100%;
  flex-wrap: wrap;
  gap: 4px;
  position: relative;
  z-index: 10;
}

.tab-button {
  flex: 1;
  min-width: fit-content;
  background-color: #313131;
  color: #cccccc;
  border: none;
  padding: 8px 15px;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: sans-serif;
  font-weight: 700;
  border-radius: 4px;
  white-space: nowrap;
  transition: background-color 0.3s, color 0.3s;
}
.tab-button.active {
  background-color: #000000;
  color: #ffffff;
}
.fa-solid {
  margin-right: 10px;
}

.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
}

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

/* Section Titles */
.section-title {
  font-size: 28px;
  color: #ff5314;
  margin-top: 10px;
  margin-bottom: 30px;
  font-weight: 700;
  text-align: left;
}

/* Song / Media Box – Layout für alle Tabs (Musik, Videos, Fotos) */
.songs-section {
  background: linear-gradient(135deg, rgba(26, 24, 24, 0.05), rgba(44, 34, 27, 0.2));
  border: 1px solid rgba(255, 107, 53, 0.2);
  border-radius: 14px;
  padding: 16px;
  margin-top: 10px;
  width: 100%;
  max-width: 700px;
  box-sizing: border-box;
}

/* Song List (nur Musik) */
.song-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.song-item {
  border: 1.5px solid #ff5e00;
  border-radius: 6px;
  padding: 18px 26px 16px 26px;
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
  transition: box-shadow 0.3s, border-color 0.3s;
}
.song-item:hover {
  box-shadow: 0 12px 56px 6px rgba(255,110,50,0.38),
              0 0 0 3.5px rgba(255,94,0,0.13),
              0 0 32px 8px #ff6f38bb inset;
}
.song-meta-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
.song-title {
  font-size: 20px;
  font-weight: 700;
  color: white;
  margin: 0 0 3px 0;
  text-align: left;
}
.song-album {
  font-size: 14px;
  color: #ccc;
  font-style: italic;
  margin: 0;
  text-align: left;
}
.song-duration {
  font-size: 16px;
  color: #ff6b35;
  font-weight: 600;
  margin-left: 40px;
  white-space: nowrap;
}

.song-player-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 6px;
  width: 100%;
}

.streaming-section {
  text-align: center;
}
.streaming-title {
  display: none;
  font-size: 20px;
  color: white;
  margin-bottom: 25px;
  font-weight: 600;
}

/* ============================================= */
/* 📷 FOTO-GALERIEN – Polaroid-Stapel           */
/* ============================================= */

.photos-section {
  /* Inhalte liegen in gleicher Box */
}

.photo-gallery-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, 260px); /* 2 größere Stapel */
  column-gap: 80px;
  row-gap: 32px;
  justify-content: center;
  justify-items: center;
}

/* Hauptseite bei offenem Overlay ausblenden (Header/Footer bleiben) */
.photo-overlay-open .page-viewport {
  opacity: 0;
  pointer-events: none;
}

/* gesamter Stapel gedreht – GRÖSSER + deutlichere Stapel-Optik */
.polaroid-gallery {
  position: relative;
  width: 260px;
  height: 310px;
  transform: rotate(-2deg);
  transition: transform 0.18s ease-out, box-shadow 0.18s ease-out;
  box-shadow:
    0 6px 10px rgba(0, 0, 0, 0.45),
    0 14px 28px rgba(0, 0, 0, 0.7);
}

/* Untere Polaroids im Stapel – klarere Rahmen + stärkere Versätze */
.polaroid-gallery::before,
.polaroid-gallery::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #fdf9f3;
  border-radius: 0;
  border: 2px solid #f8ecda;
  box-shadow:
    0 5px 10px rgba(0, 0, 0, 0.35),
    0 12px 26px rgba(0, 0, 0, 0.6);
  z-index: -2;
}

.polaroid-gallery::before {
  transform: translate(-16px, 12px) rotate(-7deg);
}

.polaroid-gallery::after {
  transform: translate(12px, -10px) rotate(5deg);
  z-index: -1;
}

/* oberstes Polaroid */
.polaroid {
  position: relative;
  width: 100%;
  height: 100%;
  background: #fefdf9;
  padding: 14px 14px 30px; /* etwas mehr Weiß, klassischer Polaroid-Look */
  border-radius: 0;
  border: 3px solid #fdf9f3;
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.35),
    0 10px 22px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
}

.polaroid-image {
  width: 100%;
  flex: 1 1 auto;
  overflow: hidden;
  border-radius: 0;
  background: #222222;
}

.polaroid-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 0;
}

/* Entwicklerstreifen – Schrift ohne extra Hintergrund, wirkt wie Stift auf Papier */
.polaroid-caption {
  margin-top: 8px;
  padding: 4px 8px;
  text-align: center;
  font-size: 0.95rem;
  color: #ff6b35;
  font-weight: 750;
  font-family: "Segoe Script", "Bradley Hand", "Comic Sans MS", cursive;
}

/* Hover: ganzer Stapel */
.polaroid-gallery:hover {
  transform: translateY(-4px) rotate(0deg);
  box-shadow:
    0 8px 16px rgba(0, 0, 0, 0.45),
    0 18px 36px rgba(0, 0, 0, 0.8);
}

/* ============================================= */
/* 📷 FOTO-OVERLAY / LIGHTBOX                    */
/* ============================================= */

/* Lightbox: Hintergrund komplett transparent */
.photo-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  z-index: 9999;          /* über Header/Footer */
  background: transparent;
}

.photo-overlay.is-visible {
  display: flex;
}

/* Backdrop bleibt klickbar, aber ohne Verdunkelung */
.photo-overlay-backdrop {
  position: absolute;
  inset: 0;
  background: transparent;
}

/* Inhaltselement: halbtransparenter Hintergrund,
   immer gleiche Größe relativ zum Viewport */
.photo-overlay-dialog {
  position: relative;
  max-width: 960px;
  width: calc(100% - 40px);
  height: 80vh;                     /* feste Dialog-Höhe */
  max-height: 80vh;
  background: rgba(0, 0, 0, 0.7);   /* transparenter dunkler Hintergrund */
  border-radius: 10px;
  padding: 18px 18px 16px;
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(255, 255, 255, 0.03);
  z-index: 1;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;                 /* nichts darf herausragen */
}

.photo-overlay-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: rgba(0, 0, 0, 0.85);
  color: #ffffff;
  font-size: 22px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.photo-overlay-close:hover {
  background: rgba(0, 0, 0, 1);
}

.photo-overlay-main {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;   /* nimmt ganze restliche Höhe ein */
  min-height: 0;
}

/* Navigation */
.photo-overlay-arrow {
  border: none;
  background: rgba(0, 0, 0, 0.9);
  color: #ffffff;
  font-size: 26px;
  width: 38px;
  height: 60px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.photo-overlay-arrow:hover {
  background: rgba(0, 0, 0, 1);
}

/* Bildbereich: füllt die gesamte flexible Fläche im Dialog */
.photo-overlay-image-wrapper {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  background: transparent;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Standard: Desktop / größere Screens */
.photo-overlay-image {
  max-width: 100%;
  max-height: 55vh;
  width: auto;
  height: auto;
  object-fit: contain;   /* Bild immer vollständig sichtbar */
}

/* Thumbnails: fixer Block unten */
.photo-overlay-thumbs {
  margin-top: 12px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-top: 4px;
  flex: 0 0 auto;
  max-height: 96px;
}

.photo-overlay-thumb {
  flex: 0 0 auto;
  width: 80px;
  height: 60px;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  background: #222222;
}

.photo-overlay-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-overlay-thumb.is-active {
  border-color: #ff6b35;
}

/* ============================================= */
/* 📱📲💻🖥 RESPONSIVE BREAKPOINTS – 5 STUFEN BASIS */
/* ============================================= */

/* 📱 1. XS – Kleine Smartphones */
@media (max-width: 480px) {

  .songs-section {
    max-width: 100%;
    margin: 0;
    padding-left: 10px;
    padding-right: 10px;
  }

  .photo-gallery-grid {
    grid-template-columns: 1fr;
    row-gap: 32px;
  }

  .polaroid-gallery {
    width: 230px;
    height: 280px;
  }

  /* Overlay auf ganzen Bildschirm ausdehnen,
     Ecken entfernen, Bild deutlich größer */
  .photo-overlay {
    padding: 0;
  }

  .photo-overlay-dialog {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    padding: 12px;
  }

  .photo-overlay-image-wrapper {
    border-radius: 0;
  }

  .photo-overlay-image {
    max-height: 80vh;   /* Bilder auf Handy deutlich größer */
  }

  .photo-overlay-main {
    gap: 6px;
  }

  .photo-overlay-arrow {
    width: 30px;
    height: 50px;
  }

  /* Handy: Header + Footer ausblenden, wenn Overlay offen */
  html.photo-overlay-open header,
  html.photo-overlay-open footer {
    display: none;
  }
}

/* 📱 2. S – Normale Smartphones */
@media (min-width: 481px) and (max-width: 768px) {

  .songs-section {
    max-width: 100%;
    margin: 0;
    padding-left: 10px;
    padding-right: 10px;
  }

  .photo-gallery-grid {
    grid-template-columns: 1fr;
  }

  .polaroid-gallery {
    width: 230px;
    height: 280px;
  }

  /* auch hier Overlay vollflächig und Bild größer */
  .photo-overlay {
    padding: 0;
  }

  .photo-overlay-dialog {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
    padding: 14px;
  }

  .photo-overlay-image-wrapper {
    border-radius: 0;
  }

  .photo-overlay-image {
    max-height: 80vh;
  }

  /* Smartphones (S): ebenfalls Header/Footer ausblenden, wenn Overlay offen */
  html.photo-overlay-open header,
  html.photo-overlay-open footer {
    display: none;
  }
}

/* 📲 3. M – Tablets */
@media (min-width: 769px) and (max-width: 1023px) {

  .photo-gallery-grid {
    grid-template-columns: repeat(2, 260px);
  }
}

/* 💻 4. L – Laptops / kleine Desktops */
@media (min-width: 1024px) and (max-width: 1440px) {

  .photo-gallery-grid {
    grid-template-columns: repeat(2, 260px);
  }
}

/* 🖥 5. XL – Große Bildschirme / 4K */
@media (min-width: 1441px) {

  .photo-gallery-grid {
    grid-template-columns: repeat(2, 260px);
  }
}
