/*
Theme Name:   DPSG Mettmann Child
Theme URI:    https://dpsg-mettmann.de
Description:  Child-Theme für dpsg-mettmann.de (Parent: Astra)
Author:       Sebastian Sehr
Author URI:   https://dpsg-mettmann.de
Template:     astra
Version:      1.1.0
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  dpsg-mettmann-child
*/

/* ============================================================
   DPSG Mettmann – Custom Styles
   Corporate Design: Blau #003056 | Rot #810a1a | Grün #00823c | Beige #ecdfcb
   ============================================================ */

/* ── CSS-Variablen ──────────────────────────────────────────── */
:root {
    --dpsg-blue:      #003056;
    --dpsg-blue-mid:  #005090;
    --dpsg-red:       #810a1a;
    --dpsg-green:     #00823c;
    --dpsg-beige:     #ecdfcb;
    --dpsg-beige-bg:  #f7f3ec;
    --dpsg-text:      #1a1a2e;
    --dpsg-muted:     #64748b;
    --dpsg-border:    #e2e8f0;
    --dpsg-radius:    8px;
    --dpsg-shadow:    0 4px 16px rgba(0,48,86,.10);

    /* Stufenfarben */
    --dpsg-woelflinge: #e4610f;
    --dpsg-juffis:     #004f9f;
    --dpsg-pfadis:     #00823c;
    --dpsg-rover:      #810a1a;
}

/* ── Typografie ─────────────────────────────────────────────── */
body {
    color: var(--dpsg-text);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--dpsg-blue);
    line-height: 1.25;
}

a {
    color: var(--dpsg-blue);
    text-decoration: none;
    transition: color .2s;
}

a:hover {
    color: var(--dpsg-blue-mid);
    text-decoration: underline;
}

/* ── Header ─────────────────────────────────────────────────── */
.site-header,
#masthead,
.ast-masthead-custom-spacing {
    background: linear-gradient(135deg, var(--dpsg-blue) 0%, var(--dpsg-blue-mid) 100%) !important;
    box-shadow: 0 2px 12px rgba(0,48,86,.2);
}

/* Header schlanker: weniger Padding */
.ast-primary-header-bar,
.ast-main-header-wrap .main-header-bar {
    padding-top: 8px !important;
    padding-bottom: 8px !important;
    min-height: 0 !important;
}

/* Logo größer und vertikal zentriert */
header#masthead img.custom-logo,
.custom-logo-link img,
img.custom-logo,
.ast-header-logo-wrap img,
.ast-site-logo-wrap img {
    max-height: 72px !important;
    height: 72px !important;
    width: auto !important;
    max-width: none !important;
}

.ast-site-identity,
.ast-header-logo-wrap,
.ast-site-logo-wrap,
.custom-logo-link {
    display: flex !important;
    align-items: center !important;
}

/* Logo nicht am Rand kleben */
.ast-site-identity,
.ast-header-logo-wrap {
    padding-left: 20px !important;
}

/* Social Icons im Header weiß */
.ast-header-social-wrap .ahfb-svg-iconset svg,
.ast-header-social-wrap .ahfb-svg-iconset svg path,
.ast-header-social-wrap .ahfb-svg-iconset svg rect,
.ast-header-social-wrap .ahfb-svg-iconset svg circle,
.header-social-inner-wrap svg,
.header-social-inner-wrap svg path,
.header-social-inner-wrap svg rect,
.header-social-inner-wrap svg circle,
.ast-builder-social-element svg,
.ast-builder-social-element svg path {
    color: #fff !important;
    fill: #fff !important;
}

.ast-header-social-wrap a.ast-builder-social-element:hover svg,
.ast-header-social-wrap a.ast-builder-social-element:hover svg path {
    fill: var(--dpsg-beige) !important;
}

/* Logo weiß auf dunklem Header */
.ast-header-logo-wrap img,
.ast-site-identity img,
.ast-site-logo-wrap img,
.custom-logo-link img,
img.custom-logo {
    filter: brightness(0) invert(1) !important;
}

/* Vollbreite für Elementor-Seiten: Sidebar-Platzhalter entfernen */
/* Nur padding-left/right auf 0 – padding-top bewahren (Astra sticky-header offset) */
body.elementor-page #content,
body.elementor-page .site-content,
body.elementor-page #primary,
body.elementor-page #primary.content-area,
body.elementor-page .ast-container,
body.elementor-page .site-main,
body.elementor-page main#main {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
    overflow: visible !important;
}

/* Astra Flex-Layout aufheben: nur im Content-Bereich, nicht im Header */
body.elementor-page #content > .ast-container,
body.elementor-page .site-content > .ast-container {
    display: block !important;
}

body.elementor-page #secondary.widget-area,
body.elementor-page .ast-sidebar-wrap {
    display: none !important;
}

body.elementor-page .entry-content,
body.elementor-page .hentry {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* Elementor Sektionen selbst: volle Breite */
.elementor-section.elementor-section-stretched {
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
}

/* Logo-Bereich */
.site-branding .site-title,
.site-branding .site-title a {
    color: #fff !important;
}

.site-description {
    color: rgba(255,255,255,.75) !important;
}

/* ── Hero / Banner ───────────────────────────────────────────── */
.elementor-section.elementor-top-section:first-of-type,
.wp-block-cover:first-child,
.ast-hero-section {
    padding-left: max(24px, 5vw) !important;
    padding-right: max(24px, 5vw) !important;
}

/* Große Hero-Überschriften nicht abschneiden */
.elementor-heading-title,
.wp-block-cover__inner-container h1,
.wp-block-cover__inner-container h2 {
    overflow: visible !important;
    padding-left: 4px;
}

/* ── Navigation ─────────────────────────────────────────────── */
.main-navigation,
.ast-primary-header-bar,
.ast-main-header-wrap {
    background: transparent !important;
}

/* Nav-Links */
.main-navigation a,
.ast-primary-menu > li > a,
#primary-menu > li > a,
.menu-toggle {
    color: rgba(255,255,255,.88) !important;
    font-weight: 600;
    transition: color .2s;
}

.main-navigation a:hover,
.ast-primary-menu > li > a:hover,
#primary-menu > li > a:hover {
    color: var(--dpsg-beige) !important;
    text-decoration: none;
}

/* Aktiver Menüpunkt */
.current-menu-item > a,
.current-page-ancestor > a {
    color: var(--dpsg-beige) !important;
    border-bottom: 2px solid var(--dpsg-beige);
}

/* Dropdown */
.sub-menu {
    background: var(--dpsg-blue) !important;
    border-top: 3px solid var(--dpsg-beige) !important;
    border-radius: 0 0 var(--dpsg-radius) var(--dpsg-radius);
    box-shadow: var(--dpsg-shadow);
}

.sub-menu a {
    color: rgba(255,255,255,.85) !important;
    padding: 10px 20px !important;
}

.sub-menu a:hover {
    background: rgba(255,255,255,.08) !important;
    color: #fff !important;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.ast-button,
.button,
button[type="submit"],
input[type="submit"],
.wp-block-button__link {
    background: var(--dpsg-blue) !important;
    color: #fff !important;
    border: none !important;
    border-radius: var(--dpsg-radius) !important;
    padding: 11px 24px !important;
    font-weight: 700 !important;
    transition: background .2s, transform .1s !important;
    text-decoration: none !important;
}

.ast-button:hover,
.button:hover,
button[type="submit"]:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover {
    background: var(--dpsg-blue-mid) !important;
    color: #fff !important;
    transform: translateY(-1px);
}

/* ── Content-Bereich ────────────────────────────────────────── */
.site-content,
.entry-content {
    max-width: 1100px;
}

/* Seiteninhalt: schöne Überschriften */
.entry-title {
    color: var(--dpsg-blue);
}

/* Beitrags-Karten (Blog-Übersicht) */
.ast-article-post,
.post-thumbnail,
article.post {
    border-radius: var(--dpsg-radius);
    overflow: hidden;
    box-shadow: var(--dpsg-shadow);
    transition: transform .2s, box-shadow .2s;
}

article.post:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,48,86,.14);
}

/* Read-More Link */
.ast-read-more,
a.more-link {
    color: var(--dpsg-blue) !important;
    font-weight: 700;
    border-bottom: 2px solid var(--dpsg-beige);
    padding-bottom: 2px;
}

/* ── Widgets & Sidebar ──────────────────────────────────────── */
.widget-title,
.widgettitle {
    color: var(--dpsg-blue);
    border-bottom: 3px solid var(--dpsg-beige);
    padding-bottom: 8px;
    margin-bottom: 16px;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer,
#colophon,
.ast-small-footer {
    background: var(--dpsg-blue) !important;
    color: rgba(255,255,255,.8) !important;
}

.site-footer a,
#colophon a,
.ast-small-footer a {
    color: var(--dpsg-beige) !important;
}

.site-footer a:hover,
.ast-small-footer a:hover {
    color: #fff !important;
    text-decoration: underline;
}

/* ── Breadcrumb ─────────────────────────────────────────────── */
.ast-breadcrumbs-wrapper {
    background: var(--dpsg-beige-bg);
    border-bottom: 1px solid var(--dpsg-beige);
    padding: 10px 0;
}

.ast-breadcrumbs a {
    color: var(--dpsg-blue) !important;
}

/* ── Elementor: HFE Infocard Tag-Pills ──────────────────────── */
/* Fix: Pill-Spans im flex-Container – Abstände vergrößern */
.elementor-widget-hfe-infocard .hfe-infocard-text div[style*="display:flex"],
.elementor-widget-hfe-infocard .hfe-infocard-text-wrap div[style*="display:flex"] {
    gap: 16px !important;
    row-gap: 20px !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    padding: 8px 4px !important;
}

/* ── Gutenberg-Blöcke ────────────────────────────────────────── */
.wp-block-quote {
    border-left: 4px solid var(--dpsg-blue);
    background: var(--dpsg-beige-bg);
    border-radius: 0 var(--dpsg-radius) var(--dpsg-radius) 0;
    padding: 16px 20px;
}

.wp-block-separator {
    border-color: var(--dpsg-beige);
}

/* ── Seitenspezifische Heroes: Abstand für sticky Header ─────── */
/* [class*="-hero"] trifft stufen-hero, pfadis-hero, jungpfadis-hero usw.
   auch wenn das Element mehrere Klassen hat */
div[class*="-hero"] {
    padding-top: 120px !important;
}

/* ── DPSG Stufen-Farbgebung (für Seiten mit .stufe-* Klasse) ── */
.stufe-woelflinge h2,
.stufe-woelflinge .entry-title { color: var(--dpsg-woelflinge); }
.stufe-woelflinge .site-header { background: linear-gradient(135deg, var(--dpsg-woelflinge) 0%, #c0510c 100%) !important; }

.stufe-juffis h2,
.stufe-juffis .entry-title { color: var(--dpsg-juffis); }

.stufe-pfadis h2,
.stufe-pfadis .entry-title { color: var(--dpsg-pfadis); }

.stufe-rover h2,
.stufe-rover .entry-title { color: var(--dpsg-rover); }

/* ── Mobile ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .ast-mobile-header-wrap,
    .ast-mobile-menu-trigger {
        color: #fff !important;
    }

    /* Hamburger-Icon weiß */
    .ast-mobile-menu-trigger span,
    .menu-toggle span {
        background: #fff !important;
    }

    .site-header {
        padding: 12px 0;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.4rem; }
}
