/*
Theme Name: Luwi Photo
Theme URI: https://example.com
Author: Luwi
Description: Minimalistisches Fotografie-Portfolio-Theme. Obere Navigation mit Name links, Links rechts. Inspiriert von patricksaringer.com
Version: 4.0.0
Requires at least: 6.0
Tested up to: 6.7
License: GNU General Public License v2 or later
Text Domain: luwi-photo
*/

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Jost:wght@300;400;500;600&display=swap');

/* ============================================================
   VARIABLEN
   ============================================================ */
:root {
    --color-bg:      #ffffff;
    --color-text:    #111111;
    --color-muted:   #888888;
    --color-accent:  #000000;
    --header-height: 64px;
    --gap:           4px;
    --font-name:     'Cormorant Garamond', Georgia, serif;
    --font-nav:      'Jost', sans-serif;
    --font-body:     'Jost', sans-serif;
    --nav-size:      11px;
    --nav-tracking:  0.13em;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-body); background: var(--color-bg); color: var(--color-text); line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ============================================================
   HEADER – Name links / Navigation rechts
   ============================================================ */
#site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-height);
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    z-index: 200;
    border-bottom: 1px solid #f0f0f0;
}

/* Name / Logo */
.site-branding { flex-shrink: 0; }

.site-name {
    font-family: var(--font-name);
    font-size: 18px;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--color-accent);
    white-space: nowrap;
    transition: opacity 0.2s;
}
.site-name:hover { opacity: 0.6; }

/* Custom Logo */
.site-branding .custom-logo-link img {
    height: 36px;
    width: auto;
    display: block;
}

/* Navigation */
#primary-nav { flex-shrink: 0; }

.nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-list li a {
    font-family: var(--font-nav);
    font-size: var(--nav-size);
    font-weight: 400;
    letter-spacing: var(--nav-tracking);
    text-transform: uppercase;
    color: var(--color-muted);
    transition: color 0.15s;
    display: block;
    padding: 4px 0;
}
.nav-list li a:hover { color: var(--color-accent); }

.nav-list li.current-menu-item > a,
.nav-list li.current-page-ancestor > a {
    color: var(--color-accent);
    font-weight: 600;
}

/* ============================================================
   HAMBURGER (Mobil)
   ============================================================ */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    flex-direction: column;
    gap: 5px;
}
.hamburger span {
    display: block;
    width: 22px; height: 1.5px;
    background: var(--color-accent);
    transition: transform 0.3s, opacity 0.3s;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile Nav Overlay */
#mobile-nav {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0; right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid #eee;
    z-index: 190;
    padding: 20px 32px 28px;
}
#mobile-nav.open { display: block; }

.mobile-nav-list { list-style: none; }
.mobile-nav-list li { border-bottom: 1px solid #f5f5f5; }
.mobile-nav-list li a {
    display: block;
    padding: 13px 0;
    font-family: var(--font-nav);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--color-muted);
}
.mobile-nav-list li.current-menu-item > a { color: var(--color-accent); font-weight: 600; }

/* ============================================================
   HAUPTINHALT
   ============================================================ */
#main-content {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height) - 60px);
}

/* ============================================================
   PORTFOLIO GRID (Startseite)
   Wie Patrick Saringer: breites Grid, Titel unter/über dem Bild
   ============================================================ */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--gap);
    padding: var(--gap);
}

.portfolio-grid-item {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;   /* Portrait-Format wie Saringer */
    background: #f5f5f5;
}

.portfolio-grid-item a {
    display: block;
    width: 100%; height: 100%;
}

.portfolio-grid-item img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease, filter 0.4s ease;
}
.portfolio-grid-item:hover img {
    transform: scale(1.04);
    filter: brightness(0.88);
}

/* Titel-Overlay beim Hover */
.portfolio-grid-item__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    padding: 20px 16px;
    opacity: 0;
    transition: opacity 0.35s ease;
}
.portfolio-grid-item:hover .portfolio-grid-item__overlay { opacity: 1; }

.portfolio-grid-item__title {
    color: #fff;
    font-family: var(--font-name);
    font-size: 15px;
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.03em;
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
    line-height: 1.3;
}

/* ============================================================
   SPLIT LAYOUT (Kategorie-Seiten: Text links / Fotos rechts)
   ============================================================ */
.split-layout {
    display: grid;
    grid-template-columns: 420px 1fr;
    min-height: calc(100vh - var(--header-height));
    align-items: start;
}

.split-layout__text {
    padding: 52px 48px;
    position: sticky;
    top: var(--header-height);
}

.split-layout__text h1,
.split-layout__text h2 {
    font-family: var(--font-nav);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 24px;
    color: var(--color-accent);
    line-height: 1.5;
}

.split-layout__text p {
    font-size: 13px;
    line-height: 1.85;
    color: #333;
    margin-bottom: 15px;
}

.split-layout__gallery {
    padding: var(--gap) var(--gap) var(--gap) 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
    align-content: start;
}

.split-layout__gallery .gallery-image { overflow: hidden; }
.split-layout__gallery img {
    width: 100%; height: auto;
    display: block;
    cursor: pointer;
    transition: transform 0.45s ease;
}
.split-layout__gallery img:hover { transform: scale(1.03); }

/* ============================================================
   ABOUT SEITE
   ============================================================ */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 64px;
    padding: 52px 48px;
    align-items: start;
}

.about-layout__text h1 {
    font-family: var(--font-name);
    font-size: 42px;
    font-weight: 300;
    letter-spacing: 0.01em;
    margin-bottom: 28px;
    line-height: 1.15;
}
.about-layout__text h2 {
    font-family: var(--font-name);
    font-size: 26px;
    font-weight: 300;
    margin: 36px 0 14px;
}
.about-layout__text p {
    font-size: 13px;
    line-height: 1.85;
    color: #2d2d2d;
    margin-bottom: 15px;
}
.about-layout__text a { border-bottom: 1px solid rgba(0,0,0,0.25); }
.about-layout__text a:hover { border-color: var(--color-accent); }

.about-layout__sidebar-img { overflow: hidden; margin-bottom: var(--gap); }
.about-layout__sidebar-img img { width: 100%; height: auto; display: block; }

.about-layout__sidebar-caption {
    font-size: 11px;
    color: var(--color-muted);
    line-height: 1.55;
    padding: 8px 0 18px;
    font-style: italic;
    font-family: var(--font-name);
}

/* ============================================================
   KONTAKT SEITE
   ============================================================ */
.contact-layout {
    padding: 52px 48px;
    max-width: 560px;
}
.contact-layout h1 {
    font-family: var(--font-name);
    font-size: 38px;
    font-weight: 300;
    margin-bottom: 14px;
}
.contact-layout .intro-text {
    font-size: 13px;
    line-height: 1.78;
    color: #555;
    margin-bottom: 36px;
}

.contact-form .form-group { margin-bottom: 20px; }
.contact-form label {
    display: block;
    font-size: 9px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 7px;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    border: none;
    border-bottom: 1px solid #d0d0d0;
    padding: 8px 0;
    font-family: var(--font-body);
    font-size: 14px;
    background: transparent;
    color: var(--color-text);
    outline: none;
    border-radius: 0;
    transition: border-color 0.2s;
}
.contact-form input:focus,
.contact-form textarea:focus { border-bottom-color: var(--color-accent); }
.contact-form textarea { resize: vertical; min-height: 110px; }

.contact-form .submit-btn {
    margin-top: 28px;
    background: var(--color-accent);
    color: #fff;
    border: none;
    padding: 12px 36px;
    font-family: var(--font-nav);
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
}
.contact-form .submit-btn:hover { background: #2a2a2a; transform: translateY(-1px); }
.contact-form .submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.form-feedback { padding: 14px 18px; font-size: 13px; margin-bottom: 20px; display: none; }
.form-feedback.success { background: #f0f7f0; border-left: 3px solid #2d8c2d; color: #1a5c1a; }
.form-feedback.error   { background: #fff5f5; border-left: 3px solid #cc0000; color: #990000; }

/* CF7 Kompatibilität */
.contact-layout .wpcf7 input:not([type=submit]),
.contact-layout .wpcf7 textarea {
    border: none !important; border-bottom: 1px solid #d0d0d0 !important;
    border-radius: 0 !important; padding: 8px 0 !important;
    width: 100% !important; font-family: var(--font-body) !important;
    font-size: 14px !important; box-shadow: none !important; background: transparent !important;
}
.contact-layout .wpcf7 input[type=submit] {
    background: var(--color-accent) !important; color: #fff !important;
    border: none !important; padding: 12px 36px !important;
    font-family: var(--font-nav) !important; font-size: 9px !important;
    letter-spacing: 0.18em !important; text-transform: uppercase !important;
    cursor: pointer !important; border-radius: 0 !important; margin-top: 20px !important;
}

/* ============================================================
   STANDARD SEITE
   ============================================================ */
.default-page {
    padding: 52px 48px;
    max-width: 760px;
}
.default-page h1 {
    font-family: var(--font-name);
    font-size: 36px;
    font-weight: 300;
    margin-bottom: 26px;
}
.default-page p { font-size: 13px; line-height: 1.82; color: #2d2d2d; margin-bottom: 15px; }

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
    border-top: 1px solid #f0f0f0;
    padding: 20px 32px;
    margin-top: 40px;
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.footer-copy {
    font-size: 10px;
    letter-spacing: 0.05em;
    color: var(--color-muted);
}
.footer-nav-list {
    list-style: none;
    display: flex;
    gap: 20px;
}
.footer-nav-list li a {
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--color-muted);
    text-transform: uppercase;
    transition: color 0.15s;
}
.footer-nav-list li a:hover { color: var(--color-accent); }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.93); z-index: 1000;
    align-items: center; justify-content: center; cursor: pointer;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 88vw; max-height: 88vh; object-fit: contain; cursor: default; pointer-events: none; }
.lightbox-close {
    position: absolute; top: 20px; right: 28px;
    color: #fff; font-size: 30px; font-weight: 300;
    cursor: pointer; opacity: 0.6; transition: opacity 0.2s;
    font-family: var(--font-nav); line-height: 1; z-index: 1001;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    color: #fff; font-size: 32px; font-weight: 300;
    cursor: pointer; opacity: 0.4; transition: opacity 0.2s;
    padding: 20px 24px; user-select: none; z-index: 1001;
}
.lightbox-nav:hover { opacity: 1; }
.lightbox-prev { left: 0; }
.lightbox-next { right: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
    .portfolio-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .split-layout { grid-template-columns: 1fr; }
    .split-layout__text { position: static; padding: 36px 28px; }
    .split-layout__gallery { padding: var(--gap); }
    .about-layout { grid-template-columns: 1fr; gap: 32px; padding: 36px 28px; }
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    #site-header { padding: 0 20px; }
    #primary-nav { display: none; }
    .hamburger { display: flex; }
    .contact-layout { padding: 36px 24px; }
    .default-page { padding: 36px 24px; }
}

@media (max-width: 480px) {
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); gap: 2px; padding: 2px; }
    .portfolio-grid-item { aspect-ratio: 1; }
}

/* ============================================================
   SEITENTITEL (separat steuerbar)
   ============================================================ */
.page-title-heading {
    font-family: var(--font-page-title, var(--font-name));
    font-size: var(--page-title-size, 38px);
    font-weight: var(--page-title-weight, 300);
    color: var(--page-title-color, var(--color-text));
    margin-bottom: 28px;
    line-height: 1.2;
    letter-spacing: 0.01em;
}
.page-title-heading.hidden { display: none; }

/* ============================================================
   NAVIGATION HOVER-EFFEKTE
   ============================================================ */

/* 1: Underline (Standard) */
.nav-hover-underline .nav-list li a {
    position: relative;
    padding-bottom: 3px;
}
.nav-hover-underline .nav-list li a::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 0; height: 1px;
    background: var(--nav-color-hover, var(--color-accent));
    transition: width 0.25s ease;
}
.nav-hover-underline .nav-list li a:hover::after,
.nav-hover-underline .nav-list li.current-menu-item > a::after { width: 100%; }

/* 2: Fade */
.nav-hover-fade .nav-list li a { transition: opacity 0.2s ease; }
.nav-hover-fade .nav-list li a:hover { opacity: 0.45; color: var(--nav-color-hover, var(--color-accent)); }

/* 3: Slide Up */
.nav-hover-slide .nav-list li a {
    overflow: hidden;
    display: inline-block;
    transition: transform 0.25s ease;
}
.nav-hover-slide .nav-list li a:hover { transform: translateY(-2px); }

/* 4: Hintergrund */
.nav-hover-bg .nav-list li a {
    padding: 4px 8px;
    border-radius: 2px;
    transition: background 0.2s ease, color 0.2s ease;
}
.nav-hover-bg .nav-list li a:hover {
    background: var(--nav-color-hover, var(--color-accent));
    color: var(--color-bg) !important;
    opacity: 1;
}

/* 5: Bold */
.nav-hover-bold .nav-list li a {
    transition: font-weight 0.15s, letter-spacing 0.15s;
}
.nav-hover-bold .nav-list li a:hover {
    font-weight: 700;
    color: var(--nav-color-hover, var(--color-accent));
}

/* Allgemeine Nav-Farben */
.nav-list li a         { color: var(--nav-color-default, var(--color-muted)); }
.nav-list li a:hover   { color: var(--nav-color-hover, var(--color-accent)); }
.nav-list li.current-menu-item > a,
.nav-list li.current-page-ancestor > a { color: var(--nav-color-active, var(--color-accent)); }

/* ============================================================
   SCROLL-REVEAL ANIMATIONEN
   ============================================================ */

/* Fade In */
[data-reveal].reveal-fade {
    opacity: 0;
    transition: opacity 0.7s ease;
}
[data-reveal].reveal-fade.is-visible { opacity: 1; }

/* Slide Up */
[data-reveal].reveal-slide {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
[data-reveal].reveal-slide.is-visible { opacity: 1; transform: translateY(0); }

/* Zoom In */
[data-reveal].reveal-zoom {
    opacity: 0;
    transform: scale(0.94);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].reveal-zoom.is-visible { opacity: 1; transform: scale(1); }

/* Slide Left */
[data-reveal].reveal-left {
    opacity: 0;
    transform: translateX(-24px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}
[data-reveal].reveal-left.is-visible { opacity: 1; transform: translateX(0); }

/* Verzögerung für gestaffelten Effekt */
[data-reveal]:nth-child(2) { transition-delay: 0.08s; }
[data-reveal]:nth-child(3) { transition-delay: 0.16s; }
[data-reveal]:nth-child(4) { transition-delay: 0.24s; }
[data-reveal]:nth-child(5) { transition-delay: 0.32s; }
[data-reveal]:nth-child(n+6) { transition-delay: 0.38s; }

/* ============================================================
   CONTACT FORM 7 – DESIGN ANGEPASST
   ============================================================ */
.luwi-cf7-wrapper .wpcf7 { margin: 0; }

.luwi-cf7-wrapper .wpcf7-form p {
    margin-bottom: 22px;
}

.luwi-cf7-wrapper .wpcf7-form label {
    display: block;
    font-size: 9px;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-muted);
    margin-bottom: 7px;
    font-family: var(--font-nav);
}

.luwi-cf7-wrapper .wpcf7-form input:not([type=submit]),
.luwi-cf7-wrapper .wpcf7-form textarea,
.luwi-cf7-wrapper .wpcf7-form select {
    width: 100% !important;
    border: none !important;
    border-bottom: 1px solid #d0d0d0 !important;
    border-radius: 0 !important;
    padding: 8px 0 !important;
    font-family: var(--font-body) !important;
    font-size: 14px !important;
    background: transparent !important;
    color: var(--color-text) !important;
    box-shadow: none !important;
    outline: none !important;
    transition: border-color 0.2s !important;
}

.luwi-cf7-wrapper .wpcf7-form input:focus:not([type=submit]),
.luwi-cf7-wrapper .wpcf7-form textarea:focus {
    border-bottom-color: var(--color-accent) !important;
}

.luwi-cf7-wrapper .wpcf7-form textarea { resize: vertical; min-height: 110px !important; }

.luwi-cf7-wrapper .wpcf7-form input[type=submit] {
    margin-top: 10px !important;
    background: var(--color-accent) !important;
    color: var(--color-bg) !important;
    border: none !important;
    padding: 12px 36px !important;
    font-family: var(--font-nav) !important;
    font-size: 9px !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    border-radius: 0 !important;
    transition: background 0.2s, transform 0.15s !important;
}
.luwi-cf7-wrapper .wpcf7-form input[type=submit]:hover {
    background: #2a2a2a !important;
    transform: translateY(-1px) !important;
}

/* CF7 Fehlermeldungen */
.luwi-cf7-wrapper .wpcf7-not-valid-tip {
    font-size: 11px;
    color: #cc0000;
    margin-top: 4px;
    display: block;
}
.luwi-cf7-wrapper .wpcf7-response-output {
    padding: 12px 16px !important;
    font-size: 13px !important;
    border-radius: 0 !important;
    margin: 16px 0 0 !important;
}
.luwi-cf7-wrapper .wpcf7-mail-sent-ok {
    background: #f0f7f0 !important;
    border: none !important;
    border-left: 3px solid #2d8c2d !important;
    color: #1a5c1a !important;
}
.luwi-cf7-wrapper .wpcf7-validation-errors,
.luwi-cf7-wrapper .wpcf7-mail-sent-ng {
    background: #fff5f5 !important;
    border: none !important;
    border-left: 3px solid #cc0000 !important;
    color: #990000 !important;
}
