/*======================================
Theme Name: First-Child
Theme URI: https://achtbit.media
Description: Child-Theme f�r First
Version: 1.0
Author: Thomas W
Template: first
======================================*/


@media screen and (min-width: 783px) {
    .site-top,
    .main-navigation {
        max-width: 1060px;
    }
}

/* Full Width Template: kein max-width, kein padding */
@media screen and (min-width: 961px) {
    .page-template-page_fullwidth .site-content {
        max-width: none;
        padding: 0 80px;
    }

    .site-content, .footer-widget {
        max-width: none;
        padding: 0 80px;
    }
}


.site-title-description-wrapper {
    text-align: left;
}

.site-top {
    margin-top: 34px;
}

.widget {
    color: #1e1d1d;
}

h2 {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    color: #5b2281;
}

.et_submit {
    color: white;
    background-color: #5b2281;
    margin-left: 2px !important;
    margin-top: 2px !important;
    margin-bottom: 2px !important;
    margin-right: 2px !important;
}

.et_reset {
    color: white;
    font-size: 14px;
    width: 200px;
    background-color: #5b2281;
    margin-left: 2px !important;
    margin-top: 2px !important;
    margin-bottom: 2px !important;
    margin-right: 2px !important;
}

.et_filter_headline, .et_filter_subrow {
    background: #c8b8db !important;
}

.monthbar {
    background: #865da2 !important;
    color: white;
}

.site-logo img {
    max-height: 120px;
    width: auto;
}


.site-branding {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}

@media screen and (min-width: 960px) {
    .site-branding {
        display: flex !important;
    }
}

/* Logo-Container */
.site-branding .site-logo {
    flex: 0 0 auto;
    padding-bottom: 0;
    padding-right: 0;
    margin-bottom: 0;
    margin-top: 0;
}

/* Title und Description als Block */
.site-branding .site-title,
.site-branding .site-description {
    flex: 1 1 auto;
    margin-bottom: 0;
    margin-top: 0;
}

/* Title und Description gruppieren */
.site-branding .site-title {
    width: 100%;
    flex-basis: auto;
    flex-grow: 0;
}

/* Wrapper für Title + Description als gemeinsamer Block */
.site-branding {
    flex-wrap: nowrap;
}

.site-branding .site-logo + .site-title,
.site-branding .site-logo ~ .site-title {
    flex: 0 1 auto;
}

.site-branding .site-description {
    flex: 0 1 auto;
}

/* Responsive: Bei kleinen Bildschirmen untereinander */
@media screen and (max-width: 600px) {
    .site-branding {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .site-title {
        font-size: 22px !important;
    }
}

.entry-title {
    color: #5b2281;
}

/* ============================================
   Header-Kacheln System
   ============================================ */

/* Original header-image ausblenden wenn Kacheln aktiv */
.home .header-image {
    display: none;
}

.header-tiles-container {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    margin: 0;
    padding: 0;
}

.header-tile {
    flex: 1 1 33.333%;
    min-width: 300px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.header-tile-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 0.4s ease;
    z-index: 0;
}

.header-tile:hover .header-tile-bg {
    transform: scale(1.08);
}

.header-tile-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    transition: opacity 0.4s ease;
}

.header-tile:hover .header-tile-overlay {
    opacity: 0;
}

/* Farbbalken unten */
.header-tile-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 8px;
    z-index: 3;
    transition: height 0.4s ease, bottom 0.4s ease;
}

.header-tile:hover .header-tile-bar {
    height: 78px;
    bottom: 0;
    opacity: 0.8;
}

.header-tile-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 20px;
    padding-bottom: 24px;
    text-align: left;
    box-sizing: border-box;
}

.header-tile-link {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 20px;
    padding-bottom: 24px;
    color: inherit;
    text-decoration: none;
    box-sizing: border-box;
}

.header-tile-link:hover {
    color: inherit;
}

.header-tile-title {
    display: block;
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    text-transform: uppercase;
    color: black;
}

.header-tile-subtitle {
    display: block;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* Responsive: Tablet - erste Box 100%, zweite und dritte je 50% */
@media screen and (max-width: 960px) {
    .header-tile:first-child {
        flex: 1 1 100%;
        min-width: 100%;
    }

    .header-tile:nth-child(2),
    .header-tile:nth-child(3) {
        flex: 1 1 50%;
        min-width: 0;
    }
}

/* Responsive: Mobil (1 Spalte, weniger Höhe) */
@media screen and (max-width: 600px) {
    .header-tiles-container {
        flex-direction: column;
    }

    .header-tile {
        flex: 1 1 100%;
        min-width: 100%;
        min-height: 150px !important;
    }

    .header-tile-content {
        justify-content: flex-end !important;
        align-items: flex-start !important;
        padding: 15px;
        padding-bottom: 20px;
    }

    .header-tile-link {
        justify-content: flex-end !important;
        align-items: flex-start !important;
    }

    .header-tile-title {
        font-size: 18px;
    }

    .header-tile-subtitle {
        font-size: 12px;
    }

    /* Keine Hover-Animationen auf Mobil */
    .header-tile:hover .header-tile-bg {
        transform: none;
    }

    .header-tile:hover .header-tile-overlay {
        opacity: 1;
    }

    .header-tile:hover .header-tile-bar {
        height: 8px;
        opacity: 1;
    }
}


/* ============================================
   Seiten-Header (Page Hero)
   Analoges System zu den Kacheln, aber volle Breite
   ============================================ */

/* header-image auf Seiten mit aktivem Hero ausblenden */
.has-page-hero .header-image {
    display: none;
}

.page-hero-container {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.page-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.page-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

/* Farbbalken unten – identisch zu den Kacheln */
.page-hero-bar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
}

.page-hero-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 4;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-start;
    padding: 20px 30px 80px 80px;
    box-sizing: border-box;
}

@media screen and (max-width: 1200px) {
    .page-hero-content {
        padding: 20px 45px 28px;
    }
}

.page-hero-title {
    display: block;
    font-size: 32px;
    font-weight: 600;
    line-height: 1.3;
    text-transform: uppercase;
}

@media screen and (max-width: 782px) {
    /* Hero: reduzierte Höhe damit mehr Bild sichtbar ist */
    .page-hero-container {
        height: 160px !important;
    }
    .page-hero-content {
        padding: 12px 20px 20px;
    }
    .page-hero-title {
        font-size: 22px;
    }
}

/* ============================================
   Mobiles Menü: Untermenüs per Klick ausklappen
   ============================================ */

/* Auf Desktop immer versteckt – nur mobil eingeblendet */
.submenu-toggle {
    display: none;
}

@media screen and (max-width: 782px) {
    /* Untermenüs beim Öffnen standardmäßig verstecken */
    .main-navigation.toggled ul ul {
        display: none;
    }

    /* Nur aufklappen wenn li.submenu-open gesetzt */
    .main-navigation li.submenu-open > ul {
        display: block !important;
    }

    /* Toggle-Pfeil-Button */
    .main-navigation li {
        position: relative;
    }
    .submenu-toggle {
        display: block;
        position: absolute;
        right: 0;
        top: 0;
        background: none;
        border: none;
        color: rgba(255, 255, 255, 0.8);
        cursor: pointer;
        line-height: 60px;
        padding: 0 20px;
        font-size: 13px;
        transition: transform 0.2s ease;
    }
    .submenu-toggle:hover {
        color: #fff;
        background-color: rgba(255, 255, 255, 0.1);
    }
    li.submenu-open > .submenu-toggle {
        transform: rotate(180deg);
    }
}

