:root {
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #0284c7;
    --accent-hover: #0369a1;
    --bg-light: #f8fafc;
    --white: #ffffff;
    --text-main: #1e293b;
    --text-muted: #475569;
    --border-color: #e2e8f0;
    --radius: 8px;
    --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.1), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
}

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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-light);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Skip-to-Content Link (Barrierefreiheit) */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    background: var(--primary);
    color: var(--white);
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    font-weight: 700;
    z-index: 9999;
    text-decoration: none;
    transition: top 0.2s ease;
}
.skip-link:focus {
    top: 1rem;
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* Deutliche Fokus-Ringe fuer Tastaturnavigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* Top-Bar */
.top-bar {
    background-color: var(--primary);
    color: #cbd5e1;
    font-size: 0.85rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.top-bar-left {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
    align-items: center;
}

.top-bar a {
    color: #e2e8f0;
    text-decoration: none;
    transition: color 0.2s;
}

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

/* Header & Navigation */
header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

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

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1.5rem;
    padding: 0.35rem 0.75rem;
    cursor: pointer;
    color: var(--primary);
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

nav ul li {
    position: relative;
}

nav ul li a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.5rem 0.25rem;
    transition: color 0.2s;
    display: inline-block;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--accent);
}

/* Dropdown-Menue (Hover, Fokus & Touch) */
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu,
.dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu li a {
    display: block;
    padding: 0.6rem 1.25rem;
    font-weight: 500;
    color: var(--text-main);
}

.dropdown-menu li a:hover {
    background-color: var(--bg-light);
    color: var(--accent);
}

/* Hero Section */
.hero {
    position: relative;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.85)), url('../images/hero-netzwerk.jpg') center/cover no-repeat;
    color: var(--white);
    padding: 5.5rem 0;
    text-align: center;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.25rem;
}

.hero p {
    font-size: 1.15rem;
    max-width: 720px;
    margin: 0 auto 2rem;
    color: #e2e8f0;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    min-height: 44px;
}

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

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

.btn-outline {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-outline:hover {
    background-color: var(--white);
    color: var(--primary);
}

.content-box .btn-outline,
main > .container .btn-outline {
    color: var(--primary);
    border-color: var(--primary);
}

.content-box .btn-outline:hover,
main > .container .btn-outline:hover {
    background-color: var(--primary);
    color: var(--white);
}

/* Sections & Cards */
.section-spacer {
    padding: 4rem 0;
}

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

.section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.section-header h2,
.content-box h1,
.content-box h2 {
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.content-box {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.75rem;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
}

.card-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-body h3 {
    color: var(--primary);
    margin-bottom: 0.6rem;
    font-size: 1.25rem;
}

.card-body p {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    flex: 1;
}

/* Formulare & Alerts */
.styled-form .form-group {
    margin-bottom: 1.15rem;
}

.styled-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--primary);
    font-size: 0.95rem;
}

.styled-form input,
.styled-form select,
.styled-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    background-color: var(--white);
    color: var(--text-main);
    min-height: 44px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.styled-form input:focus,
.styled-form select:focus,
.styled-form textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
    outline: none;
}

.alert-success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
    padding: 0.85rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.25rem;
    font-weight: 500;
}

.alert-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 0.85rem 1rem;
    border-radius: 6px;
    margin-bottom: 1.25rem;
    font-weight: 500;
}

/* Footer */
footer {
    background-color: var(--primary);
    color: #cbd5e1;
    padding: 3.5rem 0 1.5rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid h4 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-grid ul {
    list-style: none;
}

.footer-grid ul li {
    margin-bottom: 0.5rem;
}

.footer-grid a,
.footer-bottom a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-grid a:hover,
.footer-bottom a:hover {
    color: var(--accent);
}

.footer-bottom {
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.88rem;
    color: #94a3b8;
}

/* Responsive & Mobile UX */
@media (max-width: 768px) {
    .menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        min-width: 44px;
    }

    nav {
        display: none;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--white);
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--border-color);
        padding: 1rem 1.25rem;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }

    nav ul li a {
        display: flex;
        align-items: center;
        min-height: 44px;
        padding: 0.6rem 0.5rem;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-left: 2px solid var(--accent);
        margin-left: 0.75rem;
        padding: 0.25rem 0;
    }

    .content-box {
        padding: 1.35rem;
    }

    /* Horizontale Scroll-Tabellen mit Scroll-Schatten */
    .table-responsive,
    div[style*="overflow-x: auto"] {
        position: relative;
        -webkit-overflow-scrolling: touch;
        border-radius: 6px;
        background:
            linear-gradient(to right, #ffffff 30%, rgba(255,255,255,0)),
            linear-gradient(to right, rgba(255,255,255,0), #ffffff 70%) 100% 0,
            radial-gradient(farthest-side at 0 50%, rgba(15, 23, 42, 0.14), rgba(0,0,0,0)),
            radial-gradient(farthest-side at 100% 50%, rgba(15, 23, 42, 0.14), rgba(0,0,0,0)) 100% 0;
        background-repeat: no-repeat;
        background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
        background-attachment: local, local, scroll, scroll;
    }

    .table-responsive table th,
    .table-responsive table td,
    div[style*="overflow-x: auto"] table th,
    div[style*="overflow-x: auto"] table td {
        padding: 0.6rem 0.65rem;
        font-size: 0.9rem;
    }
}

/* Reduzierte Bewegung respektieren */
@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;
    }
}

/* ============================================================================
   ERGÄNZUNG FÜR KACHELN, PORTALE & FORMULARE (style/style.css)
   Bitte ans Ende der style/style.css anfügen!
   ============================================================================ */

:root {
    --border: var(--border-color, #e2e8f0);
    --text: var(--text-main, #0f172a);
}

/* Top-Bar einheitlich über alle Seiten */
.top-bar {
    background-color: #0b1f33;
    color: #e2e8f0;
    font-size: 0.85rem;
    padding: 0.55rem 0;
}

.top-bar .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem 1.25rem;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.top-bar-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.1rem;
    margin-left: auto;
}

.top-bar a {
    color: #ffffff;
    text-decoration: none;
}

.top-bar a:hover {
    color: #e69d00;
}

/* Kachel-Raster (Dashboard, Startseite, Kontakt, Projekte) */
.dashboard-grid,
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.dash-card,
.card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(15, 41, 66, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.dash-card:hover,
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 41, 66, 0.09);
}

.dash-card h3,
.card h3 {
    color: #0f2942;
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
}

.dash-card p,
.card p {
    color: #475569;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.text-link {
    color: #0f2942;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.92rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: auto;
}

.text-link:hover {
    color: #d97706;
}

/* Projekt- & Leistungslisten */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Badges & Status */
.status-badge,
.badge {
    display: inline-block;
    background-color: #eff6ff;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.22rem 0.65rem;
    border-radius: 999px;
}

/* Zweispaltige Formularzeilen */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

/* Logout- & Sekundär-Buttons */
.btn-logout {
    display: inline-block;
    padding: 0.45rem 0.9rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #0f2942;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.btn-logout:hover {
    background: #f1f5f9;
}

/* Login- & Registrierungsseiten */
.login-wrapper {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-card {
    width: 100%;
    max-width: 460px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(15, 41, 66, 0.08);
}

.login-footer {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.88rem;
}

/* Hinweismeldungen */
.alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 0.85rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 0.85rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
}

