/*
Theme Name: Notar Markterlbach
Description: Custom Theme für www2.notar-markterlbach.de (Notar Simon Meyer)
Version: 1.0
Author: Web4Business Migration
*/

/* ============================================================
   GOOGLE FONTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Muli:wght@300;400;600;700&family=Merriweather:ital,wght@0,400;0,700;1,400&display=swap');

/* ============================================================
   DESIGN TOKENS
   Primärfarbe: #41556b (Stahlblau – aus Originalseite)
   ============================================================ */
:root {
    --primary:       #41556b;
    --primary-dark:  #2d3d4f;
    --primary-light: #5a7490;
    --accent:        #8a9bb0;
    --text:          #333333;
    --text-light:    #666666;
    --bg-light:      #f4f6f9;
    --bg-sidebar:    #eef1f5;
    --white:         #ffffff;
    --border:        #d0d8e0;
    --font-sans:     'Muli', sans-serif;
    --font-serif:    'Merriweather', serif;
    --shadow:        0 2px 8px rgba(65,85,107,0.12);
    --radius:        4px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text);
    background: var(--white);
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: var(--font-sans);
    font-weight: 700;
    color: var(--primary-dark);
    line-height: 1.3;
    margin-bottom: 0.75rem;
}
h1 { font-size: 1.75rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }
ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; }
strong { font-weight: 700; }

img { max-width: 100%; height: auto; display: block; }

/* ============================================================
   LAYOUT
   ============================================================ */
.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }

.inner {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    background: var(--white);
    border-bottom: 3px solid var(--primary);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.site-logo img {
    height: 70px;
    width: auto;
}
.site-logo:hover { opacity: 0.85; }

/* ============================================================
   BANNER / KEYVISUAL
   ============================================================ */
.banner-wrap {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    height: 320px;
    overflow: hidden;
    position: relative;
    background: var(--primary-dark);
}

.banner-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(29,45,63,0.25) 0%, rgba(29,45,63,0.55) 100%);
    display: flex;
    align-items: flex-end;
    padding: 28px 40px;
}

.banner-tagline {
    color: var(--white);
    font-size: 1.05rem;
    font-family: var(--font-sans);
    font-weight: 300;
    letter-spacing: 0.04em;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* ============================================================
   NAVIGATION (Horizontal, im Header)
   ============================================================ */
.main-nav { flex: 1; margin-left: 32px; }

.main-nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 2px;
    flex-wrap: wrap;
}

.main-nav > ul > li { position: relative; }

.main-nav a {
    display: block;
    padding: 8px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-radius: var(--radius);
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.main-nav a:hover,
.main-nav .current-menu-item > a,
.main-nav .current-menu-ancestor > a {
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
}

/* Dropdown */
.main-nav ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 210px;
    box-shadow: 0 4px 16px rgba(65,85,107,0.18);
    border-top: 3px solid var(--primary);
    border-radius: 0 0 var(--radius) var(--radius);
    z-index: 200;
    flex-direction: column;
    padding: 4px 0;
}

.main-nav ul ul li { width: 100%; }

.main-nav ul ul a {
    padding: 8px 18px;
    font-size: 0.84rem;
    text-transform: none;
    letter-spacing: 0;
    border-radius: 0;
    color: var(--text);
}

.main-nav ul ul a:hover { background: var(--bg-light); color: var(--primary-dark); }

.main-nav li:hover > ul { display: flex; }

/* Burger */
.burger-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.burger-btn span {
    display: block;
    width: 26px;
    height: 2px;
    background: var(--primary-dark);
    border-radius: 2px;
    transition: all 0.3s;
}

/* ============================================================
   MOBILE NAV OVERLAY
   ============================================================ */
.mobile-nav {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(29,45,63,0.97);
    z-index: 999;
    flex-direction: column;
    align-items: flex-start;
    padding: 60px 32px 32px;
    overflow-y: auto;
}

.mobile-nav.open { display: flex; }

.mobile-nav-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
}

.mobile-nav > ul > li { border-bottom: 1px solid rgba(255,255,255,0.1); }

.mobile-nav a {
    display: block;
    padding: 14px 0;
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.mobile-nav a:hover { color: var(--accent); text-decoration: none; }

.mobile-nav ul ul {
    list-style: none;
    padding-left: 20px;
    margin: 0;
}

.mobile-nav ul ul a {
    font-size: 0.9rem;
    text-transform: none;
    font-weight: 400;
    color: rgba(255,255,255,0.75);
    padding: 8px 0;
}

.mobile-nav ul ul li:first-child { border-top: 1px solid rgba(255,255,255,0.08); }

/* ============================================================
   CONTENT AREA
   ============================================================ */
.content-wrap {
    flex: 1;
    padding: 36px 0 48px;
}

.content-flex {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.content-main {
    flex: 1 1 65%;
    min-width: 0;
}

/* Seiteninhalt */
.content-main h1 {
    border-bottom: 2px solid var(--primary);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.content-main h2 {
    color: var(--primary);
    margin-top: 1.5rem;
}

.content-main h3 {
    color: var(--primary-dark);
    margin-top: 1.2rem;
}

.content-main ul li { margin-bottom: 0.4rem; }

.content-main a { color: var(--primary); border-bottom: 1px dotted var(--accent); }
.content-main a:hover { border-bottom-color: var(--primary); }

/* ============================================================
   SIDEBAR
   ============================================================ */
.content-sidebar {
    flex: 0 0 280px;
    width: 280px;
}

.sidebar-card {
    background: var(--bg-sidebar);
    border-top: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 24px;
    font-size: 0.9rem;
}

.sidebar-card h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.sidebar-card p { margin-bottom: 0.6rem; color: var(--text-light); }
.sidebar-card strong { color: var(--text); }
.sidebar-card a { color: var(--primary); }
.sidebar-card a:hover { text-decoration: underline; }

.sidebar-leistungen { margin-top: 20px; }
.sidebar-leistungen h3 { color: var(--primary); }
.sidebar-leistungen ul { list-style: none; padding: 0; margin: 0; }
.sidebar-leistungen ul li { padding: 4px 0; border-bottom: 1px solid var(--border); }
.sidebar-leistungen ul li:last-child { border-bottom: none; }
.sidebar-leistungen ul li::before { content: '›'; color: var(--primary); margin-right: 8px; font-weight: 700; }
.sidebar-leistungen a { color: var(--text); font-size: 0.88rem; }
.sidebar-leistungen a:hover { color: var(--primary); }

/* ============================================================
   STARTSEITE – Teaser Grid
   ============================================================ */
.home-intro {
    margin-bottom: 32px;
}

.home-siegel {
    float: right;
    margin: 0 0 20px 24px;
    max-width: 110px;
    /* Siegel hat weiße Grafik – auf dunklem Hintergrund zeigen */
    background: var(--primary-dark);
    padding: 10px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.teaser-section {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 32px;
    margin-top: 24px;
}

.teaser-leistungen h2 { color: var(--primary); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; }
.teaser-leistungen ul { list-style: none; padding: 0; margin: 8px 0 0; }
.teaser-leistungen li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.teaser-leistungen li::before { content: '›'; color: var(--primary); margin-right: 8px; }
.teaser-leistungen a { color: var(--text); font-size: 0.9rem; }
.teaser-leistungen a:hover { color: var(--primary); }

.teaser-aktuelles h2 { color: var(--primary); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 12px; }

/* RSS-Feed */
.rss-item { padding: 12px 0; border-bottom: 1px solid var(--border); }
.rss-item:last-child { border-bottom: none; }
.rss-item h4 { font-size: 0.95rem; margin-bottom: 4px; }
.rss-item h4 a { color: var(--primary-dark); }
.rss-item h4 a:hover { color: var(--primary); }
.rss-item .rss-date { font-size: 0.78rem; color: var(--text-light); }

/* News-Liste (BNotK-Scraping) */
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list .rss-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.news-list .rss-item:last-child { border-bottom: none; }
.news-list .rss-item h4 { font-size: 0.88rem; margin: 0; line-height: 1.4; }
.news-list .rss-item h4 a { color: var(--primary-dark); border-bottom: none; }
.news-list .rss-item h4 a:hover { color: var(--primary); text-decoration: underline; }
.news-source { margin-top: 10px; font-size: 0.82rem; }
.news-source a { border-bottom: none; font-weight: 600; }
.news-fallback { background: var(--bg-light); padding: 16px; border-radius: var(--radius); border-left: 4px solid var(--primary); }
.news-fallback ul { margin: 8px 0 0; padding-left: 0; list-style: none; }
.news-fallback ul li { padding: 4px 0; }

/* Formular Erfolgs-Meldung */
.form-success {
    background: #e8f5e9;
    border-left: 4px solid #2e7d32;
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    color: #1b5e20;
}

/* Trennlinie Startseite */
.section-divider {
    border: none;
    border-top: 2px solid var(--border);
    margin: 24px 0;
}

/* ============================================================
   TEAM GRID
   ============================================================ */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.team-member {
    text-align: center;
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 16px 10px;
    border-top: 3px solid var(--primary);
}

.team-member img {
    width: 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 10px;
    border: 3px solid var(--primary-light);
}

.team-member h3 { font-size: 0.9rem; color: var(--primary); margin: 0 0 4px; }
.team-member p { font-size: 0.78rem; color: var(--text-light); margin: 0; }

/* ============================================================
   KONTAKT & KARTE
   ============================================================ */
#map, #map-anfahrt {
    width: 100%;
    height: 380px;
    border-radius: var(--radius);
    margin-top: 20px;
    border: 2px solid var(--border);
}

.contact-form { margin-top: 24px; }
.contact-form label {
    display: block;
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 4px;
}
.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    margin-bottom: 16px;
    transition: border-color 0.2s;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--primary); outline: none; }
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form .checkbox-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 16px;
    font-size: 0.85rem;
}
.contact-form .checkbox-row input { width: auto; margin-top: 3px; }
.btn-primary {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 12px 32px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background 0.2s;
    font-family: var(--font-sans);
}
.btn-primary:hover { background: var(--primary-dark); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,0.75);
    padding: 20px 24px;
    text-align: center;
    font-size: 0.85rem;
}

.site-footer a { color: rgba(255,255,255,0.85); margin: 0 8px; }
.site-footer a:hover { color: var(--white); text-decoration: none; }
.footer-sep { opacity: 0.4; }
.footer-copy { margin-top: 8px; opacity: 0.5; font-size: 0.8rem; }

/* ============================================================
   COOKIE-BANNER
   ============================================================ */
.cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--primary-dark);
    color: var(--white);
    padding: 16px 24px;
    z-index: 9999;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.3);
}
.cookie-banner.active { display: flex; justify-content: center; align-items: center; gap: 20px; flex-wrap: wrap; }
.cookie-banner p { margin: 0; font-size: 0.88rem; }
.cookie-banner button {
    background: var(--white);
    color: var(--primary-dark);
    border: none;
    padding: 9px 22px;
    border-radius: var(--radius);
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    font-family: var(--font-sans);
}
.cookie-banner button:hover { background: var(--bg-light); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .main-nav { display: none; }
    .burger-btn { display: flex; }
    .banner-wrap { height: 220px; }
    .content-flex { flex-direction: column; gap: 24px; }
    .content-sidebar { width: 100%; flex: none; }
    .teaser-section { grid-template-columns: 1fr; }
    .header-inner { padding: 10px 16px; }
    .inner { padding: 0 16px; }
    .content-wrap { padding: 24px 0 36px; }
}

@media (max-width: 480px) {
    .site-logo img { height: 50px; }
    .team-grid { grid-template-columns: repeat(2, 1fr); }
    .banner-wrap { height: 160px; }
    h1 { font-size: 1.4rem; }
}

/* ============================================================
   ÖFFNUNGSZEITEN TABELLE
   ============================================================ */
.oeffnungszeiten-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0 24px;
    font-size: 0.95rem;
}
.oeffnungszeiten-table th,
.oeffnungszeiten-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.oeffnungszeiten-table th {
    width: 130px;
    color: var(--primary-dark);
    font-weight: 700;
    background: var(--bg-light);
}
.oeffnungszeiten-table td {
    color: var(--text);
}
.oeffnungszeiten-table tr:last-child th,
.oeffnungszeiten-table tr:last-child td { border-bottom: none; }
.oeffnungszeiten-table tr:hover td,
.oeffnungszeiten-table tr:hover th { background: var(--bg-sidebar); }

/* ============================================================
   ANFAHRT INFO-GRID
   ============================================================ */
.anfahrt-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

#map-anfahrt {
    width: 100%;
    height: 380px;
    border-radius: var(--radius);
    margin-top: 8px;
    border: 2px solid var(--border);
}

@media (max-width: 600px) {
    .anfahrt-info-grid { grid-template-columns: 1fr; }
    #map-anfahrt { height: 260px; }
}

