/* ============================================
   SAR-5 LARP Website – Main Stylesheet
   Paramilitärisches taktisches Design
   Fully Mobile-Responsive
   ============================================ */

/* Design Tokens werden über tokens.css geladen (siehe header.php) */

/* === Base Styles === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-dark);
    color: var(--color-text);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-text-light);
    letter-spacing: 0.03em;
}

h2, h3 {
    text-transform: uppercase;
}

a {
    color: var(--color-primary-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-accent);
}

::selection {
    background: var(--color-primary);
    color: #fff;
}

/* === Navigation === */
#mainNav {
    background: var(--color-bg-nav);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    padding: 0.75rem 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

#mainNav .navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-light);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

#mainNav .navbar-brand .brand-logo {
    height: 40px;
    width: auto;
}

#mainNav .nav-link {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
    position: relative;
}

#mainNav .nav-link:hover,
#mainNav .nav-link.active {
    color: var(--color-primary-light);
}

#mainNav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-primary-light);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

#mainNav .nav-link:hover::after,
#mainNav .nav-link.active::after {
    width: 60%;
}

.navbar-toggler {
    border-color: var(--color-border) !important;
    padding: 0.4rem 0.6rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px var(--color-primary-glow);
}

.navbar-toggler-icon {
    width: 1.2em;
    height: 1.2em;
}

/* === Hero Section === */
.hero-section {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh; /* Dynamic viewport for mobile browsers */
    background: linear-gradient(160deg, #0e0a09 0%, #1a1210 40%, #120e0c 100%);
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(ellipse at 20% 50%, var(--color-primary-glow) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 75%, rgba(201, 169, 110, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 20%, rgba(139, 26, 26, 0.12) 0%, transparent 40%);
    z-index: 1;
}

.hero-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    z-index: 2;
    pointer-events: none;
}

/* Hero Grid Background */
.hero-grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(139, 26, 26, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 26, 26, 0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 1;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 50%, black 30%, transparent 75%);
}

/* Large Background Watermark Logo – fixed, full-page */
.hero-bg-watermark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
    opacity: 0.025;
}

.hero-bg-watermark img {
    width: clamp(400px, 50vw, 700px);
    height: auto;
    filter: grayscale(100%);
}

/* Floating Particles */
.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: particleDrift linear infinite;
}

.particle.p1 {
    width: 3px; height: 3px;
    background: var(--color-primary-light);
    left: 15%;  bottom: -5%;
    animation-duration: 18s;
    animation-delay: 0s;
}
.particle.p2 {
    width: 2px; height: 2px;
    background: var(--color-accent);
    left: 40%; bottom: -5%;
    animation-duration: 22s;
    animation-delay: 3s;
}
.particle.p3 {
    width: 4px; height: 4px;
    background: rgba(178, 34, 34, 0.6);
    left: 65%; bottom: -5%;
    animation-duration: 16s;
    animation-delay: 6s;
}
.particle.p4 {
    width: 2px; height: 2px;
    background: var(--color-accent-light);
    left: 80%; bottom: -5%;
    animation-duration: 20s;
    animation-delay: 2s;
}
.particle.p5 {
    width: 3px; height: 3px;
    background: var(--color-primary-light);
    left: 30%; bottom: -5%;
    animation-duration: 25s;
    animation-delay: 8s;
}
.particle.p6 {
    width: 2px; height: 2px;
    background: rgba(201, 169, 110, 0.5);
    left: 55%; bottom: -5%;
    animation-duration: 19s;
    animation-delay: 5s;
}

@keyframes particleDrift {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    10% { opacity: 0.6; }
    50% { opacity: 0.3; }
    90% { opacity: 0.5; }
    100% { transform: translateY(-110vh) translateX(30px); opacity: 0; }
}

.hero-content {
    position: relative;
    z-index: 3;
    padding-top: var(--nav-height);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(139, 26, 26, 0.15);
    border: 1px solid var(--color-primary);
    border-radius: 4px;
    padding: 0.4rem 1.2rem;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-primary-light);
    margin-bottom: 1.5rem;
}

.badge-pulse {
    width: 8px;
    height: 8px;
    background: var(--color-status-active);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.4); }
    50% { opacity: 0.7; box-shadow: 0 0 0 8px rgba(74, 222, 128, 0); }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 700;
    line-height: 1;
    color: #fff;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-title-sub {
    display: block;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    font-weight: 400;
    color: var(--color-text-muted);
    letter-spacing: 0.3em;
    margin-bottom: 0.5rem;
}

.hero-text {
    font-size: clamp(0.95rem, 2.5vw, 1.15rem);
    color: var(--color-text);
    max-width: 550px;
    margin-bottom: 2rem;
    line-height: 1.8;
}

/* Hero Motto */
.hero-motto {
    font-family: var(--font-heading);
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    font-weight: 500;
    color: var(--color-primary-light);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
    text-shadow: 0 0 30px var(--color-primary-glow), 0 0 60px rgba(178, 34, 34, 0.15);
    position: relative;
    display: inline-block;
}

.hero-motto::before,
.hero-motto::after {
    content: '—';
    margin: 0 0.5em;
    color: var(--color-accent);
    opacity: 0.5;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Tactical Buttons */
.btn-tactical {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--color-primary);
    border: 1px solid var(--color-primary-light);
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 2px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-tactical:hover {
    background: var(--color-primary-light);
    border-color: var(--color-primary-light);
    color: #fff;
    box-shadow: 0 0 20px var(--color-primary-glow);
    transform: translateY(-2px);
}

.btn-tactical-outline {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 2px;
    padding: 0.75rem 2rem;
    transition: all 0.3s ease;
}

.btn-tactical-outline:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    gap: 3rem;
    justify-content: center;
    padding-bottom: 3.5rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary-light);
    line-height: 1;
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--color-text-muted);
    margin-top: 0.25rem;
}

/* Hero Scroll Indicator */
.hero-scroll-indicator {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    animation: bounce 2s infinite;
}

.hero-scroll-indicator a {
    color: var(--color-text-muted);
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.hero-scroll-indicator a:hover {
    color: var(--color-primary-light);
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* === Sections === */
.section {
    padding: var(--section-padding) 0;
    position: relative;
}

.section-dark {
    background-color: var(--color-bg-dark);
    background-image: 
        radial-gradient(ellipse at 0% 50%, rgba(139, 26, 26, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 80%, rgba(201, 169, 110, 0.03) 0%, transparent 40%);
}

.section-darker {
    background-color: var(--color-bg-darker);
    background-image: 
        radial-gradient(ellipse at 100% 30%, rgba(139, 26, 26, 0.05) 0%, transparent 45%),
        radial-gradient(ellipse at 0% 70%, rgba(201, 169, 110, 0.02) 0%, transparent 40%);
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-tag {
    display: inline-block;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--color-primary-light);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.section-tag--sm {
    font-size: 0.7rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.section-divider {
    width: 60px;
    height: 3px;
    background: var(--color-primary);
    margin: 0 auto;
    position: relative;
}

.section-divider::before,
.section-divider::after {
    content: '';
    position: absolute;
    top: 0;
    width: 8px;
    height: 3px;
    background: var(--color-primary-light);
}

.section-divider::before { left: -16px; }
.section-divider::after { right: -16px; }

/* === Unit Cards === */
.unit-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 1.5rem;
    height: 100%;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.unit-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--color-border-light);
    transition: background 0.3s ease;
}

.unit-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.unit-card:hover::before {
    background: var(--color-primary);
}

.unit-card-primary {
    border-color: var(--color-primary);
}

.unit-card-primary::before {
    background: var(--color-primary-light);
}

.unit-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.unit-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 26, 26, 0.15);
    border: 1px solid var(--color-primary);
    border-radius: 4px;
    color: var(--color-primary-light);
    font-size: 1.3rem;
}

.unit-designation {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 0.3em;
    color: var(--color-text-muted);
    text-transform: uppercase;
}

.unit-name {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.unit-card p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.unit-capabilities {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.unit-capabilities li {
    font-size: 0.85rem;
    color: var(--color-text);
    padding: 0.3rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.unit-capabilities li i {
    color: var(--color-primary-light);
    font-size: 0.75rem;
}

.unit-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    padding-top: 1rem;
    border-top: 1px solid var(--color-border);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-active {
    background: var(--color-status-active);
    box-shadow: 0 0 8px rgba(74, 222, 128, 0.5);
}

.status-standby {
    background: var(--color-status-standby);
    box-shadow: 0 0 8px rgba(250, 204, 21, 0.5);
}

.status-inactive {
    background: #555;
    box-shadow: none;
}

/* === Timeline / Missions === */
.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-border);
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-marker {
    position: absolute;
    left: -33px;
    top: 0.5rem;
    width: 14px;
    height: 14px;
    background: var(--color-bg-dark);
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    z-index: 1;
}

.timeline-marker.active {
    background: var(--color-primary-light);
    box-shadow: 0 0 12px var(--color-primary-glow);
}

.timeline-marker.planned {
    background: var(--color-bg-dark);
    border-color: #facc15;
    box-shadow: 0 0 10px rgba(250,204,21,0.35);
}

.timeline-content {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 1.5rem 2rem;
    transition: border-color 0.3s ease;
}

.timeline-content:hover {
    border-color: var(--color-primary);
}

.timeline-date {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--color-primary-light);
    letter-spacing: 0.15em;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.timeline-location {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    font-size: 0.78rem;
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
    font-weight: normal;
}

.timeline-content h4 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

.timeline-content p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.mission-badge {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.7rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    background: rgba(139, 26, 26, 0.2);
    border: 1px solid var(--color-primary);
    border-radius: 2px;
    color: var(--color-primary-light);
}

.mission-badge.mission-active {
    background: rgba(74, 222, 128, 0.15);
    border-color: var(--color-status-active);
    color: var(--color-status-active);
    animation: pulse 2s infinite;
}

.mission-badge.mission-planned {
    background: rgba(250,204,21,0.12);
    border-color: rgba(250,204,21,0.45);
    color: #facc15;
}

/* === Mission YouTube Videos === */
.mission-videos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: .65rem;
    margin-top: 1rem;
    padding-top: .85rem;
    border-top: 1px solid var(--color-border);
}
.yt-embed-wrap {
    aspect-ratio: 16 / 9;
    border-radius: 5px;
    overflow: hidden;
    background: #000;
    border: 1px solid rgba(255,255,255,0.08);
}
.yt-embed-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}


.page-header {
    padding: calc(var(--nav-height) + 3rem) 0 3rem;
    background: 
        radial-gradient(ellipse at 30% 50%, rgba(139, 26, 26, 0.08) 0%, transparent 50%),
        linear-gradient(135deg, var(--color-bg-darker) 0%, var(--color-bg-dark) 100%);
    border-bottom: 1px solid var(--color-border);
}

.page-header-content {
    text-align: center;
}

.page-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

/* === Legal Content (Impressum) === */
.page-header-sub {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    letter-spacing: 0.12em;
    margin-top: 0.5rem;
    margin-bottom: 0;
}

.legal-content {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 2.5rem;
}

.legal-section {
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.legal-section:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.legal-content h3 {
    font-size: 1rem;
    color: var(--color-accent);
    margin-top: 0;
    margin-bottom: 0.75rem;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
}

.legal-content h4 {
    font-size: 0.85rem;
    color: var(--color-text-light);
    letter-spacing: 0.08em;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.legal-content p {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
    line-height: 1.65;
}

/* Legal Cards (linke Spalte) */
.legal-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    overflow: hidden;
}

.legal-card-header {
    background: rgba(139, 26, 26, 0.12);
    border-bottom: 1px solid var(--color-border);
    padding: 0.65rem 1.25rem;
    font-size: 0.8rem;
    font-family: var(--font-heading);
    letter-spacing: 0.1em;
    color: var(--color-accent);
    display: flex;
    align-items: center;
}

.legal-card-body {
    padding: 1.25rem;
}

.legal-card-body p {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.legal-card-body p:last-child {
    margin-bottom: 0;
}

.legal-card-body strong {
    color: var(--color-text);
}

.legal-link {
    color: var(--color-primary-light);
    text-decoration: none;
    transition: color 0.2s;
}

.legal-link:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

.legal-notice {
    background: rgba(139, 26, 26, 0.1);
    border: 1px solid var(--color-primary);
    border-radius: 4px;
}

.legal-notice p {
    color: var(--color-text);
    margin: 0;
    font-size: 0.9rem;
}

/* === Downloads Section === */
.download-category-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--color-text-light);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.download-category-title i {
    color: var(--color-primary-light);
}

.download-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 1.25rem 1.5rem;
    height: 100%;
    transition: all 0.3s ease;
}

.download-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.download-icon {
    flex-shrink: 0;
    font-size: 2rem;
    color: #e74c3c;
}

.download-info {
    flex: 1;
    min-width: 0;
}

.download-info h5 {
    font-size: 0.95rem;
    letter-spacing: 0.05em;
    margin-bottom: 0.3rem;
}

.download-info p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.download-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.7rem;
    color: var(--color-text-muted);
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.download-btn {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    font-size: 1rem;
}

/* === Footer === */
.site-footer {
    background: var(--color-bg-darker);
    border-top: 2px solid transparent;
    border-image: linear-gradient(90deg, transparent, var(--color-primary), var(--color-accent), var(--color-primary), transparent) 1;
    padding: 1.5rem 0;
}

.footer-compact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.site-footer .footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.site-footer .brand-text {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text-light);
    letter-spacing: 0.1em;
}

.footer-disclaimer {
    color: var(--color-text-muted);
    font-size: 0.75rem;
    margin: 0;
    max-width: 300px;
    line-height: 1.4;
}

.footer-center {
    text-align: center;
}

.footer-links-inline {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1.5rem;
}

.footer-links-inline a {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    transition: color 0.3s;
}

.footer-links-inline a:hover {
    color: var(--color-primary-light);
}

.footer-right {
    text-align: right;
}

.footer-copyright {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin: 0;
}

.footer-motto {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    color: var(--color-primary-light);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0 0 0.25rem 0;
    opacity: 0.8;
}

/* === Social Buttons === */
.social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.8rem;
    border-radius: 4px;
    font-size: 0.76rem;
    font-family: var(--font-heading);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.05);
    color: var(--color-text-muted);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.social-btn:hover {
    text-decoration: none;
    color: #fff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.social-btn-youtube {
    background: rgba(255, 0, 0, 0.1);
    border-color: rgba(255, 0, 0, 0.25);
    color: #ff5555;
}
.social-btn-youtube:hover {
    background: rgba(255, 0, 0, 0.22);
    border-color: rgba(255, 0, 0, 0.45);
    color: #ff7777;
}

.social-btn-twitch {
    background: rgba(145, 70, 255, 0.1);
    border-color: rgba(145, 70, 255, 0.25);
    color: #b77aff;
}
.social-btn-twitch:hover {
    background: rgba(145, 70, 255, 0.2);
    color: #cc99ff;
}

.social-btn-discord {
    background: rgba(88, 101, 242, 0.1);
    border-color: rgba(88, 101, 242, 0.25);
    color: #8fa0f8;
}
.social-btn-discord:hover {
    background: rgba(88, 101, 242, 0.2);
    color: #aabbff;
}

.social-btn-instagram {
    background: rgba(225, 48, 108, 0.1);
    border-color: rgba(225, 48, 108, 0.25);
    color: #f07aaa;
}
.social-btn-instagram:hover {
    background: rgba(225, 48, 108, 0.2);
    color: #f5a0c0;
}

.social-btn-facebook {
    background: rgba(24, 119, 242, 0.1);
    border-color: rgba(24, 119, 242, 0.25);
    color: #5ba0f0;
}
.social-btn-facebook:hover {
    background: rgba(24, 119, 242, 0.2);
    color: #80bfff;
}

.social-btn-twitter {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--color-text-muted);
}
.social-btn-twitter:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

/* === Tabletop Page === */
.tabletop-section {
    padding-top: 3rem;
}

.tabletop-block {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 3rem;
}

.tabletop-block:last-of-type {
    border-bottom: none;
}

.tabletop-block-title {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    font-weight: 700;
    color: var(--color-text-light);
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--color-primary);
    display: inline-block;
}

.tabletop-block-body {
    color: var(--color-text);
    line-height: 1.8;
}

.tabletop-block-body p { margin-bottom: 1rem; }
.tabletop-block-body h2 { font-family: var(--font-heading); font-size: 1.3rem; color: var(--color-primary-light); margin-bottom: 0.75rem; }
.tabletop-block-body h3 { font-family: var(--font-heading); font-size: 1.1rem; color: var(--color-text); margin-bottom: 0.6rem; }
.tabletop-block-body blockquote { border-left: 3px solid var(--color-accent); padding-left: 1rem; color: var(--color-text-muted); font-style: italic; margin: 1rem 0; }
.tabletop-block-body ul, .tabletop-block-body ol { padding-left: 1.5rem; margin-bottom: 1rem; }

.tabletop-block-img {
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tabletop-block-img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
}

/* === 404 Page === */
.error-content {
    max-width: 500px;
    margin: 0 auto;
}

.error-content h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.error-content p {
    color: var(--color-text-muted);
}

/* === Responsive === */

/* ---- Tablet (max 991px) ---- */
@media (max-width: 991px) {
    :root {
        --section-padding: 60px;
        --nav-height: 60px;
    }

    .hero-stats {
        gap: 2rem;
    }

    .timeline {
        padding-left: 30px;
    }

    .timeline-marker {
        left: -23px;
        width: 12px;
        height: 12px;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-content {
        padding: 1.25rem 1.5rem;
    }

    .unit-card {
        padding: 1.25rem;
    }

    #mainNav .nav-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem !important;
    }
}

/* ---- Mobile (max 767px) ---- */
@media (max-width: 767px) {
    :root {
        --section-padding: 48px;
        --nav-height: 56px;
    }

    body {
        font-size: 0.95rem;
        line-height: 1.65;
    }

    /* -- Navigation Mobile -- */
    #mainNav {
        padding: 0.5rem 0;
    }

    #mainNav .navbar-brand .brand-logo {
        height: 32px;
    }

    #mainNav .navbar-brand {
        font-size: 1.2rem;
        gap: 0.4rem;
    }

    .navbar-collapse {
        background: var(--color-bg-nav);
        border-top: 1px solid var(--color-border);
        margin-top: 0.5rem;
        padding: 0.5rem 0;
        border-radius: 0 0 8px 8px;
    }

    #mainNav .nav-link {
        font-size: 0.85rem;
        padding: 0.6rem 1rem !important;
        text-align: center;
    }

    #mainNav .nav-link::after {
        display: none;
    }

    /* -- Hero Mobile -- */
    .hero-section {
        min-height: 100vh;
        min-height: 100dvh;
    }

    .hero-content .row {
        padding: 0 0.5rem;
    }

    .hero-logo-large img {
        height: 120px !important;
    }

    .hero-logo-glow {
        width: 150%;
        height: 150%;
    }

    .hero-title {
        font-size: clamp(2.5rem, 14vw, 4rem);
        margin-bottom: 1rem;
    }

    .hero-title-sub {
        font-size: clamp(0.7rem, 2.5vw, 0.9rem);
        letter-spacing: 0.15em;
    }

    .hero-motto {
        font-size: clamp(0.85rem, 3.5vw, 1.1rem);
        letter-spacing: 0.08em;
    }

    .hero-motto::before,
    .hero-motto::after {
        display: none;
    }

    .hero-text {
        font-size: 0.9rem;
        max-width: 100%;
        margin-bottom: 1.5rem;
        line-height: 1.7;
    }

    .hero-badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.8rem;
        margin-bottom: 1rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        padding: 0 1rem;
    }

    .hero-actions .btn {
        text-align: center;
        width: 100%;
        padding: 0.65rem 1.5rem;
        font-size: 0.8rem;
    }

    .hero-scroll-indicator {
        bottom: 0.5rem;
    }

    .hero-stats {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
        padding-bottom: 2.5rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    /* -- Section Headers Mobile -- */
    .section-header {
        margin-bottom: 2rem;
    }

    .section-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .section-tag {
        font-size: 0.7rem;
    }

    /* -- Story Mobile -- */
    .story-intro {
        font-size: 1rem;
        padding-left: 1rem;
        margin-bottom: 2rem;
    }

    .story-block {
        margin-bottom: 2rem;
    }

    /* -- Tabletop Mobile -- */
    .tabletop-block-img {
        margin-top: 1rem;
    }

    .tabletop-block {
        padding-bottom: 2rem;
    }

    .tabletop-block-body {
        font-size: 0.92rem;
        line-height: 1.75;
    }

    .tabletop-block-body h2 { font-size: 1.15rem; }
    .tabletop-block-body h3 { font-size: 1rem; }

    .social-links {
        gap: 0.3rem;
    }

    .social-btn span {
        display: none;
    }

    .social-btn {
        padding: 0.4rem 0.55rem;
        font-size: 0.9rem;
    }

    .story-block h3 {
        font-size: 1.1rem;
    }

    .story-block p {
        font-size: 0.9rem;
        line-height: 1.75;
    }

    .story-quote {
        padding: 1.5rem 1rem;
        margin: 2rem 0;
    }

    .story-quote p {
        font-size: 1.1rem;
    }

    .story-quote p.story-quote-sub {
        font-size: 0.85rem;
    }

    /* -- Unit Cards Mobile -- */
    .unit-card {
        padding: 1.25rem;
    }

    .unit-icon {
        width: 42px;
        height: 42px;
        font-size: 1.1rem;
    }

    .unit-name {
        font-size: 1.1rem;
    }

    .unit-card p {
        font-size: 0.85rem;
    }

    .unit-capabilities li {
        font-size: 0.8rem;
    }

    /* -- Timeline Mobile -- */
    .timeline {
        padding-left: 24px;
    }

    .timeline::before {
        left: 8px;
    }

    .timeline-marker {
        left: -20px;
        width: 10px;
        height: 10px;
    }

    .timeline-content {
        padding: 1rem 1.25rem;
    }

    .timeline-content h4 {
        font-size: 1rem;
    }

    .timeline-content p {
        font-size: 0.85rem;
    }

    .timeline-date {
        font-size: 0.75rem;
    }

    .timeline-item {
        margin-bottom: 1.5rem;
    }

    .mission-videos {
        grid-template-columns: 1fr;
    }

    /* -- Downloads Mobile -- */
    .download-card {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        padding: 1rem;
    }

    .download-info h5 {
        font-size: 0.9rem;
    }

    .download-info p {
        font-size: 0.78rem;
    }

    .download-meta {
        justify-content: center;
    }

    .download-category-title {
        font-size: 1rem;
    }

    /* -- Page Header Mobile -- */
    .page-header {
        padding: calc(var(--nav-height) + 2rem) 0 2rem;
    }

    .page-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    /* -- Footer Mobile -- */
    .footer-compact {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .footer-left {
        flex-direction: column;
        align-items: center;
    }

    .footer-disclaimer {
        max-width: 100%;
        text-align: center;
    }

    .footer-links-inline {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .footer-right {
        text-align: center;
    }

    .footer-logo {
        height: 28px;
    }

    .legal-content {
        padding: 1.5rem;
    }
}

/* ---- Small Mobile (max 400px) ---- */
@media (max-width: 400px) {
    :root {
        --section-padding: 36px;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-logo-large img {
        height: 100px !important;
    }

    .hero-motto {
        font-size: 0.8rem;
    }

    .unit-card, .timeline-content, .download-card {
        border-radius: 2px;
    }

    .story-quote {
        padding: 1.25rem 0.75rem;
    }

    .story-quote p {
        font-size: 1rem;
    }
}

/* ---- Large Desktop (min 1400px) ---- */
@media (min-width: 1400px) {
    .hero-logo-large img {
        height: 320px;
    }

    .hero-title {
        font-size: 7.5rem;
    }

    .hero-motto {
        font-size: 1.8rem;
    }
}

/* === Hero Logo === */
.hero-logo-large {
    position: relative;
    display: block;
    text-align: center;
    margin-bottom: 0.75rem;
}

.hero-logo-large img {
    height: clamp(160px, 25vw, 280px);
    width: auto;
    filter: drop-shadow(0 0 40px rgba(178, 34, 34, 0.4)) drop-shadow(0 0 80px rgba(178, 34, 34, 0.15));
    animation: logoFloat 6s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

.hero-logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, rgba(139, 26, 26, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 1;
    animation: glowPulse 4s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

/* === Story / History Section === */
.story-block {
    margin-bottom: 3rem;
}

.story-block:last-child {
    margin-bottom: 0;
}

.story-block h3 {
    font-size: 1.3rem;
    color: var(--color-primary-light);
    margin-bottom: 1rem;
    letter-spacing: 0.08em;
    position: relative;
    padding-left: 1.25rem;
}

.story-block h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.15em;
    width: 4px;
    height: 1.1em;
    background: var(--color-primary);
    border-radius: 2px;
}

.story-block p {
    font-size: 1rem;
    line-height: 1.85;
    color: var(--color-text);
    margin-bottom: 0.75rem;
}

.story-block p.story-emphasis {
    font-size: 1.05rem;
    color: var(--color-text-light);
    font-weight: 400;
}

.story-block p.story-muted {
    color: var(--color-text-muted);
    font-style: italic;
}

.story-intro {
    font-size: 1.2rem;
    line-height: 1.9;
    color: var(--color-text-light);
    border-left: 3px solid var(--color-primary);
    padding-left: 1.5rem;
    margin-bottom: 3rem;
}

.story-quote {
    text-align: center;
    padding: 2.5rem 2rem;
    margin: 3rem 0;
    background: 
        radial-gradient(ellipse at 50% 50%, rgba(139, 26, 26, 0.12) 0%, transparent 70%),
        rgba(139, 26, 26, 0.05);
    border: 1px solid var(--color-primary);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.story-quote::before {
    content: '\201E';
    position: absolute;
    top: -0.2em;
    left: 0.3em;
    font-size: 6rem;
    color: rgba(139, 26, 26, 0.15);
    font-family: Georgia, serif;
    line-height: 1;
    pointer-events: none;
}

.story-quote p {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--color-text-light);
    line-height: 1.6;
    margin-bottom: 0;
    letter-spacing: 0.02em;
}

.story-quote p.story-quote-sub {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--color-text-muted);
    margin-top: 1rem;
    letter-spacing: 0;
}

/* === Footer Logo === */
.footer-logo {
    height: 36px;
    width: auto;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* === Touch / Active States for Mobile === */
@media (hover: none) {
    .unit-card:hover,
    .download-card:hover,
    .timeline-content:hover {
        transform: none;
        box-shadow: none;
    }

    .galerie-card:hover,
    .galerie-preview-card:hover,
    .member-card:hover {
        transform: none;
    }

    .galerie-preview-card:hover img,
    .galerie-image:hover {
        transform: none;
    }

    .tabletop-block-img:hover {
        transform: none;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    }

    .unit-card:active,
    .download-card:active {
        border-color: var(--color-primary);
        background: var(--color-bg-card-hover);
    }
}

/* === Safe Area for Notch Phones === */
@supports (padding: env(safe-area-inset-bottom)) {
    .site-footer {
        padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
    }

    #mainNav {
        padding-left: env(safe-area-inset-left);
        padding-right: env(safe-area-inset-right);
    }
}

/* === Smooth Scroll & Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .hero-logo-large img {
        animation: none;
    }

    .hero-logo-glow {
        animation: none;
    }

    .particle {
        display: none;
    }

    /* 404-Partikel ebenfalls verstecken */
    .e404-p {
        display: none;
    }
}

/* ============================================
   Accessibility
   ============================================ */

/* Skip-to-content Link */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 8px 8px;
    z-index: 10000;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

/* Focus-visible für bessere Tastatur-Navigation */
*:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.btn:focus-visible,
.nav-link:focus-visible,
.navbar-toggler:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--color-accent-glow);
}

/* Kontrast-Verbesserungen */
.text-muted,
.story-muted {
    color: #9a9389 !important; /* WCAG AA auf dunklem Hintergrund */
}

.footer-disclaimer small {
    color: #9a9389;
}

/* ============================================
   Galerie
   ============================================ */

/* Kategorie-Filter */
.galerie-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--color-border-light);
    color: var(--color-text-muted);
    padding: 0.45rem 1.2rem;
    border-radius: 2px;
    font-family: var(--font-heading);
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
}

.filter-btn:hover {
    border-color: var(--color-primary-light);
    color: var(--color-text-light);
    background: rgba(139, 26, 26, 0.08);
}

.filter-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary-light);
    color: #fff;
    box-shadow: 0 0 12px var(--color-primary-glow);
}

.filter-btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--color-accent-glow);
}

/* Galerie-Alben */
.galerie-album {
    margin-bottom: 3.5rem;
}
.galerie-album:last-child {
    margin-bottom: 0;
}
.galerie-album-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: .75rem;
    border-bottom: 1px solid var(--color-border);
    flex-wrap: wrap;
}
.galerie-album-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text-light);
    letter-spacing: .04em;
    margin: 0;
    text-transform: uppercase;
}
.galerie-album-count {
    font-size: .78rem;
    color: var(--color-text-muted);
    font-family: var(--font-mono, monospace);
    margin-left: auto;
}

/* Galerie-Grid */
.galerie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.galerie-item-hidden {
    display: none;
}

/* Fade-Out beim Filtern (JS setzt diese Klasse, dann display:none nach der Transition) */
.galerie-item-fading .galerie-card {
    opacity: 0 !important;
    transform: translateY(8px) !important;
    transition: opacity 0.22s ease, transform 0.22s ease;
    pointer-events: none;
}

.galerie-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.galerie-card:hover {
    transform: translateY(-4px);
    border-color: var(--color-primary-light);
}

/* Galerie Preview (Startseite) */
.galerie-preview-link {
    display: block;
    text-decoration: none;
}

.galerie-preview-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    aspect-ratio: 4/3;
    transition: border-color 0.3s, transform 0.3s;
}

.galerie-preview-card:hover {
    border-color: var(--color-primary-light);
    transform: translateY(-4px);
}

.galerie-preview-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.galerie-preview-card:hover img {
    transform: scale(1.05);
}

.galerie-preview-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.75));
    color: #fff;
    font-size: 0.8rem;
    padding: 1.5rem 0.75rem 0.5rem;
}

.galerie-image-wrap {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    cursor: pointer;
}

.galerie-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.galerie-image:hover,
.galerie-image:focus {
    transform: scale(1.05);
}
.galerie-image:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

.galerie-info {
    padding: 1rem;
}

.galerie-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-light);
    margin-bottom: 0.25rem;
}

.galerie-desc {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

.galerie-cat {
    font-size: 0.75rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Lightbox */
.galerie-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none; /* Eigene Pinch-/Swipe-Gesten, kein Browser-Zoom */
}

.galerie-lightbox[hidden] {
    display: none;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    transform-origin: center center;
    will-change: transform; /* GPU-Compositing für flüssiges Pinch-Zoom */
}

.lightbox-caption {
    color: var(--color-text);
    font-family: var(--font-heading);
    margin-top: 1rem;
    font-size: 1.1rem;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10000;
    padding: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
}

.lightbox-close {
    top: 1rem;
    right: 1.5rem;
    font-size: 2.5rem;
}

.lightbox-prev {
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

/* Galerie Responsive */
@media (max-width: 991px) {
    .galerie-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 767px) {
    .galerie-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
        gap: 1rem;
    }

    .lightbox-prev,
    .lightbox-next {
        font-size: 1.5rem;
    }

    .lightbox-close {
        font-size: 2rem;
    }
}

@media (max-width: 400px) {
    .galerie-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   Page Loading Animation
   ============================================ */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 9999;
    pointer-events: none;
}

.page-loader .loader-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light), var(--color-accent));
    animation: pageLoad 0.8s ease-out forwards;
}

@keyframes pageLoad {
    0%   { width: 0%; }
    50%  { width: 70%; }
    100% { width: 100%; opacity: 0; }
}

/* Skeleton Shimmer */
.skeleton {
    background: var(--color-bg-dark);
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 26, 26, 0.08), transparent);
    animation: skeletonShimmer 1.5s infinite;
}

@keyframes skeletonShimmer {
    0%   { left: -100%; }
    100% { left: 100%; }
}

.skeleton-card {
    height: 260px;
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-text-sm {
    height: 0.75rem;
    width: 60%;
}

/* Skeleton-Zeile in Admin-Tabellen */
.skeleton-line {
    height: 0.9rem;
    border-radius: 4px;
    background: var(--color-bg-dark);
    position: relative;
    overflow: hidden;
}

.skeleton-line::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
    animation: skeletonShimmer 1.4s infinite;
}

/* Galerie Image Loading – rein CSS-basiert */
.galerie-card img {
    transition: opacity 0.3s ease, transform 0.4s ease;
}

/* ============================================
   Scroll & Fade Animations
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Member Cards (Team-Sektion)
   ============================================ */
.member-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.member-card:hover {
    border-color: var(--color-primary-light);
    transform: translateY(-4px);
    box-shadow: 0 8px 28px rgba(139, 26, 26, 0.25);
}

/* ===== Member Photo ===== */
.member-photo-wrap {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #111;
    position: relative;
}

.member-photo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.5s ease;
}

.member-card:hover .member-photo-wrap img {
    transform: scale(1.05);
}

.member-photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    color: var(--color-text-muted);
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 6px,
        rgba(255,255,255,0.03) 6px,
        rgba(255,255,255,0.03) 12px
    );
}

.member-photo-placeholder-kia {
    color: #555;
}

.member-photo-wrap-fallen {
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #0d0d0d;
    position: relative;
}

.member-photo-wrap-fallen img {
    filter: grayscale(60%);
}

.member-rank-badge {
    display: inline-block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-accent, #c9a96e);
    border: 1px solid rgba(201, 169, 110, 0.25);
    border-radius: 3px;
    padding: 1px 5px;
    margin-top: 2px;
}

.member-name-callsign {
    color: var(--color-accent, #c9a96e);
    font-style: italic;
    text-transform: none;
}

/* ===== Team-Gruppen ===== */
.team-group-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    border-bottom: 2px solid var(--color-primary);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

.team-group-header i {
    color: var(--color-primary-light);
    font-size: 1rem;
}

.member-card-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.1rem 1.25rem 0.75rem;
    border-bottom: 1px solid var(--color-border);
    background: rgba(139, 26, 26, 0.06);
}

.member-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--color-primary-dark);
    border: 2px solid var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.3rem;
    color: var(--color-accent);
}

.member-id-block {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.member-callsign {
    font-family: var(--font-heading);
    font-size: 1rem;
    letter-spacing: 0.12em;
    color: var(--color-accent);
    text-transform: uppercase;
    line-height: 1.1;
}

.member-realname {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    letter-spacing: 0.04em;
    margin-top: 0.1rem;
    line-height: 1.3;
}

.member-realname .member-name-callsign {
    font-size: inherit;
}

.member-unit-badge {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
    background: var(--color-border);
    border-radius: 3px;
    padding: 0.1em 0.45em;
    width: fit-content;
}

.member-card-body {
    padding: 1rem 1.25rem;
    flex: 1;
}

.member-name {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-light);
    margin-bottom: 0.15rem;
}

.member-role {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-primary-light);
    margin-bottom: 0.65rem;
}

.member-bio {
    font-size: 0.9rem;
    color: var(--color-text);
    line-height: 1.6;
    margin-bottom: 0;
}

.member-card-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-top: 1px solid var(--color-border);
}

.member-status-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-text-muted);
}

@media (max-width: 575px) {
    .member-card-header {
        flex-direction: column;
        text-align: center;
    }

    .member-unit-badge {
        align-self: center;
    }
}

@media (max-width: 480px) {
    /* 1-Spalten-Layout, Portrait-Bild bleibt erhalten */
    #team .col-sm-6,
    .fallen-section .col-sm-6,
    #team .col-6,
    .fallen-section .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Bild-Container: maximale Breite + zentriert */
    .member-photo-wrap {
        aspect-ratio: 3 / 4;
        max-width: 280px;
        margin: 0 auto;
    }

    /* Karte komplett zentriert */
    .member-card {
        align-items: center;
    }

    .member-card-header,
    .member-card-body,
    .member-card-footer {
        width: 100%;
        text-align: center;
    }

    .member-card-header {
        justify-content: center;
    }

    .member-card-footer {
        justify-content: center;
    }

    .member-id-block {
        align-items: center;
    }
}

/* ===== Print-Stylesheet ===== */
@media print {
    .navbar, footer, .hero-section, .hero-bg-watermark,
    .hero-particles, .hero-scanlines, .scroll-indicator,
    .fallen-section .member-card-footer { display: none !important; }

    body { background: #fff !important; color: #000 !important; font-size: 11pt; }

    .member-card {
        border: 1px solid #ccc !important;
        break-inside: avoid;
        page-break-inside: avoid;
        background: #fff !important;
        color: #000 !important;
        box-shadow: none !important;
    }

    .member-callsign { color: #000 !important; }
    .member-name-callsign { color: #555 !important; }
    .member-rank-badge { border: 1px solid #555 !important; color: #000 !important; background: transparent !important; }
    .member-photo-wrap { aspect-ratio: 3 / 4; }
    .team-group-header { color: #000 !important; border-color: #999 !important; }

    a[href]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
    a[href^="#"]::after, a[href^="javascript"]::after { content: ""; }
}

.navbar-scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
    border-bottom-color: rgba(139, 26, 26, 0.3) !important;
}

/* ===== Gefallene Sektion ===== */
.fallen-section {
    margin-top: 3.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.fallen-header {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

.fallen-header i {
    color: #555;
}

.member-card-fallen {
    opacity: 0.72;
    filter: grayscale(60%);
    transition: opacity 0.3s, filter 0.3s;
}

.member-card-fallen:hover {
    opacity: 0.9;
    filter: grayscale(20%);
    transform: none;
}

.member-card-mia {
    border-color: rgba(251,146,60,0.35);
    box-shadow: 0 0 0 1px rgba(251,146,60,0.15);
}

.member-card-mia:hover {
    border-color: rgba(251,146,60,0.6);
    box-shadow: 0 0 12px rgba(251,146,60,0.2);
}

.status-dot.status-mia {
    background: #fb923c;
    box-shadow: 0 0 8px rgba(251,146,60,0.5);
}

.stat-number-kia {
    color: #ef4444 !important;
}

.member-photo-fallen img {
    filter: grayscale(50%);
}

.member-icon-kia {
    background: #2a2a2a !important;
    border-color: #555 !important;
    color: #888 !important;
}

/* Status-Dot KIA */
.status-dot.status-kia {
    background: #555;
    box-shadow: none;
}

/* ===== WIP Banner ===== */
.wip-banner {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 9998;
    max-width: 300px;
    animation: wip-flyin 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.8s both;
}

@keyframes wip-flyin {
    from {
        transform: translateY(calc(100% + 2rem));
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.wip-banner.wip-hiding {
    animation: wip-flyout 0.3s ease-in forwards;
}

@keyframes wip-flyout {
    to {
        transform: translateY(calc(100% + 2rem));
        opacity: 0;
    }
}

.wip-banner-inner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(201, 169, 110, 0.12);
    border: 1px solid rgba(201, 169, 110, 0.45);
    border-left: 3px solid var(--color-accent);
    border-radius: 4px;
    padding: 0.9rem 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 0 0 20px rgba(201, 169, 110, 0.1);
    backdrop-filter: blur(6px);
}

.wip-icon {
    font-size: 1.3rem;
    color: var(--color-accent);
    flex-shrink: 0;
    animation: wip-wrench 2.5s ease-in-out infinite;
}

@keyframes wip-wrench {
    0%, 100% { transform: rotate(0deg); }
    20%       { transform: rotate(-20deg); }
    40%       { transform: rotate(15deg); }
    60%       { transform: rotate(-10deg); }
    80%       { transform: rotate(5deg); }
}

.wip-text {
    flex: 1;
    min-width: 0;
}

.wip-text strong {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    color: var(--color-accent);
    margin-bottom: 0.15rem;
}

.wip-text span {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    line-height: 1.4;
}

.wip-close {
    background: none;
    border: none;
    padding: 0.15rem 0.25rem;
    color: var(--color-text-muted);
    cursor: pointer;
    flex-shrink: 0;
    font-size: 1.1rem;
    line-height: 1;
    border-radius: 2px;
    transition: color 0.2s;
}

.wip-close:hover {
    color: var(--color-text);
}

@media (max-width: 480px) {
    .wip-banner {
        left: 1rem;
        right: 1rem;
        max-width: none;
        bottom: 1rem;
    }
}

/* ============================================================
   404 – FEINDKONTAKT (grünes Taktik-Theme mit Hexagonen)
   ============================================================ */
:root {
    --e404-green:       #1a7a2e;
    --e404-green-light: #26a63f;
    --e404-green-glow:  rgba(38, 166, 63, 0.35);
    --e404-green-dim:   rgba(38, 166, 63, 0.12);
}

.e404-scene {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background: linear-gradient(160deg, #090f0b 0%, #0d1a10 50%, #080e09 100%);
    display: flex;
    align-items: center;
}

/* --- Scan-Linien --- */
.e404-scanlines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.18) 2px,
        rgba(0,0,0,0.18) 4px
    );
    pointer-events: none;
    z-index: 1;
}

/* --- Hexagon-Hintergrund --- */
.e404-hex-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.e404-hex {
    position: absolute;
    width: 70px;
    height: 80px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: rgba(38, 166, 63, 0.18);
    filter: drop-shadow(0 0 3px rgba(38, 166, 63, 0.5));
    animation-name: hexPulse;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-direction: alternate;
    animation-fill-mode: both;
    animation-duration: 4s;
    animation-delay: 0s;
}

/* Hexagon-Positionen & individuelle Timing-Varianz */
.e404-hex.hex-0  { left:  4%; top: 10%; animation-duration: 3.8s; animation-delay: 0.0s; width:55px;  height:63px; }
.e404-hex.hex-1  { left: 12%; top: 65%; animation-duration: 5.2s; animation-delay: 0.7s; width:80px;  height:92px; }
.e404-hex.hex-2  { left: 20%; top: 28%; animation-duration: 4.1s; animation-delay: 1.4s; width:50px;  height:57px; }
.e404-hex.hex-3  { left: 28%; top: 78%; animation-duration: 6.0s; animation-delay: 0.3s; width:95px;  height:109px; }
.e404-hex.hex-4  { left: 35%; top: 12%; animation-duration: 3.5s; animation-delay: 2.0s; width:60px;  height:69px; }
.e404-hex.hex-5  { left: 42%; top: 55%; animation-duration: 4.7s; animation-delay: 0.9s; width:40px;  height:46px; }
.e404-hex.hex-6  { left: 50%; top: 82%; animation-duration: 5.5s; animation-delay: 1.7s; width:70px;  height:80px; }
.e404-hex.hex-7  { left: 57%; top: 20%; animation-duration: 3.2s; animation-delay: 0.5s; width:85px;  height:97px; }
.e404-hex.hex-8  { left: 63%; top: 70%; animation-duration: 4.9s; animation-delay: 2.2s; width:45px;  height:52px; }
.e404-hex.hex-9  { left: 70%; top:  5%; animation-duration: 5.8s; animation-delay: 1.1s; width:100px; height:115px; }
.e404-hex.hex-10 { left: 76%; top: 48%; animation-duration: 3.9s; animation-delay: 0.2s; width:55px;  height:63px; }
.e404-hex.hex-11 { left: 82%; top: 85%; animation-duration: 4.4s; animation-delay: 1.8s; width:65px;  height:75px; }
.e404-hex.hex-12 { left: 88%; top: 32%; animation-duration: 5.1s; animation-delay: 0.6s; width:75px;  height:86px; }
.e404-hex.hex-13 { left:  8%; top: 40%; animation-duration: 4.6s; animation-delay: 2.5s; width:50px;  height:57px; }
.e404-hex.hex-14 { left: 16%; top: 88%; animation-duration: 3.7s; animation-delay: 1.3s; width:88px;  height:101px; }
.e404-hex.hex-15 { left: 24%; top: 52%; animation-duration: 5.4s; animation-delay: 0.8s; width:42px;  height:48px; }
.e404-hex.hex-16 { left: 92%; top: 60%; animation-duration: 4.2s; animation-delay: 1.6s; width:60px;  height:69px; }
.e404-hex.hex-17 { left: 48%; top: 38%; animation-duration: 6.3s; animation-delay: 0.4s; width:35px;  height:40px; }

@keyframes hexPulse {
    0%   { opacity: 0.25; transform: scale(0.90); filter: drop-shadow(0 0 2px rgba(38,166,63,0.3)); }
    100% { opacity: 0.85; transform: scale(1.08); filter: drop-shadow(0 0 10px rgba(38,166,63,0.8)); }
}

/* --- Partikel (grün) --- */
.e404-particles {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

.e404-p {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    animation: e404ParticleDrift linear infinite;
}
.e404-p.p1 { width:3px; height:3px; background:var(--e404-green-light); left:10%; bottom:-5%; animation-duration:18s; animation-delay:0s; }
.e404-p.p2 { width:2px; height:2px; background:var(--e404-green-light); left:35%; bottom:-5%; animation-duration:23s; animation-delay:4s; }
.e404-p.p3 { width:4px; height:4px; background:rgba(38,166,63,0.5);    left:58%; bottom:-5%; animation-duration:15s; animation-delay:7s; }
.e404-p.p4 { width:2px; height:2px; background:var(--e404-green-light); left:75%; bottom:-5%; animation-duration:20s; animation-delay:2s; }
.e404-p.p5 { width:3px; height:3px; background:rgba(38,166,63,0.7);    left:88%; bottom:-5%; animation-duration:26s; animation-delay:9s; }

@keyframes e404ParticleDrift {
    0%   { transform: translateY(0) translateX(0); opacity: 0; }
    10%  { opacity: 0.7; }
    90%  { opacity: 0.4; }
    100% { transform: translateY(-110vh) translateX(20px); opacity: 0; }
}

/* --- Inhalt --- */
.e404-content {
    position: relative;
    z-index: 3;
    padding-top: var(--nav-height, 70px);
    padding-bottom: 3rem;
}

.e404-tag {
    color: var(--e404-green-light) !important;
    border-color: var(--e404-green-light) !important;
    letter-spacing: 0.2em;
}

.e404-code {
    font-size: clamp(6rem, 18vw, 12rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.05em;
    color: transparent;
    -webkit-text-stroke: 2px var(--e404-green);
    text-shadow: 0 0 60px var(--e404-green-glow), 0 0 120px rgba(38,166,63,0.15);
    font-family: var(--font-heading, 'Barlow Condensed', sans-serif);
    margin: 0.5rem 0 0.25rem;
    animation: e404CodeFlicker 5s ease-in-out infinite;
}

@keyframes e404CodeFlicker {
    0%, 95%, 100% { opacity: 1; }
    96%           { opacity: 0.6; }
    97%           { opacity: 1; }
    98%           { opacity: 0.4; }
}

.e404-title {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    color: var(--e404-green-light);
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

.e404-divider {
    width: 80px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--e404-green-light), transparent);
    margin: 1rem auto 1.5rem;
    box-shadow: 0 0 8px var(--e404-green-glow);
}

/* --- Hexagon-Icon --- */
.e404-icon-wrap {
    position: relative;
    display: inline-block;
    margin: 0 auto 1.5rem;
}

.e404-hex-icon {
    width: 90px;
    height: 90px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: linear-gradient(135deg, rgba(38,166,63,0.18), rgba(38,166,63,0.06));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--e404-green-light);
    filter: drop-shadow(0 0 10px var(--e404-green-light));
    animation: e404IconGlow 3s ease-in-out infinite alternate;
}

@keyframes e404IconGlow {
    0%   { filter: drop-shadow(0 0 4px  var(--e404-green-light)); }
    100% { filter: drop-shadow(0 0 18px var(--e404-green-light)); }
}

.e404-icon-pulse {
    position: absolute;
    inset: -14px;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: transparent;
    /* border wird geclippt – stattdessen als dünner filled hex mit opacity */
    outline: none;
    box-shadow: none;
    animation: e404PulseRing 2.5s ease-out infinite;
    animation-fill-mode: both;
}

/* Pseudo-Element erzeugt den sichtbaren Hex-Rahmen des Pulse-Rings */
.e404-icon-pulse::after {
    content: '';
    position: absolute;
    inset: 0;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: rgba(38,166,63,0.25);
}

@keyframes e404PulseRing {
    0%   { opacity: 0.7; transform: scale(1); }
    100% { opacity: 0;   transform: scale(1.6); }
}

/* --- Texte --- */
.e404-subtitle {
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    color: #e0f0e4;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.e404-lead {
    font-size: 1.05rem;
    color: rgba(180, 220, 185, 0.8);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

/* --- Statuszeile --- */
.e404-status-bar {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(166, 38, 38, 0.07);
    border: 1px solid rgba(166, 38, 38, 0.25);
    border-radius: 4px;
    padding: 0.4rem 1rem;
    margin-bottom: 2rem;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    color: var(--e404-green-light);
    font-family: var(--font-mono, monospace);
}

.e404-status-text {
    color: #ef4444;
    animation: e404StatusBlink 1.1s step-start infinite;
}

@keyframes e404StatusBlink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.15; }
}

.e404-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--e404-green-light);
    box-shadow: 0 0 6px var(--e404-green-light);
    animation: e404Blink 1.2s step-start infinite;
    flex-shrink: 0;
}

@keyframes e404Blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

/* --- Buttons --- */
.e404-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.e404-btn-primary {
    background: var(--e404-green);
    border: 1px solid var(--e404-green-light);
    color: #fff;
    font-weight: 600;
    letter-spacing: 0.08em;
    transition: background 0.25s, box-shadow 0.25s;
}
.e404-btn-primary:hover {
    background: var(--e404-green-light);
    box-shadow: 0 0 16px var(--e404-green-glow);
    color: #fff;
}

.e404-btn-outline {
    background: transparent;
    border: 1px solid rgba(38, 166, 63, 0.4);
    color: var(--e404-green-light);
    font-weight: 600;
    letter-spacing: 0.08em;
    transition: border-color 0.25s, box-shadow 0.25s;
}
.e404-btn-outline:hover {
    border-color: var(--e404-green-light);
    box-shadow: 0 0 12px var(--e404-green-glow);
    color: var(--e404-green-light);
}

@media (max-width: 576px) {
    .e404-code { -webkit-text-stroke-width: 1px; }
}

/* --- Einschusslöcher (e404.js) --- */
.e404-bullet {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    animation: bulletAppear 0.15s ease-out forwards;
}
.e404-bullet svg {
    display: block;
}
@keyframes bulletAppear {
    0%   { transform: translate(-50%, -50%) scale(0.2); opacity: 0; }
    60%  { transform: translate(-50%, -50%) scale(1.15); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1);    opacity: 1; }
}
.e404-bullet.fading {
    animation: bulletFade 1.2s ease-in forwards;
}
@keyframes bulletFade {
    0%   { opacity: 1; }
    100% { opacity: 0; }
}

/* ============================================
   Member-Bereich
   ============================================ */

/* --- Login --- */
.member-login-wrap {
    min-height: 55vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

.member-login-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-top: 3px solid var(--color-primary);
    border-radius: 0.75rem;
    padding: 2.5rem 2.5rem 2rem;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.member-login-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(139, 26, 26, 0.15);
    border: 1px solid rgba(139, 26, 26, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--color-primary-light);
    margin: 0 auto 1.5rem;
}

.member-login-title {
    font-family: var(--font-heading);
    color: var(--color-text-light);
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 0.5rem;
}

.member-login-sub {
    color: var(--color-text-muted);
    font-size: 0.88rem;
    text-align: center;
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

.member-login-error {
    background: rgba(220, 53, 69, 0.12);
    border: 1px solid rgba(220, 53, 69, 0.35);
    color: #f5a0a8;
    border-radius: 0.375rem;
    padding: 0.65rem 1rem;
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
}

.member-login-field {
    margin-bottom: 1.25rem;
}

.member-login-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: 0.4rem;
}

.member-login-input {
    display: block;
    width: 100%;
    padding: 0.65rem 1rem;
    background: var(--color-bg-darker);
    border: 1px solid var(--color-border-light);
    border-radius: 0.375rem;
    color: var(--color-text-light);
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.member-login-input:focus {
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px var(--color-primary-glow);
}
.member-login-input.is-invalid {
    border-color: #dc3545;
}
.member-login-input::placeholder { color: var(--color-text-muted); opacity: 0.6; }

.member-login-btn {
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 1rem;
    margin-bottom: 0;
}

.member-login-hint {
    color: var(--color-text-muted);
    font-size: 0.8rem;
    text-align: center;
    margin-top: 1.25rem;
    margin-bottom: 0;
}

/* --- Eingeloggter Status-Header --- */
.member-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(74, 222, 128, 0.06);
    border: 1px solid rgba(74, 222, 128, 0.2);
    border-radius: 0.5rem;
    padding: 0.7rem 1.25rem;
    gap: 1rem;
}

.member-status-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.member-status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--color-status-active);
    box-shadow: 0 0 6px var(--color-status-active);
    flex-shrink: 0;
    animation: memberDotPulse 2s ease-in-out infinite;
}
@keyframes memberDotPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

.member-area-status-label {
    font-size: 0.85rem;
    color: var(--color-status-active);
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
}

.member-logout-btn {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    text-decoration: none;
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 0.35rem;
    transition: color 0.2s, border-color 0.2s;
    white-space: nowrap;
    flex-shrink: 0;
    /* Button-Reset: Optik identisch zu früherem <a>-Element */
    background: none;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
}
.member-logout-btn:hover {
    color: var(--color-text-light);
    border-color: var(--color-border-light);
}

/* --- Tab-Navigation --- */
.member-area-tabs {
    border-bottom: 2px solid var(--color-border);
    margin-bottom: 2rem;
    display: flex;
    gap: 0;
}

.member-area-tabs .m-tab {
    padding: 0.65rem 1.5rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--color-text-muted);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    cursor: pointer;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
    display: flex;
    align-items: center;
}
.member-area-tabs .m-tab.active {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
}
.member-area-tabs .m-tab:not(.active):hover {
    color: var(--color-text-light);
    border-bottom-color: var(--color-border-light);
}

/* --- Tab-Panels --- */
.member-tab-panel { display: none; }
.member-tab-panel.active { display: block; }

/* --- Empty States --- */
.member-empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--color-text-muted);
}
.member-empty-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.4;
}
.member-empty-title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}
.member-empty-sub {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* --- News --- */
.news-list { display: flex; flex-direction: column; gap: 1rem; }

.news-item {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-primary);
    border-radius: 0.5rem;
    padding: 1.25rem 1.5rem;
    transition: border-color 0.2s;
}
.news-item:hover { border-color: var(--color-border-light); border-left-color: var(--color-primary-light); }

.news-item-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.6rem;
}
.news-item-date,
.news-item-author {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
}

.news-item-title {
    color: var(--color-text-light);
    font-family: var(--font-heading);
    font-size: 1.15rem;
    margin-bottom: 0.6rem;
    line-height: 1.3;
}

.news-item-body {
    color: var(--color-text);
    font-size: 0.93rem;
    line-height: 1.65;
}
.news-item-body p { margin-bottom: 0.4rem; }
.news-item-body p:last-child { margin-bottom: 0; }

/* --- Member Download Kategorie-Header --- */
.member-dl-category-header {
    margin-bottom: 1rem;
}
.member-dl-category-header .section-tag {
    display: inline-block;
    margin-bottom: 0.25rem;
}

/* --- Member Download Badge --- */
.member-dl-badge {
    display: inline-block;
    font-size: 0.6rem;
    padding: 0.15em 0.5em;
    border-radius: 0.25rem;
    background: var(--color-primary);
    color: #fff;
    vertical-align: middle;
    margin-left: 0.4em;
    letter-spacing: 0.06em;
    font-family: var(--font-mono);
}

/* ============================================================
   MOBILE UX – Gesamtprojekt Fixes
   Breakpoints: 767px (Mobile), 480px (Kleingerät), 360px (xs)
   ============================================================ */

/* --- Touch-Target-Mindestgröße (44×44 px) --- */
.filter-btn,
.navbar-toggler,
.lightbox-close,
.lightbox-prev,
.lightbox-next,
.member-logout-btn,
.m-tab {
    min-height: 44px;
    min-width: 44px;
}

/* Navbar Toggler: sichtbarer Focus-Ring */
.navbar-toggler:focus {
    box-shadow: 0 0 0 3px var(--color-primary-glow);
    outline: none;
}

/* --- Lightbox Mobile: größere Touch-Flächen, besseres Layout --- */
@media (max-width: 767px) {
    .lightbox-close {
        top: 0.5rem;
        right: 0.5rem;
        font-size: 2rem;
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0,0,0,0.5);
        border-radius: 50%;
    }

    .lightbox-prev {
        left: 0.25rem;
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0,0,0,0.4);
        border-radius: 50%;
    }

    .lightbox-next {
        right: 0.25rem;
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(0,0,0,0.4);
        border-radius: 50%;
    }

    .lightbox-img {
        max-width: 100vw;
        max-height: 75vh;
    }

    .lightbox-content {
        max-width: 100vw;
        padding: 0 3.5rem;
    }

    .lightbox-caption {
        font-size: 0.9rem;
        padding: 0 1rem;
    }
}

/* --- Lightbox: Buttons und Padding auf sehr kleinen Screens (≤400px) --- */
@media (max-width: 400px) {
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
    }

    .lightbox-content {
        padding: 0 2.75rem; /* 2× 40px Buttons + kleiner Puffer */
    }
}

/* --- Galerie Filter: horizontales Scrollen auf Mobile (statt Umbrechen) --- */
@media (max-width: 480px) {
    .galerie-filter {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start; /* center funktioniert nicht korrekt mit overflow */
        gap: 0.35rem;
        padding-bottom: 0.25rem;   /* Platz für Scrollbar (sichtbar auf Android) */
        scrollbar-width: none;     /* Firefox */
        -ms-overflow-style: none;  /* IE/Edge */
    }
    .galerie-filter::-webkit-scrollbar { display: none; } /* Chrome/Safari */

    .filter-btn {
        flex-shrink: 0;            /* Buttons dürfen nicht schrumpfen */
        padding: 0.4rem 0.85rem;
        font-size: 0.75rem;
        letter-spacing: 0.06em;
    }
}

/* --- Member Tabs: horizontal scrollbar statt Überlauf --- */
.member-area-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;        /* Firefox */
    -ms-overflow-style: none;     /* IE/Edge */
    flex-shrink: 0;
    white-space: nowrap;
}
.member-area-tabs::-webkit-scrollbar { display: none; }

@media (max-width: 600px) {
    .member-area-tabs .m-tab {
        padding: 0.55rem 1rem;
        font-size: 0.82rem;
        letter-spacing: 0.04em;
    }
}

@media (max-width: 400px) {
    .member-area-tabs .m-tab {
        padding: 0.5rem 0.75rem;
        font-size: 0.78rem;
    }
}

/* --- Member Status Bar: vertikales Stapeln auf sehr kleinen Screens --- */
@media (max-width: 480px) {
    .member-status-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.65rem;
        padding: 0.85rem 1rem;
    }

    .member-logout-btn {
        align-self: stretch;
        text-align: center;
    }
}

/* --- Member Login Card: weniger Padding auf Mobile --- */
@media (max-width: 480px) {
    .member-login-card {
        padding: 1.75rem 1.25rem 1.5rem;
    }

    .member-login-title {
        font-size: 1.25rem;
    }
}

/* --- News-Titel: langer Text bricht sauber um --- */
.news-item-title {
    word-break: break-word;
    overflow-wrap: break-word;
}

.news-item-body {
    word-break: break-word;
    overflow-wrap: break-word;
}

/* --- Download Card Mobile --- */
@media (max-width: 767px) {
    .download-btn {
        width: 100%;
        height: auto;
        padding: 0.55rem !important;
    }

    /* Download-Meta: kleinerer Gap auf Mobile */
    .download-meta {
        gap: 0.6rem;
    }
}

/* --- 404 Seite: Buttons gestapelt auf Mobile --- */
@media (max-width: 576px) {
    .e404-actions {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .e404-btn-primary,
    .e404-btn-outline {
        width: 100%;
        max-width: 280px;
        text-align: center;
        justify-content: center;
    }

    /* Hexagone reduzieren auf Mobile: CPU schonen */
    .e404-hex:nth-child(n+9) {
        display: none;
    }

    .e404-status-row {
        flex-wrap: wrap;
        gap: 0.35rem;
    }
}

@media (max-width: 400px) {
    .e404-code {
        font-size: clamp(5rem, 28vw, 7rem);
    }

    .e404-title {
        font-size: clamp(1.1rem, 5vw, 1.5rem);
    }

    /* Hex komplett ausblenden auf very small screens */
    .e404-hex {
        display: none;
    }
}

/* --- Story-Quote: kein horizontales Overflow auf Mobile --- */
@media (max-width: 480px) {
    .story-quote {
        overflow-wrap: break-word;
        word-break: break-word;
    }

    .story-quote p {
        hyphens: auto;
        -webkit-hyphens: auto;
    }
}

/* --- Impressum: Legal Card auf Mobile --- */
@media (max-width: 576px) {
    .legal-card-header {
        font-size: 0.75rem;
    }

    .legal-card-body {
        padding: 1rem;
    }
}

/* --- Navbar: Mobile Hamburger Zone --- */
@media (max-width: 991px) {
    .navbar-toggler {
        padding: 0.4rem 0.6rem;
        border-color: rgba(255,255,255,0.2);
    }

    /* Verhindert Zoom auf iOS beim Tippen ins Navbar-Menü */
    #mainNav .nav-link {
        font-size: 1rem; /* iOS zoomt bei < 16px input/text, hier Sicherheit für touch */
    }
}

/* --- Team-Sektion: Swipe-Hint auf Mobile --- */
@media (max-width: 767px) {
    .team-group-header {
        font-size: 0.7rem;
        letter-spacing: 0.15em;
        margin-bottom: 1.25rem;
    }

    .member-bio {
        font-size: 0.85rem;
    }

    .member-role {
        font-size: 0.75rem;
    }
}

/* --- Allgemeine Body-Scrollverbesserungen auf Mobile --- */
@media (max-width: 767px) {
    /* Verhindert horizontales Scrollen durch überstehende Elemente */
    body {
        overflow-x: hidden;
    }

    /* Weicheres Tippen auf touch-Geräten */
    a, button, [role="button"] {
        -webkit-tap-highlight-color: rgba(178, 34, 34, 0.2);
    }

    /* Section-Padding für enge Screens anpassen */
    .section {
        padding-left: 0;
        padding-right: 0;
    }

    .section > .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

}

/* --- Hero-Section auf kleinen Screens: Padding-Top der Content-Row --- */
@media (max-width: 480px) {
    .hero-content .row {
        padding-top: calc(var(--nav-height) + 0.5rem);
    }
}

/* === Back to Top === */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    background: var(--color-primary);
    border: 1px solid var(--color-primary-light);
    border-radius: 4px;
    color: #fff;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 999;
}
.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}
.back-to-top:hover {
    background: var(--color-primary-dark);
    transform: translateY(-3px);
}

/* === Cookie-Hinweis === */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(10, 10, 11, 0.96);
    border-top: 1px solid rgba(139, 26, 26, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.25rem;
    padding: 0.75rem 1.5rem;
    z-index: 1050;
    flex-wrap: wrap;
}
.cookie-notice__text {
    margin: 0;
    font-size: 0.82rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}
.cookie-notice__link {
    color: var(--color-accent);
    margin-left: 0.4rem;
    text-decoration: underline;
}
.cookie-notice__btn {
    flex-shrink: 0;
    background: var(--color-primary);
    border: 1px solid var(--color-primary-light);
    color: #fff;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.35rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}
.cookie-notice__btn:hover {
    background: var(--color-primary-dark);
}

/* ===== Impressum / Tabletop – inline-style-Ersatz ===== */
.legal-notice-icon   { color: var(--color-primary-light); margin-top: 2px; }
.legal-text          { color: var(--color-text); }
.legal-sub           { color: var(--color-text-muted); font-size: 0.85rem; }
.tabletop-empty-icon { font-size: 3rem; color: var(--color-accent); opacity: 0.4; }
/* RTE-eingefügtes Bild (auch in admin.css; hier für Frontend-Rendering von News-Inhalten) */
.rte-inserted-img    { max-width: 100%; }


