/*
Theme Name: Gemeinde Züssow
Author: Dein Name
Description: Ein klassisches PHP-basiertes WordPress Theme ohne Blöcke, abwärtskompatibel ab WP 5.9.
Version: 1.5
Text Domain: sfaw-classic-theme
*/

/* Breitenbegrenzung und seitliches Scrollen verhindern */
html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

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

/* ==========================================================================
   Barrierefreiheit: Fokus-Zustände, Screenreader-Text & Skip-Link
   ========================================================================== */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #ffffff;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #005fcc;
    display: block;
    font-size: 15px;
    font-weight: 700;
    height: auto;
    left: 10px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 10px;
    width: auto;
    z-index: 100000;
}

/* Deutlich sichtbarer Tastatur-Fokus für alle interaktiven Elemente */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.submenu-toggle-checkbox:focus-visible + .submenu-toggle-label,
.menu-toggle-checkbox:focus-visible + .menu-toggle-label {
    outline: 3px solid #005fcc;
    outline-offset: 2px;
}

/* Grundlegendes Layout */
body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.site-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

/* Der Haupt-Wrapper */
.site-content {
    display: flex;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 20px;
    margin-bottom: 20px;
    min-height: calc(100vh - 300px);
}
/* Flex-Anpassungen für Inhalt und Sidebar */
main#primary {
    min-width: 0;
    overflow-wrap: anywhere;
}
/* Artikel- & Seiten-Styling */
.entry-archive {
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.entry-thumbnail {
    margin-bottom: 20px;
}

.entry-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

.entry-title {
    margin-top: 10px;
    margin-bottom: 15px;
    line-height: 1.3;
}

.entry-title a {
    color: inherit;
    text-decoration: none;
}

.entry-title a:hover {
    text-decoration: underline;
}

/* Aufgelockerte Sidebar: Passt sich an den eigenen Inhalt an & trennt Bereiche */
/* Aufgelockerte Sidebar: Passt sich an den eigenen Inhalt an & trennt Bereiche */
aside.sidebar {
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 20px;
    background: transparent;
    padding: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

aside.sidebar > * {
    background: #f9f9f9;
    padding: 18px 20px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 6px;
}

aside.sidebar > * > *:first-child {
    margin-top: 0;
}

aside.sidebar > * > *:last-child {
    margin-bottom: 0;
}

aside.sidebar .widget-title {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 18px;
    line-height: 1.3;
}

.custom-page-sidebar {
    margin-bottom: 0;
}

/* Header & Footer Layouts */
header.site-header {
    width: 100%;
    z-index: 9999;
}

.header-wrap {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

footer.site-footer {
    margin-top: auto;
    background: #333;
    color: #fff;
    padding: 20px 0;
    width: 100%;
    max-width: 100%;
}

.footer-widgets {
    display: grid;
    gap: 20px;
    width: 100%;
    max-width: 100%;
}

.footer-widget-col {
    min-width: 0;
    overflow-wrap: anywhere;
}

.footer-widget-title {
    font-size: 18px;
    margin-top: 0;
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
}
/* Wenn die Option "Sticky Header" im Customizer aktiv ist */
header.site-header.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Verhindert, dass der Content unter den fixierten Header rutscht */
body.has-sticky-header {
    padding-top: 160px;
}

/* Die obere Reihe: Logo links, Text rechts daneben */
.header-top-row {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
    max-width: 100%;
}

.site-logo {
    min-width: 0;
}

.site-logo img {
    max-height: 80px;
    max-width: 100%;
    width: auto;
    display: block;
}

/* Block für Titel und Slogan untereinander */
.site-text-branding {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.site-title {
    margin: 0;
    font-size: 26px;
    font-weight: bold;
    line-height: 1.2;
}

.site-title a {
    color: inherit;
    text-decoration: none;
}

.site-description {
    margin: 0;
    font-size: 14px;
    opacity: 0.85;
    line-height: 1.2;
}

/* Die untere Reihe: Das horizontale Navigationsmenü */
.main-navigation {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 10px;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.main-navigation li {
    position: relative;
    min-width: 0;
    max-width: 100%;
}

.main-navigation li a {
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    display: block;
    overflow-wrap: anywhere;
}
/* ==========================================================================
   Barrierefreies CSS Untermenü-Dropdown & Mobile-Hamburger
   ========================================================================== */

/* Checkbox visuell verstecken, aber für Screenreader & Tab-Taste erreichbar lassen */
.submenu-toggle-checkbox,
.menu-toggle-checkbox {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
    pointer-events: none;
}

/* Standardmäßig auf Desktop ausgeblendet (wird unter 768px per display: flex aktiviert) */
.menu-toggle-label {
    display: none;
    position: relative;
    background: transparent;
    cursor: pointer;
    padding: 10px;
    flex-direction: column;
    gap: 5px;
    width: 45px;
    align-self: flex-start;
}

.hamburger-bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: currentColor;
    transition: all 0.3s ease-in-out;
}

.menu-item-link-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}

.submenu-toggle-label {
    position: relative;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    user-select: none;
    border-radius: 3px;
    transition: background-color 0.2s ease;
}

.submenu-toggle-label:hover {
    background-color: rgba(0, 0, 0, 0.06);
}

.submenu-arrow {
    display: inline-block;
    font-size: 12px;
    transition: transform 0.25s ease;
}

.submenu-toggle-checkbox:checked ~ .submenu-toggle-label .submenu-arrow {
    transform: rotate(180deg);
}

/* Desktop-Ansicht: Mobile-Checkbox komplett aus DOM-Fluss nehmen & Untermenüs schweben lassen */
@media (min-width: 769px) {
    .menu-toggle-checkbox {
        display: none;
    }

    .main-navigation ul.sub-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 220px;
        flex-direction: column;
        gap: 0;
        background-color: #ffffff;
        color: #333333;
        border: 1px solid rgba(0, 0, 0, 0.12);
        border-radius: 4px;
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
        padding: 6px 0;
        margin-top: 8px;
        z-index: 10000;
    }

    /* Öffnet per Klick ODER bei Tastatur-Fokus innerhalb des Menüpunkts */
    .main-navigation li:has(> .menu-item-link-wrap > .submenu-toggle-checkbox:checked) > ul.sub-menu,
    .main-navigation li:focus-within > ul.sub-menu {
        display: flex;
    }
    .main-navigation ul.sub-menu li {
        width: 100%;
    }
    .main-navigation ul.sub-menu li a {
        padding: 8px 15px;
        font-size: 14px;
        transition: background-color 0.15s ease;
    }

    .main-navigation ul.sub-menu li a:hover {
        background-color: rgba(0, 0, 0, 0.05);
    }

    .main-navigation ul.sub-menu ul.sub-menu {
        top: 0;
        left: 100%;
        margin-top: 0;
        margin-left: 2px;
    }
}

/* Mobile Ansicht */
@media (max-width: 768px) {
    .site-content {
        flex-direction: column;
    }

    main#primary,
    aside.sidebar {
        width: 100%;
        max-width: 100%;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
    }

    .menu-toggle-label {
        display: flex;
    }

    .main-navigation {
        display: none;
        width: 100%;
        padding-top: 15px;
    }

    .menu-toggle-checkbox:checked ~ .main-navigation {
        display: block;
    }

    .menu-toggle-checkbox:checked ~ .menu-toggle-label .hamburger-bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .menu-toggle-checkbox:checked ~ .menu-toggle-label .hamburger-bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle-checkbox:checked ~ .menu-toggle-label .hamburger-bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 12px;
    }

    .main-navigation li a {
        padding: 8px 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        display: block;
    }

    .main-navigation ul.sub-menu {
        display: none;
        padding-left: 18px;
        margin-top: 6px;
        gap: 8px;
    }

    .main-navigation li:has(> .menu-item-link-wrap > .submenu-toggle-checkbox:checked) > ul.sub-menu,
    .main-navigation li:focus-within > ul.sub-menu {
        display: flex;
    }
    .menu-item-link-wrap {
        justify-content: space-between;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .menu-item-link-wrap a {
        border-bottom: none !important;
        flex: 1;
    }
}

/* ==========================================================================
   Breadcrumb Navigation (Semantische Liste & SEO)
   ========================================================================== */
.sfaw-breadcrumbs {
    width: 100%;
    font-size: 14px;
}

.breadcrumb-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
}

.sfaw-breadcrumbs a {
    text-decoration: none;
    transition: opacity 0.15s ease;
}

.sfaw-breadcrumbs a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

.breadcrumb-sep {
    margin: 0 6px;
    opacity: 1;
}

.breadcrumb-current {
    font-weight: 600;
}
/* ==========================================================================
   Einzelbeiträge (Meta-Daten, Tags & Beitragsnavigation)
   ========================================================================== */
.entry-meta {
    font-size: 14px;
    opacity: 0.85;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.meta-sep {
    margin: 0 4px;
}

.entry-footer {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    font-size: 14px;
}

.post-navigation {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1 1 45%;
    min-width: 0;
}

.post-navigation .nav-next {
    text-align: right;
}

.post-navigation .nav-subtitle {
    display: block;
    font-size: 12px;
    opacity: 0.75;
}
.post-navigation .nav-title {
    font-weight: 600;
}
/* ==========================================================================
   Kommentarbereich (übernimmt automatisch Schriftart & Farben des Hauptinhalts)
   ========================================================================== */
.comments-area {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
    font-family: inherit;
    color: inherit;
}

.comments-title,
.comment-reply-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 22px;
    line-height: 1.3;
}

.comment-list {
    list-style: none;
    margin: 0 0 30px 0;
    padding: 0;
}

.comment-list .children {
    list-style: none;
    margin: 15px 0 0 25px;
    padding-left: 15px;
    border-left: 2px solid rgba(0, 0, 0, 0.1);
}

.comment-body {
    padding: 18px;
    margin-bottom: 18px;
    background-color: rgba(0, 0, 0, 0.025);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 4px;
}

.comment-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
    opacity: 0.85;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-author .avatar {
    border-radius: 50%;
}

.comment-metadata a {
    text-decoration: none;
}

.comment-content p:last-child {
    margin-bottom: 0;
}

.reply {
    margin-top: 10px;
    font-size: 14px;
}

/* Kommentar-Formular & Eingabefelder */
.comment-form p {
    margin-bottom: 16px;
}

.comment-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.comment-form .comment-form-cookies-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.comment-form .comment-form-cookies-consent label {
    font-weight: normal;
    margin-bottom: 0;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 16px;
    color: inherit;
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 4px;
}

.comment-form input[type="submit"],
.comment-form button[type="submit"] {
    padding: 10px 22px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background-color: #333333;
    border: 1px solid #333333;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.comment-form input[type="submit"]:hover,
.comment-form button[type="submit"]:hover {
    opacity: 0.85;
}
/* ==========================================================================
   Archive, Suchergebnisse, Suchformular & 404-Seite
   ========================================================================== */
.page-header {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(0, 0, 0, 0.1);
}

.page-title {
    margin: 0;
    font-size: 26px;
    line-height: 1.3;
}

.archive-description {
    margin-top: 10px;
    opacity: 0.85;
}

.search-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.search-field {
    flex: 1 1 220px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 16px;
    color: inherit;
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 4px;
}

.search-submit,
.button-link {
    display: inline-block;
    padding: 10px 20px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    /*color: #ffffff;*/
    /*background-color: #333333;*/
    border: 1px solid #333333;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.search-submit:hover,
.button-link:hover {
    opacity: 0.85;
}

.error-404-home {
    margin-top: 25px;
}

.posts-navigation {
    margin-top: 30px;
    padding-top: 20px;
}
.posts-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}
/* ==========================================================================
   Kompaktes Suchformular (Klassisch & WordPress-Block) in Sidebar und Footer
   ========================================================================== */
.sidebar .search-form,
.site-footer .search-form,
.sidebar .wp-block-search__inside-wrapper,
.site-footer .wp-block-search__inside-wrapper {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 6px;
    margin: 8px 0;
}

.sidebar .wp-block-search__label,
.site-footer .wp-block-search__label {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 6px;
    display: block;
}

.sidebar .search-field,
.site-footer .search-field,
.sidebar .wp-block-search__input,
.site-footer .wp-block-search__input {
    flex: 1 1 auto;
    min-width: 0;
    height: 36px;
    padding: 4px 10px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.2;
    color: inherit;
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.25);
    border-radius: 4px;
}

.sidebar .search-submit,
.site-footer .search-submit,
.sidebar .wp-block-search__button,
.site-footer .wp-block-search__button {
    flex: 0 0 auto;
    height: 36px;
    padding: 4px 12px;
    margin: 0;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 600;
    color: #ffffff;
    background-color: #333333;
    border: 1px solid #333333;
    border-radius: 4px;
    cursor: pointer;
}
/* ==========================================================================
   Autoren-Seite (Autoren-Box & Avatar)
   ========================================================================== */
.author-box {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.author-avatar img {
    border-radius: 50%;
    display: block;
}

.author-info {
    flex: 1 1 auto;
    min-width: 0;
}

.author-bio {
    margin: 10px 0 0 0;
    opacity: 0.9;
}

.author-website {
    margin: 8px 0 0 0;
    font-size: 14px;
}

@media (max-width: 600px) {
    .author-box {
        flex-direction: column;
        align-items: flex-start;
    }
}

/** individuelles Style **/
.btn-center {
    text-align: center;
    padding: 15px;
    border-radius: 15px;
}
.btn-center .is-layout-flex {
    display: revert;
}
.wpcf7-form input {
    width: 100%;
    height: 36px;
}
.wpcf7-form textarea {
    width: 100%;
}