/*
Theme Name:   Notare M&W Child
Description:  Child-Theme von Twenty Twenty-Five für Notare Dr. Meyer & Dr. Wolf, Ludwigshafen
Author:       Notare M&W
Template:     twentytwentyfive
Version:      1.0.0
Text Domain:  notare-mw-child
*/

/* =========================================
   CSS-Variablen
   ========================================= */
:root {
    --nmw-primary:   #133566;
    --nmw-accent:    #ff0000;
    --nmw-text:      #363636;
    --nmw-bg:        #fcfcfc;
    --nmw-white:     #ffffff;
    --nmw-border:    #e0e0e0;
    --nmw-nav-hover: #0f2a52;
}

/* =========================================
   TT5-Overrides: Reset unerwünschter Stile
   ========================================= */
body {
    font-family: 'Open Sans', sans-serif !important;
    color: var(--nmw-text) !important;
    background-color: var(--nmw-bg) !important;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

.wp-site-blocks,
.is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    max-width: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* =========================================
   Header / Navigation
   ========================================= */
.nmw-header {
    width: 100%;
    background-color: var(--nmw-primary);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nmw-nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 20px;
    position: relative;
}

.nmw-logo img {
    max-height: 50px;
    width: auto;
    display: block;
}

.nmw-nav-links {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin: 0;
    padding: 0;
}

.nmw-nav-links li {
    position: relative;
}

.nmw-nav-links a {
    display: block;
    color: var(--nmw-white);
    text-decoration: none;
    padding: 15px 16px;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.03em;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.nmw-nav-links a:hover,
.nmw-nav-links .current-menu-item > a,
.nmw-nav-links .current-menu-ancestor > a {
    background-color: var(--nmw-nav-hover);
}

.nmw-nav-links .sub-menu {
    display: none;
    position: absolute;
    background-color: var(--nmw-nav-hover);
    min-width: 220px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 1001;
    top: 100%;
    left: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nmw-nav-links .sub-menu li {
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.nmw-nav-links .sub-menu a {
    padding: 11px 16px;
    font-size: 12px;
    font-weight: 400;
}

.nmw-nav-links .sub-menu a:hover {
    background-color: var(--nmw-primary);
}

@media (min-width: 901px) {
    .nmw-nav-links li:hover > .sub-menu {
        display: block;
    }
}

.nmw-burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    margin-left: auto;
}

.nmw-burger span {
    display: block;
    width: 28px;
    height: 3px;
    background-color: var(--nmw-white);
    margin: 5px 0;
    transition: 0.3s;
}

/* =========================================
   Hero-Slider
   ========================================= */
.nmw-hero-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 2600 / 765;
    max-height: 765px;
    overflow: hidden;
    background-color: var(--nmw-primary);
}

.nmw-hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    opacity: 0;
    animation: nmwFade 25s infinite;
}

.nmw-hero-slide:nth-child(1) { animation-delay: 0s; }
.nmw-hero-slide:nth-child(2) { animation-delay: 5s; }
.nmw-hero-slide:nth-child(3) { animation-delay: 10s; }
.nmw-hero-slide:nth-child(4) { animation-delay: 15s; }
.nmw-hero-slide:nth-child(5) { animation-delay: 20s; }

@keyframes nmwFade {
    0%   { opacity: 0; }
    10%  { opacity: 1; }
    20%  { opacity: 1; }
    30%  { opacity: 0; }
    100% { opacity: 0; }
}

/* =========================================
   Haupt-Inhaltslayout
   ========================================= */
.nmw-content-wrap {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    background-color: var(--nmw-bg);
    padding: 40px 20px;
    box-sizing: border-box;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

/* =========================================
   Inhaltsbereich
   ========================================= */
.nmw-content h1 {
    color: var(--nmw-primary);
    font-size: 26px;
    margin-bottom: 20px;
    line-height: 1.3;
}

.nmw-content h2 {
    color: var(--nmw-primary);
    font-size: 20px;
    margin-bottom: 15px;
    margin-top: 30px;
}

.nmw-content h3 {
    color: var(--nmw-primary);
    font-size: 18px;
    margin-bottom: 15px;
    margin-top: 25px;
}

.nmw-content p {
    margin-bottom: 15px;
    color: var(--nmw-text);
}

.nmw-content a {
    color: var(--nmw-primary);
    text-decoration: underline;
}

.nmw-content a:hover {
    color: var(--nmw-accent);
}

.nmw-content ul {
    margin-bottom: 15px;
    padding-left: 20px;
}

.nmw-content li {
    margin-bottom: 8px;
}

.nmw-content img {
    max-width: 100%;
    height: auto;
}

/* =========================================
   Sidebar
   ========================================= */
.nmw-sidebar {
    background-color: var(--nmw-white);
    padding-left: 20px;
    border-left: 1px solid var(--nmw-border);
}

.nmw-sidebar-widget {
    margin-bottom: 25px;
    text-align: center;
}

.nmw-sidebar-head {
    color: var(--nmw-text);
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.nmw-sidebar-divider {
    height: 1px;
    background-color: var(--nmw-border);
    margin: 18px 30%;
}

.nmw-sidebar p {
    font-size: 14px;
    margin-bottom: 5px;
    color: var(--nmw-text);
}

.nmw-sidebar a {
    color: var(--nmw-text);
    text-decoration: none;
}

.nmw-sidebar a:hover {
    color: var(--nmw-accent);
}

/* =========================================
   Footer
   ========================================= */
.nmw-footer {
    background-color: var(--nmw-primary);
    color: var(--nmw-white);
    text-align: center;
    padding: 30px 20px;
    width: 100%;
    box-sizing: border-box;
}

.nmw-footer-links {
    margin-bottom: 15px;
}

.nmw-footer-links a {
    color: var(--nmw-white);
    text-decoration: none;
    margin: 0 8px;
    font-size: 14px;
}

.nmw-footer-links a:hover {
    text-decoration: underline;
}

.nmw-footer-copy {
    font-size: 12px;
    opacity: 0.8;
}

/* =========================================
   Cookie-Banner
   ========================================= */
.nmw-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--nmw-white);
    box-shadow: 0 -4px 10px rgba(0,0,0,0.1);
    z-index: 9999;
    padding: 20px;
    border-top: 4px solid var(--nmw-primary);
    display: none;
}

.nmw-cookie-inner {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.nmw-cookie-inner h3 {
    margin-bottom: 10px;
    color: var(--nmw-primary);
}

.nmw-cookie-inner p {
    font-size: 14px;
    margin-bottom: 15px;
}

.nmw-btn {
    background-color: var(--nmw-primary);
    color: var(--nmw-white);
    border: none;
    padding: 10px 22px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px;
    transition: background-color 0.3s;
    font-family: inherit;
    font-size: 14px;
}

.nmw-btn:hover {
    background-color: var(--nmw-nav-hover);
}

/* =========================================
   Kontaktformular
   ========================================= */
.nmw-contact-form p {
    margin-bottom: 0;
}

.nmw-contact-form label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 14px;
}

.nmw-contact-form input[type="text"],
.nmw-contact-form input[type="email"],
.nmw-contact-form input[type="tel"],
.nmw-contact-form select,
.nmw-contact-form textarea {
    width: 100%;
    max-width: 560px;
    padding: 9px 12px;
    border: 1px solid var(--nmw-border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 15px;
    box-sizing: border-box;
    margin-bottom: 14px;
}

.nmw-contact-form textarea {
    min-height: 140px;
    resize: vertical;
}

.nmw-contact-form .nmw-btn-send {
    background-color: var(--nmw-accent);
    color: var(--nmw-white);
    border: none;
    padding: 11px 26px;
    font-size: 15px;
    cursor: pointer;
    font-weight: 600;
    border-radius: 4px;
    font-family: inherit;
    transition: background-color 0.3s;
}

.nmw-contact-form .nmw-btn-send:hover {
    background-color: var(--nmw-primary);
}

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 900px) {

    .nmw-burger {
        display: block;
    }

    .nmw-nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: var(--nmw-primary);
        z-index: 1000;
        padding: 0;
    }

    .nmw-nav-links.is-open {
        display: flex;
    }

    .nmw-nav-links li {
        width: 100%;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .nmw-nav-links a {
        padding: 14px 20px;
        width: 100%;
        box-sizing: border-box;
    }

    .nmw-nav-links .sub-menu {
        position: static;
        display: none;
        width: 100%;
        box-shadow: none;
        background-color: rgba(0,0,0,0.15);
    }

    .nmw-nav-links .sub-menu.is-open {
        display: block;
    }

    .nmw-nav-links .sub-menu a {
        padding-left: 40px;
    }

    .nmw-content-wrap {
        grid-template-columns: 1fr;
        padding: 20px 15px;
        gap: 0;
    }

    .nmw-sidebar {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--nmw-border);
        padding-top: 25px;
        margin-top: 25px;
    }

    .nmw-hero-slider {
        aspect-ratio: auto;
        height: 200px;
    }
}

/* =========================================
   Startseiten-Layout (front-page.php)
   ========================================= */
.nmw-home-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

.nmw-home-aktuelles h3,
.nmw-home-taetigkeitsfelder h3 {
    color: var(--nmw-primary);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--nmw-border);
}

/* RSS-Items */
.nmw-rss-item {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--nmw-border);
}

.nmw-rss-item h4 {
    font-size: 15px;
    margin-bottom: 5px;
}

.nmw-rss-item h4 a {
    color: var(--nmw-primary);
    text-decoration: none;
    font-weight: 600;
}

.nmw-rss-item h4 a:hover {
    color: var(--nmw-accent);
}

.nmw-rss-date {
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
}

/* Tätigkeitsfelder-Links */
.nmw-taetigkeitsfeld {
    border-bottom: 1px solid var(--nmw-border);
    text-align: center;
}

.nmw-taetigkeitsfeld a {
    display: block;
    padding: 12px 0;
    color: var(--nmw-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.05em;
    transition: color 0.2s;
}

.nmw-taetigkeitsfeld a:hover {
    color: var(--nmw-accent);
}

@media (max-width: 900px) {
    .nmw-home-columns {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* =========================================
   Sticky Sidebar
   ========================================= */
.nmw-sidebar {
    position: sticky;
    top: 80px; /* Abstand zur sticky Navigation */
    align-self: start;
}

/* =========================================
   Bewerbungsseite 2-Spalten-Layout
   ========================================= */
.nmw-bewerbung-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 20px 0 30px 0;
    padding: 20px;
    background-color: #f7f7f7;
    border-left: 3px solid var(--nmw-primary);
}

.nmw-bewerbung-col p {
    margin-bottom: 10px;
    font-size: 14px;
}

@media (max-width: 900px) {
    .nmw-bewerbung-columns {
        grid-template-columns: 1fr;
    }
}

/* Bewerbungsseite: Feintuning Einzüge */
.nmw-bewerbung-col > p:first-child {
    padding-left: 8px;
}
