/*
Theme Name:   SVHArchiv – Football Club Child
Theme URI:    https://svh-archiv.local/
Description:  Child Theme für Football Club (ThemeBoy). Hält SVHArchiv-spezifische Anpassungen und PHP-8-Kompatibilitäts-Patches.
Author:       SV Hohenlinden
Template:     football-club
Version:      0.5.4
Text Domain:  svh-football-child
*/

/* ============================================================
   Mega-Menü Kachel-Layout (Handbuch Kap. 8.11)
   Wird ausgelöst durch die CSS-Klasse `svh-mega` auf dem
   Hauptmenü-Item "Archivzugang".
   ============================================================ */

.elementor-nav-menu li.svh-mega {
    position: relative;
}

/* Submenu als breites Kachel-Panel statt klassische Liste */
.elementor-nav-menu li.svh-mega > .sub-menu,
.elementor-nav-menu li.svh-mega > ul {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    padding: 24px;
    min-width: 920px;
    max-width: 95vw;
    background: #ffffff;
    border-top: 4px solid #106EB5;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
    border-radius: 0 0 12px 12px;
}

.elementor-nav-menu li.svh-mega > .sub-menu li,
.elementor-nav-menu li.svh-mega > ul li {
    display: block;
    width: 100%;
}

/* Jede Kachel: Blauer Block mit Hover-Lift */
.elementor-nav-menu li.svh-mega > .sub-menu li > a,
.elementor-nav-menu li.svh-mega > ul li > a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 110px;
    padding: 18px 12px;
    background: #106EB5;
    color: #ffffff !important;
    font-family: "Montserrat", Arial, sans-serif;
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
    text-decoration: none;
    border-radius: 12px;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.elementor-nav-menu li.svh-mega > .sub-menu li > a:hover,
.elementor-nav-menu li.svh-mega > ul li > a:hover {
    background: #0a4d80;
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    color: #ffffff !important;
}

/* Kleines Sport-Icon vor dem Titel via ::before pro Sparte */
.elementor-nav-menu li.svh-mega > .sub-menu li > a::before,
.elementor-nav-menu li.svh-mega > ul li > a::before {
    content: "";
    display: block;
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.95;
    /* Default: leeres Punkt-Icon */
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32' fill='%23ffffff'><circle cx='16' cy='16' r='10' fill='none' stroke='%23FF7F50' stroke-width='2'/></svg>");
}

/* Mobile: Kachel-Grid → 2 Spalten, dann 1 */
@media (max-width: 980px) {
    .elementor-nav-menu li.svh-mega > .sub-menu,
    .elementor-nav-menu li.svh-mega > ul {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        min-width: auto;
        padding: 16px;
    }
}

@media (max-width: 560px) {
    .elementor-nav-menu li.svh-mega > .sub-menu,
    .elementor-nav-menu li.svh-mega > ul {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Globale Mobile-/Tablet-Feinheiten
   ============================================================ */

/* Hero-Headline: 48 px Desktop bleibt — auf Tablet 36 px, Mobile 28 px */
@media (max-width: 1024px) {
    .elementor-section .elementor-heading-title { line-height: 1.2; }
    .elementor-section h1.elementor-heading-title { font-size: 36px !important; }
    .elementor-section h2.elementor-heading-title { font-size: 28px !important; }
}
@media (max-width: 767px) {
    .elementor-section h1.elementor-heading-title { font-size: 28px !important; }
    .elementor-section h2.elementor-heading-title { font-size: 22px !important; }
    .elementor-section h3.elementor-heading-title { font-size: 20px !important; }
}

/* Hero-Sektion: weniger min-height auf Mobile, weniger Padding */
@media (max-width: 767px) {
    .elementor-section[style*="min-height"],
    .elementor-section.elementor-section-stretched { min-height: 50vh !important; }
    .elementor-section { padding-top: 40px !important; padding-bottom: 40px !important; }
}

/* Topbar: zentrieren + Schriftgröße runter */
@media (max-width: 767px) {
    .elementor-location-header .elementor-section:first-child .elementor-row,
    .elementor-location-header .elementor-section:first-child {
        text-align: center;
    }
    .elementor-location-header .elementor-widget-icon-list .elementor-icon-list-items {
        justify-content: center !important;
        flex-wrap: wrap;
        gap: 4px 12px !important;
    }
    .elementor-location-header .elementor-widget-social-icons .elementor-social-icons-wrapper {
        justify-content: center !important;
    }
    .elementor-location-header .elementor-widget-icon-list .elementor-icon-list-item {
        font-size: 12px !important;
    }
}

/* Hauptheader: Logo + Nav + Search stacken auf Mobile, Search-Form auf Mobile ausblenden */
@media (max-width: 1024px) {
    .elementor-location-header .elementor-widget-nav-menu .elementor-nav-menu {
        justify-content: center;
    }
}
@media (max-width: 767px) {
    .elementor-location-header .elementor-widget-site-logo .elementor-widget-container {
        text-align: center;
    }
    .elementor-location-header .elementor-widget-site-logo img {
        margin: 0 auto;
    }
    /* Such-Form auf Mobile ausblenden — der Burger-Nav nimmt den Platz */
    .elementor-location-header .elementor-widget-search-form { display: none; }
}

/* Footer-Spalten: explizit untereinander auf Mobile (falls Theme-Default versagt) */
@media (max-width: 767px) {
    .elementor-location-footer .elementor-section .elementor-container {
        flex-direction: column;
    }
    .elementor-location-footer .elementor-column {
        width: 100% !important;
        margin-bottom: 24px;
    }
    .elementor-location-footer .elementor-column:last-child {
        margin-bottom: 0;
    }
}

/* Startseite-Sparten-Grid: bei sehr schmal 1-spaltig */
@media (max-width: 480px) {
    .elementor-widget-text-editor div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
}

/* Hero-Buttons-Wrapper: vollbreit stacken auf Mobile */
@media (max-width: 480px) {
    .elementor-widget-text-editor div[style*="display:flex"] {
        flex-direction: column !important;
    }
    .elementor-widget-text-editor div[style*="display:flex"] > a {
        text-align: center;
    }
}

/* Filter-Bar: kompakter auf Mobile */
@media (max-width: 767px) {
    .svh-archive-filter {
        padding: 12px;
        flex-direction: column;
    }
    .svh-archive-filter .field {
        min-width: 0;
        width: 100%;
    }
    .svh-archive-filter .actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* Tabellen (Änderungsprotokoll): horizontal scrollen statt brechen */
@media (max-width: 767px) {
    .svh-changelog {
        font-size: 12px;
    }
    .svh-changelog th,
    .svh-changelog td {
        padding: 8px 6px;
    }
}

/* Account-Forms: Mobile-Padding reduzieren */
@media (max-width: 480px) {
    .svh-form {
        padding: 16px;
        margin: 16px 0;
    }
}
