/*
 Theme Name:   Astra Child - SG Mülchi
 Theme URI:    https://www.sg-muelchi.ch
 Description:  Child Theme für Astra - Schützengesellschaft Mülchi
 Author:       SG Mülchi
 Author URI:   https://www.sg-muelchi.ch
 Template:     astra
 Version:      1.1.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  astra-child-sgmuelchi
*/

/* =============================================================
   CHILD THEME CSS - SG Mülchi
   Alle Anpassungen hier eintragen, nie das Parent-Theme ändern
   ============================================================= */

/* -------------------------------------------------------------
   1. HEADER — Desktop
   ------------------------------------------------------------- */

/* Transparenter Header */
#masthead,
.ast-desktop-header,
.site-header,
.ast-primary-header-bar,
.ast-above-header-bar,
.ast-below-header-bar {
    background-color: transparent !important;
}

/* Logo-Grösse Desktop */
.custom-logo {
    max-height: 100px;
    width: auto;
}

/* Sitetitel + Untertitel vollständig ausblenden */
.site-title,
.site-description,
.ast-site-title-wrap .site-title,
.ast-site-title-wrap .site-description,
.ast-header-custom-item .site-title,
h1.site-title,
p.site-description {
    display: none !important;
    visibility: hidden !important;
}

/* -------------------------------------------------------------
   2. HEADER — Mobile
   ------------------------------------------------------------- */

/* Mobile Header ebenfalls transparent */
.ast-mobile-header-wrap,
.main-header-bar-wrap .ast-mobile-header-wrap {
    background-color: transparent !important;
}

/* Logo auf Mobile anzeigen */
@media (max-width: 768px) {
    .custom-logo-link,
    .custom-logo {
        display: block !important;
    }
    .custom-logo {
        max-height: 60px !important;
        width: auto !important;
    }
    .ast-site-identity {
        display: flex !important;
        align-items: center !important;
    }

    /* Sitetitel auf Mobile ausblenden */
    .site-title,
    .site-description,
    .ast-site-title-wrap,
    .ast-site-identity-wrap .site-title,
    .ast-site-identity-wrap .site-description {
        display: none !important;
        visibility: hidden !important;
    }

    /* Abstand unter Header damit Content nicht überlappt */
    #content,
    #content.site-content,
    .ast-container,
    .entry-content {
        padding-top: 38px !important;
    }
}

/* Hamburger-Icon weiss */
.ast-mobile-menu-buttons .menu-toggle,
.ast-mobile-menu-buttons button {
    color: #ffffff !important;
    background: transparent !important;
    border: none !important;
}

/* Doppelten X-Button entfernen */
.ast-mobile-header-wrap .ast-button-wrap,
button#astra-mobile-menu-close {
    display: none !important;
}

/* Leerer Bereich links vom Hamburger ausblenden */
@media (max-width: 768px) {
    .ast-mobile-header-wrap .ast-header-sections-navigation,
    .main-header-bar .ast-header-custom-item:empty,
    .ast-mobile-header-content-wrap > div:empty {
        display: none !important;
    }
    .ast-mobile-menu-buttons {
        margin-left: auto !important;
    }
}

/* -------------------------------------------------------------
   3. MOBILES MENÜ (ausgeklappt)
   ------------------------------------------------------------- */

/* Panel-Hintergrund */
.ast-mobile-popup-drawer .ast-drawer-inside,
#ast-mobile-popup .ast-drawer-inside,
.ast-mobile-popup-content {
    background-color: #213446 !important;
}

/* Menü-Links */
.ast-mobile-popup-drawer .main-navigation a,
.ast-mobile-popup-drawer .menu-item a,
#ast-mobile-popup .menu-item a {
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    padding: 12px 20px !important;
}

/* Hover */
.ast-mobile-popup-drawer .menu-item a:hover,
#ast-mobile-popup .menu-item a:hover {
    color: #cccccc !important;
    background-color: rgba(255,255,255,0.05) !important;
}

/* Dropdown-Pfeil */
.ast-mobile-popup-drawer .ast-menu-toggle,
#ast-mobile-popup .ast-menu-toggle {
    color: #ffffff !important;
    border-left: 1px solid rgba(255,255,255,0.2) !important;
}

/* Aktiver Menüpunkt */
.ast-mobile-popup-drawer .current-menu-item > a,
#ast-mobile-popup .current-menu-item > a {
    color: #ffffff !important;
    font-weight: bold !important;
}

/* Overlay abdunkeln */
.ast-mobile-popup-drawer.active::before,
.ast-mobile-popup-overlay {
    background-color: rgba(0,0,0,0.7) !important;
}

/* -------------------------------------------------------------
   4. DESKTOP NAVIGATION
   ------------------------------------------------------------- */

/* Nur Menü-Links im Header weiss färben */
#masthead .main-header-menu .menu-item > a {
    color: #ffffff !important;
}

#masthead .main-header-menu .menu-item:hover > a {
    color: #cccccc !important;
}

/* -------------------------------------------------------------
   5. POST-LISTE STARTSEITE
   ------------------------------------------------------------- */

.ast-article-post {
    border-bottom: 1px solid #eee;
    padding-bottom: 1.5em;
    margin-bottom: 1.5em;
}

/* Post-Titel Farbe */
.entry-title a,
.entry-title {
    color: #333333 !important;
}

h1, h2, h3, h4, h5, h6 {
    color: #333333 !important;
}

/* -------------------------------------------------------------
   6. PAGINATION
   ------------------------------------------------------------- */

.page-numbers {
    color: #333333 !important;
    background-color: #ffffff;
    border: 1px solid #cccccc;
    padding: 5px 10px;
    border-radius: 3px;
}

.page-numbers.current {
    background-color: #333333;
    color: #ffffff !important;
}

.page-numbers:hover {
    background-color: #eeeeee;
}

/* -------------------------------------------------------------
   7. SIDEBAR
   ------------------------------------------------------------- */

/* Sticky Sidebar inline styles aufheben */
.sidebar-main {
    max-height: none !important;
    overflow: visible !important;
    top: 0 !important;
}

/* Sidebar Scrollbar ausblenden */
.widget-area,
#secondary {
    height: auto !important;
    max-height: unset !important;
    overflow: visible !important;
}

/* Widgets nahtlos als Block verbinden */
.sidebar-main .widget,
#secondary .widget {
    margin-bottom: 0 !important;
    border-bottom: 1px solid rgba(0,0,0,0.1) !important;
    border-radius: 0 !important;
    padding-bottom: 10px !important;
}

.sidebar-main .widget:first-child,
#secondary .widget:first-child {
    border-radius: 8px 8px 0 0 !important;
}

.sidebar-main .widget:last-child,
#secondary .widget:last-child {
    border-bottom: none !important;
    border-radius: 0 0 8px 8px !important;
}

/* -------------------------------------------------------------
   8. BIRTHDAY WIDGET
   ------------------------------------------------------------- */

.widget_birthday h2.widget-title {
    font-size: 1rem;
    text-transform: uppercase;
}

/* -------------------------------------------------------------
   9. PARTICIPANTS DATABASE — Mobile
   ------------------------------------------------------------- */

@media (max-width: 768px) {
    .participants-database,
    .pdb-list,
    .pdb-record,
    [class*="pdb-"] table {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        width: 100% !important;
    }

    .participants-database table,
    .pdb-list table {
        font-size: 0.75rem !important;
    }

    .participants-database td,
    .participants-database th,
    .pdb-list td,
    .pdb-list th {
        padding: 4px 6px !important;
        white-space: nowrap;
    }
}

/* Bilder in Beiträgen auf Mobile */
@media (max-width: 768px) {

    /* Bild-Ausrichtung aufheben, volle Breite */
    .entry-content img,
    .ast-article-post img {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        margin: 0 0 1em 0 !important;
        display: block !important;
    }

    /* Kein Text neben Bildern */
    .entry-content .alignleft,
    .entry-content .alignright {
        float: none !important;
        margin: 0 0 1em 0 !important;
        width: 100% !important;
    }
}

/* Footer-Höhe unter Astra-Minimum von 30px */
.site-primary-footer-wrap,
.ast-builder-grid-row-container.site-primary-footer-wrap {
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    min-height: unset !important;
}

.ast-builder-footer-grid-columns {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

