/**
 * MARK HAACKE — THEME BASE STYLES
 *
 * Überschreibt Kadence-Defaults mit v2-Design.
 * Fokus: Typografie, Body-Hintergrund, Buttons, Links.
 *
 * @package Kadence_Child
 */

/* ============================================
   BODY & TYPOGRAFIE
   ============================================ */
body {
    background: var(--mh-bg);
    color: var(--mh-text);
    font-family: var(--font-body);
    font-size: var(--fs-body);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-feature-settings: 'liga' 1, 'kern' 1, 'calt' 1;
}

h1, h2, h3, h4, h5, .site-title {
    font-family: var(--font-display);
    font-weight: 600;
    letter-spacing: -0.02em;
    color: var(--mh-text);
}

h1 { font-size: var(--fs-h1); line-height: 1.05; letter-spacing: -0.03em; }
h2 { font-size: var(--fs-h2); line-height: 1.1;  letter-spacing: -0.025em; }
h3 { font-size: var(--fs-h3); line-height: 1.2; }

.mh-display {
    font-family: var(--font-display);
    font-size: var(--fs-display);
    line-height: 0.98;
    letter-spacing: -0.035em;
    font-weight: 600;
}

.mh-display em,
.mh-display i {
    font-style: italic;
    color: var(--mh-accent);
    font-weight: 400;
}

.mh-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--fs-eyebrow);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--mh-accent);
}

.mh-eyebrow::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--mh-accent);
    display: inline-block;
}

.mh-lead {
    font-size: var(--fs-lead);
    line-height: 1.55;
    color: var(--mh-text-light);
    max-width: 60ch;
}

::selection {
    background: var(--mh-accent);
    color: #fff;
}

/* ============================================
   LINKS
   ============================================ */
a { color: inherit; text-decoration: none; transition: color 0.25s var(--ease-signature); }
a:hover { color: var(--mh-accent); }

/* Inline-Text-Links — nur in p/li innerhalb Content */
.entry-content p a:not(.wp-block-button__link):not(.kb-button):not(.mh-hero__btn):not(.mh-branch-card__cta),
.entry-content li a:not(.wp-block-button__link):not(.kb-button):not(.mh-hero__btn):not(.mh-branch-card__cta) {
    color: var(--mh-accent);
    border-bottom: 1px solid var(--mh-accent-glow);
    transition: border-color 0.25s var(--ease-signature);
}
.entry-content p a:hover,
.entry-content li a:hover {
    border-bottom-color: var(--mh-accent);
}

/* ============================================
   BUTTONS (Core + Kadence + WooCommerce)
   ============================================ */
.wp-block-button__link,
.kb-button,
.button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce #respond input#submit,
input[type="submit"] {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-pill);
    transition: transform 0.3s var(--ease-signature), box-shadow 0.3s var(--ease-signature), background 0.25s var(--ease-signature);
    background: var(--mh-accent);
    color: #fff;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.wp-block-button__link:hover,
.kb-button:hover,
.button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover {
    background: var(--mh-accent-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-accent);
}

.is-style-outline .wp-block-button__link {
    background: transparent;
    color: var(--mh-text);
    border: 1.5px solid var(--mh-border);
}
.is-style-outline .wp-block-button__link:hover {
    background: transparent;
    border-color: var(--mh-accent);
    color: var(--mh-accent);
    box-shadow: none;
}

/* ============================================
   CARDS & FORMS
   ============================================ */
.mh-card {
    background: var(--mh-card);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    box-shadow: var(--shadow-sm);
    transition: transform 0.4s var(--ease-signature), box-shadow 0.4s var(--ease-signature);
}
.mh-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="url"],
input[type="search"],
textarea,
select {
    background: var(--mh-card);
    border: 1px solid var(--mh-border);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: var(--fs-body);
    transition: border-color 0.2s var(--ease-signature), box-shadow 0.2s var(--ease-signature);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--mh-accent);
    box-shadow: 0 0 0 4px var(--mh-accent-glow);
}

/* ============================================
   SECTION RHYTHM
   ============================================ */
.mh-section { padding: var(--space-xl) 0; }
.mh-container {
    max-width: var(--container);
    margin: 0 auto;
    /* 2026-05-20: horizontales Padding entfernt — Rand wird zentral durch
       übergeordneten Wrapper (Kadence Page-Container o. ä.) gesteuert,
       damit alle Layout-Blöcke einheitlich aussehen. */
    padding: 0;
}
.mh-container--narrow { max-width: var(--container-narrow); }

/* ============================================
   ADMIN-BAR OFFSET
   ============================================ */
body.admin-bar .mh-branch-switcher,
body.admin-bar .mh-branche-filter {
    top: calc(var(--header-h) + 32px);
}
@media (max-width: 782px) {
    body.admin-bar .mh-branch-switcher,
    body.admin-bar .mh-branche-filter {
        top: calc(var(--header-h) + 46px);
    }
}

/* ============================================
   STICKY HEADER — Schatten beim Scrollen
   Kadence macht NICHT das <header> sticky, sondern den inneren
   `.kadence-sticky-header`-Wrapper und setzt darauf per JS:
     .item-is-fixed   = ist sticky-positioniert
     .item-at-start   = noch an Ursprungsposition (also: NICHT scrolled)
   ⇒ „scrolled-Zustand" = .item-is-fixed:not(.item-at-start).
   Default-Header: nur dezente Trennlinie. Sticky-Zustand: weicher Schatten.
   Kadence-Customizer-Shadow ggf. mit !important überschrieben.
   ============================================ */
/* Default + at-start: NIE einen Schatten (Kadence-Default hart killen). */
#masthead,
#masthead .kadence-sticky-header,
#masthead .kadence-sticky-header.item-is-fixed.item-at-start,
#masthead .site-header-row-container-inner {
    box-shadow: none !important;
    transition: none !important;
}
#masthead { border-bottom: 1px solid var(--mh-border); }

/* NUR im echten Sticky-Zustand (.item-is-stuck): fester, unanimierter
   Schatten — kein Pulsieren mehr beim Scrollen. */
#masthead .kadence-sticky-header.item-is-stuck {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08) !important;
    transition: none !important;
}

/* ============================================
   FOOTER WIDGETS — v2-Stil (für dunklen Footer-Hintergrund optimiert)
   Greift auf Kadence-Footer-Widget-Markup:
   <section class="widget widget_nav_menu">
     <h2 class="widget-title">…</h2>
     <div class="menu-…-container">
       <ul class="menu">
         <li class="menu-item"><a>…</a></li>
   Auch unser Shortcode [haacke_fachgebiete_menu] bedient diese Struktur.
   ============================================ */
.site-footer { color: rgba(255, 255, 255, 0.55); }
.site-footer .footer-widget-area-inner { padding: 0; }

.site-footer .widget-title {
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    margin: 0 0 1.2rem;
}

.site-footer .widget_nav_menu .menu,
.site-footer .widget_haacke_fachgebiete .menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* 2026-05-20: 0.7 → 0.5 (etwas kompakter) */
}
.site-footer .widget_nav_menu .menu li.menu-item,
.site-footer .widget_haacke_fachgebiete .menu li.menu-item {
    margin: 0;
    padding: 0;
    border: 0;
}
.site-footer .widget_nav_menu .menu li.menu-item > a,
.site-footer .widget_haacke_fachgebiete .menu li.menu-item > a {
    display: inline-block;
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    border: 0;
    transition: color 0.3s var(--ease-signature);
}
.site-footer .widget_nav_menu .menu li.menu-item > a:hover,
.site-footer .widget_nav_menu .menu li.menu-item > a:focus,
.site-footer .widget_haacke_fachgebiete .menu li.menu-item > a:hover,
.site-footer .widget_haacke_fachgebiete .menu li.menu-item > a:focus {
    color: #fff;
}
.site-footer .widget_nav_menu .menu .current-menu-item > a,
.site-footer .widget_haacke_fachgebiete .menu .current-menu-item > a {
    color: var(--mh-accent);
}

/* ============================================
   FOOTER-BRAND BLOCK — Logo + Firmenname + Claim
   Quelle: Options-Page „Site-Infos". Logo wird per CSS-Filter weiß
   eingefärbt, wenn keine weiße Logo-Variante hinterlegt ist.

   Layout:
     - .mh-footer-brand--with-logo  → horizontal: Logo links | rechts: Name + Claim
     - .mh-footer-brand             → vertikal (Fallback ohne Logo)
   ============================================ */
.site-footer .mh-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    align-items: flex-start;
}
.site-footer .mh-footer-brand--with-logo {
    flex-direction: row;
    align-items: center;
    gap: 0.95rem;
}
.site-footer .mh-footer-brand__link {
    display: inline-block;
    line-height: 0;
    border: 0;
    flex-shrink: 0;
}
.site-footer .mh-footer-brand__link:hover { color: inherit; }
.site-footer .mh-footer-brand__logo {
    display: block;
    max-width: 75px;    /* schmaler — User-Wunsch */
    max-height: 75px;   /* Sicherheits-Cap, Logo bleibt proportional */
    height: auto;
    width: auto;
}
.site-footer .mh-footer-brand__logo--filter {
    /* brightness(0) macht alles schwarz, invert(1) macht alles weiß
       → funktioniert nur bei ein-/zweifarbigen Logos sauber. */
    filter: brightness(0) invert(1);
}
.site-footer .mh-footer-brand__wordmark {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #fff;
}
.site-footer .mh-footer-brand__text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.site-footer .mh-footer-brand__name {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    letter-spacing: 0;
}
.site-footer .mh-footer-brand__claim {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.45);
    letter-spacing: 0.04em;
    line-height: 1.4;
}

/* ============================================
   FOOTER-CONTACT BLOCK — Tel / Mail / Adresse
   Quelle: Options-Page „Site-Infos". Markup .widget für
   konsistente widget-title-Optik.
   ============================================ */
.site-footer .mh-footer-contact {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.site-footer .mh-footer-contact__item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 0;
    border: 0;
}
.site-footer .mh-footer-contact__label {
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.site-footer .mh-footer-contact__value {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.5;
    transition: color 0.3s var(--ease-signature);
    border: 0;
}
.site-footer a.mh-footer-contact__value:hover,
.site-footer a.mh-footer-contact__value:focus {
    color: #fff;
}
