/*fonts*/
@font-face {
    font-family: 'Bayshore';
    src: url('/fonts/bayshore-regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

/* Globale Variablen */
:root {
    --bg-light: #f5f5f5;
    --bg-dark: #e8e8e8;
    --text-main: #1a1a1a;
    --text-muted: #666;
    --text-meta: #888;
    --accent: #000;
}

/* 1. HINTERGRUND-TEXTUR & BASICS */
/* 1. HINTERGRUND ANPASSUNG */
body {
    margin: 0;
    padding: 0;
    background: #ffffff; /* Reinweißer Hintergrund */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* Das Punkt-Muster entfernen wir, indem wir body::before leeren oder löschen */
body::before {
    display: none; 
}

header {
    margin: 120px 0 80px 0;
    width: 85%;
    max-width: 1400px;
    display: flex;
    flex-direction: column;
    align-items: flex-start; 
}

h1 {
    font-family: 'Bayshore', sans-serif; /* Die neue Schriftart */
    font-weight: 400;
    font-size: 2.5rem; /* Eventuell etwas größer, da Schreibschriften oft kleiner wirken */
    letter-spacing: 1px; /* Verringert, damit die Buchstaben verbunden bleiben */
    text-transform: none; /* Deaktiviert Großbuchstaben-Zwang für Schreibschrift */
    border-left: 3px solid var(--accent);
    padding-left: 15px;
    margin-bottom: 25px;
}

.description {
    max-width: 800px;
    text-align: left;
    line-height: 1.8;
    color: var(--text-muted);
    font-size: 0.75rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* 2. GALLERIE LAYOUT */
.gallery-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 80px;
    width: 85%;
    max-width: 1400px;
    margin: 50px auto 0;
}

.gallery-tile:hover .profile-thumbnail {
    filter: blur(0px) brightness(1);
    transform: scale(1.03);
}

/* 3. BILD-CONTAINER & METADATEN */
.image-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    align-items: center; /* Zentriert die gesamte Gruppe auf der Seite */
}

.image-wrapper {
    display: flex;
    flex-direction: column;
    /* Entferne fit-content, damit er die volle verfügbare Breite nutzt */
    width: 100%; 
    max-width: 100%; 
}

.image-wrapper img {
    width: 100%; /* Das Bild füllt nun exakt die Breite aus, die auch der Globus nutzt */
    height: auto;
    max-height: none; /* Entferne die Begrenzung, damit es bündig bleibt */
    display: block;
    object-fit: cover;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.05);
}

img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 90vh; /* Vergrößert von 80vh auf 90vh */
    display: block;
    cursor: zoom-in;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.05);
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.info-row {
    box-sizing: border-box; /* Wichtig für Padding */
    width: 100%; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.image-context {
    width: 100%; /* Ebenfalls bündig */
    margin-top: 15px;
    color: #333;
    line-height: 1.8;
    font-size: 0.75rem;
}

.metadata {
    font-size: 0.65rem;
    color: var(--text-meta);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.image-description {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.8;
    letter-spacing: 0.5px;
    margin-top: 8px;
}



/* 4. BUTTONS & INTERAKTION */
.download-btn, .nav-link {
    font-size: 0.6rem;
    color: #aaa;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid #eee;
    padding: 5px 10px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.download-btn:hover, .nav-link:hover {
    color: var(--accent);
    border-color: var(--accent);
}

/* 5. ZURÜCK-NAVIGATION */
.back-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 7.5%;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.back-link {
    font-size: 0.62rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-meta);
    text-decoration: none;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--text-main);
}

/* 6. FLUG-KARTE (Globe + Info-Panel) */
.flight-card {
    width: 100%;
    display: flex;
    flex-direction: row;
    aspect-ratio: 16 / 7;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.1);
}

/* Linkes Info-Panel */
.flight-info {
    width: 240px;
    flex-shrink: 0;
    background: #0d0d0d;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
    overflow: hidden;
}

.fi-callsign {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.88);
    letter-spacing: 0.3px;
}

.fi-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
    flex-shrink: 0;
}

.fi-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.fi-label {
    font-size: 0.52rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
}

.fi-value {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.88);
    letter-spacing: 0.3px;
    line-height: 1.4;
}

.fi-sub {
    font-size: 0.68rem;
    color: rgba(255, 255, 255, 0.38);
}

.fi-loading {
    font-size: 0.6rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.25);
}

/* Globe-Container innerhalb der Flugkarte */
.flight-card .globe-container {
    flex: 1;
    aspect-ratio: unset;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
}

/* Mehrere Legs in einer Flugkarte (multi-leg) */
.flight-card.multi-leg {
    flex-direction: column;
    aspect-ratio: unset;
    height: auto;
    gap: 1px;
}
.flight-segment {
    display: flex;
    flex-direction: row;
    width: 100%;
    aspect-ratio: 16 / 7;
    overflow: hidden;
    flex-shrink: 0;     /* don't let column-flex shrink the segment */
}
.flight-segment .flight-info {
    width: 240px;
    flex-shrink: 0;
}
.flight-segment .globe-container {
    flex: 1;
    min-width: 0;       /* prevent flex overflow from base width:100% */
    width: auto;        /* override base width:100% – let flex decide */
    aspect-ratio: unset;
    /* height resolved by flex align-self:stretch (definite in flex spec) */
    border-radius: 0;
    box-shadow: none;
}

/* Standalone Globe-Container (Fallback, falls außerhalb .flight-card) */
.globe-container {
    width: 100%;
    aspect-ratio: 16 / 7;
    background-color: #000;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.1);
}

.flight-div { width: 100% !important; height: 100% !important; }

/* 6. LIGHTBOX */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    cursor: pointer; /* Zeigt an, dass man überall klicken kann zum Schließen */
}

.lightbox.active {
    display: flex;
}

#lightbox-img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain; /* Verhindert Verzerrungen */
}

/* --- Galerie-Kachel-Grid (Profilseite) --- */

.gallery-tile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    width: 85%;
    max-width: 1400px;
    margin: 50px auto 100px;
}

/* Eine einzelne Kachel */
.gallery-tile {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    transition: box-shadow 0.4s ease;
}

.gallery-tile:hover {
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.22);
}

/* Thumbnail innerhalb der Kachel */
.profile-thumbnail {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    filter: blur(15px) brightness(0.7);
    transition: filter 0.6s ease, transform 0.6s ease;
}

.gallery-tile:hover .profile-thumbnail {
    filter: blur(0px) brightness(1);
    transform: scale(1.03);
}

/* Platzhalter-Kachel ohne Bild */
.gallery-tile--placeholder {
    background: linear-gradient(135deg, #1a1a1a 0%, #2e2e2e 100%);
    cursor: default;
}

/* Galerie-Titel – zentriert über dem Bild */
.gallery-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    margin: 0;
    width: 90%;
    color: #ffffff;
    font-family: 'Bayshore', sans-serif;
    font-size: 4rem;
    text-align: center;
    text-shadow: 0 6px 24px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 0.4s ease;
}

.gallery-tile:hover .gallery-title {
    opacity: 0.85;
}