:root {
    /* Color Scheme: Teal, Deep Navy, Fresh White */
    --primary-dark: #060a13;
    /* Ultra Deep Navy */
    --primary-mid: #1f2937;
    /* Gray-800 */
    --accent: #14b8a6;
    /* Modern Teal */
    --accent-hover: #0d9488;
    /* Teal Hover */
    --bg-light: #f4f6f9;
    /* Clean Light Gray */
    --text-main: #374151;
    /* Gray-700 */
    --text-muted: #6b7280;
    /* Gray-500 */
    --white: #ffffff;
    --header-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

body {
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.7;
    scroll-behavior: smooth;
}

h1,
h2,
h3 {
    color: var(--primary-dark);
    line-height: 1.3;
    letter-spacing: -0.025em;
}

a {
    text-decoration: none;
    color: var(--accent);
    transition: color 0.3s ease;
}

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

/* Navbar */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(5px);
    box-shadow: var(--header-shadow);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* --- Dynamic Logo Scroll Behavior --- */

.logo {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--primary-dark);
}

.logo-link:hover {
    color: var(--primary-dark);
}

.logo-text {
    font-weight: 800;
    font-size: 1.6rem;
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    position: relative;
}

.logo-text span span {
    color: var(--accent);
    font-weight: 500;
}

.header-logo {
    height: 2.8rem;
    width: 2.8rem;
    display: block;
    object-fit: contain;
    transition: height 0.3s ease, width 0.3s ease;
}

/* --- Bulletproof Scroll Transition Mechanics --- */
.text-full {
    display: inline-block !important;
    /* Erzwingt, dass max-width greift */
    max-width: 500px;
    /* Groß genug für den vollen Namen */
    opacity: 1;
    white-space: nowrap;
    transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

.text-acronym {
    display: inline-block !important;
    /* Erzwingt, dass max-width greift */
    max-width: 0;
    opacity: 0;
    white-space: nowrap;
    overflow: hidden;
    transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s ease;
}

/* Zustand, wenn nach unten gescrollt wurde */
header.scrolled .text-full {
    max-width: 0 !important;
    opacity: 0;
    overflow: hidden;
}

header.scrolled .text-acronym {
    max-width: 200px !important;
    opacity: 1;
}

/* Navbar-Polsterung wird beim Scrollen elegant schmaler */
header.scrolled .nav-container {
    padding: 0.7rem 2rem;
    transition: padding 0.3s ease;
}

header.scrolled .header-logo {
    height: 2.2rem;
    width: 2.2rem;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
    list-style: none;
    transition: gap 0.3s ease;
}

header.scrolled .nav-links {
    gap: 1.5rem;
}

.nav-links a {
    color: var(--primary-mid);
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-links a:hover {
    color: var(--accent);
}

/* Hero Section with Absolute Inline SVG Map Background for 100% Chrome Reliability */
.hero {
    background-color: var(--primary-dark);
    color: var(--white);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 8rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}

/* Stylized Münster Map Background Overlay */
.map-bg-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    opacity: 0.18;
    /* Clean, recognizable but doesn't hurt readability */
    z-index: 1;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 10px;
    background: var(--white);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
    z-index: 2;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 3;
    text-align: center;
}

.hero-tag {
    display: inline-block;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 2rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(6, 10, 19, 0.8);
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    color: var(--white);
    margin-bottom: 2rem;
    letter-spacing: -2px;
    font-weight: 800;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
}

.hero p {
    font-size: clamp(1.2rem, 2.2vw, 1.6rem);
    color: #e5e7eb;
    max-width: 800px;
    margin: 0 auto 3.5rem;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.btn {
    display: inline-block;
    background: var(--accent);
    color: var(--white);
    padding: 1.1rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 14px rgba(20, 184, 166, 0.4);
}

.btn:hover {
    background: var(--accent-hover);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px -10px rgba(20, 184, 166, 0.7);
}

/* General Sections */
section {
    padding: 8rem 2rem;
    position: relative;
}

.section-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h2 {
    font-size: 3rem;
    margin-bottom: 1.2rem;
    font-weight: 800;
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 750px;
    margin: 0 auto;
}

/* Vision Section with clean map layout features */
#vision {
    background-color: var(--white);
    overflow: hidden;
}

.bg-light {
    background: var(--bg-light);
}

/* Grid Layouts */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 4rem;
    align-items: center;
}

.grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Erzwingt exakt 2 Spalten auf großen Bildschirmen */
    gap: 2.5rem;
}

/* Responsive Anpassung für Smartphones und kleine Tablets */
@media (max-width: 768px) {
    .grid-2x2 {
        grid-template-columns: 1fr;
        /* Erzwingt exakt 1 Spalte auf kleinen Bildschirmen */
        gap: 1.5rem;
    }

    .nav-links {
        display: none;
    }

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

    section {
        padding: 5rem 1.5rem;
    }
}

/* Cards */
.card {
    background: var(--white);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--accent);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}


.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.card h3 {
    margin-bottom: 1.2rem;
    font-size: 1.6rem;
    font-weight: 700;
}

.card p {
    color: var(--text-muted);
    line-height: 1.7;
}

/* Refined List Design */
.nexus-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.nexus-list li {
    position: relative;
    padding-left: 2rem;
    color: var(--text-main);
}

.nexus-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 10px;
    height: 10px;
    background-color: var(--accent);
    border-radius: 50%;
}

/* Modified Members List Styles with Logo Support */
.member-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--white);
    border: 1px solid rgba(20, 184, 166, 0.12);
    padding: 2.5rem 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    color: inherit;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    height: 100%;
}

.member-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent);
    box-shadow: 0 10px 20px -5px rgba(20, 184, 166, 0.1);
}

/* Logo Container & Image Styling */
.logo-container {
    width: 100%;
    height: 60px;
    /* Fixed height keeps all cards uniform */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.member-logo {
    max-height: 100%;
    max-width: 75%;
    object-fit: contain;
    /* Clean look: logos match the site's sleek theme until hovered */
    filter: grayscale(100%);
    opacity: 0.6;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.member-card:hover .member-logo {
    filter: grayscale(0%);
    opacity: 1;
}

.member-card .role {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.8rem;
}

.member-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.4rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.member-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* Footer with matching map background layout */
footer {
    background-color: var(--primary-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    z-index: 3;
}

.footer-logo {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -1px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    font-weight: 500;
}

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

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

    section {
        padding: 5rem 1.5rem;
    }
}

/* Media query for intermediate screen sizes to handle nav wrapping */
@media (max-width: 860px) {
    .nav-container {
        justify-content: center;
    }
}

/* Impressum Styles */
#impressum {
    padding: 4rem 2rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.impressum-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    margin-top: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.impressum-block h4 {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
}

.impressum-block p {
    line-height: 1.6;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(6, 10, 19, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.modal-container {
    background: var(--white);
    padding: 3rem;
    border-radius: 16px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2.5rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: var(--primary-dark);
}

.modal-body h2 {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
}

.modal-body p,
.modal-body ul {
    font-size: 1.1rem;
    color: var(--text-main);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.modal-body ul {
    list-style-position: inside;
    padding-left: 1rem;
}

.btn-details {
    background: none;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    margin-top: 1.5rem;
    align-self: flex-start;
    transition: all 0.3s ease;
}

.btn-details:hover {
    background: var(--accent);
    color: var(--white);
}