/*
Theme Name: Notarin Weeger
Theme URI: https://www2.notarin-weeger.de
Description: Custom WordPress Theme für Notarin Miriam Weeger, Laichingen – Petrol Design
Author: Webmigration
Version: 1.0
*/

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

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
    --primary:    #00677C;
    --primary-dk: #004F5E;
    --primary-lt: #e6f3f5;
    --text:       #444;
    --bg:         #fff;
    --sidebar-bg: #f4f6f9;
    --footer-bg:  #00677C;
}

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

body {
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text);
    background: #f0f0f0;
}

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

a { color: var(--primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--primary-dk); text-decoration: underline; }

h1, h2, h3, h4 {
    font-family: 'Open Sans', sans-serif;
    color: var(--primary);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.6em;
}
h1 { font-size: 1.8em; margin-top: 0; }
h2 { font-size: 1.35em; }
h3 { font-size: 1.15em; }

p { margin-bottom: 1em; }
ul, ol { margin: 0 0 1em 1.5em; }

/* ============================================================
   PAGE WRAPPER
   ============================================================ */
.page-wrapper {
    background: #fff;
    max-width: 1400px;
    margin: 0 auto;
    box-shadow: 0 0 30px rgba(0,0,0,0.15);
    position: relative;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    background: #fff;
    padding: 16px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid var(--primary);
}

.site-logo img {
    max-height: 80px;
    width: auto;
}

/* ============================================================
   BANNER + VERTICAL NAV
   ============================================================ */
.banner-nav-wrapper {
    position: relative;
    height: 350px;
    overflow: hidden;
    background: #333;
}

/* Slideshow */
.banner-slider {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.8s ease-in-out;
}

.banner-slider img {
    flex: 0 0 100%;
    width: 100%;
    height: 350px;
    object-fit: cover;
}

/* Vertical sidebar nav on left */
.main-nav-vertical {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 230px;
    background: rgba(0, 103, 124, 0.92);
    z-index: 10;
    overflow-y: auto;
}

.main-nav-vertical ul {
    list-style: none;
    padding: 8px 0;
    margin: 0;
}

.main-nav-vertical > ul > li {
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.main-nav-vertical a {
    display: block;
    padding: 6px 16px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    line-height: 1.4;
    transition: background 0.2s;
}

.main-nav-vertical a:hover,
.main-nav-vertical li.current-menu-item > a,
.main-nav-vertical li.current-page-ancestor > a {
    background: rgba(0,0,0,0.25);
    text-decoration: none;
}

/* Dropdown submenu */
.main-nav-vertical .sub-menu {
    display: none;
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(0, 79, 94, 0.95);
    position: absolute;
    left: 100%;
    top: 0;
    width: 210px;
    z-index: 20;
}

.main-nav-vertical li:hover > .sub-menu { display: block; }

.main-nav-vertical .sub-menu a {
    font-size: 12px;
    text-transform: none;
    font-weight: 400;
    padding: 6px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

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

/* Mobile nav overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}
.mobile-nav-panel {
    position: absolute;
    top: 0; left: 0;
    width: 80%;
    max-width: 320px;
    height: 100%;
    background: var(--primary);
    overflow-y: auto;
    padding: 20px 0;
}
.mobile-nav-panel .close-btn {
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0 16px 12px;
    display: block;
}
.mobile-nav-panel ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav-panel li { border-bottom: 1px solid rgba(255,255,255,0.15); }
.mobile-nav-panel a { display: block; padding: 10px 20px; color: #fff; font-size: 14px; font-weight: 600; }
.mobile-nav-panel .sub-menu { display: block; background: rgba(0,0,0,0.2); padding-left: 16px; }
.mobile-nav-panel .sub-menu a { font-size: 13px; font-weight: 400; }

/* ============================================================
   CONTENT LAYOUT
   ============================================================ */
.content-area {
    padding: 40px;
    background: #fff;
}

.content-flex {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
}

.main-content {
    flex: 1 1 60%;
    min-width: 280px;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.right-sidebar {
    flex: 0 0 260px;
    min-width: 220px;
    background: var(--sidebar-bg);
    border-top: 4px solid var(--primary);
    border-radius: 4px;
    padding: 24px 20px;
}

.right-sidebar h2, .right-sidebar h3 {
    font-size: 1em;
    margin-top: 1em;
    padding-top: 1em;
    border-top: 1px solid #ddd;
    color: var(--primary);
}
.right-sidebar h2:first-child, .right-sidebar h3:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.right-sidebar p { font-size: 0.9em; }

/* ============================================================
   TEASER GRID (Startseite)
   ============================================================ */
.teaser-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 24px 0;
}

.teaser-card {
    text-align: center;
    background: var(--primary-lt);
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.teaser-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,103,124,0.2);
}

.teaser-card img {
    width: 100%;
    aspect-ratio: 175/115;
    object-fit: cover;
}

.teaser-card a {
    display: block;
    padding: 8px;
    font-size: 0.85em;
    font-weight: 600;
    color: var(--primary);
}

/* ============================================================
   CONTACT FORM
   ============================================================ */
.contact-form-wrap { max-width: 600px; margin: 20px 0; }

.contact-form-wrap label {
    display: block;
    margin-top: 14px;
    font-weight: 600;
    font-size: 0.9em;
    color: var(--primary);
}

.contact-form-wrap input,
.contact-form-wrap textarea,
.contact-form-wrap select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-family: 'Open Sans', sans-serif;
    font-size: 0.9em;
    margin-top: 4px;
    transition: border-color 0.2s;
}

.contact-form-wrap input:focus,
.contact-form-wrap textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.contact-form-wrap textarea { resize: vertical; min-height: 120px; }

.contact-form-wrap button[type="submit"] {
    display: inline-block;
    margin-top: 16px;
    padding: 12px 30px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 0.95em;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.contact-form-wrap button[type="submit"]:hover { background: var(--primary-dk); }

.form-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 14px 18px;
    border-radius: 4px;
    margin-bottom: 16px;
}
.form-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 14px 18px;
    border-radius: 4px;
    margin-bottom: 16px;
}

/* ============================================================
   OSM MAP
   ============================================================ */
#osm-map {
    height: 380px;
    width: 100%;
    margin-top: 24px;
    border-radius: 6px;
    border: 2px solid var(--primary);
}

/* ============================================================
   AKTUELLES / BNotK NEWS
   ============================================================ */
.bnotk-list { list-style: none; margin: 0; padding: 0; }
.bnotk-item { border-bottom: 1px solid #e0e0e0; padding: 14px 0; }
.bnotk-date { font-size: 0.82em; color: #888; display: block; }
.bnotk-title { font-weight: 600; font-size: 1em; display: block; margin: 4px 0 6px; }
.bnotk-desc { font-size: 0.9em; color: var(--text); margin: 0; }
.bnotk-source { margin-top: 20px; font-size: 0.85em; color: #666; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--primary);
    color: #fff;
    padding: 20px 40px;
    text-align: center;
    font-size: 0.88em;
}
.site-footer a { color: rgba(255,255,255,0.85); }
.site-footer a:hover { color: #fff; text-decoration: underline; }

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.cookie-banner {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--primary);
    color: #fff;
    padding: 18px 24px;
    z-index: 99999;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.25);
}
.cookie-banner.active { display: flex; justify-content: center; align-items: center; gap: 20px; flex-wrap: wrap; }
.cookie-banner p { margin: 0; font-size: 0.9em; }
.cookie-banner button {
    background: #fff;
    color: var(--primary);
    border: none;
    padding: 9px 22px;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.cookie-banner button:hover { background: #f0f0f0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .main-nav-vertical { display: none; }
    .burger-btn { display: flex; }
    .banner-nav-wrapper { height: 240px; }
    .banner-slider img { height: 240px; }

    .content-area { padding: 20px; }
    .content-flex { flex-direction: column; gap: 24px; }
    .right-sidebar { flex: 1 1 auto; width: 100%; }

    .teaser-grid { grid-template-columns: repeat(2, 1fr); }
    .site-header { padding: 12px 20px; }
    .site-footer { padding: 16px 20px; }
}

@media (max-width: 480px) {
    .teaser-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ============================================================
   TEAM-GRID (Mitarbeiter-Seite)
   ============================================================ */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 24px;
    margin-top: 24px;
}
.team-member {
    text-align: center;
    background: #f9fafb;
    border-radius: 6px;
    padding: 16px 12px;
    border-top: 3px solid var(--primary);
}
.team-member img {
    width: 100%;
    max-width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 10px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.team-member h3 {
    font-size: 0.95em;
    margin: 8px 0 4px;
    color: var(--primary);
}
.team-member p {
    font-size: 0.82em;
    color: #555;
    margin: 0;
}
@media (max-width: 600px) {
    .team-grid { grid-template-columns: repeat(2, 1fr); }
}
