/*
Theme Name: Hello Elementor Child
Theme URI: https://www.berufshafen.de
Description: Child Theme für Hello Elementor – Berufshafen Onepager und Rechtsseiten
Author: Jonas Weckwerth & Tim Zander
Template: hello-elementor
Version: 1.1.0
Text Domain: hello-elementor-child
*/

/* ============================================================
   Globale Variablen & Reset für alle Seiten (auch Legal-Seiten)
   ============================================================ */
:root {
    --bh-rot:        #781613;
    --bh-rot-hell:   #a01e1a;
    --bh-rot-dunkel: #5a100e;
    --bh-rot-tief:   #3d0908;
    --bh-creme:      #f5f2ee;
    --bh-weiss:      #ffffff;
    --bh-dunkel:     #1a1210;
    --bh-grau:       #555555;
    --bh-grau-hell:  #e2e2e2;
    --bh-font: 'Gabarito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --bh-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --bh-radius: 14px;
    --bh-radius-lg: 20px;
    --bh-shadow-sm: 0 4px 12px rgba(26, 18, 16, 0.06);
    --bh-shadow: 0 10px 24px rgba(26, 18, 16, 0.08);
}

body {
    font-family: var(--bh-font);
    color: var(--bh-dunkel);
    background: var(--bh-creme);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   Footer (Kernstyles, erweitert auf allen Seiten)
   ============================================================ */
.bh-footer { background: var(--bh-rot-tief); color: rgba(255,255,255,0.8); padding: 60px 0 0; font-family: var(--bh-font); }
.bh-footer * { box-sizing: border-box; }
.bh-footer .bh-container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.bh-footer__inner {
    display: grid;
    grid-template-columns: 1.3fr auto auto;
    gap: 48px;
    align-items: start;
    padding-bottom: 40px;
}
.bh-footer__brand img { height: 40px; width: auto; margin-bottom: 16px; display: block; }
.bh-footer__brand p { font-size: 14px; line-height: 1.6; margin: 0; }
.bh-footer__nav, .bh-footer__legal { display: flex; flex-direction: column; gap: 10px; }
.bh-footer a { color: rgba(255,255,255,0.75); text-decoration: none; font-size: 14px; transition: color 0.5s var(--bh-ease); }
.bh-footer a:hover { color: var(--bh-weiss); }

.bh-footer__disclaimer {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 22px 0 26px;
    background: rgba(0,0,0,0.15);
}
.bh-footer__disclaimer p {
    margin: 0;
    font-size: 11.5px;
    line-height: 1.65;
    color: rgba(255,255,255,0.45);
    max-width: 100%;
}

.bh-footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding: 20px 0;
    font-size: 13px;
    opacity: 0.6;
}

@media (max-width: 768px) {
    .bh-footer__inner { grid-template-columns: 1fr; gap: 32px; }
    .bh-footer__disclaimer p { font-size: 11px; }
}

/* ============================================================
   Legal-Seiten (Impressum, Datenschutz, Richtlinien)
   ============================================================ */

/* Hello-Elementor-Container-Resets für Legal-Seiten: dort soll
   unser eigenes Layout greifen, nicht die Parent-Wrapper. */
body.page-template-page-impressum,
body.page-template-page-datenschutz,
body.page-template-page-richtlinien,
body.page-template-page-cookie-richtlinien {
    background: var(--bh-creme);
    font-family: var(--bh-font);
    color: var(--bh-dunkel);
    margin: 0;
    padding: 0;
}
body.page-template-page-impressum .site-main,
body.page-template-page-datenschutz .site-main,
body.page-template-page-richtlinien .site-main,
body.page-template-page-cookie-richtlinien .site-main,
body.page-template-page-impressum .page-content,
body.page-template-page-datenschutz .page-content,
body.page-template-page-richtlinien .page-content,
body.page-template-page-cookie-richtlinien .page-content,
body.page-template-page-impressum main.site-main,
body.page-template-page-datenschutz main.site-main,
body.page-template-page-richtlinien main.site-main,
body.page-template-page-cookie-richtlinien main.site-main {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}
/* Hello Elementor Page-Title ausblenden auf Legal-Seiten */
body.page-template-page-impressum .page-header,
body.page-template-page-datenschutz .page-header,
body.page-template-page-richtlinien .page-header,
body.page-template-page-cookie-richtlinien .page-header,
body.page-template-page-impressum .entry-title,
body.page-template-page-datenschutz .entry-title,
body.page-template-page-richtlinien .entry-title,
body.page-template-page-cookie-richtlinien .entry-title {
    display: none !important;
}

.bh-legal {
    background: var(--bh-creme);
    padding: 160px 0 100px;
    min-height: 80vh;
    font-family: var(--bh-font);
    color: var(--bh-dunkel);
    width: 100%;
    box-sizing: border-box;
}
.bh-legal,
.bh-legal h1,
.bh-legal h2,
.bh-legal h3,
.bh-legal h4,
.bh-legal p,
.bh-legal li,
.bh-legal span,
.bh-legal a,
.bh-legal strong,
.bh-legal em {
    font-family: var(--bh-font) !important;
}
.bh-legal__container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}
.bh-legal__kicker {
    display: inline-block;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--bh-rot);
    margin-bottom: 18px;
    padding-left: 32px;
    position: relative;
}
.bh-legal__kicker::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 24px;
    height: 2px;
    background: var(--bh-rot);
    transform: translateY(-50%);
}
.bh-legal__title {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    line-height: 1.12;
    margin: 0 0 40px;
    letter-spacing: -0.02em;
    color: var(--bh-dunkel);
}
.bh-legal__intro {
    font-size: 17px;
    line-height: 1.7;
    color: var(--bh-grau);
    margin: 0 0 40px;
}

.bh-legal h2 {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.01em;
    margin: 56px 0 20px;
    color: var(--bh-dunkel);
    padding-top: 4px;
    border-top: 2px solid rgba(120, 22, 19, 0.12);
    padding-top: 28px;
}
.bh-legal h2:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.bh-legal h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 32px 0 12px;
    color: var(--bh-dunkel);
}
.bh-legal h4 {
    font-size: 15px;
    font-weight: 700;
    margin: 22px 0 8px;
    color: var(--bh-dunkel);
}
.bh-legal p {
    font-size: 15.5px;
    line-height: 1.75;
    color: var(--bh-grau);
    margin: 0 0 16px;
}
.bh-legal ul, .bh-legal ol {
    font-size: 15.5px;
    line-height: 1.75;
    color: var(--bh-grau);
    padding-left: 22px;
    margin: 0 0 16px;
}
.bh-legal li { margin-bottom: 6px; }
.bh-legal a {
    color: var(--bh-rot);
    text-decoration: underline;
    text-underline-offset: 2px;
    word-break: break-word;
}
.bh-legal a:hover { color: var(--bh-rot-hell); }
.bh-legal strong { color: var(--bh-dunkel); font-weight: 700; }

/* Hervorgehobene Info-Kachel */
.bh-legal__box {
    background: var(--bh-weiss);
    border-radius: var(--bh-radius);
    padding: 24px 28px;
    margin: 24px 0 28px;
    box-shadow: var(--bh-shadow-sm);
    border-left: 4px solid var(--bh-rot);
}
.bh-legal__box h3 {
    margin-top: 0;
    color: var(--bh-rot);
    font-size: 16px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 700;
}
.bh-legal__box p:last-child { margin-bottom: 0; }

/* Wichtig-Block (stärker betont) */
.bh-legal__important {
    background: linear-gradient(135deg, rgba(120, 22, 19, 0.06) 0%, rgba(160, 30, 26, 0.03) 100%);
    border: 1px solid rgba(120, 22, 19, 0.15);
    border-radius: var(--bh-radius-lg);
    padding: 28px 32px;
    margin: 32px 0;
}
.bh-legal__important h3 {
    margin-top: 0;
    color: var(--bh-rot);
    display: flex;
    align-items: center;
    gap: 10px;
}
.bh-legal__important h3::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--bh-rot);
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}
.bh-legal__important p:last-child { margin-bottom: 0; }

.bh-legal__meta {
    background: rgba(120, 22, 19, 0.04);
    border-radius: var(--bh-radius);
    padding: 18px 22px;
    font-size: 14px;
    line-height: 1.7;
}
.bh-legal__meta strong { display: block; margin-bottom: 4px; color: var(--bh-dunkel); }

/* Cookie-Tabelle für Cookie-Richtlinien */
.bh-cookie-table {
    margin: 20px 0 32px;
    border-radius: var(--bh-radius);
    overflow: hidden;
    background: var(--bh-weiss);
    box-shadow: var(--bh-shadow-sm);
    border: 1px solid rgba(120, 22, 19, 0.08);
}
.bh-cookie-row {
    display: grid;
    grid-template-columns: 1.2fr 1.1fr 2fr 1fr;
    gap: 18px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(120, 22, 19, 0.08);
    align-items: start;
    font-size: 13.5px;
    line-height: 1.55;
    color: var(--bh-grau);
}
.bh-cookie-row:last-child { border-bottom: none; }
.bh-cookie-row--head {
    background: rgba(120, 22, 19, 0.05);
    font-weight: 700;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--bh-rot);
    padding: 14px 20px;
}
.bh-cookie-row code {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;
    font-size: 12.5px;
    background: rgba(120, 22, 19, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--bh-rot);
    word-break: break-word;
}
.bh-cookie-row small {
    display: block;
    color: var(--bh-grau);
    opacity: 0.75;
    font-size: 12px;
    margin-top: 2px;
    font-family: var(--bh-font);
}
.bh-cookie-row > div:first-child {
    font-weight: 600;
    color: var(--bh-dunkel);
}

/* CTA-Link (z.B. Cookie-Einstellungen öffnen) */
.bh-legal__cta-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: var(--bh-rot);
    color: var(--bh-weiss) !important;
    text-decoration: none !important;
    border-radius: 8px;
    font-weight: 700;
    font-size: 13.5px;
    transition: background 0.4s var(--bh-ease), transform 0.4s var(--bh-ease);
}
.bh-legal__cta-link:hover {
    background: var(--bh-rot-hell);
    color: var(--bh-creme) !important;
    transform: translateY(-2px);
}

@media (max-width: 780px) {
    .bh-cookie-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 18px 20px;
    }
    .bh-cookie-row--head { display: none; }
    .bh-cookie-row > div::before {
        content: attr(data-label);
        display: block;
        font-size: 10.5px;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--bh-rot);
        font-weight: 700;
        margin-bottom: 2px;
    }
    .bh-cookie-row > div:nth-child(1)::before { content: 'Name / Technologie'; }
    .bh-cookie-row > div:nth-child(2)::before { content: 'Anbieter'; }
    .bh-cookie-row > div:nth-child(3)::before { content: 'Zweck'; }
    .bh-cookie-row > div:nth-child(4)::before { content: 'Speicherdauer'; }
}

/* Kompakter Header-Platzhalter für Legal-Seiten wenn Custom Header nicht greift */
.bh-legal-header {
    background: var(--bh-rot-dunkel);
    padding: 16px 0;
    text-align: center;
}
.bh-legal-header a {
    display: inline-block;
}
.bh-legal-header img {
    height: 36px;
    width: auto;
}

/* Zurück-Link */
.bh-legal__back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--bh-rot);
    text-decoration: none !important;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 32px;
    padding: 8px 14px 8px 8px;
    border-radius: 10px;
    transition: background 0.4s var(--bh-ease), transform 0.4s var(--bh-ease);
}
.bh-legal__back:hover {
    background: rgba(120, 22, 19, 0.08);
    transform: translateX(-3px);
}

@media (max-width: 640px) {
    .bh-legal { padding: 120px 0 60px; }
    .bh-legal__box, .bh-legal__important { padding: 20px; }
}
