/* =========================================================
   NDG Haupt-CMS
   Zentrales öffentliches Stylesheet
   Final aktualisiert: Projektbilder responsiv begrenzt
   ========================================================= */

:root {
    --bg: #f5f7fb;
    --surface: rgba(255, 255, 255, 0.82);
    --text: #10233f;
    --muted: #5e6d80;
    --line: rgba(16, 35, 63, 0.12);
    --blue: #006eb8;
    --green: #69b21d;
    --orange: #f9a51a;
    --shadow: 0 24px 70px rgba(0, 38, 76, 0.12);
    color-scheme: light;
}

html[data-theme="dark"] {
    --bg: #07111f;
    --surface: rgba(16, 28, 45, 0.78);
    --text: #edf6ff;
    --muted: #9db0c5;
    --line: rgba(255, 255, 255, 0.1);
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    html[data-theme="system"] {
        --bg: #07111f;
        --surface: rgba(16, 28, 45, 0.78);
        --text: #edf6ff;
        --muted: #9db0c5;
        --line: rgba(255, 255, 255, 0.1);
        --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
        color-scheme: dark;
    }
}

* {
    box-sizing: border-box;
}

html {
    max-width: 100%;
    scroll-behavior: smooth;
}

body {
    max-width: 100%;
    margin: 0;
    overflow-x: hidden;
    color: var(--text);
    background:
        radial-gradient(
            circle at 90% 5%,
            rgba(105, 178, 29, 0.12),
            transparent 28%
        ),
        radial-gradient(
            circle at 10% 10%,
            rgba(0, 110, 184, 0.15),
            transparent 34%
        ),
        var(--bg);
    font: 16px/1.65 Inter, ui-sans-serif, system-ui, sans-serif;
}

main {
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
}

/* =========================================================
   Kopfbereich und Navigation
   ========================================================= */

.site-header {
    position: sticky;
    z-index: 20;
    top: 18px;
    display: flex;
    align-items: center;
    max-width: 1180px;
    margin: 18px auto 0;
    padding: 10px 14px;
    gap: 28px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(24px);
}

.brand img {
    display: block;
    width: 190px;
}

.site-header nav {
    display: flex;
    margin-left: auto;
    gap: 24px;
}

.site-header nav a {
    color: var(--muted);
    font-weight: 700;
}

.theme-toggle {
    width: 42px;
    height: 42px;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

/* =========================================================
   Zentrale Inhaltsbreiten
   ========================================================= */

.hero,
.section,
.trust,
.cta,
.footer {
    max-width: 1180px;
    margin: 0 auto;
}

/* =========================================================
   Hero-Bereich
   ========================================================= */

.hero {
    display: grid;
    grid-template-columns: 1.35fr 0.65fr;
    align-items: center;
    min-height: 690px;
    padding: 110px 0 80px;
    gap: 70px;
}

.hero h1 {
    margin: 18px 0 28px;
    font-size: clamp(3rem, 6vw, 5.7rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero p,
.section-head p {
    max-width: 720px;
    color: var(--muted);
    font-size: 1.15rem;
}

.eyebrow {
    color: var(--blue);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.actions {
    display: flex;
    margin-top: 34px;
    gap: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 22px;
    border: 1px solid var(--line);
    border-radius: 15px;
    font-weight: 850;
    cursor: pointer;
}

.primary {
    color: #ffffff;
    border: 0;
    background: linear-gradient(135deg, var(--blue), #0b88d4);
    box-shadow: 0 12px 28px rgba(0, 110, 184, 0.25);
}

.secondary {
    background: var(--surface);
}

.glass,
.card,
.projects article,
.admin-grid article {
    border: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
}

.hero-panel {
    padding: 22px;
    border-radius: 30px;
}

.status {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    color: var(--muted);
    gap: 10px;
}

.status i,
.pulse i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 8px rgba(105, 178, 29, 0.12);
}

.metric {
    padding: 20px 0;
    border-top: 1px solid var(--line);
}

.metric strong,
.metric span {
    display: block;
}

.metric strong {
    font-size: 1.3rem;
}

.metric span {
    color: var(--muted);
}

/* =========================================================
   Vertrauensleiste
   ========================================================= */

.trust {
    display: flex;
    justify-content: space-between;
    padding: 22px;
    color: var(--muted);
    border-block: 1px solid var(--line);
    gap: 20px;
    font-weight: 750;
}

/* =========================================================
   Allgemeine Abschnitte und Bento-Karten
   ========================================================= */

.section {
    padding: 120px 0;
}

.section-head {
    margin-bottom: 42px;
}

.section-head h2,
.security h2,
.cta h2 {
    margin: 12px 0;
    font-size: clamp(2.3rem, 4vw, 4rem);
    line-height: 1.05;
    letter-spacing: -0.045em;
}

.bento {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.card {
    min-width: 0;
    min-height: 240px;
    padding: 34px;
    border-radius: 28px;
    transition:
        transform 0.25s,
        border-color 0.25s;
}

.card:hover,
.projects article:hover {
    border-color: rgba(0, 110, 184, 0.38);
    transform: translateY(-6px);
}

.card-wide {
    grid-column: span 2;
}

.card h3 {
    margin: 0 0 14px;
    font-size: 1.55rem;
}

.card p,
.projects p,
.security p {
    color: var(--muted);
}

.accent {
    background:
        linear-gradient(
            135deg,
            rgba(0, 110, 184, 0.18),
            rgba(105, 178, 29, 0.12)
        ),
        var(--surface);
}

/* =========================================================
   Projekte auf der Startseite
   ========================================================= */

.projects,
.featured-projects,
.home-projects,
.projects-preview,
.project-grid {
    min-width: 0;
    max-width: 100%;
}

.projects {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.projects article,
.project-card,
.featured-project-card,
.home-project-card {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.projects article {
    padding: 30px;
    border-radius: 24px;
    transition:
        transform 0.25s,
        border-color 0.25s;
}

.projects b {
    font-size: 1.3rem;
}

/*
 * Große Webseiten-Screenshots werden als kompakte Vorschau angezeigt.
 * Dadurch bleiben Projektkarten innerhalb der verfügbaren Seitenbreite.
 */
.projects img,
.featured-projects img,
.home-projects img,
.projects-preview img,
.project-grid img,
.project-card img,
.featured-project-card img,
.home-project-card img,
.project-image img,
.project-preview img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 280px;
    margin: 0;
    border-radius: 16px;
    object-fit: cover;
    object-position: top center;
}

.project-card__visual,
.project-image,
.project-preview {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    border-radius: 16px;
}

/* =========================================================
   Sicherheit und Call-to-Action
   ========================================================= */

.security {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    padding: 55px;
    border-radius: 32px;
    gap: 60px;
}

.security li {
    margin: 12px 0;
}

.cta {
    padding: 100px 24px;
    text-align: center;
}

/* =========================================================
   Footer
   ========================================================= */

.footer {
    display: grid;
    padding: 48px 0;
    color: var(--muted);
    border-top: 1px solid var(--line);
    gap: 12px;
}

.footer img {
    width: 210px;
    height: auto;
    object-fit: contain;
}

/* =========================================================
   Kontaktformular
   ========================================================= */

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 900px;
    gap: 20px;
}

.contact-form label,
.admin-card label {
    display: grid;
    gap: 8px;
    font-weight: 750;
}

.contact-form input,
.contact-form textarea,
.admin-card input {
    width: 100%;
    padding: 14px 16px;
    color: var(--text);
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    font: inherit;
}

.full {
    grid-column: 1 / -1;
}

.check {
    display: flex !important;
    grid-template-columns: auto 1fr !important;
    align-items: center;
}

.check input {
    width: auto;
}

.hp {
    position: absolute;
    left: -10000px;
}

.notice {
    margin: 18px 0;
    padding: 16px;
    border-radius: 14px;
}

.success {
    background: rgba(105, 178, 29, 0.16);
}

.error {
    background: rgba(220, 45, 45, 0.14);
}

/* =========================================================
   Wartungsmodus und ursprüngliche Administrationsansicht
   ========================================================= */

.maintenance,
.admin-body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 20px;
}

.maintenance-card,
.admin-card {
    width: 100%;
    max-width: 720px;
    padding: 45px;
    border: 1px solid var(--line);
    border-radius: 30px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.maintenance-card img,
.admin-card img {
    width: min(100%, 390px);
}

.maintenance-card h1 {
    font-size: clamp(2.4rem, 6vw, 4.8rem);
    line-height: 1;
}

.pulse {
    display: flex;
    align-items: center;
    margin-top: 30px;
    gap: 16px;
}

.admin-card form {
    display: grid;
    gap: 18px;
}

.dashboard {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.dashboard aside {
    display: flex;
    flex-direction: column;
    padding: 30px;
    border-right: 1px solid var(--line);
    gap: 10px;
}

.dashboard aside img {
    width: 210px;
    margin-bottom: 30px;
}

.dashboard aside a {
    padding: 12px 14px;
    border-radius: 12px;
}

.dashboard aside .active {
    background: var(--surface);
}

.dashboard > main {
    padding: 60px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 40px;
    gap: 20px;
}

.admin-grid article {
    padding: 28px;
    border-radius: 24px;
}

.admin-grid strong {
    display: block;
    margin: 8px 0;
    font-size: 1.7rem;
}

/* =========================================================
   Öffentliche Projektvorschau
   ========================================================= */

.section-action {
    display: flex;
    justify-content: center;
    margin-top: 34px;
}

.project-number {
    display: block;
    margin-bottom: 20px;
    color: var(--blue);
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.page-hero {
    padding-bottom: 36px;
}

.page-hero h1 {
    max-width: 950px;
    margin: 16px 0 24px;
    font-size: clamp(2.7rem, 6vw, 5.6rem);
    line-height: 1.02;
}

.page-hero p {
    max-width: 820px;
    font-size: 1.12rem;
}

.project-showcase {
    display: grid;
    padding-top: 34px;
    gap: 32px;
}

.showcase-card {
    display: grid;
    grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
    max-width: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 32px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.showcase-visual {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-width: 0;
    min-height: 360px;
    padding: 42px;
    overflow: hidden;
    color: #ffffff;
}

.showcase-visual img {
    position: absolute;
    z-index: -2;
    inset: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    object-fit: cover;
    object-position: top center;
}

.showcase-visual::before {
    position: absolute;
    z-index: -1;
    inset: 0;
    content: "";
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.18),
            transparent 45%
        ),
        radial-gradient(
            circle at 85% 15%,
            rgba(255, 255, 255, 0.3),
            transparent 28%
        );
}

.showcase-visual span,
.showcase-visual small {
    opacity: 0.82;
}

.showcase-visual strong {
    margin: 18px 0;
    font-size: clamp(2rem, 4vw, 3.7rem);
    line-height: 1;
}

.showcase-blue .showcase-visual {
    background: linear-gradient(135deg, #0567b1, #09a6d8);
}

.showcase-green .showcase-visual {
    background: linear-gradient(135deg, #166534, #65a30d);
}

.showcase-orange .showcase-visual {
    background: linear-gradient(135deg, #b45309, #f59e0b);
}

.showcase-dark .showcase-visual {
    background: linear-gradient(135deg, #111827, #334155);
}

.showcase-content {
    min-width: 0;
    padding: 48px;
}

.showcase-content h2 {
    margin: 12px 0;
    font-size: clamp(2rem, 3vw, 3rem);
}

.showcase-content ul {
    padding-left: 20px;
    line-height: 1.9;
}

.project-status {
    display: inline-flex;
    padding: 7px 12px;
    color: var(--blue);
    border-radius: 999px;
    background: rgba(10, 112, 184, 0.12);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* =========================================================
   Tablet und kleinere Desktopansichten
   ========================================================= */

@media (max-width: 900px) {
    .projects img,
    .featured-projects img,
    .home-projects img,
    .projects-preview img,
    .project-grid img,
    .project-card img,
    .featured-project-card img,
    .home-project-card img,
    .project-image img,
    .project-preview img {
        height: 230px;
    }
}

@media (max-width: 850px) {
    .site-header {
        top: 0;
        margin: 0;
        border-radius: 0;
    }

    .site-header nav {
        display: none;
    }

    .brand img {
        width: 160px;
    }

    .hero {
        grid-template-columns: 1fr;
        padding: 80px 22px;
    }

    .trust {
        padding-inline: 22px;
        overflow: auto;
    }

    .section {
        padding: 85px 22px;
    }

    .bento,
    .projects,
    .security,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .card-wide {
        grid-column: auto;
    }

    .security {
        margin-inline: 22px;
    }

    .footer {
        padding: 40px 22px;
    }

    .contact-form {
        grid-template-columns: 1fr;
    }

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

    .dashboard aside {
        border: 0;
        border-bottom: 1px solid var(--line);
    }

    .dashboard > main {
        padding: 30px 20px;
    }

    .showcase-card {
        grid-template-columns: 1fr;
    }

    .showcase-visual {
        min-height: 280px;
    }

    .showcase-content {
        padding: 30px 24px;
    }

    .page-hero {
        padding-top: 80px;
    }
}

/* =========================================================
   Smartphone
   ========================================================= */

@media (max-width: 640px) {
    .actions {
        flex-direction: column;
        align-items: stretch;
    }

    .trust {
        justify-content: flex-start;
    }

    .projects img,
    .featured-projects img,
    .home-projects img,
    .projects-preview img,
    .project-grid img,
    .project-card img,
    .featured-project-card img,
    .home-project-card img,
    .project-image img,
    .project-preview img {
        height: 180px;
        border-radius: 12px;
    }

    .showcase-visual {
        min-height: 230px;
        padding: 28px 22px;
    }
}

/* =========================================================
   Reduzierte Bewegung
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
