/*
Theme Name: Notar Striewski
Theme URI: https://www2.notar-striewski.de
Author: Migration
Description: Custom theme for Notar Klaus Striewski, Leverkusen – 1:1 migration from original design
Version: 1.0
*/

@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;700&family=Merriweather:wght@400;700&family=Roboto:wght@300;400;500&display=swap');

/* ============================================
   CSS Custom Properties
   ============================================ */
:root {
    --primary:       #2c4a6e;   /* Dunkelblau (klassisch, Notar-Stil) */
    --primary-dark:  #1a2f47;
    --primary-light: #4a6f9a;
    --accent:        #8a9eb8;
    --gold:          #b8960c;
    --bg:            #ffffff;
    --bg-light:      #f4f6f9;
    --bg-header:     #1e3352;   /* Sehr dunkler Header */
    --text:          #333333;
    --text-light:    #666666;
    --border:        #d8dde6;
    --sidebar-bg:    #f0f3f7;
    --font-heading:  'Merriweather', Georgia, serif;
    --font-body:     'Lato', 'Roboto', sans-serif;
    --max-width:     1160px;
    --header-h:      100px;
}

/* ============================================
   Reset & Base
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}
a { color: var(--primary); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--primary-dark); text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    color: var(--primary);
    font-weight: 700;
    line-height: 1.25;
}
h1 { font-size: 28px; margin-bottom: 18px; }
h2 { font-size: 22px; margin-bottom: 12px; margin-top: 1.4rem; }
h3 { font-size: 18px; margin-bottom: 10px; margin-top: 1.2rem; }
p  { margin-bottom: 14px; }
ul, ol { margin: 0 0 14px 22px; }
li { margin-bottom: 5px; }
strong { font-weight: 700; }

.centerer { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ============================================
   Header – dunkel klassisch
   ============================================ */
.site-header {
    background: var(--bg-header);
    border-bottom: 3px solid var(--gold);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
    position: relative;
}

/* Logo-Bereich */
.site-logo { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.site-logo img { max-height: 70px; width: auto; }
.logo-text-wrap { display: flex; flex-direction: column; flex-shrink: 0; }
.logo-title {
    font-family: var(--font-heading);
    font-size: 1.18rem;
    color: #fff;
    line-height: 1.2;
    letter-spacing: 0.02em;
}
.logo-subtitle {
    font-family: var(--font-body);
    font-size: 0.78rem;
    color: rgba(255,255,255,0.65);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 3px;
}

/* ============================================
   Navigation
   ============================================ */
.main-nav {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
    position: relative;
    z-index: 1000;
}

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a {
    display: block;
    padding: 8px 14px;
    color: rgba(255,255,255,0.88);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12.5px;
    letter-spacing: 0.06em;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    border-radius: 3px;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li.current-menu-item > a,
.main-nav > ul > li.current-menu-ancestor > a {
    background: var(--primary-light);
    color: #fff;
    text-decoration: none;
}

/* Dropdown */
.main-nav ul ul {
    display: none !important;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-header);
    min-width: 220px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
    z-index: 9999;
    border-top: 2px solid var(--gold);
    flex-direction: column;
    list-style: none;
    padding: 4px 0;
    margin: 0;
}
.main-nav > ul > li:hover > ul,
.main-nav > ul > li:focus-within > ul,
.main-nav ul.nav-menu > li:hover > ul.sub-menu {
    display: flex !important;
}
.main-nav ul ul li { width: 100%; border-bottom: 1px solid rgba(255,255,255,0.08); }
.main-nav ul ul li:last-child { border-bottom: none; }
.main-nav ul ul a {
    display: block;
    padding: 10px 18px;
    font-size: 13.5px;
    color: rgba(255,255,255,0.85);
    transition: background 0.2s;
    text-decoration: none;
    font-weight: 400;
}
.main-nav ul ul a:hover { background: var(--primary-light); color: #fff; text-decoration: none; }

/* Burger Button */
.burger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;
    background: none;
    border: none;
    padding: 4px;
}
.burger span { display: block; width: 26px; height: 2px; background: rgba(255,255,255,0.85); margin: 5px 0; border-radius: 2px; transition: all 0.3s; }
.burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ============================================
   Hero / Keyvisual (Einzelbild – kein Slider)
   ============================================ */
.keyvisual {
    position: relative;
    overflow: hidden;
    background: var(--bg-header);
    left: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    width: 100vw;
    margin-bottom: 0;
}
.keyvisual img {
    width: 100%;
    height: 360px;
    min-height: 360px;
    max-height: 360px;
    object-fit: cover;
    object-position: center 40%;
    display: block;
}
.keyvisual-fallback {
    height: 260px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    letter-spacing: 0.06em;
}

/* ============================================
   Page Layout – Grid
   ============================================ */
.content_wrapper {
    display: grid;
    grid-template-columns: 1fr 255px;
    gap: 40px;
    margin-top: 36px;
    margin-bottom: 60px;
    align-items: start;
}

#content_main {
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
}
#content_main p { margin-bottom: 14px; }
#content_main ul { padding-left: 20px; }

/* cm_column_wrapper */
.cm_column_wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    width: 100%;
    margin: 20px 0;
}
.cm_column { width: auto !important; min-width: 0; }
.cm_column_gap { display: none !important; }

/* Startseite content-wrapper */
.content-wrapper {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}
.content-inner {
    display: grid;
    grid-template-columns: 1fr 255px;
    gap: 40px;
    margin-top: 36px;
    margin-bottom: 60px;
    align-items: start;
}
.content-text { min-width: 0; overflow-wrap: break-word; }

/* ============================================
   Sidebar
   ============================================ */
.sidebar-right {
    background: var(--sidebar-bg);
    padding: 22px 20px;
    border-radius: 4px;
    border-top: 3px solid var(--primary);
    position: sticky;
    top: calc(var(--header-h) + 1rem);
    min-width: 0;
}
.sidebar-right h3 {
    font-family: var(--font-heading);
    color: var(--primary);
    font-size: 14px;
    margin-bottom: 10px;
    margin-top: 0;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 700;
}
.sidebar-right p { margin-bottom: 8px; font-size: 14px; line-height: 1.6; color: var(--text-light); }
.sidebar-right a { color: var(--primary); }
.sidebar-right a:hover { color: var(--primary-dark); }
.sidebar-sep { height: 1px; background: var(--border); margin: 16px 0; }
.sidebar-right strong { color: var(--text); }

/* Öffnungszeiten-Tabelle */
.oh-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.oh-table td { padding: 2px 0; vertical-align: top; color: var(--text-light); border: none; }
.oh-table td:first-child { font-weight: 700; color: var(--primary); padding-right: 10px; width: 55px; }

/* ============================================
   Impressum / Datenschutz Styles
   ============================================ */
.impressum-table { width: auto; border-collapse: collapse; margin: 0 0 1.4rem 0; }
.impressum-table td { padding: 3px 14px 3px 0; vertical-align: top; font-size: 15px; line-height: 1.5; border: none; }
.impressum-table td.label {
    font-weight: 700; font-size: 0.76rem; text-transform: uppercase;
    letter-spacing: 0.07em; color: var(--text-light); white-space: nowrap;
    padding-top: 5px; min-width: 110px;
}
address {
    font-style: normal; margin-bottom: 1.2rem; padding: 12px 16px;
    border-left: 3px solid var(--border); background: var(--bg-light);
    border-radius: 0 4px 4px 0; font-size: 14.5px; line-height: 1.7;
}
address strong { color: var(--primary); display: block; margin-bottom: 3px; }

/* ============================================
   Leistungen Service-Grid
   ============================================ */
.leistungen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin: 20px 0;
}
.leistungen-card {
    padding: 16px 18px;
    background: var(--bg-light);
    border-left: 3px solid var(--primary);
    border-radius: 0 4px 4px 0;
    transition: transform 0.2s, box-shadow 0.2s;
}
.leistungen-card:hover { transform: translateX(4px); box-shadow: 2px 2px 8px rgba(0,0,0,0.08); }
.leistungen-card a { color: var(--primary); font-weight: 600; font-size: 14.5px; }
.leistungen-card a:hover { text-decoration: none; color: var(--primary-dark); }

/* ============================================
   Kontaktformular
   ============================================ */
.contact-form { margin-top: 1.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.form-group { display: flex; flex-direction: column; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label { font-size: 0.78rem; font-weight: 700; color: var(--primary); margin-bottom: 0.3rem; text-transform: uppercase; letter-spacing: 0.04em; }
.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
    width: 100%; padding: 0.6rem 0.85rem; border: 1.5px solid var(--border);
    border-radius: 3px; font-family: var(--font-body); font-size: 1rem;
    background: #fff; color: var(--text); transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-form input:focus, .contact-form textarea:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(44,74,110,0.1);
}
.contact-form textarea { resize: vertical; min-height: 130px; }
.checkbox-label { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.88rem; cursor: pointer; line-height: 1.5; }
.checkbox-label input { margin-top: 3px; flex-shrink: 0; accent-color: var(--primary); }
.btn-primary {
    background: var(--primary); color: #fff; border: none; padding: 11px 28px;
    font-family: var(--font-body); font-size: 1rem; font-weight: 700; border-radius: 3px;
    cursor: pointer; margin-top: 1rem; transition: background 0.2s, transform 0.1s;
    letter-spacing: 0.03em;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* ============================================
   OSM Karte
   ============================================ */
.map-container { margin: 1.5rem 0; border-radius: 4px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
#osm-map { height: 400px; width: 100%; }

/* ============================================
   Footer
   ============================================ */
.site-footer {
    width: 100%;
    background: var(--bg-header);
    color: rgba(255,255,255,0.75);
    padding: 26px 5%;
    margin-top: 50px;
    border-top: 3px solid var(--gold);
}
.site-footer .centerer { text-align: center; }
.site-footer a { color: rgba(255,255,255,0.75); margin: 0 8px; transition: color 0.3s; text-decoration: none; font-size: 13.5px; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.site-footer p { margin-bottom: 6px; font-size: 13.5px; }

/* ============================================
   Cookie Banner
   ============================================ */
#cookie-banner {
    position: fixed;
    bottom: 0; left: 0;
    width: 100%;
    background: #fff;
    border-top: 3px solid var(--primary);
    padding: 16px 20px;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
    z-index: 9999;
    display: none;
    text-align: center;
}
#cookie-banner h4 { color: var(--primary); font-family: var(--font-heading); margin-bottom: 6px; }
#cookie-banner p { margin-bottom: 12px; font-size: 13px; max-width: 800px; margin-left: auto; margin-right: auto; line-height: 1.5; }
#cookie-banner button { margin: 0 5px; padding: 9px 18px; border: none; cursor: pointer; border-radius: 3px; font-weight: 700; font-family: var(--font-body); font-size: 14px; }
.btn-cookie-accept { background: var(--primary); color: #fff; }
.btn-cookie-decline { background: #eee; color: #333; }

/* ============================================
   Notar-Portrait
   ============================================ */
.notar-portrait {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 2rem;
}
.notar-portrait img {
    width: 190px; min-width: 190px; height: 230px;
    object-fit: cover; object-position: center top;
    border-radius: 3px; box-shadow: 0 3px 12px rgba(0,0,0,0.15);
    border-top: 3px solid var(--primary); display: block;
}
.notar-portrait-text { flex: 1; min-width: 0; }

/* ============================================
   Responsive – Tablet (≤ 900px)
   ============================================ */
@media (max-width: 900px) {
    .content_wrapper { grid-template-columns: 1fr 200px; gap: 24px; }
    .content-inner   { grid-template-columns: 1fr 200px; gap: 24px; }
}

/* ============================================
   Responsive – Mobil (≤ 768px)
   ============================================ */
@media (max-width: 768px) {
    .content_wrapper { grid-template-columns: 1fr; gap: 0; margin-top: 24px; }
    .content-inner   { grid-template-columns: 1fr; gap: 0; margin-top: 24px; }
    .sidebar-right { position: static; margin-top: 28px; }
    .cm_column_wrapper { grid-template-columns: 1fr; }
    .keyvisual img { height: 200px; min-height: 200px; max-height: 200px; }
    .header-content { padding: 8px 0; }
    .site-logo img { max-height: 50px; }
    .logo-title { font-size: 0.95rem; }
    .burger { display: flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: calc(100% + 2px);
        left: 0;
        width: 100vw;
        margin-left: calc(-50vw + 50%);
        background: var(--bg-header);
        padding: 6px 0;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        z-index: 1002;
    }
    .main-nav.open { display: block; }
    .main-nav > ul { flex-direction: column; gap: 0; }
    .main-nav > ul > li > a {
        padding: 13px 20px;
        color: rgba(255,255,255,0.9);
        font-size: 13px;
        border-radius: 0;
        border-bottom: 1px solid rgba(255,255,255,0.1) !important;
        background: none;
    }
    .main-nav > ul > li > a:hover { background: var(--primary-light); }

    /* Mobile Untermenüs */
    .main-nav ul ul,
    .main-nav ul.nav-menu ul.sub-menu {
        display: none;
        position: static !important;
        background: rgba(0,0,0,0.25);
        box-shadow: none;
        border: none;
        border-top: none;
        padding: 0;
        margin: 0;
        min-width: 0;
        width: 100%;
        flex-direction: column;
    }
    .main-nav > ul > li.open > ul,
    .main-nav > ul > li.open > ul.sub-menu {
        display: flex !important;
        flex-direction: column;
    }
    .main-nav > ul > li.open > ul > li { width: 100%; border-bottom: 1px solid rgba(255,255,255,0.08); }
    .main-nav ul ul a,
    .main-nav ul ul li a {
        padding: 11px 10px 11px 36px !important;
        color: rgba(255,255,255,0.85) !important;
        font-size: 13px;
        display: block;
        text-decoration: none;
        font-weight: 400;
    }
    .main-nav ul ul a:hover { background: rgba(255,255,255,0.1) !important; color: #fff !important; }
    h1 { font-size: 22px; }
    h2 { font-size: 18px; }
    h3 { font-size: 16px; }
    .form-row { grid-template-columns: 1fr; }
    .notar-portrait { flex-direction: column; align-items: center; text-align: center; }
    .notar-portrait img { width: 160px; min-width: 160px; height: 190px; }
}

@media (max-width: 480px) {
    .leistungen-grid { grid-template-columns: 1fr; }
}

/* ============================================
   BNotK News-Liste
   ============================================ */
.bnotk-news { margin-top: 0.5rem; }
.bnotk-list { list-style: none; margin: 0; padding: 0; }
.bnotk-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.bnotk-item:last-child { border-bottom: none; }
.bnotk-date {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}
.bnotk-title {
    font-family: var(--font-heading);
    font-size: 15.5px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.35;
    text-decoration: none;
    display: block;
    margin-bottom: 5px;
}
.bnotk-title:hover { color: var(--primary-dark); text-decoration: underline; }
.bnotk-desc { font-size: 13.5px; color: var(--text-light); margin: 0; line-height: 1.55; }
.bnotk-source { margin-top: 18px; font-size: 12px; color: var(--text-light); }
.bnotk-source a { color: var(--primary); }

/* ============================================
   Formular Feedback-Boxen
   ============================================ */
.form-notice {
    padding: 12px 16px;
    border-radius: 3px;
    margin-bottom: 1.2rem;
    font-weight: 600;
    font-size: 14.5px;
}
.form-success {
    background: #e8f5e9;
    border-left: 4px solid #388e3c;
    color: #1b5e20;
}
.form-error {
    background: #fce4ec;
    border-left: 4px solid #c62828;
    color: #b71c1c;
}
