/*
Theme Name: Notar Schindler
Theme URI: 
Author: Antigravity
Author URI: 
Description: Custom WordPress theme for Notar Schindler
Version: 1.1
Text Domain: notarschindler
*/

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

:root {
    --primary-color: #2d5016;
    --primary-dark: #1a2f0d;
    --secondary-color: #f8f9fa;
    --text-color: #333333;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
    --bg-color: #ffffff;
    --heading-font: 'Enriqueta', serif;
    --body-font: 'Roboto', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--body-font);
    color: var(--text-color);
    background-color: #e9ecef;
    line-height: 1.75;
    font-size: 15px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    color: var(--primary-color);
    line-height: 1.3;
}

h1 { font-size: 1.8rem; margin-bottom: 1.2rem; }
h2 { font-size: 1.5rem; margin-bottom: 1rem; border-bottom: 2px solid var(--primary-color); padding-bottom: 8px; }
h3 { font-size: 1.25rem; margin-bottom: 0.8rem; }

p { margin-bottom: 1em; }

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

ul, ol {
    margin-bottom: 1em;
    padding-left: 1.5em;
}
li { margin-bottom: 0.3em; }

/* ==============================
   HEADER
   ============================== */
.site-header {
    background-color: var(--primary-color);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: stretch;
    padding: 0 30px;
}

.header-logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding: 8px 0;
}

.site-logo {
    height: 100px;
    width: auto;
}

.header-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: 20px;
}

.header-name {
    padding: 8px 0 10px;
}
.header-name a {
    font-family: var(--heading-font);
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
}
.header-name a:hover { color: #fff; text-decoration: none; }

/* ==============================
   NAVIGATION
   ============================== */
.main-navigation ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    color: #fff;
    padding: 12px 14px;
    display: block;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
}
.main-navigation a:hover {
    background-color: rgba(255,255,255,0.15);
    color: #fff;
    text-decoration: none;
}

/* Dropdown */
.main-navigation .sub-menu,
.main-navigation .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 220px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1001;
    border-top: 3px solid var(--primary-color);
}

.main-navigation .menu-item-has-children:hover > .sub-menu,
.main-navigation .has-dropdown:hover > .dropdown {
    display: block;
}

.main-navigation .sub-menu li,
.main-navigation .dropdown li {
    width: 100%;
}

.main-navigation .sub-menu a,
.main-navigation .dropdown a {
    color: var(--text-color);
    padding: 10px 18px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.88rem;
}
.main-navigation .sub-menu a:hover,
.main-navigation .dropdown a:hover {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

/* Last 2 nav items: dropdown right-aligned */
.main-navigation > div > ul > li:nth-last-child(-n+2) .sub-menu,
.main-navigation > ul > li:nth-last-child(-n+2) .sub-menu,
.main-navigation > div > ul > li:nth-last-child(-n+2) .dropdown,
.main-navigation > ul > li:nth-last-child(-n+2) .dropdown {
    left: auto;
    right: 0;
}

/* Burger Menu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 5px;
}

/* ==============================
   MAIN CONTENT
   ============================== */
.site-content {
    max-width: 1100px;
    margin: 30px auto;
    padding: 40px;
    background-color: #fff;
    box-shadow: 0 1px 10px rgba(0,0,0,0.08);
    border-radius: 2px;
    display: grid;
    grid-template-columns: 3fr 1fr;
    gap: 40px;
}

.page-template-default .site-content,
.page-template-page-anfahrt .site-content,
.page-template-page-kontaktformular .site-content {
    grid-template-columns: 1fr;
}

/* Entry content formatting */
.entry-content {
    font-size: 15px;
    line-height: 1.75;
}
.entry-content p { margin-bottom: 1.1em; }
.entry-content h2 {
    margin-top: 2em;
    margin-bottom: 0.8em;
    font-size: 1.4rem;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 6px;
}
.entry-content h3 {
    margin-top: 1.5em;
    margin-bottom: 0.6em;
}
.entry-content ul, .entry-content ol {
    margin-bottom: 1.2em;
    padding-left: 2em;
}
.entry-content li { margin-bottom: 0.4em; }
.entry-content strong { color: var(--primary-color); }
.entry-content a { text-decoration: underline; }
.entry-content a:hover { color: var(--primary-dark); }

.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em 0;
}
.entry-content th, .entry-content td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
    vertical-align: top;
}
.entry-content th {
    background-color: var(--secondary-color);
    font-weight: 600;
    color: var(--primary-color);
}
.entry-content tr:hover { background-color: #fafafa; }

/* Address blocks */
.entry-content address {
    font-style: normal;
    background: var(--secondary-color);
    padding: 15px 20px;
    border-left: 4px solid var(--primary-color);
    margin: 1em 0;
    line-height: 1.8;
}

/* ==============================
   FRONT PAGE
   ============================== */
.front-page-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.welcome-section {
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.welcome-text { flex: 1; }

.siegel-img {
    max-width: 140px;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 500;
    margin-top: 15px;
    transition: background 0.3s;
}
.btn:hover {
    background-color: var(--primary-dark);
    color: #fff;
    text-decoration: none;
}

.teaser-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.teaser-card {
    background: var(--secondary-color);
    padding: 20px;
    border-radius: 4px;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.2s, box-shadow 0.2s;
}
.teaser-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.teaser-card h3 { font-size: 1.1rem; margin-bottom: 0.5em; }
.teaser-card a { text-decoration: none; }

.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

/* ==============================
   SIDEBAR
   ============================== */
.sidebar {
    background-color: var(--secondary-color);
    padding: 25px;
    border-radius: 4px;
    border-top: 3px solid var(--primary-color);
}

.sidebar h3 {
    font-size: 1.05rem;
    color: var(--primary-color);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-widget {
    margin-bottom: 25px;
}
.sidebar-widget:last-child { margin-bottom: 0; }

.sidebar-widget p { margin-bottom: 0.5em; font-size: 0.95rem; }

.wappen-img {
    max-width: 100%;
    height: auto;
    margin-top: 15px;
}

/* ==============================
   FORMS
   ============================== */
.kontakt-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.kontakt-form .full-width {
    grid-column: span 2;
}

.kontakt-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.kontakt-form input[type="text"],
.kontakt-form input[type="email"],
.kontakt-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--body-font);
    font-size: 0.95rem;
    transition: border-color 0.3s;
}
.kontakt-form input:focus,
.kontakt-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(45,80,22,0.15);
}

.kontakt-form textarea { height: 150px; resize: vertical; }

.kontakt-form button[type="submit"],
.kontakt-form input[type="submit"] {
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    padding: 12px 28px;
    cursor: pointer;
    font-weight: 600;
    border-radius: 4px;
    font-size: 1rem;
    transition: background 0.3s;
}
.kontakt-form button[type="submit"]:hover { background-color: var(--primary-dark); }

/* DSGVO checkbox inline */
.kontakt-form .full-width label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-weight: 400;
    cursor: pointer;
}
.kontakt-form input[type="checkbox"] {
    width: auto;
    margin-top: 3px;
    flex-shrink: 0;
}

.success-msg {
    color: #155724; background: #d4edda; padding: 15px; border-radius: 4px;
    grid-column: span 2; border: 1px solid #c3e6cb;
}
.error-msg {
    color: #721c24; background: #f8d7da; padding: 15px; border-radius: 4px;
    grid-column: span 2; border: 1px solid #f5c6cb;
}

/* ==============================
   FEED
   ============================== */
.feed-item {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid #eee;
}
.feed-item:last-child { border-bottom: none; }

.feed-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 3px;
}

.feed-title {
    font-weight: 600;
    margin-bottom: 4px;
}
.feed-title a { text-decoration: none; }
.feed-title a:hover { text-decoration: underline; }

.feed-desc {
    font-size: 0.92rem;
    color: var(--text-muted);
}

/* ==============================
   FOOTER
   ============================== */
.site-footer {
    background-color: var(--primary-color);
    color: #fff;
    padding: 35px 20px 20px;
    margin-top: 0;
}

.footer-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.footer-links ul {
    list-style: none;
    display: flex;
    gap: 25px;
}
.footer-links a {
    color: rgba(255,255,255,0.85);
    font-size: 0.95rem;
}
.footer-links a:hover { color: #fff; text-decoration: underline; }

.site-info {
    width: 100%;
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.15);
    font-size: 0.88rem;
    color: rgba(255,255,255,0.7);
}

/* ==============================
   MAP
   ============================== */
#osm-map {
    height: 420px;
    width: 100%;
    margin-top: 20px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* ==============================
   COOKIE BANNER
   ============================== */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0,0,0,0.92);
    color: #fff;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    display: none;
}
#cookie-banner.show { display: flex; }
#cookie-banner p { margin: 0; font-size: 0.9rem; }
#cookie-banner button {
    background: var(--primary-color);
    color: #fff;
    border: none;
    padding: 8px 18px;
    cursor: pointer;
    margin-left: 15px;
    border-radius: 4px;
    white-space: nowrap;
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 768px) {
    .site-content {
        grid-template-columns: 1fr;
        padding: 20px;
        margin: 15px;
    }
    .two-columns { grid-template-columns: 1fr; }
    .kontakt-form {
        grid-template-columns: 1fr;
    }
    .kontakt-form .full-width { grid-column: span 1; }
    .success-msg, .error-msg { grid-column: span 1; }

    .header-container {
        flex-wrap: wrap;
        padding: 10px 15px;
    }

    .site-logo { height: 60px; }
    .site-title { font-size: 1rem; }
    .site-title small { font-size: 0.85rem; }

    .header-right {
        padding-right: 0;
    }

    .menu-toggle { display: block; }

    .main-navigation {
        display: none;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: var(--primary-color);
        z-index: 999;
    }
    .main-navigation.toggled { display: block; }

    .main-navigation ul { flex-direction: column; }

    .main-navigation .sub-menu,
    .main-navigation .dropdown {
        position: static;
        display: none;
        background-color: rgba(0,0,0,0.1);
        box-shadow: none;
        border-top: none;
    }
    .main-navigation .menu-item-has-children.open > .sub-menu,
    .main-navigation .has-dropdown.open > .dropdown { display: block; }

    .main-navigation > div > ul > li:nth-last-child(-n+2) .sub-menu,
    .main-navigation > ul > li:nth-last-child(-n+2) .dropdown {
        left: 0;
    }

    .welcome-section { flex-direction: column; }

    .footer-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-links ul { flex-wrap: wrap; justify-content: center; }

    #cookie-banner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .teaser-grid { grid-template-columns: 1fr; }
    h1 { font-size: 1.4rem; }
}
