/* Grundlegende Reset-Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Roboto-Schriftart einbinden */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

/* Grundlegende Variablen */
:root {
    --primary-color: rgba(0, 47, 165, 0.85);
    --secondary-color: #e6f0ff;
    --accent-color: #ff6b6b;
    --text-color: #333;
    --light-text: #666;
    --light-bg: #f9f9f9;
    --white: #fff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    font-size: 1rem;
    background-color: var(--white);
    overflow-x: hidden;
    padding: 0 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header-Styles mit Logo links und Text näher zum Logo */
header {
    display: flex;
    align-items: flex-start;
    padding: 20px 0;
    flex-wrap: wrap;
}

.logo-container {
    flex: 0 0 250px;
    text-align: left;
}

.logo {
    max-width: 100%;
    height: auto;
}

.header-text {
    flex: 1;
    text-align: left;
    padding-left: 20px;
    margin-top: 15px; /* Versetzung nach unten */
}

.header-text h2 {
    margin-top: 130px; /* adjust value as needed */
}

header h2 {
    font-family: 'Roboto', sans-serif;
    color: #2a6db5;
    font-size: 1.4rem;
    font-weight: 500;
    font-style: italic;
}

/* Navigationsleiste */
.main-nav {
    background-color: var(--primary-color);
    border-radius: 5px;
    margin: 10px 0;
    position: relative;
    padding: 5px 0;
}

.nav-list {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
    justify-content: space-around;
}

.nav-list li {
    position: relative;
    flex: 1;
    text-align: center;
}

.nav-list a {
    display: block;
    color: var(--white);
    text-decoration: none;
    padding: 18px 20px;
    font-weight: 600;
    transition: var(--transition);
    font-size: 1.05rem;
    font-family: 'Roboto', sans-serif;
}

.nav-list a:hover,
.nav-list a.active {
    background-color: rgba(255, 255, 255, 0.1);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 15px;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--white);
    position: relative;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    transition: var(--transition);
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}


.accordion-toggle {
    cursor: pointer;
    padding: 10px;
    background-color: var(--secondary-color);
    margin-top: 5px;
    margin-bottom: 0;
    border-radius: 5px 5px 0 0;
    transition: var(--transition);
    font-weight: bold;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 1rem;
}
.accordion-toggle:hover {
    background-color: #d8e7ff;
}
.accordion-toggle.active {
    background-color: var(--primary-color);
    color: white;
}
.accordion-content {
    display: none;
    padding: 15px;
    background-color: var(--light-bg);
    border-radius: 0 0 5px 5px;
    margin-top: 0;
    margin-bottom: 10px;
}


/* Notfall-Banner */
.emergency-banner {
    background-color: var(--accent-color);
    text-align: center;
    padding: 12px;
    margin: 15px 0;
    border-radius: 5px;
    position: relative;
    overflow: hidden;
}

.emergency-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.emergency-banner a {
    color: var(--white);
    font-weight: bold;
    text-decoration: none;
    font-size: 1.2rem;
    padding: 0 15px;
    z-index: 1;
    position: relative;
    font-family: 'Roboto', sans-serif;
}


/* Pulsierende Animation für das Banner selbst */
@keyframes pulse {
    0%, 100% {
        background-color: var(--accent-color);
    }
    50% {
        background-color: #e05555;
    }
}

.emergency-banner.pulsating {
    animation: pulse 3s infinite;
}

/* Mittlerer Bereich */
.emergency-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Zusätzlicher Glanz-Effekt */
.emergency-banner::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
            to bottom right,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.3) 50%,
            rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(45deg);
    animation: shine 3s infinite;
    z-index: 0;
}

@keyframes shine {
    0% {
        left: -100%;
        top: -100%;
    }
    100% {
        left: 100%;
        top: 100%;
    }
}

/* Hauptinhalt und Sidebar */
main {
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 30px;
    margin: 30px 0;
}

/* Textbox mit Wasserzeichen */
.welcome {
    background-color: var(--white);
    padding: 30px;
    border-radius: 5px;
    box-shadow: var(--shadow);
    position: relative;
    min-height: 600px;
}

/* Das Wasserzeichen direkt in der Textbox */
.welcome::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('watermark.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 50%;
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

.welcome h2, .welcome h3, .welcome p, .welcome div {
    position: relative;
    z-index: 1;
}

.welcome h2 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-family: 'Roboto', sans-serif;
    font-size: 2rem;
}

.welcome h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-family: 'Roboto', sans-serif;
    font-size: 1.6rem;
}

.content-with-image {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    margin-bottom: 25px;
}

.text-content {
    flex: 3;
    min-width: 300px;
}

.image-container {
    flex: 1;
    min-width: 250px;
    position: relative;
    z-index: 1;
}

.article-image {
    width: 100%;
    height: auto;
    border-radius: 5px;
    box-shadow: var(--shadow);
}

.welcome p {
    margin-bottom: 18px;
    font-size: 1.05rem;
    font-family: 'Roboto', sans-serif;
}

/* Sidebar Styling */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar > div {
    background-color: var(--secondary-color);
    padding: 25px;
    border-radius: 5px;
    box-shadow: var(--shadow);
}

.sidebar h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-family: 'Roboto', sans-serif;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 8px;
}

.team-photo img {
    width: 100%;
    border-radius: 5px;
    margin-bottom: 15px;
}

.opening-hours ul {
    list-style: none;
    margin-bottom: 15px;
}

.opening-hours li {
    margin-bottom: 10px;
    font-size: 1.05rem;
    font-family: 'Roboto', sans-serif;
}

.opening-hours span {
    font-weight: 600;
    display: block;
}

.contact-info p {
    margin-bottom: 12px;
    font-size: 1.05rem;
    font-family: 'Roboto', sans-serif;
}

.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 18px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    margin-top: 12px;
    font-size: 1.05rem;
    font-family: 'Roboto', sans-serif;
}

.button:hover {
    background-color: #003d7a;
}

/* Besucherzähler */
.counter {
    text-align: center;
    margin: 25px 0;
    padding: 12px;
    background-color: var(--light-bg);
    border-radius: 5px;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    color: var(--light-text);
}

/* Footer Styling */
footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 50px 0 25px;
    margin-top: 40px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    max-width: 90%;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-col {
    flex: 1;
    min-width: 250px;
}

.footer-col h4 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-family: 'Roboto', sans-serif;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 10px;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
    font-size: 1.05rem;
    font-family: 'Roboto', sans-serif;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
}

.footer-col a:hover {
    color: var(--white);
    text-decoration: underline;
}

.copyright {
    text-align: center;
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
}

.copyright a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.copyright a:hover {
    text-decoration: underline;
}

/* 1. Container zentrieren und Padding */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* 2. Bilder skalierbar machen */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* 3. Typografie und Fliesstext */
body {
    line-height: 1.6;
    font-size: 1rem;
}




/* Accordion arrow styles */
.accordion-toggle {
    position: relative;
    padding-right: 40px !important; /* Space for arrow */
}

.accordion-toggle::after {
    content: '▼';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.3s ease;
    font-size: 0.8em;
    color: var(--primary-color);
}

.accordion-toggle.active::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Adjust existing accordion styles */
.accordion-toggle {
    cursor: pointer;
    padding: 15px 20px;
    background-color: var(--secondary-color);
    margin-top: 5px;
    margin-bottom: 0;
    border-radius: 5px 5px 0 0;
    transition: var(--transition);
    font-weight: bold;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 1rem;
}

.accordion-toggle:hover {
    background-color: #d8e7ff;
}

.accordion-toggle.active {
    background-color: var(--primary-color);
    color: white;
}

/* When active, the arrow should be white */
.accordion-toggle.active::after {
    color: white;
}

/* Adjust the news item accordions specifically */
.news-item .accordion-toggle::after {
    content: '▼';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.3s ease;
    font-size: 0.8em;
}

.news-item .accordion-toggle.active::after {
    transform: translateY(-50%) rotate(180deg);
}


/* Gleichmässiger Abstand zwischen den Infrastruktur-Abschnitten */
.infrastructure-card + .infrastructure-card {
    margin-top: 25px; /* bei Bedarf anpassen */
}

/* Öffnungszeiten: Abstand zwischen allen Boxen im Container */
.opening-hours-container > div + div {
    margin-top: 25px;
}

/* Anfahrtswege: Abstand zwischen Karte und Textblock */
.directions-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Anfahrtswege: Abstand zwischen den Abschnitten (h3) */
.directions-info h3,
.additional-info h3 {
    margin-top: 25px;
}

.directions-info h3:first-child,
.additional-info h3:first-child {
    margin-top: 0;
}

/* optional: etwas Luft um Listen/Absätze */
.directions-info p,
.additional-info p {
    margin: 10px 0;
}

.directions-info ul {
    margin: 10px 0 20px 20px;
}





/* Responsive Design */
@media (max-width: 900px) {
    main {
        grid-template-columns: 1fr;
    }

    .header-text {
        margin-top: 15px;
        padding-left: 0;
        text-align: center;
    }

    header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .logo-container {
        margin-bottom: 15px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-list {
        display: none;
        flex-direction: column;
        width: 100%;
    }

    .nav-list.active {
        display: flex;
    }

    .nav-list a {
        padding: 12px 20px;
    }

    .main-nav {
        padding: 0;
    }

    .content-with-image {
        flex-direction: column;
    }

    .image-container {
        order: -1;
    }
}

/* Bilder skalierbar machen */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Desktop-Navigation */
.main-nav .nav-list {
    display: flex;
    gap: 1rem;
}

@media (max-width: 600px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    .opening-hours-table td { font-size: 0.9rem; }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }

    header h2 {
        font-size: 1rem;
    }

    .welcome h2 {
        font-size: 1.5rem;
    }

    .welcome h3 {
        font-size: 1.2rem;
    }

    .sidebar > div {
        padding: 15px;
    }
}

@media (max-width: 600px) {
    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .opening-hours-table td {
        font-size: 0.9rem;
    }
}
