@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

:root {
    --font-main: 'Open Sans', sans-serif;
    --text-color: #333;
    --bg-color: #f0f2f5;
    --bg-white: #ffffff;
    --header-bg: #001f3f;
    --footer-bg: #001f3f;
    --nav-bg: rgba(255,255,255,0.95);
    --link-color: #001f3f;
    --link-hover: #0056b3;
    --nav-text: #333;
    --accent: #001f3f;
    --border-color: #dde3e8;
    --content-max: 1100px;
}

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

body {
    font-family: var(--font-main);
    font-size: 16px;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
}

a { color: var(--link-color); text-decoration: underline; transition: color 0.3s; }
a:hover { color: var(--link-hover); }

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main);
    color: var(--accent);
    margin-bottom: 0.6em;
    line-height: 1.3;
}
h1 { font-size: 28px; font-weight: 300; }
h2 { font-size: 22px; font-weight: 400; }
h3 { font-size: 16px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

.center { text-align: center; }
.justify { text-align: justify; }

/* LAYOUT */
.page-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* HEADER */
header {
    background-color: var(--header-bg);
    width: 100%;
    padding: 30px 0;
}

.header-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo img {
    max-height: 160px;
    width: auto;
}

/* NAVIGATION */
.main-nav {
    background-color: var(--nav-bg);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 100;
}

.nav-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 40px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
}

.main-nav > .nav-inner > ul > li { position: relative; }

.main-nav a {
    color: var(--nav-text);
    font-size: 14px;
    font-weight: 400;
    text-decoration: none;
    padding: 14px 18px;
    display: block;
    transition: background-color 0.3s, color 0.3s;
}

.main-nav a:hover {
    background-color: var(--header-bg);
    color: #ffffff;
}

.main-nav a.active {
    background-color: var(--header-bg);
    color: #ffffff;
}

/* DROPDOWN */
.main-nav li.has-dropdown > a::after {
    content: ' ›';
    font-size: 12px;
}

.main-nav .dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--nav-bg);
    min-width: 240px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(5px);
    transition: all 0.3s ease;
    z-index: 200;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid var(--border-color);
}

.main-nav li.has-dropdown:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-nav .dropdown a {
    padding: 10px 20px;
    font-size: 13px;
    white-space: nowrap;
}

.main-nav .dropdown a:hover {
    background-color: var(--header-bg);
    color: #ffffff;
}

/* KEYVISUAL / BANNER */
.keyvisual {
    width: 100%;
    position: relative;
    height: 350px;
    overflow: hidden;
}

.keyvisual-slide {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.keyvisual-slide.active { opacity: 1; }

.slide-1 { background-image: url('assets/slide1.jpg'); }
.slide-2 { background-image: url('assets/slide2.jpg'); }

/* CONTENT AREA */
.content-area {
    max-width: var(--content-max);
    margin: 0 auto;
    width: 100%;
    display: flex;
    gap: 0;
    padding: 40px 40px;
    background-color: var(--bg-white);
    flex: 1;
}

.main-content {
    flex: 1;
    min-width: 0;
    padding-right: 40px;
    border-right: 1px solid var(--border-color);
}

/* SIDEBAR */
.sidebar {
    width: 260px;
    flex-shrink: 0;
    padding-left: 30px;
    font-size: 14px;
}

.sidebar h3 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--accent);
}

.sidebar-section { margin-bottom: 25px; }

.sidebar table { width: 100%; border-collapse: collapse; }
.sidebar table td { padding: 2px 0; vertical-align: top; font-size: 14px; }
.sidebar table td:first-child { font-weight: 600; width: 80px; padding-right: 8px; }

.sidebar-btn {
    display: inline-block;
    background-color: var(--accent);
    color: #ffffff !important;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    border: 1px solid var(--accent);
    transition: all 0.3s;
    margin-top: 10px;
}
.sidebar-btn:hover {
    background-color: transparent;
    color: var(--accent) !important;
}

.sidebar .small { font-size: 12px; color: #666; margin-top: 5px; }

/* SECTION DIVIDER */
.section-divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 25px 0;
}

/* TÄTIGKEITSFELDER GRID */
.taetigkeitsfelder-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 25px 0;
}

.tf-item {
    text-align: center;
    text-decoration: none;
    color: var(--accent);
    transition: transform 0.3s;
}

.tf-item:hover { transform: translateY(-3px); }

.tf-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 8px;
}

.tf-item span {
    display: block;
    font-size: 14px;
    font-weight: 600;
    text-decoration: underline;
}

/* TEAM MEMBERS */
.team-member {
    display: flex;
    gap: 25px;
    margin-bottom: 35px;
    align-items: flex-start;
}

.team-member .portrait {
    width: 200px;
    flex-shrink: 0;
    border-radius: 4px;
}

.team-member .bio { flex: 1; }
.team-member .bio h3 { margin-bottom: 10px; text-transform: none; }
.team-member .bio ul { margin-left: 18px; }
.team-member .bio li { margin-bottom: 5px; font-size: 15px; }

/* ÖFFNUNGSZEITEN TABELLE */
.oeffnungszeiten-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
.oeffnungszeiten-table th {
    background-color: var(--accent);
    color: #ffffff;
    padding: 10px 15px;
    text-align: left;
    font-size: 14px;
    font-weight: 600;
}
.oeffnungszeiten-table td {
    padding: 8px 15px;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
}
.oeffnungszeiten-table tbody tr:hover { background-color: var(--bg-color); }

/* OSM MAP */
.osm-map {
    width: 100%;
    height: 400px;
    margin-top: 20px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

/* IMAGES */
img { max-width: 100%; height: auto; }
main img { margin: 10px 0; }
main p { margin-bottom: 12px; }
main ul, main ol { margin-left: 20px; margin-bottom: 15px; }
main li { margin-bottom: 5px; }

/* DOWNLOAD LIST */
.download-list {
    list-style: none;
    margin: 0 0 20px 0;
    padding: 0;
}
.download-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
}
.download-list li:last-child { border-bottom: none; }
.download-list a {
    font-weight: 600;
    text-decoration: none;
}
.download-list a:hover { text-decoration: underline; }

/* FOOTER */
footer {
    background-color: var(--footer-bg);
    color: #ffffff;
    font-size: 13px;
}

.footer-inner {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 15px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-links a { color: #ffffff; text-decoration: none; margin: 0 8px; }
.footer-links a:hover { text-decoration: underline; }
.footer-meta { color: rgba(255,255,255,0.7); font-size: 12px; }

/* MOBILE NAV TOGGLE */
.mobile-nav-toggle {
    display: none;
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    gap: 5px;
    position: fixed;
    top: 12px;
    right: 15px;
    z-index: 1001;
    background-color: var(--header-bg);
    border-radius: 4px;
}

.mobile-nav-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background-color: #ffffff;
    transition: all 0.3s;
}

.mobile-nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-nav-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* COOKIE BANNER */
#cookie-banner {
    position: fixed;
    bottom: 0; left: 0;
    width: 100%;
    background-color: rgba(0, 31, 63, 0.97);
    color: #ffffff;
    padding: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    transform: translateY(100%);
    transition: transform 0.4s ease-out;
}
#cookie-banner.show { transform: translateY(0); }

.cookie-content { max-width: 800px; text-align: center; font-size: 14px; line-height: 1.5; }

.cookie-buttons { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.cookie-btn {
    padding: 8px 20px;
    border: 1px solid #ffffff;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s;
}

.cookie-btn-accept { background-color: #ffffff; color: var(--header-bg); }
.cookie-btn-accept:hover { background-color: transparent; color: #ffffff; }
.cookie-btn-essential { background-color: transparent; color: #ffffff; }
.cookie-btn-essential:hover { background-color: #ffffff; color: var(--header-bg); }

/* RESPONSIVE */
@media screen and (max-width: 992px) {
    .content-area { flex-direction: column; padding: 30px 20px; }
    .main-content { padding-right: 0; border-right: none; border-bottom: 1px solid var(--border-color); padding-bottom: 30px; margin-bottom: 30px; }
    .sidebar { width: 100%; padding-left: 0; }
    .taetigkeitsfelder-grid { grid-template-columns: repeat(3, 1fr); }
}

@media screen and (max-width: 768px) {
    .header-inner { padding: 0 20px; }
    .logo img { max-height: 100px; }
    header { padding: 20px 0; }

    .mobile-nav-toggle { display: flex; }

    .main-nav {
        position: fixed;
        top: 0; right: -100%;
        width: 80%; max-width: 350px;
        height: 100vh;
        background-color: var(--header-bg);
        z-index: 1000;
        overflow-y: auto;
        transition: right 0.3s ease;
        border-bottom: none;
    }
    .main-nav.open { right: 0; }
    .nav-inner { padding: 70px 0 20px 0; }
    .main-nav ul { flex-direction: column; }
    .main-nav a { color: #ffffff; padding: 12px 20px; }
    .main-nav a:hover, .main-nav a.active { background-color: rgba(255,255,255,0.1); }

    .main-nav .dropdown {
        position: static;
        opacity: 1; visibility: visible; transform: none;
        display: none;
        background-color: rgba(0,0,0,0.2);
        box-shadow: none; border: none;
    }
    .main-nav li.has-dropdown.open .dropdown { display: block; }
    .main-nav .dropdown a { color: #ffffff; padding-left: 35px; }

    .main-nav li.has-dropdown > a::after { content: ' +'; float: right; font-size: 16px; }
    .main-nav li.has-dropdown.open > a::after { content: ' −'; }

    .keyvisual { height: 200px; }
    .content-area { padding: 20px 15px; }
    .taetigkeitsfelder-grid { grid-template-columns: repeat(2, 1fr); gap: 15px; }

    .team-member { flex-direction: column; }
    .team-member .portrait { width: 100%; max-width: 250px; }

    .footer-inner { flex-direction: column; text-align: center; gap: 8px; padding: 15px 20px; }
}

@media screen and (max-width: 480px) {
    .taetigkeitsfelder-grid { grid-template-columns: repeat(2, 1fr); }
}
