/* assets/css/style.css */

/* =========================================
   1. VARIABLES & THEME
   ========================================= */
:root {
    /* Light Theme Defaults */
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --bg-header: rgba(255, 255, 255, 0.95);
    --text-main: #0f172a;
    --text-muted: #64748b;
    --stroke: #cbd5e1;
    --grid-line: #cbd5e1;
    
    /* Brand Colors */
    --aim-blue: #0f172a;
    --aim-red: #dc2626;
    --highlight: #3b82f6;
    
    /* UI Dimensions & Shadows */
    --radius-sm: 4px;
    --radius-md: 12px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    
    /* Fonts */
    --font-sans: 'Manrope', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
}

[data-theme="dark"] {
    --bg-body: #020617;
    --bg-card: #0f172a;
    --bg-header: rgba(15, 23, 42, 0.95);
    --text-main: #f1f5f9;
    --text-muted: #94a3b8;
    --stroke: #1e293b;
    --grid-line: #1e293b;
    --aim-blue: #38bdf8;
    --aim-red: #ef4444;
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.5);
}

/* =========================================
   2. GLOBAL RESET & BASE STYLES
   ========================================= */
html { 
    scroll-behavior: smooth; 
    -webkit-text-size-adjust: 100%;
}

*, *::before, *::after { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    /* Technical Grid Pattern */
    background-image: 
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center top;
    background-attachment: fixed;
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

a { 
    text-decoration: none; 
    color: inherit; 
    transition: var(--transition-fast); 
}

/* Accessibility: Keyboard Focus Styles */
a:focus-visible, button:focus-visible {
    outline: 2px solid var(--aim-blue);
    outline-offset: 2px;
}

ul { list-style: none; }

img { 
    max-width: 100%; 
    height: auto; 
    display: block; 
}

/* Screen Reader Only Class (Utility) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Layout Utilities */
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 24px; 
    position: relative; 
}

.section-padding { padding: 100px 0; }

/* Typography */
h1, h2, h3, h4 { 
    color: var(--text-main); 
    font-weight: 800; 
    letter-spacing: -0.03em; 
    line-height: 1.1; 
    transition: color 0.3s;
}

.section-tag {
    color: var(--aim-red);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: block;
}

/* =========================================
   3. COMPONENTS (Buttons, Badges)
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    text-align: center;
    border: none;
    will-change: transform;
}

.btn-primary {
    background: var(--aim-blue);
    color: white;
    border: 2px solid var(--aim-blue);
    box-shadow: 4px 4px 0px rgba(15, 23, 42, 0.2);
}

.btn-primary:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px rgba(15, 23, 42, 0.3);
}

.btn-primary:active {
    transform: translate(0, 0);
    box-shadow: 2px 2px 0px rgba(15, 23, 42, 0.2);
}

[data-theme="dark"] .btn-primary {
    color: #0f172a;
    box-shadow: 4px 4px 0px rgba(56, 189, 248, 0.3);
}

[data-theme="dark"] .btn-primary:hover {
    box-shadow: 6px 6px 0px rgba(56, 189, 248, 0.4);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-main);
    border: 2px solid var(--stroke);
}

.btn-secondary:hover {
    border-color: var(--aim-blue);
    background: var(--bg-body);
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: rgba(59, 130, 246, 0.1);
    color: var(--highlight);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--font-mono);
    text-transform: uppercase;
    margin-bottom: 24px;
    gap: 8px;
    box-shadow: var(--shadow-sm);
}

.badge-dot {
    width: 8px;
    height: 8px;
    background: var(--aim-red);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
    70% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}

/* =========================================
   4. HEADER & NAVIGATION
   ========================================= */
header {
    position: sticky;
    top: 0;
    background: var(--bg-header);
    -webkit-backdrop-filter: blur(12px); /* Safari support */
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--stroke);
    z-index: 1000;
    padding: 16px 0;
    transition: all 0.3s;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    height: 40px; 
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-item {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    position: relative;
    cursor: pointer;
}

.nav-item:hover {
    color: var(--aim-blue);
}

.nav-item::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: var(--aim-red);
    transition: width 0.3s;
}

.nav-item:hover::after {
    width: 100%;
}

.theme-toggle {
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-muted);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--stroke);
    background: var(--bg-card);
    transition: all 0.2s;
}

.theme-toggle:hover {
    color: var(--aim-blue);
    border-color: var(--aim-blue);
}

.nav-toggle, .nav-burger { display: none; }

/* =========================================
   5. HERO SECTION
   ========================================= */
.hero {
    padding: 80px 0 60px 0;
    background: linear-gradient(to bottom, var(--bg-body), var(--bg-card));
    border-bottom: 1px solid var(--stroke);
}

.hero-split {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    margin-bottom: 24px;
    color: var(--aim-blue);
}

.hero p {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    color: var(--text-muted);
    margin-bottom: 40px;
    max-width: 90%;
}

.stat-card-hero {
    background: var(--bg-card);
    border: 1px solid var(--stroke);
    padding: 30px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
    transition: all 0.3s;
}

.data-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dashed var(--stroke);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.data-row:last-child { border-bottom: none; }

.data-val {
    font-weight: 600;
    color: var(--aim-blue);
}

/* =========================================
   6. TICKER
   ========================================= */
.ticker-wrap {
    width: 100%;
    overflow: hidden;
    background: var(--bg-card);
    border-bottom: 1px solid var(--stroke);
    padding: 12px 0;
    white-space: nowrap;
}

.ticker {
    display: inline-block;
    animation: marquee 30s linear infinite;
    will-change: transform;
}

/* Pause animation on hover for readability */
.ticker:hover {
    animation-play-state: paused;
}

.ticker-item {
    display: inline-block;
    padding: 0 40px;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.ticker-item strong {
    color: var(--text-main);
}

.ticker-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: var(--aim-red);
    border-radius: 50%;
    margin-right: 8px;
}

@keyframes marquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-50%, 0, 0); }
}

/* =========================================
   7. LABS / TEAMS (Flip Cards)
   ========================================= */
.section-intro {
    max-width: 600px;
    margin-bottom: 60px;
}

.lab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.flip-card {
    background-color: transparent;
    height: 320px;
    perspective: 1000px; /* Notwendig für den 3D-Effekt */
    cursor: pointer;
    -webkit-tap-highlight-color: transparent; /* Entfernt das blaue Blinken auf Android/iOS beim Tippen */
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: left;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

/* 1. Klick-Logik (Klasse .flipped): Funktioniert IMMER (Mobile & Desktop) */
.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
}

/* 2. Hover-Logik: NUR für Mäuse */
/* (hover: hover) allein reicht oft nicht, da Android das manchmal emuliert.
   (pointer: fine) stellt sicher, dass es wirklich eine Maus/Trackpad ist. */
@media (hover: hover) and (pointer: fine) {
    .flip-card:hover .flip-card-inner {
        transform: rotateY(180deg);
        -webkit-transform: rotateY(180deg);
    }
}

/* KARTENSEITEN DESIGN */
.flip-front, .flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    
    /* WICHTIG: Rückseite verstecken */
    -webkit-backface-visibility: hidden; /* Safari */
    backface-visibility: hidden;         /* Standard */
    
    /* Fix für Safari Pixel-Ränder, aber OHNE translate3d, was Chrome stört */
    background-clip: padding-box;
    
    border-radius: var(--radius-md);
    padding: 30px;
    border: 1px solid var(--stroke);
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    
    /* Z-Index Reset */
    z-index: 2;
}

.flip-back {
    /* Die Rückseite ist standardmäßig gedreht */
    transform: rotateY(180deg);
    -webkit-transform: rotateY(180deg);
    
    background: var(--aim-blue);
    color: white;
    border-color: var(--aim-blue);
}

/* Wenn gedreht, Rückseite visuell nach vorne holen (hilft bei Rendering-Glitches) */
.flip-card.flipped .flip-back,
.flip-card:hover .flip-back {
    z-index: 5;
}

/* Theme Anpassung für Dark Mode */
[data-theme="dark"] .flip-back {
    color: #0f172a;
}

/* INHALTE DER KARTEN */
.card-num {
    position: absolute;
    top: 20px;
    right: 20px;
    font-family: var(--font-mono);
    font-size: 3rem;
    color: var(--stroke);
    font-weight: 700;
    z-index: 0;
    opacity: 0.3;
}

.bento-content {
    position: relative;
    z-index: 1;
    /* Verhindert Text-Blurring in Chrome während der Animation */
    transform: translateZ(1px); 
}

.lab-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-body);
    color: var(--aim-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    margin-bottom: 24px;
    font-size: 1.3rem;
    border: 1px solid var(--stroke);
}

/* =========================================
   8. PROBLEM STATEMENT
   ========================================= */
.problem-section {
    background: var(--aim-blue);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

[data-theme="dark"] .problem-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.problem-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.problem-box {
    background: var(--bg-card);
    color: var(--text-main);
    padding: 40px;
    border-radius: var(--radius-md);
    border-left: 6px solid var(--aim-red);
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.problem-section h2 { color: white; }
.problem-section p { color: #94a3b8; }

/* =========================================
   9. COMMUNITY GALLERY
   ========================================= */
.gallery-main-frame {
    margin-bottom: 40px;
    border: 1px solid var(--stroke);
    padding: 10px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.team-photo-main {
    width: 100%;
    height: auto;
    border-radius: 2px;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.team-caption {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 10px;
    text-align: right;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.gallery-item {
    aspect-ratio: 1/1;
    overflow: hidden;
    border-radius: var(--radius-sm);
    border: 1px solid var(--stroke);
    background: var(--bg-body);
    transition: transform 0.2s;
    will-change: transform;
}

.gallery-item:hover {
    transform: scale(1.05);
    border-color: var(--aim-blue);
    z-index: 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================
   10. ROADMAP
   ========================================= */
.timeline-wrapper {
    position: relative;
    margin-top: 40px;
}

.timeline-wrapper::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: repeating-linear-gradient(
        to bottom,
        var(--stroke),
        var(--stroke) 6px,
        transparent 6px,
        transparent 12px
    );
}

.timeline-item {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    position: relative;
}

.timeline-marker {
    width: 50px;
    height: 50px;
    background: var(--bg-card);
    border: 2px solid var(--aim-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--aim-blue);
    z-index: 1;
    flex-shrink: 0;
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--stroke);
    padding: 25px;
    border-radius: var(--radius-md);
    flex: 1;
    transition: 0.2s;
}

.timeline-content:hover {
    border-color: var(--aim-blue);
    transform: translateX(5px);
}

.tag-q {
    background: var(--bg-body);
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: inline-block;
}

/* =========================================
   11. ADVISORY BOARD
   ========================================= */
.advisor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.advisor-card {
    text-align: center;
    background: var(--bg-card);
    padding: 24px;
    border-radius: var(--radius-md);
    border: 1px solid var(--stroke);
    transition: 0.2s;
}

.advisor-card:hover {
    border-color: var(--aim-blue);
    transform: translateY(-5px);
}

.advisor-img {
    width: 100px;
    height: 100px;
    background: var(--bg-body);
    border-radius: 50%;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2rem;
    border: 3px solid var(--stroke);
    
    /* NEU: Wichtig, damit das Bild rund abgeschnitten wird */
    overflow: hidden; 
    position: relative;
}

/* NEU: Damit das Bild den Kreis perfekt ausfüllt ohne Verzerrung */
.advisor-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.advisor-card h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.advisor-card span {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: block;
}

/* =========================================
   12. MEMBERSHIP
   ========================================= */
.doc-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--stroke);
    max-width: 700px;
    margin: 0 auto;
    padding: 60px;
    box-shadow: var(--shadow-lg);
    position: relative;
    border-radius: var(--radius-md);
}

.doc-clip {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 24px;
    background: #94a3b8;
    border-radius: 12px;
}

.checklist li {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px dotted var(--stroke);
}

.checklist li:last-child {
    border-bottom: none;
}

.checklist i {
    color: var(--aim-blue);
    margin-right: 15px;
    margin-top: 5px;
}

/* =========================================
   13. FOOTER
   ========================================= */
footer {
    background: var(--bg-card);
    border-top: 1px solid var(--stroke);
    padding: 80px 0 40px 0;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

.footer-links ul { line-height: 2; }

.footer-links a { color: var(--text-muted); }

.footer-links a:hover { color: var(--aim-blue); }

/* =========================================
   14. BOARD SECTION & MODAL
   ========================================= */
.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-top: 40px;
    text-align: center;
}

.board-card {
    cursor: pointer;
    transition: transform 0.3s ease;
    will-change: transform;
}

.board-card:hover {
    transform: translateY(-5px);
}

.board-img-wrapper {
    width: 180px;
    height: 180px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 3px solid transparent;
    transition: border-color 0.3s;
    background: var(--bg-card); /* Fallback */
}

.board-card:hover .board-img-wrapper {
    border-color: var(--aim-blue);
}

.board-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
    will-change: transform;
}

.board-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    color: white;
    font-size: 1.5rem;
}

.board-card:hover .board-overlay {
    opacity: 1;
}

.board-card:hover .board-img {
    transform: scale(1.1);
}

.board-card h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.board-role {
    color: var(--aim-blue);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
}

/* Modal / Lightbox Styles */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: none; 
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    will-change: opacity;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-card);
    width: 90%;
    max-width: 800px;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--stroke);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    will-change: transform;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    z-index: 10;
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--aim-red);
}

.modal-body {
    display: flex;
    flex-wrap: wrap;
}

.modal-img-col {
    flex: 1 1 300px;
    min-height: 350px;
    background-color: var(--bg-body);
}

.modal-img-col img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-info-col {
    flex: 1 1 300px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.modal-role-badge {
    display: inline-block;
    background: rgba(15, 23, 42, 0.05);
    color: var(--aim-blue);
    padding: 5px 12px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    font-family: var(--font-mono);
    border: 1px solid var(--stroke);
}

[data-theme="dark"] .modal-role-badge {
    background: rgba(255, 255, 255, 0.05);
}

#modal-name {
    font-size: 2rem;
    margin-bottom: 15px;
    line-height: 1.1;
    color: var(--text-main);
}

#modal-bio {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 1rem;
}

/* =========================================
   15. FAQ SECTION
   ========================================= */
.faq-grid {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.faq-item:hover {
    border-color: var(--aim-blue);
    transform: translateX(5px);
}

.faq-item details { cursor: pointer; }

.faq-item summary {
    padding: 20px;
    font-weight: 600;
    font-size: 1.05rem;
    list-style: none; /* Hide default triangle */
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-main);
}

/* Hide default marker in Webkit */
.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary i {
    color: var(--aim-blue);
    transition: transform 0.3s ease;
}

.faq-item details[open] summary i {
    transform: rotate(180deg);
}

.faq-item details[open] summary {
    border-bottom: 1px solid var(--stroke);
    color: var(--aim-blue);
}

.faq-content {
    padding: 20px;
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
    background-color: var(--bg-body);
    border-bottom-left-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
    animation: fadeIn 0.3s ease-in-out;
}

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

[data-theme="dark"] .faq-content {
    background-color: rgba(15, 23, 42, 0.5);
}

/* =========================================
   16. RESPONSIVE MEDIA QUERIES
   ========================================= */
@media (max-width: 900px) {
    /* Hide specific elements on mobile */
    .stat-card-hero { display: none; }
    
    /* Mobile Navigation */
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-card);
        flex-direction: column;
        padding: 20px;
        border-bottom: 1px solid var(--stroke);
        gap: 20px;
        transform: translateY(-150%);
        transition: transform 0.3s ease-in-out;
        z-index: 900;
        box-shadow: var(--shadow-lg);
    }
    
    .nav-links .btn { width: 100%; }
    .nav-toggle { display: none; }
    
    .nav-burger {
        display: block;
        font-size: 1.5rem;
        cursor: pointer;
        color: var(--text-main);
    }
    
    #nav-toggle:checked ~ .nav-links {
        transform: translateY(0);
    }
    
    /* Grid Adjustments */
    .hero-split,
    .problem-split,
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-visual { order: -1; }
}

@media (max-width: 650px) {
    /* Modal Tweaks */
    .modal-body { flex-direction: column; }
    
    .modal-img-col {
        height: 250px;
        min-height: auto;
        flex: none;
    }
    
    .modal-info-col { padding: 25px; }
}

/* =========================================
   17. REDUCED MOTION (Accessibility)
   ========================================= */
@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;
    }
    
    .badge-dot { animation: none; }
    .ticker { animation: none; white-space: normal; }
    .ticker-wrap { white-space: normal; overflow: visible; }
    .ticker-item { display: inline; padding: 0 10px; }
}

/* =========================================
   18. LEGAL PAGES (Imprint/Privacy)
   ========================================= */
.legal-page-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--stroke);
    padding: 60px 0;
    text-align: center;
}
.legal-content {
    max-width: 800px;
    margin: 60px auto;
    padding: 0 24px;
}
.legal-content h2 {
    margin-top: 40px;
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--aim-blue);
}
.legal-content p, .legal-content li {
    margin-bottom: 15px;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.8;
}
.legal-content ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 20px;
}
.legal-content a {
    color: var(--aim-blue);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.legal-content a:hover {
    color: var(--aim-red);
}

/* =========================================
   19. LIGHTBOX (Gallery)
   ========================================= */
.lightbox-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000; /* Muss über dem Header sein */
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    user-select: none;
}

.lightbox-caption {
    color: #94a3b8;
    margin-top: 10px;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    text-align: center;
}

/* Controls */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: transparent;
    border: none;
    color: white;
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10002;
    padding: 10px;
    line-height: 0.5;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: var(--aim-red);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 20px 15px;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.2s;
    border-radius: 4px;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--aim-blue); /* Falls Theme hell, sonst weiß lassen */
}

/* Desktop Positioning */
.lightbox-prev { left: 30px; }
.lightbox-next { right: 30px; }

/* Mobile Optimierungen */
@media (max-width: 768px) {
    .lightbox-nav {
        padding: 15px 10px;
        background: transparent; /* Weniger visuelles Rauschen auf Mobile */
        font-size: 1.2rem;
    }
    
    .lightbox-prev { left: 5px; }
    .lightbox-next { right: 5px; }
    
    #lightbox-img {
        max-width: 95vw; /* Mehr Platz nutzen */
    }
}

.footer-copy a {
    color: inherit; /* Nimmt die graue Farbe des Textes an */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.footer-copy a:hover {
    color: var(--aim-blue); /* Leuchtet Blau beim Hover */
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* =========================================
   20. LUMA CALENDAR INTEGRATION
   ========================================= */
.luma-wrapper {
    width: 100%;
    max-width: 900px; /* Nicht zu breit auf Desktop */
    margin: 0 auto;   /* Zentrieren */
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--stroke);
    box-shadow: var(--shadow-lg);
    overflow: hidden; /* Damit die runden Ecken auch für das Iframe gelten */
    height: 600px;    /* Genug Platz für die Liste */
}

.luma-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Dark Mode Anpassung (optional, falls Luma das unterstützt oder wir den Rahmen anpassen wollen) */
[data-theme="dark"] .luma-wrapper {
    border-color: var(--stroke);
}

/* Mobile Anpassung */
@media (max-width: 600px) {
    .luma-wrapper {
        height: 500px; /* Etwas kompakter auf dem Handy */
        border-radius: var(--radius-sm);
    }
}

/* =========================================
   MEMBERSHIP PRICING UPDATE
   ========================================= */

/* Container für beide Preise */
.price-wrapper {
    text-align: center;
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px dashed var(--stroke);
    border-bottom: 1px dashed var(--stroke);
}

/* Primärer Preis (Student) */
.price-primary {
    display: flex;
    align-items: baseline; /* Richtet Zahl und Text an der Grundlinie aus */
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px; /* Abstand zum Non-Student Preis */
}

.price-big {
    font-family: var(--font-mono); /* IBM Plex Mono */
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--aim-blue);
    line-height: 1;
    letter-spacing: -2px;
}

.price-sub {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Sekundärer Preis (Non-Student) */
.price-secondary {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-muted); /* Das macht es visuell zweitrangig */
    font-weight: 400;
}

.price-secondary .price-std {
    color: var(--text-main); /* Der Preis selbst etwas dunkler als der Text */
    font-weight: 600;
}

/* Mobile Optimierung */
@media (max-width: 600px) {
    .price-big {
        font-size: 2.8rem;
    }
    
    .price-primary {
        flex-direction: column;
        align-items: center;
        gap: 0;
    }
}

/* =========================================
   LOGO TEXT ADDITION
   ========================================= */

.logo-link {
    display: flex;
    align-items: center;  /* Vertikale Zentrierung */
    gap: 12px;            /* Abstand zwischen Icon und Text */
    text-decoration: none;
}

.logo-text {
    font-family: var(--font-sans); /* 'Manrope' für modernen Look */
    font-weight: 800;              /* Extra Fett, wie im Design üblich */
    font-size: 1.5rem;             /* Größe passend zum Icon */
    color: var(--text-main);       /* Passt sich automatisch Dark/Light Mode an */
    letter-spacing: -0.03em;       /* Leicht unterschnitten für "tighten" Look */
    line-height: 1;
}


@media (max-width: 600px) {
    /* .logo-text { display: none; } */ 
}

/* Newsletter Integration */
.footer-newsletter {
    max-width: 300px;
}

.newsletter-form .input-group {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.03); /* Leicht abgedunkelt */
    border: 1px solid var(--stroke);
    border-radius: 6px;
    padding: 5px;
    transition: 0.3s border-color;
}

.newsletter-form .input-group:focus-within {
    border-color: var(--aim-blue);
    background: #fff;
}

.newsletter-input {
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-size: 0.9rem;
    color: var(--text-main);
    width: 100%;
    outline: none;
    font-family: var(--font-main);
}

.newsletter-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.btn-newsletter {
    background: var(--aim-blue);
    color: white;
    border: none;
    border-radius: 4px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.btn-newsletter:hover {
    background: var(--aim-red); /* AIM Branding Hover Effekt */
    transform: translateX(2px);
}

/* Responsives Grid Update - Damit 4 Spalten Platz haben */
@media (min-width: 992px) {
    .footer-grid {
        grid-template-columns: 1.5fr 0.8fr 0.8fr 1.2fr; /* Platzverteilung anpassen */
    }
}

/* Newsletter Consent Styling */
.newsletter-consent {
    margin-top: 8px;
    display: flex;
    align-items: center; /* Vertikal zentriert */
    gap: 8px; /* Abstand Box zu Text */
    font-size: 0.75rem; /* Schön klein und dezent */
    color: var(--text-muted);
    line-height: 1.2;
}

.newsletter-consent input[type="checkbox"] {
    accent-color: var(--aim-blue); /* Checkbox in Markenfarbe */
    cursor: pointer;
    width: 14px;
    height: 14px;
    margin: 0;
}

.newsletter-consent label {
    cursor: pointer;
    user-select: none; /* Verhindert Markieren beim Klicken */
}

.newsletter-consent a {
    color: var(--text-main); /* Link etwas dunkler hervorheben */
    text-decoration: underline;
    text-decoration-color: var(--stroke);
    text-underline-offset: 2px;
    transition: 0.2s;
}

.newsletter-consent a:hover {
    color: var(--aim-blue);
    text-decoration-color: var(--aim-blue);
}

#aim-honey {
    position: absolute;
    left: -9999px;
    opacity: 0;
    width: 0;
    height: 0;
    z-index: -1;
}

/* =========================================
   21. NEWSLETTER POPUP (OPTIMIERT)
   ========================================= */
.newsletter-popup {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 380px; /* Etwas breiter für mehr Luft */
    max-width: 90vw; /* Damit es auf Handy nicht überläuft */
    background: var(--bg-card);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 9000;
    padding: 24px;
    
    /* Animation Start */
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.newsletter-popup.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
}

/* Close Button dezent*/
.popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
    padding: 5px;
}

.popup-close:hover {
    color: var(--aim-red);
}

/* Typografie */
.popup-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--aim-blue);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: block;
}

.popup-header h4 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--text-main);
    line-height: 1.2;
}

.popup-header p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 24px;
}

.popup-form .input-group {
    display: flex; /* Zwingt Elemente nebeneinander */
    align-items: center;
    background: var(--bg-body);
    border: 1px solid var(--stroke);
    border-radius: 6px;
    padding: 4px; /* Abstand innen zum Rand */
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

/* Fokus-Effekt für die ganze Gruppe */
.popup-form .input-group:focus-within {
    border-color: var(--aim-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); /* Leichter blauer Schein */
    background: var(--bg-card);
}

/* Das Input Feld selbst (unsichtbarer Hintergrund) */
.popup-form input[type="email"] {
    border: none;
    background: transparent;
    flex-grow: 1; /* Nimmt den ganzen Platz links ein */
    padding: 10px 12px;
    font-size: 0.95rem;
    color: var(--text-main);
    outline: none; /* Default Fokus entfernen, da wir die Gruppe stylen */
    min-width: 0; /* Verhindert Overflow auf sehr kleinen Handys */
    font-family: var(--font-sans);
}

/* Der Button (rechts angedockt) */
.popup-form .btn-newsletter {
    background: var(--aim-blue);
    color: white;
    border: none;
    border-radius: 4px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0; /* Button darf nicht geschrumpft werden */
}

.popup-form .btn-newsletter:hover {
    background: var(--aim-red);
}

/* Checkbox Bereich */
.newsletter-consent {
    margin-top: 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.newsletter-consent input {
    margin-top: 3px; /* Optische Ausrichtung mit der ersten Textzeile */
    cursor: pointer;
}

.newsletter-consent a {
    color: var(--text-main);
    text-decoration: underline;
    text-decoration-color: var(--stroke);
}

/* MOBILE ANPASSUNG (Kompakt-Version) */
@media (max-width: 480px) {
    .newsletter-popup {
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        /* Nur oben abrunden */
        border-radius: 12px 12px 0 0; 
        border-bottom: none;
        border-left: none;
        border-right: none;
        
        /* Weniger Padding für kompakten Look */
        padding: 16px 20px 20px 20px; 
        
        box-shadow: 0 -5px 20px rgba(0,0,0,0.15);
    }
    
    /* 1. Den kleinen Tag "JOIN THE NETWORK" ausblenden */
    .popup-tag {
        display: none;
    }

    /* 2. Den Beschreibungstext ausblenden – Platz sparen! */
    .popup-header p {
        display: none;
    }

    /* 3. Überschrift kleiner und näher am Input */
    .popup-header h4 {
        font-size: 1rem; /* Kleiner */
        margin-bottom: 12px; /* Weniger Abstand zum Input */
        margin-top: 5px; /* Platz für den Schließen-Button lassen */
        padding-right: 30px; /* Damit Text nicht hinter das X rutscht */
    }

    /* 4. Schließen-Button kompakter positionieren */
    .popup-close {
        top: 12px;
        right: 12px;
        font-size: 1.2rem;
    }
    
    /* 5. Input Gruppe etwas kompakter */
    .popup-form input[type="email"] {
        padding: 8px 10px; /* Etwas weniger Höhe */
        font-size: 16px; /* Wichtig: Verhindert Auto-Zoom auf iPhones */
    }
    
    .popup-form .btn-newsletter {
        width: 36px;
        height: 36px;
    }
}

/* =========================================
   ADVISORY CTA CARD
   ========================================= */

/* Macht den Link-Container zum Block und entfernt Unterstreichungen */
a.advisor-card {
    display: block;
    text-decoration: none;
    color: var(--text-main);
    cursor: pointer;
}

/* Spezifisches Design für die "Mitmachen"-Karte */
.advisor-cta {
    border: 2px dashed var(--stroke); /* Gestrichelter Rahmen */
    background: transparent; /* Transparenter Hintergrund hebt sie leicht ab */
}

.advisor-cta:hover {
    border-color: var(--aim-blue);
    background: var(--bg-card);
    transform: translateY(-5px);
}

/* Icon Styling */
.cta-icon {
    background: rgba(59, 130, 246, 0.1); /* Leichtes Blau im Hintergrund */
    color: var(--aim-blue);
    border: none; /* Kein Rand um das Icon-Bild selbst */
}

/* Dark Mode Anpassung */
[data-theme="dark"] .cta-icon {
    background: rgba(59, 130, 246, 0.2);
}

/* Kleiner Pfeil-Effekt beim Hover */
.advisor-cta:hover span {
    color: var(--aim-blue);
}