/* WordPress-Anpassungen nach dem Grav-CSS */

.site-header-inner {
    display: flex;
    align-items: center;
    gap: 28px;
}

.site-branding {
    display: flex !important;
    flex: 0 0 auto;
    min-width: 360px;
    align-items: center;
    gap: 16px;
}

.site-logo-wrapper,
.site-logo-wrapper .custom-logo-link {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
}

.site-logo-wrapper .custom-logo {
    display: block;
    width: auto !important;
    height: 72px !important;
    max-width: 90px !important;
    max-height: 72px !important;
    object-fit: contain;
}

.site-title-link {
    display: flex !important;
    min-width: 0;
    color: #ffffff !important;
    line-height: 1.15;
    text-decoration: none !important;
    flex-direction: column;
}

.site-title-link .site-name {
    display: block !important;
    color: #ffffff !important;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 21px;
    font-weight: 700;
    white-space: nowrap;
}

.site-title-link .site-description {
    display: block !important;
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.78) !important;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.main-navigation {
    margin-left: auto;
}

@media (max-width: 1050px) {
    .site-branding {
        min-width: auto;
    }

    .site-title-link .site-name {
        font-size: 18px;
    }

    .site-title-link .site-description {
        display: none !important;
    }
}

@media (max-width: 650px) {
    .site-branding {
        gap: 10px;
    }

    .site-logo-wrapper .custom-logo {
        height: 55px !important;
        max-width: 68px !important;
        max-height: 55px !important;
    }

    .site-title-link .site-name {
        max-width: 190px;
        font-size: 16px;
        white-space: normal;
    }
}

/* Webseitenname im hellen Header */
.site-title-link,
.site-title-link .site-name {
    color: #541916 !important;
}

.site-title-link .site-description {
    color: #706d63 !important;
}

.site-title-link:hover .site-name,
.site-title-link:focus .site-name {
    color: #7b2623 !important;
}

/* Beitragsarchiv */

.archive-years {
    display: grid;
    gap: 55px;
}

.archive-year {
    border-top: 1px solid #ded7ca;
}

.archive-year-title {
    display: inline-block;
    margin: -24px 0 24px;
    padding: 0 20px 0 0;
    color: #541916;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 38px;
    background: #f6f3ec;
}

.archive-post-list {
    display: grid;
    gap: 0;
}

.archive-post-item {
    display: grid;
    padding: 22px 0;
    grid-template-columns: 130px 1fr;
    gap: 30px;
    border-bottom: 1px solid #ded7ca;
}

.archive-post-date {
    color: #706d63;
    font-size: 14px;
    font-weight: 700;
}

.archive-post-content h3 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
}

.archive-post-content h3 a {
    color: #541916;
    text-decoration: none;
}

.archive-post-content h3 a:hover {
    color: #7b2623;
}

.archive-post-content p {
    margin: 8px 0 0;
}

@media (max-width: 650px) {
    .archive-post-item {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}

/* Footer einheitlich gestalten */

.site-footer,
.footer-main,
.footer-bottom {
    color: #eee8de;
    background: #34100f !important;
}

.footer-main {
    padding: 42px 0 25px;
}

.footer-content {
    display: block;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
}

.footer-brand strong {
    color: #ffffff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 23px;
}

.footer-navigation {
    width: 100%;
}

.footer-menu {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    gap: 10px 26px;
    list-style: none;
}

.footer-menu a {
    color: #eee8de;
    text-decoration: none;
}

.footer-menu a:hover,
.footer-menu a:focus {
    color: #c39b4a;
}

.footer-bottom {
    padding: 18px 0 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;
}

.footer-copyright {
    margin: 0;
}

.legal-menu {
    display: flex;
    flex-wrap: wrap;
    margin: 0;
    padding: 0;
    gap: 10px 20px;
    list-style: none;
}

.legal-menu a {
    color: #eee8de;
    text-decoration: none;
}

.legal-menu a:hover,
.legal-menu a:focus {
    color: #c39b4a;
}

@media (max-width: 700px) {
    .footer-bottom-inner {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }
}

/* Termine aus The Events Calendar */

.event-title-link {
    color: inherit;
    text-decoration: none;
}

.event-title-link:hover,
.event-title-link:focus {
    color: var(--color-primary, #7b2623);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.events-footer {
    margin-top: 30px;
    text-align: center;
}

.events-all-link {
    display: inline-flex;
    padding: 11px 22px;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
    background: var(--color-primary, #7b2623);
    border-radius: 3px;
}

.events-all-link:hover,
.events-all-link:focus {
    color: #ffffff;
    background: var(--color-primary-dark, #541916);
}

.events-empty {
    margin: 0;
    padding: 24px;
    text-align: center;
    background: rgba(0, 0, 0, 0.035);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Startseitentext mittig ausrichten */
.welcome-section .home-content {
    max-width: 900px;
    margin-right: auto;
    margin-left: auto;
    text-align: center;
}

.welcome-section .entry-content {
    text-align: center;
}

.welcome-section .entry-content h1,
.welcome-section .entry-content h2,
.welcome-section .entry-content h3,
.welcome-section .entry-content p {
    text-align: center;
}

.welcome-section .entry-content h2 {
    margin-bottom: 18px;
    color: #541916;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.2;
}

.welcome-section .entry-content p {
    max-width: 780px;
    margin-right: auto;
    margin-left: auto;
}

/* Überschriften der Startseitenmodule verkleinern */
.events-section .section-header h2,
.sponsors-section .section-header h2 {
    font-size: clamp(27px, 3.5vw, 36px) !important;
    line-height: 1.2;
}

.events-section .section-header,
.sponsors-section .section-header {
    margin-bottom: 28px;
}

@media (max-width: 600px) {
    .welcome-section .entry-content h2 {
        font-size: 27px;
    }

    .events-section .section-header h2,
    .sponsors-section .section-header h2 {
        font-size: 25px !important;
    }
}

/* Begrüßungsbereich exakt horizontal zentrieren */
.welcome-section {
    width: 100%;
}

.welcome-section > .content-container {
    display: flex !important;
    width: min(1180px, calc(100% - 40px)) !important;
    margin-right: auto !important;
    margin-left: auto !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
    align-items: center;
    justify-content: center;
}

.welcome-section .home-content,
.welcome-section article {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
    text-align: center !important;
    transform: none !important;
}

.welcome-section .entry-content {
    display: block !important;
    width: min(780px, 100%) !important;
    max-width: 780px !important;
    margin-right: auto !important;
    margin-left: auto !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
    text-align: center !important;
}

.welcome-section .entry-content > * {
    margin-right: auto !important;
    margin-left: auto !important;
    text-align: center !important;
}

@media (max-width: 600px) {
    .welcome-section > .content-container {
        width: calc(100% - 28px) !important;
    }
}


/* ==========================================================
   Linke Bereichsnavigation
   ========================================================== */

.page-layout.has-section-navigation {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    align-items: start;
    gap: 55px;
}

.page-layout.has-section-navigation .page-article {
    width: 100%;
    max-width: none;
    min-width: 0;
}

.section-sidebar {
    position: relative;
}

.section-navigation {
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 3px;
    box-shadow: 0 8px 28px rgba(30, 24, 17, 0.07);
}

.section-navigation-title {
    display: block;
    padding: 18px 21px;
    color: #ffffff !important;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 21px;
    font-weight: 700;
    line-height: 1.25;
    text-decoration: none !important;
    background: #541916;
}

.section-navigation-title:hover,
.section-navigation-title:focus {
    color: #ffffff !important;
    background: #7b2623;
}

.section-navigation-list {
    margin: 0;
    padding: 8px 0;
    list-style: none;
}

.section-navigation-list li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.075);
}

.section-navigation-list li:last-child {
    border-bottom: 0;
}

.section-navigation-list a {
    position: relative;
    display: block;
    padding: 12px 20px 12px 24px;
    color: #3f3b34;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    text-decoration: none;
}

.section-navigation-list a::before {
    position: absolute;
    top: 50%;
    left: 11px;
    width: 5px;
    height: 5px;
    content: "";
    background: #c39b4a;
    border-radius: 50%;
    transform: translateY(-50%);
}

.section-navigation-list a:hover,
.section-navigation-list a:focus {
    color: #7b2623;
    background: #f6f3ec;
}

.section-navigation-list .current_page_item > a,
.section-navigation-list .current_page_ancestor > a {
    color: #541916;
    font-weight: 700;
    background: #f1ece1;
    box-shadow: inset 4px 0 0 #c39b4a;
}

.section-navigation-list .current_page_item > a::before,
.section-navigation-list .current_page_ancestor > a::before {
    background: #7b2623;
}

@media (min-width: 951px) {
    .section-navigation {
        position: sticky;
        top: 115px;
    }
}

@media (max-width: 950px) {
    .page-layout.has-section-navigation {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .section-sidebar {
        width: 100%;
    }

    .section-navigation-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .section-navigation-list li:nth-child(odd) {
        border-right: 1px solid rgba(0, 0, 0, 0.075);
    }
}

@media (max-width: 600px) {
    .section-navigation-list {
        display: block;
    }

    .section-navigation-list li:nth-child(odd) {
        border-right: 0;
    }

    .section-navigation-title {
        font-size: 19px;
    }
}


/* ==========================================================
   HV FOTOARCHIV
   ========================================================== */

.hv-photo-index {
    display: grid;
    grid-template-columns: repeat(
        3,
        minmax(0, 1fr)
    );
    gap: 28px;
    margin-top: 35px;
}

.hv-photo-card {
    display: block;
    overflow: hidden;
    color: #3f3b34 !important;
    text-decoration: none !important;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: 4px;
    box-shadow: 0 8px 25px rgba(40, 25, 18, 0.08);
    transition:
        transform 180ms ease,
        box-shadow 180ms ease;
}

.hv-photo-card:hover,
.hv-photo-card:focus {
    color: #541916 !important;
    transform: translateY(-4px);
    box-shadow: 0 14px 32px rgba(40, 25, 18, 0.15);
}

.hv-photo-card-media {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #e8e1d5;
}

.hv-photo-card-media img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
    transition: transform 300ms ease;
}

.hv-photo-card:hover .hv-photo-card-media img {
    transform: scale(1.045);
}

.hv-photo-card-placeholder {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: #766d61;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 20px;
}

.hv-photo-card-body {
    display: block;
    padding: 17px 19px 18px;
}

.hv-photo-card-body strong {
    display: block;
    color: #541916;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 18px;
    line-height: 1.3;
}

.hv-photo-card-count {
    display: block;
    margin-top: 7px;
    color: #777066;
    font-size: 14px;
}

.entry-content .foogallery {
    margin-top: 30px;
    margin-bottom: 35px;
}

@media (max-width: 1050px) {
    .hv-photo-index {
        grid-template-columns: repeat(
            2,
            minmax(0, 1fr)
        );
    }
}

@media (max-width: 600px) {
    .hv-photo-index {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}


/* ==========================================================
   HV NATIVE FOTOALBEN
   ========================================================== */

.entry-content .wp-block-gallery {
    display: grid;
    grid-template-columns: repeat(
        4,
        minmax(0, 1fr)
    );
    gap: 12px;
    margin: 32px 0 38px;
}

.entry-content .wp-block-gallery .wp-block-image {
    position: relative;
    overflow: hidden;
    width: 100% !important;
    margin: 0 !important;
    aspect-ratio: 4 / 3;
    background: #e8e1d5;
    border-radius: 3px;
}

.entry-content .wp-block-gallery .wp-block-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.entry-content .wp-block-gallery .wp-block-image img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    object-fit: cover;
    transition: transform 250ms ease;
}

.entry-content .wp-block-gallery .wp-block-image:hover img {
    transform: scale(1.045);
}

@media (max-width: 1000px) {
    .entry-content .wp-block-gallery {
        grid-template-columns: repeat(
            3,
            minmax(0, 1fr)
        );
    }
}

@media (max-width: 700px) {
    .entry-content .wp-block-gallery {
        grid-template-columns: repeat(
            2,
            minmax(0, 1fr)
        );
    }
}

@media (max-width: 420px) {
    .entry-content .wp-block-gallery {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================
   Feinere Seitenüberschriften
   ========================================================== */

body:not(.home) .page-main .page-title {
    margin-bottom: 28px;
    color: #541916;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(34px, 4vw, 46px);
    font-weight: 400 !important;
    line-height: 1.16;
    letter-spacing: 0.01em;
}

body:not(.home) .page-main .page-title::after {
    display: block;
    width: 52px;
    height: 2px;
    margin-top: 16px;
    content: "";
    background: #c39b4a;
}

.page-main .entry-content h2 {
    margin-top: 38px;
    margin-bottom: 18px;
    color: #541916;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(27px, 3vw, 34px);
    font-weight: 400 !important;
    line-height: 1.22;
}

.page-main .entry-content h3 {
    margin-top: 30px;
    margin-bottom: 14px;
    color: #541916;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(22px, 2.5vw, 27px);
    font-weight: 400 !important;
    line-height: 1.25;
}

.page-main .entry-content h4,
.page-main .entry-content h5,
.page-main .entry-content h6 {
    font-weight: 500 !important;
}


/* Footer-Copyright und MansNET-Hinweis */
.footer-copyright {
    margin: 0;
}

.footer-copyright .footer-separator {
    display: inline-block;
    margin: 0 7px;
    opacity: 0.7;
}

.footer-copyright a {
    color: inherit;
    font-weight: 600;
    text-decoration: none;
}

.footer-copyright a:hover,
.footer-copyright a:focus {
    color: #ffffff;
    text-decoration: underline;
}
