/* ══════════════════════════════════════════════════════════════════
   wert5 · STILE DER ZENTRALEN MENÜLEISTE
   Gehört zu /partials/nav.php · Ablage: /css/wert5-nav.css

   Eigenständig: alle Farben nutzen var(--x, Fallback). Die Datei
   funktioniert damit auch auf Seiten, die keine :root-Variablen
   definieren, und überschreibt umgekehrt nie die der Seite.
   ══════════════════════════════════════════════════════════════════ */

/* ─── KOPFLEISTE ─────────────────────────────────────────────── */

.w5-head {
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 40px 0;
}

.w5-head-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--line, rgba(45, 90, 63, 0.14));
}

.w5-logo {
    display: inline-block;
    text-decoration: none;
    line-height: 0;
}

.w5-logo img {
    height: 67px;
    width: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.w5-logo:hover img { opacity: 0.85; }

/* Variante für die Startseite: ohne Trennlinie, größeres Logo,
   Logo etwas tiefer als der Menü-Button. */
/* Die Hero-Variante sitzt INNERHALB des Hero-Containers und erbt
   dessen Innenabstand – daher ohne eigene Breite und Polsterung. */
.w5-head--hero {
    max-width: none;
    padding: 0;
    margin-bottom: 30px;
}

.w5-head--hero .w5-head-bar {
    align-items: flex-start;
    padding-bottom: 0;
    border-bottom: none;
}

.w5-head--hero .w5-logo { margin-top: 30px; }
.w5-head--hero .w5-logo img { height: 96px; }

/* ─── MENÜ-BUTTON ────────────────────────────────────────────── */

.menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: var(--green, #2D5A3F);
    color: var(--paper, #FBF9F4);
    border: none;
    cursor: pointer;
    padding: 13px 24px;
    border-radius: 2px;
    font-family: var(--sans, "Inter", -apple-system, sans-serif);
    font-size: 12px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 600;
    transition: background 0.3s ease, transform 0.3s ease;
}

.menu-toggle:hover {
    background: var(--green-light, #3A7052);
    transform: translateY(-2px);
}

.menu-toggle .bars {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
}

.menu-toggle .bars span {
    width: 22px;
    height: 2px;
    background: var(--paper, #FBF9F4);
    display: block;
}

/* ─── OVERLAY ────────────────────────────────────────────────── */

.nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: linear-gradient(135deg, var(--green, #2D5A3F) 0%, var(--ink, #1F3F2E) 100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.45s ease, visibility 0.45s;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.nav-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.nav-head {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex: 0 0 auto;
}

.nav-head .logo { height: 44px; width: auto; display: block; }

.nav-close {
    background: transparent;
    border: 1.5px solid rgba(245, 241, 232, 0.5);
    color: var(--paper, #FBF9F4);
    cursor: pointer;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex: 0 0 auto;
}

.nav-close:hover {
    background: var(--paper, #FBF9F4);
    color: var(--green, #2D5A3F);
    border-color: var(--paper, #FBF9F4);
    transform: rotate(90deg);
}

.nav-close svg { width: 22px; height: 22px; }

.nav-main {
    max-width: 1600px;
    width: 100%;
    margin: 0 auto;
    padding: 6px 48px 48px;
    flex: 1 1 auto;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 34px;
    align-items: start;
}

.nav-label {
    font-family: var(--sans, "Inter", sans-serif);
    font-size: 11px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--accent, #B8924A);
    font-weight: 600;
    margin-bottom: 20px;
}

.nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 16px;
}

/* ─── KACHELN ────────────────────────────────────────────────── */

.nav-tile {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 2px;
    overflow: hidden;
    text-decoration: none;
    display: block;
    background: #22402f;
    isolation: isolate;
    opacity: 0;
    transform: translateY(22px);
}

.nav-overlay.open .nav-tile { animation: tileIn 0.55s cubic-bezier(.22,.61,.36,1) forwards; }
.nav-overlay.open .nav-tile:nth-child(1) { animation-delay: 0.06s; }
.nav-overlay.open .nav-tile:nth-child(2) { animation-delay: 0.12s; }
.nav-overlay.open .nav-tile:nth-child(3) { animation-delay: 0.18s; }
.nav-overlay.open .nav-tile:nth-child(4) { animation-delay: 0.24s; }
.nav-overlay.open .nav-tile:nth-child(5) { animation-delay: 0.30s; }
.nav-overlay.open .nav-tile:nth-child(6) { animation-delay: 0.36s; }
.nav-overlay.open .nav-tile:nth-child(7) { animation-delay: 0.42s; }
.nav-overlay.open .nav-tile:nth-child(8) { animation-delay: 0.48s; }
.nav-overlay.open .nav-tile:nth-child(9) { animation-delay: 0.54s; }
@keyframes tileIn { to { opacity: 1; transform: none; } }

.nav-tile-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    filter: grayscale(100%) contrast(1.03) brightness(0.95);
    transition: filter 0.55s ease;
}

.nav-tile:hover .nav-tile-bg { filter: grayscale(0) contrast(1) brightness(1); }

.nav-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(31,63,46,0.15) 0%, rgba(31,63,46,0) 40%, rgba(18,38,28,0.82) 100%);
}

.nav-tile-veil {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(31,63,46,0) 45%, rgba(18,38,28,0.86) 100%);
    opacity: 0.55;
    transition: opacity 0.4s ease;
}

.nav-tile:hover .nav-tile-veil { opacity: 1; }

/* Goldrahmen – zeichnet sich gegen den Uhrzeigersinn */
.nav-frame { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.nav-frame i { position: absolute; display: block; background: var(--accent, #B8924A); }
.nav-frame .e-top { top: 0; right: 0; height: 5px; width: 0; }
.nav-frame .e-left { top: 0; left: 0; width: 5px; height: 0; }
.nav-frame .e-bottom { bottom: 0; left: 0; height: 5px; width: 0; }
.nav-frame .e-right { bottom: 0; right: 0; width: 5px; height: 0; }
.nav-frame .e-top, .nav-frame .e-bottom { transition: width 0.18s linear; }
.nav-frame .e-left, .nav-frame .e-right { transition: height 0.18s linear; }
.nav-tile:hover .e-top { width: 100%; transition-delay: 0s; }
.nav-tile:hover .e-left { height: 100%; transition-delay: 0.18s; }
.nav-tile:hover .e-bottom { width: 100%; transition-delay: 0.36s; }
.nav-tile:hover .e-right { height: 100%; transition-delay: 0.54s; }

/* Aktuelle Seite: Rahmen steht dauerhaft */
.nav-tile.is-current .e-top,
.nav-tile.is-current .e-bottom { width: 100%; }
.nav-tile.is-current .e-left,
.nav-tile.is-current .e-right { height: 100%; }
.nav-tile.is-current .nav-tile-bg { filter: grayscale(0) contrast(1) brightness(1); }

.nav-tile-content {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    padding: 22px 24px;
}

.nav-num {
    display: block;
    font-family: var(--sans, "Inter", sans-serif);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    color: var(--accent, #B8924A);
    margin-bottom: 8px;
}

.nav-tile h3 {
    font-family: var(--serif, "Cormorant Garamond", Garamond, serif);
    font-size: 26px;
    font-weight: 500;
    color: var(--paper, #FBF9F4);
    letter-spacing: -0.01em;
    line-height: 1.05;
    margin: 0;
    transform: translateY(0);
    transition: transform 0.5s cubic-bezier(.22,.61,.36,1);
}

.nav-tile:hover h3 { transform: translateY(-4px); }

.nav-tile p {
    font-family: var(--sans, "Inter", sans-serif);
    font-size: 13px;
    line-height: 1.5;
    color: rgba(245, 241, 232, 0.92);
    margin: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(-10px);
    transition: max-height 0.5s cubic-bezier(.22,.61,.36,1), opacity 0.4s ease, transform 0.5s ease, margin-top 0.5s ease;
}

.nav-tile:hover p { max-height: 6em; opacity: 1; margin-top: 8px; transform: none; transition-delay: 0.3s; }

/* ─── RECHTE SPALTE ──────────────────────────────────────────── */

.nav-side {
    background: rgba(245, 241, 232, 0.05);
    border: 1px solid rgba(245, 241, 232, 0.14);
    border-top: 3px solid var(--accent, #B8924A);
    border-radius: 2px;
    padding: 30px 30px 28px;
    position: sticky;
    top: 10px;
}

.nav-side h4 {
    font-family: var(--serif, "Cormorant Garamond", Garamond, serif);
    font-size: 22px;
    font-weight: 500;
    color: var(--paper, #FBF9F4);
    margin: 0 0 4px;
}

.nav-side .side-sub {
    font-family: var(--sans, "Inter", sans-serif);
    font-size: 12px;
    color: rgba(245, 241, 232, 0.6);
    letter-spacing: 0.02em;
    margin-bottom: 22px;
}

.contact-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 16px;
    text-decoration: none;
}

.contact-row svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--accent, #B8924A); margin-top: 3px; }

.contact-row .c-label {
    font-family: var(--sans, "Inter", sans-serif);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(245, 241, 232, 0.55);
    font-weight: 600;
    display: block;
    margin-bottom: 1px;
}

.contact-row .c-val { font-family: var(--sans, "Inter", sans-serif); font-size: 14px; color: var(--paper, #FBF9F4); transition: color 0.3s; }
.contact-row:hover .c-val { color: var(--accent, #B8924A); }

.side-div { height: 1px; background: rgba(245, 241, 232, 0.14); margin: 22px 0; }

.side-social-label {
    font-family: var(--sans, "Inter", sans-serif);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(245, 241, 232, 0.55);
    font-weight: 600;
    margin-bottom: 12px;
}

.social-row { display: flex; gap: 12px; margin-bottom: 24px; }

.social-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1.5px solid rgba(245, 241, 232, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--paper, #FBF9F4);
    transition: all 0.3s ease;
}

.social-btn:hover { background: var(--accent, #B8924A); border-color: var(--accent, #B8924A); color: var(--ink, #1F3F2E); transform: translateY(-2px); }
.social-btn svg { width: 20px; height: 20px; }

.side-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    font-family: var(--sans, "Inter", sans-serif);
    font-size: 12px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 600;
    padding: 14px 18px;
    border-radius: 2px;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 12px;
}

.side-btn svg { width: 17px; height: 17px; flex: 0 0 auto; }
.side-btn-wa { background: transparent; color: var(--paper, #FBF9F4); border: 1.5px solid rgba(245, 241, 232, 0.45); }
.side-btn-wa svg { color: var(--accent, #B8924A); }
.side-btn-wa:hover { background: rgba(245, 241, 232, 0.1); border-color: var(--accent, #B8924A); color: var(--accent, #B8924A); }
.side-btn-gold { background: var(--accent, #B8924A); color: var(--ink, #1F3F2E); }
.side-btn-gold:hover { background: #C9A861; transform: translateY(-2px); }

body.no-scroll { overflow: hidden; }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .nav-frame i { transition: none; }
    .nav-overlay.open .nav-tile { animation: none; opacity: 1; transform: none; }
}

@media (max-width: 1040px) {
    .nav-main { grid-template-columns: 1fr; gap: 26px; }
    .nav-side { position: static; }
}

@media (max-width: 900px) {
    .nav-head, .nav-main { padding-left: 22px; padding-right: 22px; }
}

@media (max-width: 768px) {
    .w5-head { padding: 22px 20px 0; }
    .w5-logo img { height: 52px; }
    .w5-head--hero { padding: 0; margin-bottom: 36px; }
    .w5-head--hero .w5-logo { margin-top: 16px; }
    .w5-head--hero .w5-logo img { height: 62px; }
}

@media (max-width: 560px) {
    .nav-grid { grid-template-columns: 1fr; }
    .nav-tile { aspect-ratio: 16 / 10; }
    .nav-tile p { max-height: 6em; opacity: 1; margin-top: 8px; transform: none; }
    .menu-toggle span.lbl { display: none; }
}
