/*
Theme Name: FOeFotografie
Theme URI: https://felix-oeder.de
Author: Felix Oeder
Description: Cinematic Portfolio Theme
Version: 1.0.1
Text Domain: foefotografie
*/

/**
 * Lokale Fonts (Korrektur: Direkter Pfad im Theme-Ordner ohne ../)
 */
@font-face {
    font-family: 'Syne';
    src: url('fonts/syne-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Inter';
    src: url('fonts/inter-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/**
 * Layout & Masonry Styles für die Galerie-Seiten (Heller White-Cube-Modus, seitenbreit & vertikal zentriert)
 */
body.page-template-page-galerie-seite,
body.page-template-page-galerie-masonry {
    background-color: #ffffff !important;
    color: #111111 !important;
}

.gallery-page-main {
    padding-top: clamp(140px, 15vw, 200px) !important;
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    background-color: #ffffff;
}

/* Titel und Subtext direkt nebeneinander, vertikal zentriert (Desktop) - Abstand nach unten verkleinert auf 30px */
.gallery-intro {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 0 30px 0 !important;
    padding: 0 40px !important;
    box-sizing: border-box;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 30px;
}

/* Unabhängiger Titel auf der Galerie-Seite */
.gallery-page-main .entry-title {
    font-family: 'Syne', sans-serif;
    font-size: 3.5rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #111111;
    line-height: 1.05 !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0;
}

/* Subtext daneben */
.gallery-page-main .entry-content {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    line-height: 1.6 !important;
    color: #555555;
    letter-spacing: 0.5px;
    margin: 0 !important;
    padding: 0 !important;
    text-align: left;
}

/* Verhindert, dass WordPress-interne Absatz-Abstände dazwischenfunken */
.gallery-intro .entry-content p {
    margin: 0 !important;
    padding: 0 !important;
    line-height: inherit !important;
}

.gallery-empty-notice {
    color: #888888;
    font-family: 'Inter', sans-serif;
    text-align: center;
}

/* Vollständig seitenbreites Masonry-Grid mit 5px Abständen */
.s-portfolio-masonry-grid {
    column-count: 4;
    column-gap: 5px;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 5px !important;
    box-sizing: border-box !important;
}

@media (max-width: 1400px) {
    .s-portfolio-masonry-grid {
        column-count: 3;
    }
}

@media (max-width: 1024px) {
    .s-portfolio-masonry-grid {
        column-count: 2;
    }
    .gallery-page-main {
        padding: 170px 0 60px 0 !important;
    }
    /* Mobile: Untereinander angeordnet und horizontal zentriert */
    .gallery-intro {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
        margin-bottom: 20px !important;
        padding: 0 20px !important;
    }
    .gallery-page-main .entry-content {
        text-align: center;
        max-width: 100%;
    }
}

@media (max-width: 600px) {
    .s-portfolio-masonry-grid {
        column-count: 1;
        column-gap: 0;
        padding: 0 5px !important;
    }
    .gallery-page-main {
        padding: 140px 0 40px 0 !important;
    }
    .gallery-page-main .entry-title {
        font-size: 2.2rem;
    }
    .gallery-intro {
        padding: 0 15px !important;
    }
}

.s-masonry-item {
    break-inside: avoid;
    margin-bottom: 5px;
}

.s-masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 2px;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
    will-change: transform;
}

/* Cineastischer Hover-Effekt für Galerie-Bilder */
@media (hover: hover) and (pointer: fine) {
    .s-masonry-item img:hover {
        transform: scale(1.02);
    }
}

.s-masonry-item a {
    cursor: zoom-in;
    display: block;
    overflow: hidden;
    border-radius: 2px;
}

/**
 * Globaler Header: Transparent, Sticky & Mit Verkleinerungs-Effekt beim Scrollen
 */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 999;
    background-color: transparent;
    transition: background-color 0.4s ease, padding 0.4s ease, box-shadow 0.4s ease, border-bottom 0.4s ease;
    box-sizing: border-box;
    padding: 0 50px 0 50px; 
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* Container für Logo links & Navigation rechts */
.site-header-container {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Navigation explizit nach rechts ausrichten */
.main-navigation {
    margin-left: auto;
}

/* Custom Logo Grundeinstellung */
.site-header .custom-logo-link {
    display: inline-block;
    line-height: 0;
}

.site-header .custom-logo {
    height: 120px;
    width: auto;
    display: block;
    object-fit: contain;
    transition: height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Fallback falls kein Logo, sondern Text genutzt wird */
.site-header .site-title a {
    font-family: 'Syne', sans-serif;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #111111;
    text-decoration: none;
    transition: font-size 0.4s ease;
}

/* Navigation Styles */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 40px;
    justify-content: flex-end;
}

.main-navigation a {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #111111;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.main-navigation a:hover {
    opacity: 0.6;
}

/**
 * STICKY & GESCHRUMPFT
 */
.site-header.is-scrolled {
    background-color: rgba(255, 255, 255, 0.80);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 10px 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0);
}

.site-header.is-scrolled .custom-logo {
    height: 50px;
}

.site-header.is-scrolled .site-title a {
    font-size: 1.2rem;
}

/**
 * Cinematic Horizontal Startseite
 */
html.page-template-page-startseite,
body.page-template-page-startseite {
    margin: 0 !important;
    padding: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    background-color: #000 !important;
    overflow: hidden !important;
    font-family: 'Inter', sans-serif;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    box-sizing: border-box !important;
    overscroll-behavior: none !important;
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}

body.page-template-page-startseite::-webkit-scrollbar,
html.page-template-page-startseite::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

body.page-template-page-startseite .site-header,
body.page-template-page-startseite .site-footer {
    display: none !important;
}

/**
 * Top Bar, Branding & Index-Trigger
 */
.cinematic-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 25px 40px;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    pointer-events: none;
}

.cinematic-brand {
    display: inline-block;
    pointer-events: auto;
    text-decoration: none;
}

.cinematic-brand-text {
    color: #fff;
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}

.cinematic-logo-img {
    line-height: 0;
}

.cinematic-logo-img img,
.cinematic-logo-img custom-logo {
    height: 150px;
    width: auto;
    display: block;
    object-fit: contain;
    filter: brightness(0) invert(1) drop-shadow(0 1px 8px rgba(0, 0, 0, 0.9));
}

.cinematic-index-toggle {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: #fff;
    font-family: 'Syne', sans-serif;
    font-size: 1.05rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    border-radius: 30px;
    cursor: pointer;
    padding: 12px 26px;
    margin: 0;
    transition: all 0.3s ease;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9);
}

@media (hover: hover) and (pointer: fine) {
    .cinematic-index-toggle:hover {
        background-color: #fff;
        color: #000;
        border-color: #fff;
        text-shadow: none;
    }
}

/**
 * Fullscreen Index Overlay
 */
.cinematic-index-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background-color: #000000;
    z-index: 200;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 80px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.cinematic-index-overlay.active {
    opacity: 1;
    visibility: visible;
}

.cinematic-index-close {
    position: absolute;
    top: 40px;
    right: 60px;
    background: none;
    border: none;
    color: #fff;
    font-family: 'Syne', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    padding: 10px;
}

.cinematic-index-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-width: 900px;
    position: relative;
    z-index: 2;
}

.cinematic-index-item {
    margin-bottom: 20px;
}

.cinematic-index-link {
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Syne', sans-serif;
    font-size: 3.5rem;
    font-weight: 400;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: inline-block;
    word-break: break-word;
}

@media (hover: hover) and (pointer: fine) {
    .cinematic-index-link:hover {
        color: #ffffff;
        padding-left: 20px;
    }
}

.cinematic-index-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.cinematic-index-preview img {
    position: absolute;
    top: 50%;
    left: 70%;
    transform: translate(-50%, -50%);
    width: 450px;
    height: 300px;
    object-fit: cover;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/**
 * Horizontaler Slider
 */
.cinematic-container {
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    overflow-x: scroll !important;
    overflow-y: hidden !important;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    bottom: 0 !important;
    right: 0 !important;
}
.cinematic-container::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.cinematic-overlay-static {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    background: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 60px;
    box-sizing: border-box;
    z-index: 2;
    will-change: transform, opacity;
    cursor: default;
    pointer-events: auto;
}

.cinematic-slide {
    flex: 0 0 100vw !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    scroll-snap-align: start;
    position: relative !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    padding: 0 !important;
}

.cinematic-img-wrap {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    will-change: transform;
}

.cinematic-slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transform: scale(1.08);
    transition: filter 0.1s ease-out, transform 0.1s ease-out;
    filter: blur(0px);
}

.cinematic-slide[data-index="0"] .cinematic-img-wrap img {
    transform: none !important;
}

.cinematic-overlay-static:hover .cinematic-title,
.cinematic-overlay-static:hover .cinematic-subtitle {
    transform: none !important;
}

.cinematic-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto; 
    background: none;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 60px;
    box-sizing: border-box;
    text-decoration: none;
    z-index: 2;
    will-change: transform, opacity;
    cursor: pointer;
    pointer-events: auto; 
}

.cinematic-title {
    color: #ffffff;
    font-family: 'Syne', sans-serif;
    font-size: 5rem;
    font-weight: 400;
    letter-spacing: 2px;
    margin: 0;
    text-transform: uppercase;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    word-break: break-word;
    display: inline-block;
    width: fit-content;
    transform-origin: left bottom;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cinematic-slide[data-index="0"] .cinematic-title {
    text-transform: none !important;
}

.cinematic-subtitle {
    color: #ffffff;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 2rem;
    margin-top: 0 !important;
    letter-spacing: 1.2px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
    word-break: break-word;
    display: inline-block;
    width: fit-content;
    transform-origin: left bottom;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (hover: hover) and (pointer: fine) {
    .cinematic-overlay:hover .cinematic-title,
    .cinematic-overlay:hover .cinematic-subtitle {
        transform: scale(1.03);
    }
}

/**
 * Fortschrittsanzeige
 */
.cinematic-indicators {
    position: fixed;
    bottom: 30px;
    right: 60px;
    display: flex;
    gap: 10px;
    z-index: 10;
    pointer-events: auto;
}

.cinematic-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.4);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.cinematic-dot.active {
    background-color: #ffffff;
    transform: scale(1.3);
}

/**
 * Erweiterte Mobile-Anpassungen (< 768px & Touch-Devices)
 */
@media (max-width: 768px) {
    html.page-template-page-startseite,
    body.page-template-page-startseite {
        cursor: auto;
        overflow: hidden !important;
    }
    
    .cinematic-top-bar {
        padding: 15px 20px;
    }

    .cinematic-brand-text {
        font-size: 0.9rem;
        letter-spacing: 2px;
    }

    .cinematic-logo-img img,
    .cinematic-logo-img custom-logo {
        height: 100px;
    }

    .cinematic-index-toggle {
        padding: 10px 20px;
        font-size: 0.95rem;
        letter-spacing: 2px;
        margin: 0;
    }

    .cinematic-index-overlay {
        padding: 90px 20px 30px 20px;
        justify-content: flex-start;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .cinematic-index-close {
        top: 20px;
        right: 20px;
        font-size: 0.9rem;
    }

    .cinematic-index-list {
        max-width: 100%;
    }

    .cinematic-index-item {
        margin-bottom: 15px;
    }

    .cinematic-index-link {
        font-size: 1.8rem;
        letter-spacing: 1px;
    }

    .cinematic-index-preview {
        display: none !important;
    }

    .cinematic-overlay {
        padding: 30px 20px;
        background: none;
    }

    .cinematic-title {
        font-size: 3rem;
        letter-spacing: 1.5px;
        line-height: 1.15;
    }

    .cinematic-subtitle {
        font-size: 1.6rem;
        letter-spacing: 1.5px;
        margin-top: 0 !important;
    }

    .cinematic-indicators {
        right: 20px;
        bottom: 20px;
    }
}

@media (max-width: 1024px) {
    .site-header {
        padding: 15px 20px;
    }
    
    .site-header.is-scrolled {
        padding: 10px 20px;
    }

    .site-header .custom-logo {
        height: 80px;
    }

    .site-header.is-scrolled .custom-logo {
        height: 40px;
    }

    .main-navigation ul {
        display: none;
    }
    
    .main-navigation.toggled ul {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        padding: 25px;
        box-sizing: border-box;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }

    .main-navigation.toggled a {
        font-size: 1.2rem;
    }
    
    .site-header .menu-toggle {
        margin-left: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 10px;
    }

    .burger-icon {
        display: inline-flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 16px;
    }

    .burger-icon span {
        display: block;
        height: 2px;
        width: 100%;
        background-color: currentColor;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .menu-toggle[aria-expanded="true"] .burger-icon span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle[aria-expanded="true"] .burger-icon span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle[aria-expanded="true"] .burger-icon span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .cinematic-index-overlay {
        padding-top: 70px;
        padding-bottom: 20px;
    }
    .cinematic-index-link {
        font-size: 1.4rem;
    }
    .cinematic-index-item {
        margin-bottom: 10px;
    }
    .cinematic-overlay {
        padding: 20px;
    }
    .cinematic-title {
        font-size: 1.6rem;
    }
}

a.cinematic-index-link,
a.cinematic-index-link:visited,
a.cinematic-index-link:active {
    color: rgba(255, 255, 255, 0.8);
}

@media (hover: hover) and (pointer: fine) {
    a.cinematic-index-link:hover {
        color: #ffffff;
    }
}

.site-header .custom-logo-link,
.cinematic-brand {
    position: relative;
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

@media (hover: hover) and (pointer: fine) {
    .site-header .custom-logo-link:hover .custom-logo {
        transform: scale(1.06) rotate(-1deg);
        filter: drop-shadow(0 0 12px rgba(0, 0, 0, 0.15));
    }

    .cinematic-brand:hover .cinematic-logo-img img,
    .cinematic-brand:hover .cinematic-logo-img custom-logo {
        transform: scale(1.06) rotate(-1deg);
        filter: brightness(0) invert(1) drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
    }
    
    .cinematic-brand:hover .cinematic-brand-text {
        letter-spacing: 4px;
        color: #ffffff;
        text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
    }
}

.site-footer {
    width: 100%;
    background-color: #ffffff;
    color: #555555;
    padding: 40px 50px;
    box-sizing: border-box;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.site-footer-inner {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-footer .copyright {
    margin: 0;
    color: #777777;
}

.footer-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 30px;
}

.footer-navigation ul li {
    margin: 0;
    padding: 0;
}

.footer-navigation a {
    color: #111111;
    font-family: 'Syne', sans-serif;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-navigation a:hover {
    opacity: 0.6;
}

@media (max-width: 768px) {
    .site-footer {
        padding: 30px 20px;
    }
    
    .site-footer-inner {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .footer-navigation ul {
        justify-content: center;
    }
}