/* === wohngeld-köln.de — Design System === */
:root {
    /* Primary: Deep green — trust, stability, home */
    --primary-color: #1a5f4a;
    --primary-light: #2d8a6e;
    --primary-dark: #134a38;

    /* Accent: Gold — action, CTA, highlights */
    --accent-color: #e8a838;
    --accent-hover: #c88a20;
    --accent-light: #f5d48a;

    /* Neutrals */
    --text-color: #1e1e1e;
    --text-muted: #555;
    --bg-color: #fafaf8;
    --bg-white: #ffffff;
    --border-color: #d0d5d2;
    --footer-bg: #1a1f1c;
    --footer-text: #c0c5c2;

    /* Functional */
    --link-color: #1a5f4a;
    --focus-outline: 3px solid #e8a838;
    --error-color: #c0392b;
    --success-color: #1a5f4a;

    /* Spacing */
    --section-padding: 3rem 0;
    --card-radius: 8px;
    --btn-radius: 6px;
}

* {
    box-sizing: border-box;
}

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

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 0;
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
    line-height: 1.3;
    color: var(--primary-dark);
}

h1 { font-size: 2.2rem; margin-bottom: 1rem; }
h2 { font-size: 1.7rem; margin: 2rem 0 1rem; }
h3 { font-size: 1.3rem; margin: 1.5rem 0 0.75rem; }

a {
    color: var(--link-color);
    text-decoration: underline;
    text-underline-offset: 3px;
}

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

/* ===== Skip Link ===== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 10px 16px;
    z-index: 100;
    font-weight: 600;
    border-radius: 0 0 var(--btn-radius) 0;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
    outline: var(--focus-outline);
    outline-offset: 0;
}

/* ===== Header ===== */
header {
    background: var(--bg-white);
    border-bottom: 2px solid var(--primary-color);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    gap: 1.5rem;
    padding: 0.6rem 0;
}

.logo {
    margin-right: auto;
    flex-shrink: 0;
}

.logo a {
    text-decoration: none;
    color: var(--primary-dark);
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

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

.logo a::before {
    content: '🏠 ';
    font-size: 1.2rem;
}

/* ===== CTA Button ===== */
.btn {
    display: inline-block;
    padding: 0.7rem 1.6rem;
    border-radius: var(--btn-radius);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.btn-cta {
    background: var(--accent-color);
    color: #1e1e1e;
    border-color: var(--accent-color);
}

.btn-cta:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #1e1e1e;
    text-decoration: none;
}

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

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

.btn-large {
    padding: 0.9rem 2.2rem;
    font-size: 1.1rem;
}

/* Header CTA button styling */
.header-cta .btn-cta {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* ===== Navigation ===== */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1100;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-color);
    position: relative;
    transition: background 0.3s;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background: var(--text-color);
    left: 0;
    transition: transform 0.3s;
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

.menu-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}

.menu-toggle[aria-expanded="true"] .hamburger::before {
    transform: rotate(45deg) translate(5px, 6px);
}

.menu-toggle[aria-expanded="true"] .hamburger::after {
    transform: rotate(-45deg) translate(5px, -6px);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.2rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links li {
    position: relative;
}

.nav-links a,
.submenu-toggle {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 0;
    display: block;
    background: none;
    border: none;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: inherit;
}

.nav-links a:hover,
.submenu-toggle:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.nav-links a.active {
    font-weight: 600;
    border-bottom: 2px solid var(--accent-color);
}

.has-submenu {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.arrow {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 4px;
    vertical-align: middle;
    border-top: 4px solid;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
    transition: transform 0.3s;
}

.submenu-toggle[aria-expanded="true"] .arrow {
    transform: rotate(180deg);
}

/* Desktop Submenu */
@media (min-width: 1025px) {
    .submenu {
        position: absolute;
        top: 100%;
        left: 0;
        background: var(--bg-white);
        border: 1px solid var(--border-color);
        border-top: 3px solid var(--primary-color);
        box-shadow: 0 6px 16px rgba(0,0,0,0.1);
        list-style: none;
        padding: 0.5rem 0;
        margin: 0;
        min-width: 220px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(8px);
        transition: all 0.25s;
        z-index: 1000;
        border-radius: 0 0 var(--card-radius) var(--card-radius);
    }

    .nav-links li:hover > .submenu,
    .nav-links li:focus-within > .submenu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .submenu li a {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .submenu li a:hover {
        background: var(--bg-color);
        color: var(--primary-color);
    }
}

/* ===== Language Switcher ===== */
.language-switcher {
    display: flex;
    align-items: center;
}

.language-switcher select {
    padding: 0.45rem 0.6rem;
    border-radius: var(--btn-radius);
    border: 1px solid var(--border-color);
    font-size: 0.9rem;
    cursor: pointer;
    background: var(--bg-white);
    color: var(--text-color);
}

/* ===== Page Content ===== */
main {
    flex: 1;
}

main .container {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* ===== Hero Section ===== */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 50%, var(--primary-light) 100%);
    color: white;
    padding: 3.5rem 0;
    text-align: center;
    border-bottom: 4px solid var(--accent-color);
}

.hero .container {
    padding: 0;
}

.hero h1 {
    color: white;
    font-size: 2.4rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero p {
    font-size: 1.15rem;
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.6;
    opacity: 0.95;
}

.hero .btn-cta {
    font-size: 1.15rem;
    padding: 0.9rem 2.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.hero .btn-cta:hover {
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
    transform: translateY(-1px);
}

/* ===== CTA Section (Bottom) ===== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    text-align: center;
    padding: 3.5rem 0;
    border-top: 4px solid var(--accent-color);
}

.cta-section h2 {
    color: white;
    font-size: 1.8rem;
}

.cta-section p {
    color: rgba(255,255,255,0.9);
    max-width: 600px;
    margin: 0 auto 1.5rem;
    font-size: 1.05rem;
}

/* ===== Guide Section ===== */
.guide-section {
    background: var(--bg-white);
    padding: 3.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.guide-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.guide-label {
    display: inline-block;
    background: #e8f5e9;
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-bottom: 0.75rem;
}

.guide-text h2 {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.guide-text p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.guide-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    font-size: 1rem;
    transition: gap 0.2s;
}

.guide-link:hover {
    gap: 0.6rem;
    color: var(--primary-light);
}

.guide-highlights {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.highlight-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--bg-color);
    padding: 1.25rem;
    border-radius: var(--card-radius);
    border-left: 3px solid var(--primary-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.highlight-card:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.highlight-icon {
    font-size: 1.75rem;
    flex-shrink: 0;
    width: 2.5rem;
    text-align: center;
}

.highlight-card strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-color);
    font-size: 0.95rem;
}

.highlight-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ===== Services Section ===== */
.services-section {
    background: var(--bg-color);
    padding: 3.5rem 0;
}

.services-section h2 {
    text-align: center;
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 550px;
    margin: 0 auto 2.5rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.service-card {
    background: var(--bg-white);
    border-radius: var(--card-radius);
    padding: 2rem 1.5rem;
    text-decoration: none;
    color: var(--text-color);
    border: 1px solid var(--border-color);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.1);
    border-color: var(--primary-light);
}

.service-card-featured {
    border-color: var(--accent-color);
    border-width: 2px;
    background: linear-gradient(180deg, #fffdf5 0%, var(--bg-white) 100%);
}

.service-icon-wrapper {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 12px;
    background: #e8f5e9;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.service-card-featured .service-icon-wrapper {
    background: #fff3d6;
}

.service-icon {
    font-size: 1.5rem;
}

.service-card h3 {
    margin: 0 0 0.75rem;
    font-size: 1.2rem;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 1.25rem;
    flex-grow: 1;
}

.service-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.95rem;
    transition: gap 0.2s;
}

.service-card:hover .service-link {
    gap: 0.5rem;
}

.service-card-featured .service-link {
    color: var(--accent-hover);
}

/* ===== Trust Bar ===== */
.trust-bar {
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0;
}

.trust-items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    text-align: center;
}

.trust-stat {
    padding: 1rem;
}

.trust-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1.2;
}

.trust-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* ===== Page Section ===== */
.page-section {
    margin-bottom: 2rem;
}

.page-section h2 {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

/* ===== Answer Block (GEO) ===== */
.answer-block {
    font-size: 1.15rem;
    line-height: 1.7;
    background: var(--bg-color);
    border-left: 4px solid var(--accent-color);
    padding: 1rem 1.25rem;
    margin: 1rem 0 2rem;
    border-radius: 0 var(--card-radius) var(--card-radius) 0;
}

/* ===== Info Box ===== */
.info-box {
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--card-radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.info-box h3 {
    margin-top: 0;
}

/* ===== Checklist ===== */
.checklist {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.checklist li {
    padding: 0.5rem 0 0.5rem 2rem;
    position: relative;
    border-bottom: 1px solid var(--border-color);
}

.checklist li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
}

/* ===== Table Styling ===== */
.table-wrapper {
    overflow-x: auto;
    margin: 1.5rem 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

table th {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
}

table td {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

table tr:nth-child(even) {
    background: var(--bg-color);
}

table tr:hover {
    background: #eef5f1;
}

/* ===== Error 404 ===== */
.error-404 {
    text-align: center;
    padding: 4rem 0;
}

.error-404 h1 {
    font-size: 3rem;
    color: var(--primary-color);
}

.error-404 .btn {
    margin-top: 1rem;
}

/* ===== Footer ===== */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 2.5rem 0;
    margin-top: auto;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-info p {
    margin: 0;
    font-size: 0.9rem;
}

.footer-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
}

.footer-links a {
    text-decoration: none;
    color: var(--footer-text);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

/* ===== Accessibility ===== */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

a:focus, button:focus, select:focus, input:focus {
    outline: var(--focus-outline);
    outline-offset: 2px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .header-container {
        gap: 1rem;
    }

    .language-switcher {
        margin-left: auto;
    }

    .header-cta {
        display: none;
    }

    .menu-toggle {
        display: block;
        margin-left: 0.5rem;
    }

    .nav-wrapper {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: var(--bg-white);
        box-shadow: -2px 0 10px rgba(0,0,0,0.15);
        padding: 5rem 1.5rem 2rem;
        transition: right 0.3s ease-in-out;
        z-index: 1050;
        overflow-y: auto;
    }

    .nav-wrapper.is-active {
        right: 0;
    }

    .nav-links {
        flex-direction: column;
        gap: 0.5rem;
    }

    .has-submenu {
        flex-direction: column;
        align-items: flex-start;
    }

    .submenu {
        list-style: none;
        padding-left: 1.5rem;
        display: none;
        width: 100%;
    }

    .submenu.is-open {
        display: block;
    }

    .submenu li a {
        padding: 0.5rem 0;
    }

    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.4rem; }
    .hero { padding: 2.5rem 0; }
    .hero h1 { font-size: 1.9rem; }

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

    .trust-items {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .trust-items {
        grid-template-columns: 1fr 1fr;
    }

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

    .footer-container {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }

    h1 { font-size: 1.6rem; }
    .hero h1 { font-size: 1.6rem; }
    .hero p { font-size: 1rem; }

    .trust-number { font-size: 1.5rem; }
    .trust-label { font-size: 0.8rem; }
}
