/* ============================================================
   hanse_nova – Template für hanse-computing.de
   Intelion-inspiriert: Teal #1C5E66, Inter + Roboto Mono,
   Pill-Buttons, helles AI-Agentur-Design mit dunklem Hero.
   (C) 2026 hanse-computing.de – GNU GPL v2+
   ============================================================ */

/* ---------- Design-Tokens ---------- */
:root {
    /* Intelion-Primary Teal */
    --hc-accent: #1C5E66;
    --hc-accent-rgb: 28, 94, 102;
    --hc-accent-soft: #EEF6FA;
    --hc-accent-hover: #174E55;
    --hc-accent-dark: #0E2F33;

    --hc-ink: #14363C;
    --hc-text: #4B5A63;
    --hc-muted: #7A8A94;
    --hc-line: #E1E9EC;
    --hc-line-soft: #CADDE6;

    --hc-bg: #ffffff;
    --hc-bg-soft: #F4F9FB;
    --hc-bg-dark: #0E2F33;
    --hc-bg-dark-2: #123B40;

    --hc-radius: 14px;
    --hc-radius-sm: 8px;
    --hc-shadow-sm: 0 1px 3px rgba(14, 47, 51, .08);
    --hc-shadow: 0 10px 30px -12px rgba(14, 47, 51, .18);
    --hc-shadow-lg: 0 24px 60px -20px rgba(14, 47, 51, .28);

    --hc-font: 'Inter', 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
    --hc-font-mono: 'Roboto Mono', ui-monospace, 'Cascadia Code', 'JetBrains Mono', Menlo, Consolas, monospace;

    --hc-space-1: .5rem;
    --hc-space-2: 1rem;
    --hc-space-3: 1.5rem;
    --hc-space-4: 2rem;
    --hc-space-5: 3rem;
    --hc-space-6: 4.5rem;

    --hc-container: 1180px;
    --hc-header-h: 78px;
}

/* ---------- Reset / Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--hc-font);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--hc-text);
    background: var(--hc-bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 .75em;
    color: var(--hc-ink);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.02em;
}

h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 1.25rem; }

a { color: var(--hc-accent); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--hc-accent-hover); }

.container {
    width: 100%;
    max-width: var(--hc-container);
    margin-inline: auto;
    padding-inline: 1.25rem;
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: 1rem; top: -100px;
    z-index: 9999;
    background: var(--hc-ink);
    color: #fff !important;
    padding: .75rem 1.25rem;
    border-radius: var(--hc-radius-sm);
    transition: top .2s ease;
}
.skip-link:focus { top: 1rem; }

/* ---------- Topbar ---------- */
.topbar {
    background: var(--hc-bg-dark);
    color: #C7D6DA;
    font-size: .875rem;
}
.topbar-inner { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; min-height: 38px; }
.topbar a { color: #E1ECEE; }
.topbar a:hover { color: #fff; }
.topbar p { margin: 0; }
.topbar .mod-menu { display: flex; list-style: none; gap: 1.25rem; margin: 0; padding: 0; }

/* ---------- Header ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--hc-line);
    transition: box-shadow .25s ease;
}
.site-header.is-scrolled { box-shadow: var(--hc-shadow-sm); }

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: var(--hc-header-h);
}

.brand-link {
    display: inline-flex;
    align-items: center;
    color: var(--hc-ink);
}
.brand-link:hover { color: var(--hc-ink); }
.brand-logo { display: block; height: 52px; width: auto; }

/* ---------- Navigation ---------- */
.main-nav ul.mod-menu {
    display: flex;
    align-items: center;
    gap: .35rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav .mod-menu > li > a {
    display: inline-block;
    padding: .55rem .9rem;
    border-radius: 999px;
    color: var(--hc-text);
    font-weight: 500;
    font-size: .95rem;
}
.main-nav .mod-menu > li > a:hover { background: var(--hc-bg-soft); color: var(--hc-ink); }
.main-nav .mod-menu > li.active > a,
.main-nav .mod-menu > li.current > a {
    background: var(--hc-accent-soft);
    color: var(--hc-accent);
    font-weight: 600;
}

.main-nav .mod-menu .parent { position: relative; }
.main-nav .mod-menu ul {
    position: absolute;
    top: calc(100% + .35rem);
    left: 0;
    min-width: 230px;
    background: #fff;
    border: 1px solid var(--hc-line);
    border-radius: var(--hc-radius-sm);
    box-shadow: var(--hc-shadow);
    list-style: none;
    margin: 0;
    padding: .4rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all .18s ease;
    z-index: 50;
}
.main-nav .mod-menu li:hover > ul,
.main-nav .mod-menu li:focus-within > ul { opacity: 1; visibility: visible; transform: translateY(0); }
.main-nav .mod-menu ul a {
    display: block;
    padding: .5rem .75rem;
    border-radius: 6px;
    color: var(--hc-text);
    font-size: .92rem;
    white-space: nowrap;
}
.main-nav .mod-menu ul a:hover { background: var(--hc-bg-soft); color: var(--hc-ink); }
.main-nav .mod-menu ul .active > a { color: var(--hc-accent); font-weight: 600; }

/* Mobile Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px; height: 44px;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--hc-line);
    border-radius: 10px;
    cursor: pointer;
}
.nav-toggle-bar {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--hc-ink);
    border-radius: 2px;
    transition: transform .25s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero (dunkel) ---------- */
.hero {
    position: relative;
    color: #fff;
    background:
        radial-gradient(1000px 500px at 85% -10%, rgba(255, 255, 255, .06), transparent 60%),
        radial-gradient(700px 400px at 10% 110%, rgba(72, 187, 200, .18), transparent 55%),
        linear-gradient(135deg, var(--hc-bg-dark) 0%, var(--hc-bg-dark-2) 100%);
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 90% 80% at 60% 30%, #000 30%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse 90% 80% at 60% 30%, #000 30%, transparent 75%);
    pointer-events: none;
}
.hero-inner { position: relative; padding-block: clamp(4rem, 10vw, 7rem); }

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    gap: 3rem;
}

.hero-content { max-width: 640px; }

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin: 0 0 1.25rem;
    padding: .4rem 1rem;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    color: #A8D5DB;
    font-family: var(--hc-font-mono);
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.hero-eyebrow::before {
    content: '';
    width: 7px; height: 7px;
    border-radius: 50%;
    background: #4FC3CE;
    box-shadow: 0 0 12px #4FC3CE;
}

.hero-title { color: #fff; margin-bottom: 1rem; }
.hero-subtitle {
    color: #C7D6DA;
    font-size: 1.15rem;
    max-width: 56ch;
    margin-bottom: 2rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }

.hero-visual { display: flex; justify-content: center; }
.hero-logo { max-width: 100%; height: auto; filter: drop-shadow(0 12px 40px rgba(0,0,0,.35)); }

/* ---------- Buttons (Pill) ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .8rem 1.7rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: .98rem;
    line-height: 1.2;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .2s ease;
}
.btn-primary {
    background: var(--hc-accent);
    color: #fff !important;
    box-shadow: 0 8px 24px -8px rgba(var(--hc-accent-rgb), .6);
}
.btn-primary:hover { background: var(--hc-accent-hover); color: #fff !important; transform: translateY(-1px); box-shadow: 0 12px 28px -8px rgba(var(--hc-accent-rgb), .7); }
.btn-ghost {
    background: rgba(255,255,255,.08);
    border-color: rgba(255,255,255,.25);
    color: #E1ECEE !important;
}
.btn-ghost:hover { background: rgba(255,255,255,.16); color: #fff !important; }
.btn-lg { padding: 1rem 2.2rem; font-size: 1.05rem; }

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-weight: 600;
    font-size: .95rem;
}
.link-arrow::after { content: '→'; transition: transform .2s ease; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Sections ---------- */
.section { padding-block: var(--hc-space-6); }

/* Stats-Band */
.section-stats { background: var(--hc-bg-soft); border-block: 1px solid var(--hc-line); padding-block: var(--hc-space-4); }
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}
.stat-value {
    font-family: var(--hc-font-mono);
    font-size: clamp(1.8rem, 3.4vw, 2.6rem);
    font-weight: 700;
    color: var(--hc-accent);
    line-height: 1.1;
    margin-bottom: .35rem;
}
.stat-label {
    font-size: .85rem;
    font-weight: 600;
    color: var(--hc-muted);
    letter-spacing: .06em;
    text-transform: uppercase;
}

/* Features */
.section-features { background: var(--hc-bg); }
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}
.feature-block {
    background: var(--hc-bg-soft);
    border: 1px solid var(--hc-line);
    border-radius: var(--hc-radius);
    padding: var(--hc-space-4);
    transition: transform .22s ease, box-shadow .22s ease;
}
.feature-block:hover { transform: translateY(-4px); box-shadow: var(--hc-shadow); }
.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px; height: 56px;
    border-radius: 16px;
    background: var(--hc-accent);
    color: #fff;
    margin-bottom: 1.1rem;
}
.feature-block h3 { margin-bottom: .6rem; }
.feature-block p { color: var(--hc-text); }

/* Cards */
.section-cards { background: var(--hc-bg); }
.section-title { text-align: center; margin-bottom: var(--hc-space-4); }
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}
.hc-card {
    background: #fff;
    border: 1px solid var(--hc-line);
    border-radius: var(--hc-radius);
    padding: var(--hc-space-3);
    box-shadow: var(--hc-shadow-sm);
    transition: transform .22s ease, box-shadow .22s ease;
    height: 100%;
}
.hc-card:hover { transform: translateY(-4px); box-shadow: var(--hc-shadow); }
.hc-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px; height: 52px;
    border-radius: 14px;
    background: var(--hc-accent-soft);
    color: var(--hc-accent);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.hc-card h3 { font-size: 1.12rem; margin-bottom: .55rem; }
.hc-card p { font-size: .95rem; color: var(--hc-text); }

/* References */
.section-references { background: var(--hc-bg-soft); border-block: 1px solid var(--hc-line); padding-block: var(--hc-space-4); }
.references-eyebrow {
    text-align: center;
    font-family: var(--hc-font-mono);
    font-size: .75rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--hc-muted);
    margin-bottom: 1.25rem;
}
.references-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem 2.5rem;
}
.reference-item {
    font-size: 1rem;
    font-weight: 600;
    color: var(--hc-muted);
    opacity: .85;
}

/* CTA (dunkel) */
.section-cta { background: var(--hc-bg); padding-bottom: var(--hc-space-6); }
.cta-box {
    background:
        radial-gradient(800px 300px at 90% -20%, rgba(79, 195, 206, .14), transparent 60%),
        linear-gradient(135deg, var(--hc-bg-dark) 0%, var(--hc-bg-dark-2) 100%);
    border-radius: 22px;
    color: #fff;
    text-align: center;
    padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 4vw, 3rem);
}
.cta-title { color: #fff; margin-bottom: .75rem; }
.cta-text { color: #C7D6DA; max-width: 52ch; margin: 0 auto 1.75rem; }

/* ---------- Main / Layout ---------- */
.site-main { padding-block: var(--hc-space-5); min-height: 45vh; }

.main-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
body.sidebar-left .main-layout { grid-template-columns: 280px 1fr; }
body.sidebar-right .main-layout { grid-template-columns: 1fr 280px; }
body.sidebar-left.sidebar-right .main-layout { grid-template-columns: 260px 1fr 260px; }

.sidebar { min-width: 0; }
.sidebar .moduletable,
.sidebar .module {
    background: var(--hc-bg-soft);
    border: 1px solid var(--hc-line);
    border-radius: var(--hc-radius);
    padding: var(--hc-space-3);
    margin-bottom: 1.5rem;
}
.sidebar h3 { font-size: 1.02rem; margin-bottom: .75rem; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }
.sidebar li { margin-bottom: .4rem; }
.sidebar li a { display: block; padding: .4rem .6rem; border-radius: 8px; color: var(--hc-text); }
.sidebar li a:hover { background: #fff; color: var(--hc-accent); }

/* Breadcrumbs */
.breadcrumbs {
    font-size: .88rem;
    color: var(--hc-muted);
    margin-bottom: 1.5rem;
}
.breadcrumbs .breadcrumb { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.breadcrumbs .breadcrumb li + li::before { content: '/'; margin-inline: .3rem; color: var(--hc-line); }
.breadcrumbs a { color: var(--hc-muted); }
.breadcrumbs a:hover { color: var(--hc-accent); }
.breadcrumbs .active { color: var(--hc-ink); font-weight: 500; }

/* Content / Artikel */
.com-content-article { background: #fff; }
.com-content-category-blog .item {
    background: #fff;
    border: 1px solid var(--hc-line);
    border-radius: var(--hc-radius);
    padding: var(--hc-space-3);
    margin-bottom: 1.5rem;
    box-shadow: var(--hc-shadow-sm);
    transition: transform .22s ease, box-shadow .22s ease;
}
.com-content-category-blog .item:hover { transform: translateY(-3px); box-shadow: var(--hc-shadow); }

/* Joomla-Meldungen */
#system-message-container { margin-bottom: 1.5rem; }
.alert { border-radius: var(--hc-radius-sm); padding: 1rem 1.25rem; margin-bottom: 1rem; }
.alert-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert-warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-error, .alert-danger { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-info { background: var(--hc-accent-soft); border: 1px solid var(--hc-line-soft); color: #1C5E66; }

/* Pagination */
.pagination { display: flex; justify-content: center; list-style: none; gap: .35rem; margin-top: 2rem; padding: 0; }
.pagination li a, .pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px; height: 40px;
    padding: 0 .6rem;
    border: 1px solid var(--hc-line);
    border-radius: 10px;
    color: var(--hc-text);
    font-weight: 500;
}
.pagination li.active span { background: var(--hc-accent); border-color: var(--hc-accent); color: #fff; }
.pagination li a:hover { border-color: var(--hc-accent); color: var(--hc-accent); }

/* ---------- Footer (dunkel) ---------- */
.site-footer {
    background: var(--hc-bg-dark);
    color: #A8B9BE;
    font-size: .93rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.4fr;
    gap: 2.5rem;
    padding-block: var(--hc-space-5) var(--hc-space-4);
}
.footer-brand { display: flex; align-items: center; margin-bottom: .9rem; }
.footer-logo { display: block; height: 44px; width: auto; }
.footer-note { max-width: 34ch; margin-bottom: 0; }
.site-footer h3 {
    color: #fff;
    font-size: .95rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .5rem; }
.site-footer a { color: #A8B9BE; }
.site-footer a:hover { color: #fff; }
.site-footer .mod-menu li::before { content: none; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-block: 1.25rem;
    font-size: .85rem;
}
.footer-bottom-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { color: #A8B9BE; }
.footer-links a:hover { color: #fff; }

/* ---------- Formulare ---------- */
input[type="text"], input[type="email"], input[type="password"],
input[type="search"], input[type="url"], input[type="tel"], input[type="number"],
select, textarea {
    width: 100%;
    padding: .7rem .9rem;
    border: 1px solid var(--hc-line);
    border-radius: 10px;
    background: #fff;
    color: var(--hc-ink);
    font-family: inherit;
    font-size: .96rem;
    transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--hc-accent);
    box-shadow: 0 0 0 3px rgba(var(--hc-accent-rgb), .15);
}
label { font-weight: 500; color: var(--hc-ink); }
.form-group { margin-bottom: 1.25rem; }
.btn-group { display: inline-flex; gap: .5rem; }

/* ---------- Module generisch ---------- */
.moduletable, .module { margin-bottom: 1.5rem; }
.moduletable > h3, .module > h3 { font-size: 1.1rem; }

.section .mod-custom h2, .section .mod-custom h3 { margin-top: 0; }

/* ---------- Home: Bestands-Hero/Services durch Template-Sektionen ersetzt ----------
   Der Home-Artikel (id=3) enthält alte Layout-Blöcke (hanse-hero, hanse-services),
   die das Template jetzt selbst rendert. Nur Design-Ausblendung, Artikel bleibt
   unangetastet; Inhalte (Schwerpunkt, Projekte, Kontakt) bleiben sichtbar. */
.blog-featured .hanse-hero,
.blog-featured .hanse-services,
.blog-featured .item-content > .hanse-hero + h3 { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .cards-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
    .hero-visual { justify-content: flex-start; }
    body.sidebar-left .main-layout,
    body.sidebar-right .main-layout,
    body.sidebar-left.sidebar-right .main-layout { grid-template-columns: 1fr; }
    .sidebar { order: 2; }
}

@media (max-width: 860px) {
    .nav-toggle { display: flex; }

    .main-nav {
        position: fixed;
        inset: var(--hc-header-h) 0 auto 0;
        background: #fff;
        border-bottom: 1px solid var(--hc-line);
        box-shadow: var(--hc-shadow);
        padding: 1rem 1.25rem 1.5rem;
        max-height: calc(100vh - var(--hc-header-h));
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity .22s ease, transform .22s ease, visibility .22s;
    }
    .main-nav.is-open { opacity: 1; visibility: visible; transform: translateY(0); }

    .main-nav ul.mod-menu { flex-direction: column; align-items: stretch; gap: .15rem; }
    .main-nav .mod-menu > li > a { display: block; padding: .75rem .9rem; border-radius: 10px; }
    .main-nav .mod-menu ul {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
        min-width: 0;
    }
    .hero-inner { padding-block: 3.5rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
    .features-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
    .footer-bottom-inner { flex-direction: column; text-align: center; }
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { width: 100%; }
    .cards-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 1.25rem; }
    .section { padding-block: 3rem; }
}

/* ---------- Print ---------- */
@media print {
    .topbar, .site-header, .hero, .section-features, .section-benefits,
    .section-trust, .section-cta, .site-footer, .nav-toggle, .main-nav { display: none !important; }
    body { background: #fff; color: #000; }
    .site-main { padding: 0; }
}
