/* =========================================
   PROJEKTE.CSS
   Spezifische Styles für die Projekt-Seite
   ========================================= */

/* --- Interne Styles aus projekte.html (Video Background & Layouts) --- */

.video-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

.video-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 130%;
  min-height: 130vh;
  object-fit: cover;
}

.video-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  z-index: 0;
}

/* Layout für Video und Text nebeneinander (LED Projekte) */
.led-project-content {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 30px;
}

.led-video-section {
  flex: 0 0 45%;
  min-width: 280px;
}

.led-text-section {
  flex: 1;
}

/* Container für zweites Video (rechtsbündig) */
.led-video-second-container {
  display: flex;
  flex-direction: row-reverse;
  gap: 20px;
  align-items: flex-start;
  margin-top: 30px;
  margin-bottom: 30px;
}

.led-video-section-second {
  flex: 0 0 45%;
  min-width: 280px;
}

.led-text-section-second {
  flex: 1;
}

/* Container für zentriertes Video */
.centered-video-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 40px;
  margin-bottom: 30px;
  width: 100%;
}

.centered-video-wrapper {
  width: 100%;
  max-width: 800px;
}

/* Video-Box Anpassungen */
.led-video-section .hero, 
.led-video-section-second .hero, 
.centered-video-wrapper .hero {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: black;
}

.aspect-ratio-override,
.led-video-section .hero.aspect-ratio-override {
  min-height: auto !important;
}

/* Mikroskop Fotos */
.mikro-photos {
  display: flex;
  justify-content: center;
  gap: 0px;
  margin: 20px 0px;
}

.mikro-photos img {
  max-width: 50%;
  height: auto;
  background: transparent;
}

/* Responsive Anpassungen für Layouts */
@media (max-width: 768px) {
  .led-project-content {
    flex-direction: column;
  }
  .led-video-second-container {
    flex-direction: column;
  }
  .led-video-section, 
  .led-video-section-second {
    flex: 1;
    width: 100%;
    min-width: auto;
  }
  .mikro-photos {
    flex-direction: column;
    align-items: center;
  }
  .mikro-photos img {
    max-width: 100%;
    margin-bottom: 20px;
  }
  .led-video-section .hero {
    min-height: 290px !important;
  }
}

@media (max-width: 480px) {
  .led-video-section .hero {
    min-height: 300px !important;
  }
}

/* --- Styles aus styles.css (Grid & Tiles) --- */

.projects-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 6px;
  position: relative;
}

.projects-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding: 6px;
}

/* Projekt Kachel Styles */
.project-tile {
  position: relative;
  height: 200px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(107,86,255,0.2);
  border-color: var(--accent);
}

.project-tile:active {
  transform: translateY(-2px);
}

.project-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.05) saturate(1.05) brightness(0.85);
  transition: filter .25s ease, transform .25s ease;
}

.project-tile:hover img {
  filter: contrast(1.1) saturate(1.15) brightness(0.95);
  transform: scale(1.05);
}

/* Overlay in der Kachel */
.project-tile .tile-overlay {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(3,7,18,0.6), rgba(3,7,18,0.35));
  border: 1px solid rgba(255,255,255,0.04);
  backdrop-filter: blur(6px);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background .25s ease, backdrop-filter .25s ease;
}

.project-tile:hover .tile-overlay {
  background: linear-gradient(90deg, rgba(3,7,18,0.7), rgba(3,7,18,0.45));
  backdrop-filter: blur(8px);
}

.tile-overlay h3 {
  margin: 0;
  font-family: Orbitron, sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.tile-overlay p {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.9;
  line-height: 1.4;
}

/* Status Badges */
.status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 10px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(3,7,18,0.7), rgba(3,7,18,0.5));
  border: 1px solid rgba(255,255,255,0.1);
  backdrop-filter: blur(6px);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.active {
  color: var(--accent);
  border-color: var(--accent-2);
}

.status-badge.archived {
  color: #999;
  border-color: rgba(255,255,255,0.06);
}

/* Media Queries für das Grid */
@media(min-width: 600px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(min-width: 720px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .project-tile {
    height: 240px;
  }
}

@media(min-width: 900px) {
  .projects-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.projects-grid.hidden {
  display: none;
}

/* --- Expanded View Styles (Detailansicht) --- */

.expanded-project {
  display: flex;
  flex-direction: column;
  gap: 14px;
  opacity: 0;
  visibility: hidden;
  height: 0;
  overflow: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, height 0.3s ease;
}

.expanded-project.active {
  opacity: 1;
  visibility: visible;
  height: auto;
  overflow: visible;
  pointer-events: auto;
}

.expanded-main {
  position: relative;
  height: auto;
  border: 1px solid var(--accent);
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(107,86,255,0.3);
  display: grid;
  grid-template-columns: 1fr;
  overflow: visible;
}

.expanded-background {
  grid-column: 1;
  grid-row: 1;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  filter: contrast(1.05) saturate(1.05) brightness(0.7);
  z-index: 0;
  border-radius: 12px;
  overflow: hidden;
}

.expanded-content {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  z-index: 1;
  background: linear-gradient(to bottom, rgba(6,6,26,0.3) 0%, rgba(6,6,26,0.85) 15%, rgba(6,6,26,0.95) 100%);
  padding: 24px;
  display: flex;
  flex-direction: column;
  height: auto;
  border-radius: 12px;
}

/* Sticky Close Button */
.close-btn {
  position: -webkit-sticky;
  position: sticky;
  top: 20px;
  align-self: flex-end;
  margin-left: auto;
  margin-bottom: 20px;
  z-index: 9999;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.08) 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 12px 20px;
  color: #e6eef8;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  font-family: Orbitron, sans-serif;
  font-size: 0.95rem;
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  display: block;
}

.close-btn:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18) 0%, rgba(255, 255, 255, 0.12) 100%);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.5), 0 0 15px rgba(110, 231, 255, 0.3);
}

.expanded-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}

.expanded-header h3 {
  font-family: Orbitron, sans-serif;
  font-size: 2rem;
  margin: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.expanded-text {
  flex: 1;
  line-height: 1.8;
  font-size: 0.8rem;
  opacity: 0.95;
  font-family: 'FuturText', sans-serif;
  letter-spacing: 1px;
}

.expanded-text img {
  filter: none !important;
}

.expanded-text strong {
  color: var(--accent);
  font-weight: 700;
}

/* Thumbnail Strip (Untere Leiste in Detailansicht) */
.thumbnail-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 6px;
}

.thumbnail-strip::-webkit-scrollbar { height: 6px; }
.thumbnail-strip::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 3px; }
.thumbnail-strip::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

.thumbnail-item {
  flex: 0 0 120px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.1);
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
}

.thumbnail-item:hover, .thumbnail-item.active {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(110,231,255,0.4);
}

.thumbnail-item.active { transform: translateY(-3px); }

.thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.7);
  transition: filter 0.25s ease;
}

.thumbnail-item:hover img { filter: brightness(1); }

.thumbnail-label {
  position: absolute;
  bottom: 4px;
  left: 4px;
  right: 4px;
  background: rgba(6,6,26,0.85);
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-align: center;
}