/* ==========================================================================
   CSC Wilhelmshaven - Modern Design System & CSS Stylesheet
   Theme: Light & Dark Mode, KCanG Compliant UI, Glassmorphism, Organic Emerald
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Inter:wght@300;400;500;600;700&display=swap');

/* --- Root Variables & Theme Definition --- */
:root {
    /* Fonts */
    --font-heading: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Light Theme Palette (Default) */
    --bg-main: #F4F7F5;
    --bg-surface: #FFFFFF;
    --bg-surface-elevated: #F9FBF9;
    --bg-header: rgba(244, 247, 245, 0.85);
    --bg-card: #FFFFFF;
    --bg-card-hover: #F0F7F2;
    --bg-glass: rgba(255, 255, 255, 0.75);
    --bg-input: #EFF3F0;
    --bg-badge: rgba(16, 185, 129, 0.12);

    --text-main: #0E2419;
    --text-muted: #52665B;
    --text-light: #7A9084;
    --text-inverse: #FFFFFF;

    --border-subtle: #E1E9E4;
    --border-strong: #C4D5CB;
    --border-accent: rgba(16, 185, 129, 0.3);

    --primary: #10B981;
    --primary-hover: #059669;
    --primary-dark: #047857;
    --primary-light: #6EE7B7;
    --primary-glow: rgba(16, 185, 129, 0.25);

    --accent-gold: #D97706;
    --accent-amber-bg: rgba(217, 119, 6, 0.1);
    --accent-blue: #2563EB;
    --danger: #EF4444;

    --shadow-sm: 0 2px 8px rgba(14, 36, 25, 0.04);
    --shadow-md: 0 8px 24px rgba(14, 36, 25, 0.08);
    --shadow-lg: 0 16px 36px rgba(14, 36, 25, 0.12);
    --shadow-glow: 0 0 20px rgba(16, 185, 129, 0.2);

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- Dark Theme Palette --- */
[data-theme="dark"], body.dark-mode {
    --bg-main: #09110B;
    --bg-surface: #101F15;
    --bg-surface-elevated: #16281C;
    --bg-header: rgba(9, 17, 11, 0.85);
    --bg-card: rgba(16, 31, 21, 0.7);
    --bg-card-hover: rgba(22, 40, 28, 0.9);
    --bg-glass: rgba(16, 31, 21, 0.65);
    --bg-input: #15271B;
    --bg-badge: rgba(52, 211, 153, 0.15);

    --text-main: #ECFDF5;
    --text-muted: #94A3B8;
    --text-light: #64748B;
    --text-inverse: #09110B;

    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --border-accent: rgba(52, 211, 153, 0.35);

    --primary: #10B981;
    --primary-hover: #34D399;
    --primary-dark: #059669;
    --primary-light: #6EE7B7;
    --primary-glow: rgba(52, 211, 153, 0.3);

    --accent-gold: #F59E0B;
    --accent-amber-bg: rgba(245, 158, 11, 0.15);

    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 48px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 28px rgba(16, 185, 129, 0.35);
}

/* --- Global Reset & Base Styles --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.25;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

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

a:hover {
    color: var(--primary-hover);
}

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

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* --- Layout Utility Classes --- */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 5rem 0;
    position: relative;
}

.section-sm {
    padding: 3rem 0;
}

.text-center { text-align: center; }
.text-right { text-align: right; }

.section-header {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 3.5rem auto;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title span {
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* --- Badges --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
    background-color: var(--bg-badge);
    color: var(--primary);
    border: 1px solid var(--border-accent);
    margin-bottom: 1rem;
}

.badge-warning {
    background-color: var(--accent-amber-bg);
    color: var(--accent-gold);
    border-color: rgba(245, 158, 11, 0.3);
}

/* --- Navigation Header --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--bg-header);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    transition: all var(--transition-normal);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 90px;
}

.brand-logo {
    display: flex;
    align-items: center;
    padding: 0.2rem 0;
}

.brand-logo img {
    height: 76px;
    max-height: 80px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(16, 185, 129, 0.4));
    transition: transform var(--transition-bounce);
}

.brand-logo:hover img {
    transform: scale(1.18) rotate(2deg);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 1.8rem;
    list-style: none;
}

.nav-link {
    font-weight: 500;
    font-size: 0.98rem;
    color: var(--text-main);
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width var(--transition-normal);
    border-radius: 2px;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary);
    font-weight: 600;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Theme Switcher Button */
.theme-toggle-btn {
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.25rem;
    transition: all var(--transition-bounce);
}

.theme-toggle-btn:hover {
    background: var(--primary-glow);
    color: var(--primary);
    transform: rotate(15deg);
}

/* Mobile Hamburger Toggle */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
    padding: 0.5rem;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.75rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    border: 1px solid transparent;
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #FFFFFF;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), var(--primary));
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.btn-outline {
    background: transparent;
    border-color: var(--border-strong);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--bg-badge);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.55rem 1.2rem;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 1.1rem 2.2rem;
    font-size: 1.05rem;
    border-radius: var(--radius-lg);
}

/* --- Hero Section --- */
.hero {
    padding-top: 9.5rem;
    padding-bottom: 6rem;
    position: relative;
    overflow: hidden;
    background: radial-gradient(circle at 80% 20%, var(--primary-glow) 0%, transparent 50%),
                radial-gradient(circle at 10% 80%, rgba(217, 119, 6, 0.08) 0%, transparent 40%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3.5rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.25rem;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 2.2rem;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-bottom: 3rem;
}

.hero-highlights {
    display: flex;
    gap: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.hero-media {
    position: relative;
}

.hero-card-frame {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-accent);
}

.hero-card-frame img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.hero-card-frame:hover img {
    transform: scale(1.03);
}

.hero-floating-badge {
    position: absolute;
    bottom: -20px;
    left: -20px;
    background: var(--bg-surface);
    border: 1px solid var(--border-accent);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    gap: 1rem;
    backdrop-filter: blur(12px);
}

.hero-floating-badge .icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-badge);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

/* --- Features & Grid Cards --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 2.5rem;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2.2rem;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-md);
    background: var(--bg-card-hover);
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--bg-badge);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.8rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.975rem;
    line-height: 1.6;
}

/* --- KCanG Notice Banner --- */
.kcang-notice-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(217, 119, 6, 0.06));
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    padding: 2rem 2.5rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    margin: 3rem 0;
}

.kcang-notice-icon {
    font-size: 3rem;
    color: var(--primary);
    flex-shrink: 0;
}

.kcang-notice-content h4 {
    font-size: 1.25rem;
    margin-bottom: 0.4rem;
}

.kcang-notice-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Blog Cards --- */
.blog-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-normal);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-accent);
}

.blog-card-image {
    height: 210px;
    overflow: hidden;
    position: relative;
    background: var(--bg-input);
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.06);
}

.blog-card-content {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-category {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.blog-card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.35;
}

.blog-card-excerpt {
    color: var(--text-muted);
    font-size: 0.925rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;

    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.825rem;
    color: var(--text-light);
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

/* --- Filter Buttons --- */
.filter-container {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
}

.filter-btn {
    padding: 0.6rem 1.4rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
    background: var(--primary);
    color: #FFFFFF;
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

/* --- FAQ Accordion --- */
.faq-list {
    max-width: 860px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: border-color var(--transition-fast);
}

.faq-item.active {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-sm);
}

.faq-question {
    width: 100%;
    padding: 1.4rem 1.8rem;
    background: none;
    border: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-main);
    cursor: pointer;
    text-align: left;
}

.faq-question .icon {
    font-size: 1.25rem;
    color: var(--primary);
    transition: transform var(--transition-normal);
}

.faq-item.active .faq-question .icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 1.8rem;
    color: var(--text-muted);
    font-size: 0.975rem;
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 1.8rem 1.5rem 1.8rem;
}

/* --- Form Controls & Membership Application --- */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 3rem;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.85rem 1.1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-muted);
    cursor: pointer;
}

.form-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    margin-top: 3px;
}

/* --- Footer --- */
.footer {
    background: var(--bg-surface-elevated);
    border-top: 1px solid var(--border-subtle);
    padding: 4rem 0 2rem 0;
    color: var(--text-muted);
    font-size: 0.925rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand h3 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    max-width: 320px;
}

.footer-column h4 {
    color: var(--text-main);
    font-size: 1.05rem;
    margin-bottom: 1.2rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

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

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

.footer-bottom {
    border-top: 1px solid var(--border-subtle);
    padding-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
}

/* --- Age Gate Modal (18+ Jugendschutz) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(12px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    max-width: 480px;
    width: 100%;
    padding: 2.5rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
    transform: scale(0.92);
    transition: transform var(--transition-bounce);
}

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

.modal-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--accent-amber-bg);
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    margin: 0 auto 1.5rem auto;
}

.modal-card h2 {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
}

.modal-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* --- Toast Notifications --- */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    background: var(--bg-surface);
    border: 1px solid var(--border-accent);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius-sm);
    padding: 1rem 1.4rem;
    box-shadow: var(--shadow-md);
    color: var(--text-main);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInRight 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* --- Mobile Responsiveness --- */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons, .hero-highlights {
        justify-content: center;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 90px;
        left: 0;
        width: 100%;
        background: var(--bg-surface);
        border-bottom: 1px solid var(--border-subtle);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        transform: translateY(-150%);
        transition: transform var(--transition-normal);
        box-shadow: var(--shadow-lg);
    }

    .nav-menu.active {
        transform: translateY(0);
    }

    .hero-content h1 {
        font-size: 2.35rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .form-card {
        padding: 1.75rem;
    }
}
