/*
Theme Name: Notarin Müller 2026
Theme URI: http://devondes.com
Description: WP Theme
Author: Oleg Durybaba
Author URI: http://devondes.com
*/

/* ─── Design tokens ──────────────────────────────────────────────────────────*/
:root {
    --color-primary:      #00006E;
    --color-primary-rgba: rgba(0, 0, 110, 0.72);
    --color-mid:          #6b6b6b;
    --color-mid-light:    #f0efed;
    --color-light:        #ffffff;
    --color-dark:         #1a1a1a;
    --color-border:       #d4d2ce;
    --color-footer-bg:    #2c2c2c;

    --font-body: 'Helvetica Neue', Arial, sans-serif;

    --header-height:  72px;
    --hero-height:    70vh;
    --max-width:      1440px;
    --content-width:  1200px;
    --radius:         2px;

    --transition: 0.2s ease-in-out;
}

/* ─── Reset & base ───────────────────────────────────────────────────────────*/
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-dark);
    background: var(--color-light);
}

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

/* ─── Skip link (accessibility) ──────────────────────────────────────────────*/
.nm_skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--color-primary);
    color: var(--color-light);
    padding: 0.5rem 1rem;
    z-index: 9999;
    font-size: 0.875rem;
    text-decoration: none;
    border-radius: var(--radius);
}
.nm_skip-link:focus {
    top: 1rem;
}

/* ─── Focus styles ───────────────────────────────────────────────────────────*/
:focus-visible {
    outline: 3px solid var(--color-primary);
    outline-offset: 3px;
}

/* ─── Typography ─────────────────────────────────────────────────────────────*/
h1, h2, h3, h4 {
    font-weight: bold;
    line-height: 1.3;
    color: var(--color-primary);
}

h1 { font-size: clamp(1.5rem, 3vw, 2.25rem); margin-bottom: 1.25rem; }
h2 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); margin-bottom: 1rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.75rem; }
h4 { font-size: 1rem; }

p { margin-bottom: 1rem; }

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover, a:focus-visible {
    color: var(--color-mid);
}

/* ─── Header ─────────────────────────────────────────────────────────────────*/
.nm_hero-wrap {
    position: relative;
}

.nm_site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: background var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.nm_site-header.is-scrolled {
    position: fixed;
    background: #ffffff;
    border-bottom-color: var(--color-border);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Nav links — white on transparent hero header (desktop only) */
@media (min-width: 1025px) {
    .nm_site-header:not(.is-scrolled) #nm_menu-main li a {
        color: rgba(255, 255, 255, 0.9);
        border-bottom-color: transparent;
    }
    .nm_site-header:not(.is-scrolled) #nm_menu-main li a:hover,
    .nm_site-header:not(.is-scrolled) #nm_menu-main li.current-menu-item > a {
        color: #fff;
        border-bottom-color: rgba(255, 255, 255, 0.7);
    }
}
.nm_site-header:not(.is-scrolled) .nm_nav-toggle {
    color: #fff;
}
.nm_site-header:not(.is-scrolled) .nm_hamburger,
.nm_site-header:not(.is-scrolled) .nm_hamburger::before,
.nm_site-header:not(.is-scrolled) .nm_hamburger::after {
    background: #fff;
}

.nm_header-inner {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* ─── Logo ───────────────────────────────────────────────────────────────────*/
.nm_logo_wrap a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-dark);
    text-decoration: none;
}
.nm_logo_wrap a:hover .nm_logo-text {
    color: var(--color-primary);
}

/* Logo text — white on hero, dark when scrolled */
.nm_logo-text {
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.3;
    color: var(--color-dark);
    margin: 0;
    transition: color var(--transition);
}
.nm_logo-text span {
    font-weight: bold;
    font-style: normal;
    white-space: nowrap;
}
.nm_site-header:not(.is-scrolled) .nm_logo-text {
    color: #fff;
}
.nm_site-header:not(.is-scrolled) .nm_logo_wrap a:hover .nm_logo-text {
    color: rgba(255, 255, 255, 0.75);
}

.nm_logo {
    background: url(img/bwappen.svg) no-repeat center / contain;
    width: 38px;
    height: 52px;
    flex-shrink: 0;
}


/* ─── Navigation ─────────────────────────────────────────────────────────────*/
.nm_main-nav {
    display: flex;
    align-items: center;
}

#nm_menu-main {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
}

#nm_menu-main li a {
    display: block;
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-mid);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color var(--transition), border-color var(--transition);
}
#nm_menu-main li a:hover,
#nm_menu-main li.current-menu-item > a,
#nm_menu-main li.current-menu-ancestor > a,
#nm_menu-main li.current_page_item > a {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

/* Hide sub-menus — no dropdowns in this theme */
#nm_menu-main .sub-menu {
    display: none !important;
}

/* Hamburger button — hidden on desktop */
.nm_nav-toggle {
    display: none !important;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--color-dark);
}
.nm_hamburger,
.nm_hamburger::before,
.nm_hamburger::after {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    transition: transform var(--transition), opacity var(--transition);
}
.nm_hamburger {
    position: relative;
}
.nm_hamburger::before,
.nm_hamburger::after {
    content: '';
    position: absolute;
    left: 0;
}
.nm_hamburger::before { top: -7px; }
.nm_hamburger::after  { top:  7px; }

/* Hamburger → X when open */
.nm_nav-toggle[aria-expanded="true"] .nm_hamburger {
    background: transparent;
}
.nm_nav-toggle[aria-expanded="true"] .nm_hamburger::before {
    transform: translateY(7px) rotate(45deg);
}
.nm_nav-toggle[aria-expanded="true"] .nm_hamburger::after {
    transform: translateY(-7px) rotate(-45deg);
}

/* ─── Hero ───────────────────────────────────────────────────────────────────*/
.nm_hero {
    width: 100%;
    height: var(--hero-height);
    min-height: 320px;
    background-color: var(--color-mid-light);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ─── Hero overlay ───────────────────────────────────────────────────────────*/
.nm_hero-overlay {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-end;
    background:
        linear-gradient(to bottom, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0) 30%),
        linear-gradient(to top,    rgba(0,0,0,0.55) 0%, rgba(0,0,0,0) 50%);
}

.nm_hero-content {
    max-width: var(--content-width);
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1.5rem 2.5rem;
    color: var(--color-light);
}

.nm_hero-subtitle {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.85;
    margin-bottom: 0.4rem;
}

.nm_hero-title {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: bold;
    color: var(--color-light);
    line-height: 1.2;
    margin-bottom: 1.25rem;
}

.nm_hero-cta {
    display: inline-block;
    padding: 0.65rem 1.75rem;
    background: var(--color-light);
    color: var(--color-primary);
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none;
    border: 2px solid var(--color-light);
    transition: background var(--transition), color var(--transition);
}
.nm_hero-cta:hover {
    background: transparent;
    color: var(--color-light);
}

/* ─── Site layout ────────────────────────────────────────────────────────────*/
.nm_site-wrap {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

.nm_content-wrap {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.nm_main-col {
    flex: 1;
    min-width: 0;
}

.nm_sidebar-col {
    flex: 0 0 260px;
    min-width: 0;
}

/* ─── Main content ───────────────────────────────────────────────────────────*/
.nm_page-title {
    margin-bottom: 1.5rem;
}

.entry ul,
.nm_main-col ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}
.entry ul li,
.nm_main-col ul li {
    padding-left: 0.25rem;
    margin-bottom: 0.25rem;
}

.entry a {
    color: var(--color-primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.entry a[href^="tel"] {
    text-decoration: none;
    color: inherit;
    cursor: text;
}
.entry ul li a {
    text-decoration: none;
}

/* ─── Sidebar ────────────────────────────────────────────────────────────────*/
.nm_sidebar {
    border-left: 2px solid var(--color-border);
    padding-left: 1.5rem;
    text-align: right;
}
.nm_sidebar h2,
.nm_sidebar h3,
.nm_sidebar h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}
.nm_sidebar .textwidget div {
    padding-left: 1.75rem;
    position: relative;
}
.nm_sidebar .textwidget span {
    display: inline-block;
    width: 1.5rem;
    position: absolute;
    left: 0;
}

/* ─── News / front page posts ────────────────────────────────────────────────*/
.nm_news h3 {
    margin-top: 2rem;
    margin-bottom: 0.25rem;
}
.nm_news hr {
    border: none;
    border-top: 1px solid var(--color-border);
    margin-bottom: 1rem;
}

/* ─── Employees ──────────────────────────────────────────────────────────────*/
.nm_employees {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem 0;
}
.nm_employees .content {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
}
.nm_employees .content img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}
.nm_employees p {
    margin: 0;
    padding: 0;
}
.nm_employees .content div {
    position: absolute;
    bottom: -100%;
    left: 0;
    right: 0;
    padding: 0.75rem 1rem;
    background: var(--color-primary-rgba);
    color: var(--color-light);
    font-size: 0.875rem;
    transition: bottom 0.25s ease-in-out;
}
.nm_employees .content:hover div,
.nm_employees .content:focus-within div {
    bottom: 0;
}
.nm_employees .content div span {
    font-size: 0.75rem;
    opacity: 0.85;
}

/* ─── Contact page ───────────────────────────────────────────────────────────*/
.page-kontakt h3 { margin-bottom: 0.25rem; }
.page-kontakt h4 { margin: 0; }
.page-kontakt p  { margin-top: 0; }

/* ─── Contact form ───────────────────────────────────────────────────────────*/
.cscfBlock {
    padding-bottom: 1.5rem;
}
.cscfBlock form input,
.cscfBlock form textarea {
    width: 100%;
    padding: 0.65rem 0.875rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    font-size: 1rem;
    outline: none;
    transition: border-color var(--transition);
}
.cscfBlock form input:focus,
.cscfBlock form textarea:focus {
    border-color: var(--color-primary);
}
.cscfBlock form .error input,
.cscfBlock form .error textarea {
    border-color: #c0392b;
}
.cscfBlock form .error span.error {
    color: #c0392b;
    font-size: 0.875rem;
}
.cscfBlock form .form-group {
    padding-bottom: 0.75rem;
}
.cscfBlock #cscf_SubmitButton,
.nm_button {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.7rem 1.75rem;
    background: var(--color-primary);
    color: var(--color-light);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: background var(--transition);
}
.cscfBlock #cscf_SubmitButton:hover,
.nm_button:hover {
    background: #000050;
}

/* ─── Cookie banner ──────────────────────────────────────────────────────────*/
.nm_cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--color-primary);
    color: var(--color-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 2rem;
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(0);
    transition: transform 0.3s ease;
}
.nm_cookie-banner.nm_hidden {
    transform: translateY(100%);
    pointer-events: none;
}
.nm_cookie-text {
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}
.nm_cookie-link {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
    white-space: nowrap;
    margin-left: 0.5rem;
}
.nm_cookie-link:hover {
    color: rgba(255, 255, 255, 0.75);
}
.nm_cookie-btn {
    flex-shrink: 0;
    padding: 0.55rem 1.5rem;
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: background var(--transition), border-color var(--transition);
    white-space: nowrap;
}
.nm_cookie-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #fff;
}

@media (max-width: 1024px) {
    .nm_cookie-banner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 1rem 1.5rem;
    }
    .nm_cookie-btn {
        width: 100%;
        text-align: center;
    }
}

/* ─── Scroll-to-top ──────────────────────────────────────────────────────────*/
.nm_to-top {
    position: fixed;
    bottom: 2rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transform: rotate(90deg);
    transition: background var(--transition), opacity var(--transition);
    z-index: 50;
}
.nm_to-top:hover { background: #000050; }
.nm_to-top svg   { fill: var(--color-light); display: block; }

/* Back arrow */
.nm_backArrow {
    display: inline-block;
    margin-right: 0.5rem;
    vertical-align: middle;
}
.nm_backArrow svg { fill: var(--color-mid); vertical-align: -2px; }
a:hover .nm_backArrow svg { fill: var(--color-primary); }

/* ─── Footer ─────────────────────────────────────────────────────────────────*/
.nm_site-footer {
    background: var(--color-footer-bg);
    color: rgba(255,255,255,0.8);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 4rem;
}
.nm_footer-inner {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
.nm_site-footer a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color var(--transition);
}
.nm_site-footer a:hover {
    color: var(--color-light);
}
.nm_site-footer p {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}
#footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
#footer ul li {
    padding: 0.2rem 0;
}

/* ─── wksl-slidebar plugin overrides ────────────────────────────────────────*/
body .wksl-slidebar-trigger {
    display: none !important;
}
body .wksl-slidebar .wksl-slidebar-content {
    padding: 20px;
}

/* ─── Utility ────────────────────────────────────────────────────────────────*/
.nm_hidden { display: none !important; }
.floatRight { float: right; }

/* ─── Widget link list ───────────────────────────────────────────────────────*/
.widget_link_list .list {
    padding-left: 0;
    list-style: none;
}
.widget_link_list .list li {
    padding-bottom: 0.4rem;
}
.widget_link_list .list li::after {
    content: '';
    display: block;
    border-bottom: 1px solid var(--color-border);
    width: 50px;
    margin-top: 0.4rem;
    margin-left: auto;
}
.widget_link_list .list li:last-child::after {
    display: none;
}


/* ─── Specific page overrides ────────────────────────────────────────────────*/
body.page-die-notarstelle-pegnitz-zieht-um #main {
    padding-right: 0;
}

.nm-post-gallery figcaption {
    box-sizing: border-box;
}

/* ─── Responsive: tablet ─────────────────────────────────────────────────────*/
@media (min-width: 1025px) {
    .nm_footer-inner {
        grid-template-columns: 1fr 1fr 1fr;
    }
    .nm_employees .content img {
        height: 300px;
    }
}

/* ─── Responsive: mobile ─────────────────────────────────────────────────────*/
@media (max-width: 1024px) {
    :root {
        --hero-height: 50vw;
    }

    .nm_content-wrap {
        flex-direction: column;
    }
    .nm_sidebar-col {
        flex: none;
        width: 100%;
    }
    .nm_sidebar {
        border-left: none;
        border-top: 2px solid var(--color-border);
        padding-left: 0;
        padding-top: 1.5rem;
        text-align: left;
    }

    /* Show hamburger, hide desktop menu */
    .nm_nav-toggle {
        display: flex !important;
    }
    #nm_menu-main {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--color-light);
        border-bottom: 1px solid var(--color-border);
        flex-direction: column;
        padding: 1rem 1.5rem 1.5rem !important;
        gap: 0;
        box-shadow: 0 4px 16px rgba(0,0,0,0.08);
        z-index: 99;
    }
    #nm_menu-main.is-open {
        display: flex;
    }
    #nm_menu-main li {
        margin: 0;
    }
    #nm_menu-main li a {
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--color-border);
        font-size: 0.9rem;
        display: block;
        color: var(--color-mid) !important;
    }
    #nm_menu-main li a:hover {
        color: var(--color-primary) !important;
    }
    #nm_menu-main li:last-child a {
        border-bottom: none;
    }
}
