/* Nachbarschaftsverband Ulm - Modern CSS mit WCAG 2.1 AA / BITV 2.0 */

:root {
    --primary-blue: #000000;
    --secondary-blue: #2377CC;
    --accent-blue: #000000;
    --text-dark: #2C3E50;
    --text-gray: #5A6C7D;
    --border-light: #E0E4E8;
    --bg-light: #F8F9FA;
    --bg-white: #FFFFFF;
    --success-green: #28A745;
    --warning-orange: #FFA726;
    --focus-color: #0056B3;
}

/* SKIP-LINK (WCAG 2.4.1) */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    z-index: 9999;
    border-radius: 0 0 4px 0;
}
.skip-link:focus {
    top: 0;
    outline: 3px solid #fff;
    outline-offset: 2px;
}

/* VISUELL VERSTECKTER TEXT FÜR SCREENREADER (WCAG 1.3.1 / 2.4.4) */
.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;
}

/* FOCUS STYLES (WCAG 2.4.7) */
:focus-visible {
    outline: 3px solid var(--focus-color);
    outline-offset: 3px;
    border-radius: 2px;
}
a:focus, button:focus, input:focus, select:focus, textarea:focus, [tabindex]:focus {
    outline: 3px solid var(--focus-color);
    outline-offset: 3px;
}
.navbar a:focus, .navbar button:focus {
    outline: 3px solid #fff;
    outline-offset: 2px;
}
.dropdown-item:focus {
    outline: 3px solid var(--focus-color);
    outline-offset: -2px;
    background-color: #e8f0fe;
    color: #000;
}

/* TYPOGRAFIE */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 16px;
}
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--primary-blue);
    line-height: 1.3;
}
h1 { font-size: 2rem;    margin-bottom: 1.5rem; }
h2 { font-size: 1.5rem;  margin-bottom: 1.25rem; }
h3 { font-size: 1.25rem; margin-bottom: 1rem; }

/* HEADER */
.bg-primary-custom { background-color: var(--bg-white) !important; }
.bg-dark-custom    { background-color: black !important; }
.nv-header { box-shadow: 0 2px 4px rgba(0,0,0,0.1); }

/* Kein H1 im Header – gestylt wie Überschrift, semantisch neutral */
.nv-header-brand {
    color: black;
    font-weight: 600;
    font-size: 1.5rem;
    display: block;
    line-height: 1.3;
}
.nv-header-sub {
    color: black;
    font-size: 0.9rem;
    display: block;
}
.nv-header a:hover .nv-header-brand,
.nv-header a:hover .nv-header-sub { opacity: 0.85; }

/* NAVIGATION */
.navbar-dark-custom {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.navbar-dark-custom .navbar-nav .nav-link {
    color: rgba(255,255,255,0.95);
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 4px;
    margin: 0 0.1rem;
}
.nav-link { color: rgba(255,255,255,0.95) !important; }
.nav-link.active, .nav-link[aria-current="page"] {
    background-color: rgba(255,255,255,0.2) !important;
    color: #fff !important;
    font-weight: 700 !important;
    text-decoration: underline;
}
@media (min-width: 992px) {
    .navbar .dropdown:hover > .dropdown-menu { display: block; margin-top: 0; }
}
.nav-item { margin-left: 18px; }
.navbar-dark-custom .navbar-nav .nav-link:hover,
.navbar-dark-custom .navbar-nav .nav-link:focus {
    background-color: rgba(255,255,255,0.15);
    color: #fff;
}
.dropdown-menu {
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 4px;
    padding: 0.5rem 0;
}
.dropdown-item {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    color: var(--text-dark);
}
.dropdown-item:hover { background-color: var(--bg-light); color: var(--primary-blue); }
.dropdown-item[aria-current="page"], .dropdown-item.active {
    background-color: #e8e8e8;
    color: #000;
}

/* CONTENT */
.content-section {
    background-color: var(--bg-white);
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid var(--border-light);
}
.content-section-gray {
    background-color: var(--bg-light);
    padding: 2.5rem;
    margin-bottom: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}
.headline {
    color: var(--primary-blue);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--accent-blue);
}
.header-orange {
    color: var(--secondary-blue);
    font-weight: 600;
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}
.header-black {
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 4px solid var(--accent-blue);
}

/* VERFAHREN / BEKANNTMACHUNGEN */
.verfahren-box {
    background-color: var(--bg-white);
    border-left: 4px solid #bbb;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.verfahren-title {
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}
.bekanntmachung-box {
    background-color: var(--bg-white);
    border-left: 4px solid #bbb;
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.bekanntmachung-title {
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--primary-blue);
}
.bekanntmachung-trenner {
    border-top: 2px solid var(--border-light);
    margin-top: 2rem;
}

/* LINKS (WCAG 2.4.4) */
.karte-link {
    display: inline-block;
    margin-top: 0.75rem;
    margin-right: 1.5rem;
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    background-color: var(--accent-blue);
    border-radius: 4px;
    transition: all 0.1s ease;
}
.karte-link:hover, .karte-link:visited {
    color: #fff;
    text-decoration: none;
    box-shadow: 2px 3px 4px rgba(0,0,0,0.3);
}
.pdf-link {
    display: inline-block;
    margin-top: 0.75rem;
    margin-right: 1.5rem;
    color: var(--secondary-blue);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    background-color: var(--bg-light);
    border-radius: 4px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
}
.pdf-link:hover {
    background-color: var(--accent-blue);
    color: #fff;
    text-decoration: none;
    box-shadow: 2px 3px 4px rgba(0,0,0,0.3);
}
.pdf-link::before { content: "\1F4C4\00A0"; }

/* ÄNDERUNGSBEREICH */
.aenderung-box {
    background-color: var(--bg-white);
    border: 1px solid var(--border-light);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 8px;
}
.aenderung-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}
.aenderung-image {
    max-width: 100%;
    height: auto;
    margin: 1rem 0;
    border: 1px solid var(--border-light);
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* WCAG 2.1.1: zoom-link MUSS per Tastatur erreichbar sein – kein display:none */
.zoom-link {
    display: inline-block;
    margin-top: 0.5rem;
    color: var(--secondary-blue);
    font-weight: 500;
    text-decoration: none;
}
.zoom-link:hover { color: var(--accent-blue); text-decoration: underline; }

.bereich-marker {
    display: inline-block;
    margin: 0.75rem 0;
    padding: 0.5rem 1rem;
    background-color: var(--bg-light);
    border-radius: 4px;
}
.bereich-marker img { vertical-align: middle; margin-right: 0.5rem; }

/* INFO BOX */
.info-box {
    background-color: #FFF8E1;
    border-left: 4px solid var(--warning-orange);
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.info-box .headline {
    font-size: 1.3rem;
    color: var(--text-dark);
    border-bottom: none;
    margin-bottom: 0.75rem;
    padding-bottom: 0;
}

/* KONTAKT */
.contact-info { line-height: 1.8; color: var(--text-dark); }
.contact-info strong {
    display: block;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-blue);
    font-weight: 600;
}

/* BILDER */
.map-overview {
    max-width: 100%;
    height: auto;
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* BUTTONS (WCAG 1.4.3) */
.btn-primary {
    background-color: var(--secondary-blue);
    border-color: var(--secondary-blue);
    color: #fff;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}
.btn-primary:hover {
    background-color: #1a5fa0;
    border-color: #1a5fa0;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.btn-outline-primary {
    color: var(--secondary-blue);
    border-color: var(--secondary-blue);
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}
.btn-outline-primary:hover {
    background-color: var(--secondary-blue);
    border-color: var(--secondary-blue);
    color: #fff;
}
.btn-sm { padding: 0.4rem 1rem; font-size: 0.9rem; }

/* ALERTS (WCAG 1.4.3) */
.alert { border-radius: 4px; border: none; padding: 1.25rem; margin-bottom: 1.5rem; }
.alert-info { background-color: #eee; color: #333; border-left: 4px solid #bbb; }
.alert-light { background-color: var(--bg-light); color: var(--text-dark); border-left: 4px solid var(--border-light); }

/* MUNICIPALITY LIST */
.municipality-list { list-style-type: none; padding-left: 0; }
.municipality-list li { margin-bottom: 0.75rem; }
.municipality-list a {
    display: inline-block;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-dark);
    font-weight: 500;
}
.municipality-list a::before {
    content: "\25B8\00A0";
    position: absolute;
    left: 0;
    color: var(--secondary-blue);
    font-weight: bold;
}
.municipality-list a:hover { color: var(--secondary-blue); }

/* FOOTER */
footer { background-color: var(--bg-light); border-top: 3px solid var(--primary-blue); }
footer a { color: #555; }
footer a:hover { color: var(--secondary-blue); }

/* LINKS */
a { color: var(--secondary-blue); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--accent-blue); text-decoration: underline; }

/* RESPONSIVE (WCAG 1.4.4) */
@media (max-width: 768px) {
    .content-section, .content-section-gray { padding: 1.5rem; }
    .headline     { font-size: 1.5rem; }
    .header-black { font-size: 1.75rem; }
    .verfahren-box, .aenderung-box, .bekanntmachung-box { padding: 1.5rem; }
    h1 { font-size: 1.75rem; }
}

/* DRUCKEN */
@media print {
    .navbar, footer, .btn, .skip-link { display: none; }
    .content-section, .content-section-gray { box-shadow: none; border: 1px solid #ccc; }
    a[href]::after { content: " (" attr(href) ")"; font-size: 0.8em; }
    a.pdf-link::before { content: ""; }
}

html { scroll-behavior: smooth; }
