/* ========================================================== */
/* 1. ROOT-VARIABLEN                                          */
/* ========================================================== */

:root {
    /* Farbpalette */
    --color-primary: #95ab42;
    --color-background-dark: #0a0a0e;
    --color-text-light: #ffffff;
    --color-text-dark: #0a0a0e;
    --color-text-strong: #cad5a1;
    --color-text-highlight: #cad5a1;
    --color-lightboxb-btn: #9d9d9f;

    /* Header-Höhen */
    --header-height-mobile: 3.5rem; /* 56px */
    --header-height-desktop: 4.5rem; /* 72px */

    /* aktive Header-Höhe (wird im Breakpoint überschrieben) */
    --header-height: var(--header-height-mobile);

    /* Hero-Variablen */
    --hero-content-offset: 50vh; /* Abstand des Textes vom oberen Bildrand */
    --hero-fine-tune: 2rem; /* Feintuning für Desktop */
}

/* Desktop-Header nur für Mausgeräte */
@media (hover: hover) and (pointer: fine) {
    :root {
        --header-height: var(--header-height-desktop);
    }
}

/* ========================================================== */
/* 2. RESET & BASE                                             */
/* ========================================================== */

/* Box-Sizing */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* HTML & Body Grundstruktur */
html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

/* Body Typografie & Grundlayout */
body {
    font-family: "Exo2", sans-serif;
    font-size: 16px;
    line-height: 1.5rem;
    font-weight: 200;
    letter-spacing: 0.035rem;
    color: var(--color-text-light);
    background-color: var(--color-background-dark);

    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Hauptbereich */
main {
    flex: 1 0 auto;
    min-height: calc(100vh + 1px);
    /* globaler Header-Offset kommt in Block 5 */
}

/* Grundlegende Elemente */
strong {
    color: var(--color-text-strong);
}

.text-highlight {
    color: var(--color-text-highlight);
}

h1 {
    font-family: "Comforter", "Exo2", sans-serif;
    font-size: 2.5rem;
    line-height: 2.8rem;
    margin: 0 auto;
    text-align: center;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Webfonts */
@font-face {
    font-family: "Exo2";
    src: url("../fonts/Exo_2/Exo2-VariableFont_wght.woff2") format("woff2");
    font-weight: 100 900;
    font-stretch: 100%;
    font-display: swap;
    font-style: normal;
}

@font-face {
    font-family: "Comforter";
    src: url("../fonts/Comforter/Comforter-Regular.woff2") format("woff2");
    font-weight: 400;
    font-stretch: 100%;
    font-display: swap;
    font-style: normal;
}

/* ========================================================== */
/* 3. LAYOUT (WRAPPER, SPACINGS, BUTTONS)                     */
/* ========================================================== */

/* Wrapper */
.wrapper {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Spacings */
.spacer-s {
    height: 0.5rem;
}
.spacer-m {
    height: 0.75rem;
}
.spacer-l {
    height: 1.5rem;
}
.spacer-xl {
    height: 3rem;
}
.spacer-xxl {
    height: 6rem;
}

/* Button-Gruppe */
.btn-grp {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    justify-content: center;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 0.75rem 1rem;
    border-radius: 0.25rem;
    text-align: center;

    flex: 1 1 auto; /* gleiche Breite */
    white-space: nowrap; /* kein Umbruch */
}

/* Primary Button */
.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    border: solid 1px var(--color-primary);
    transition: background-color 0.2s ease;
}
.btn-primary:hover {
    background-color: rgba(149, 171, 66, 0.75);
    cursor: pointer;
}

/* Secondary Button */
.btn-secondary {
    background-color: transparent;
    color: var(--color-primary);
    border: solid 1px var(--color-primary);
    transition: background-color 0.2s ease;
}
.btn-secondary:hover {
    background-color: rgba(149, 171, 66, 0.25);
    cursor: pointer;
}

/* ========================================================== */
/* 4. HEADER & NAVIGATION                                     */
/* ========================================================== */

/* Header */
#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 3000;
    width: 100%;
    height: var(--header-height);
    background-color: var(--color-background-dark);
    display: flex;
    align-items: center;
    border-bottom: 1px solid #222;
}

/* Header-Wrapper */
#header .wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Logo */
.logo-svg {
    width: 138px;
    height: 17px;
    display: block;
    background-image: url(logo/ricardostaats.svg);
    background-repeat: no-repeat;
    background-size: contain;
    margin-top: 2px;
}

/* Hamburger Button */
.hamburger-menu-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 2101;
}

.hamburger-menu-btn .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 0.3125rem 0;
    background-color: #fff;
    transition: 0.3s;
}

/* Hamburger Animation */
.hamburger-menu-btn.is-open .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger-menu-btn.is-open .bar:nth-child(2) {
    opacity: 0;
}
.hamburger-menu-btn.is-open .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Navigation (Mobile Default) */
.navigation {
    display: none;
}

/* Mobile Navigation Overlay */
.navigation.is-open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100% - var(--header-height));
    background-color: rgba(10, 10, 14, 0.95);
    z-index: 2100;
    padding-top: 2rem;
}

/* Mobile Navigation List */
.navigation.is-open ul {
    list-style: none;
    padding: 0;
    text-align: center;
}

.navigation.is-open ul li {
    margin: 1.5rem 0;
}

.navigation.is-open ul li a {
    font-size: 1.5rem;
    color: #fff;
}

.navigation.is-open ul li a.active {
    border-bottom: 2px solid var(--color-primary);
}

/* Desktop Navigation (wird in Media Queries aktiviert) */
.navigation ul {
    list-style: none;
    margin: 0;
}

.navigation ul li {
    margin-left: 1.5rem;
}

.navigation ul li a {
    position: relative;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

/* Desktop Hover/Active Underline */
.navigation ul li a::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}

.navigation ul li a:hover::after,
.navigation ul li a.active::after {
    width: 100%;
}

.navigation ul li a:hover {
    color: var(--color-primary);
}

/* ========================================================== */
/* 5. GLOBALER HEADER-OFFSET                                  */
/* ========================================================== */

/* Globaler Abstand für alle Seiten unter dem fixierten Header */
main {
    padding-top: var(--header-height);
}

/* ========================================================== */
/* 6. HERO-SYSTEM (vereinheitlicht, Bild immer fixed)          */
/* ========================================================== */

/* HERO CONTAINER */
.hero {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    padding-bottom: 4rem; /* Abstand zum unteren Fade */
}

/* HERO IMAGE — bleibt auf ALLEN Breakpoints FIXED */
.hero-image {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: 75vh;
    background-image: url(img/BG-test.webp);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
}

/* Unterer Fade des Hero-Bildes */
.hero-image::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 30vh;
    background: linear-gradient(to bottom, rgba(10, 10, 14, 0) 0%, rgba(10, 10, 14, 1) 100%);
    pointer-events: none;
}

/* HERO CONTENT */
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    width: 100%;

    /* Abstand vom oberen Bildrand */
    padding-top: var(--hero-content-offset);
    padding-bottom: 3rem;
}

/* Hintergrund-Fade hinter dem Text */
.hero-content::before {
    content: "";
    position: absolute;
    top: var(--hero-content-offset);
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(10, 10, 14, 0) 0%,
        var(--color-background-dark) 10%,
        var(--color-background-dark) 100%
    );
    z-index: -1;
}

.hero-content .wrapper {
    max-width: 600px;
    margin: 0 auto;
}

/* HERO TEXT */
.hero-content p {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

/* ========================================================== */
/* 7. PORTFOLIO & GALERIE                                     */
/* ========================================================== */

/* Back-Link Container */
.back-link-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

.back-link-gallery {
    display: inline-block;
    padding: 0 0 0.5rem 0;
    text-decoration: none;
    color: var(--color-text-light);
    font-family: "Exo2", sans-serif;
    font-size: 0.9rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.back-link-gallery:hover {
    opacity: 1;
    color: var(--color-primary);
}

.back-link-gallery .arrow {
    margin-right: 5px;
}

/* Portfolio Section */
#portfolio-section {
    margin-top: 2rem;
    padding-top: 1rem;
}

#portfolio-section .wrapper {
    max-width: none;
    width: 100%;
    margin: 0 auto;
}

#portfolio-section p {
    text-align: center;
}

/* Filter-Gruppe */
.radio-grp {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 2rem auto;
    display: block;
}

/* Label über dem Filter */
.radio-grp .form-label {
    position: absolute;
    top: -10px;
    left: 12px;
    background-color: var(--color-background-dark);
    padding: 0 5px;
    font-size: 0.8rem;
    color: #7a7a80;
    z-index: 5;
    pointer-events: none;
}

/* Mobile Filter Button */
.mobile-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0.75rem;
    border: 1px solid #7a7a80;
    border-radius: 0.25rem;
    background-color: transparent;
    color: #fff;
    cursor: pointer;
}

.radio-grp:focus-within .mobile-filter {
    border-color: var(--color-primary) !important;
}

/* Filter Options Menu */
.filter-options-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--color-background-dark);
    border: 1px solid var(--color-primary);
    z-index: 100;
}

/* Custom Filter Menu */
#customFilterMenu.filter-options-menu {
    display: none;
    flex-direction: column !important;
    padding: 0 !important;
    margin: 0 !important;
    z-index: 99999 !important;
}

/* Radio Inputs verstecken */
#customFilterMenu input[type="radio"] {
    display: none !important;
}

/* Klickbare Filter-Labels */
#customFilterMenu .sub-radio-btn {
    display: block !important;
    width: 100% !important;
    padding: 0.8rem !important;
    margin: 0 !important;
    cursor: pointer !important;
    color: var(--color-text-light) !important;
    text-align: left !important;
    background-color: transparent;
    transition: background-color 0.2s ease;
}

#customFilterMenu .sub-radio-btn:hover {
    background-color: var(--color-primary) !important;
    color: var(--color-background-dark) !important;
}

/* Standard Sub-Radio */
.sub-radio-btn {
    display: block;
    padding: 1rem;
    color: #fff;
    cursor: pointer;
    text-align: left;
}

.filter-options-menu input[type="radio"] {
    display: none;
}

input[type="radio"]:checked + .sub-radio-btn {
    background-color: var(--color-primary);
}

/* Galerie Grid */
.galerie-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding: 0 1rem;
}

/* ========================================================== */
/* FINAL: GALERIE ITEM & HOVER LOGIK                          */
/* ========================================================== */

.galerie-item {
    position: relative;
    overflow: hidden;
    display: block;
    background-color: var(--color-background-dark);
    border-radius: 0.25rem;
}

.galerie-item img {
    width: 100%;
    height: auto;
    display: block;
    filter: grayscale(70%);
    transition:
        transform 0.5s ease,
        filter 0.5s ease;
}

/* Deaktivierung alter Pseudo-Elemente */
.galerie-item::before {
    content: none;
    display: none;
}

/* Kategorie-Balken (Text + Hintergrund kombiniert) */
.galerie-item::after {
    content: attr(data-category);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;

    /* Mindesthöhe für Stabilität bei Zeilenumbrüchen */
    min-height: 20%;

    /* Perfekte Zentrierung */
    display: flex;
    align-items: center;
    justify-content: center;

    /* Abstände & Box-Modell */
    padding: 0.5rem 1rem;
    box-sizing: border-box;

    /* Typografie */
    color: var(--color-text-light);
    font-size: 0.8rem;
    font-weight: 200;
    text-align: center;
    line-height: 1.2;

    /* Hintergrund Mobile (Standardmäßig 70%) */
    background-color: rgba(10, 10, 14, 0.7);
    z-index: 10;

    /* Transition für das Aufblenden auf Desktop */
    transition: background-color 0.3s ease;
}

/* Filter-Modus */
body.no-filter-page .radio-grp {
    display: none !important;
}

/* Detail-Thumbnails ausblenden */
.galerie-item.is-detail {
    display: none !important;
}

/* Filter aktiv → Overlay ausblenden */
.galerie-container.is-filtered .galerie-item::after,
.galerie-container.is-filtered .galerie-item::before {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Filter aktiv → Hover-Effekt anpassen */
.galerie-container.is-filtered .galerie-item:hover img {
    filter: none !important;
    transform: scale(1.02);
}

/* ========================================================== */
/* 8. Lightbox Content & Responsive Scaling                   */
/* ========================================================== */

.lightbox {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    /* Sache 1: Fokus-Ring global unterbinden */
    outline: none !important;
}

.lightbox.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Der Container für den Inhalt (Bild + Caption) */
.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Verankert den Inhalt oben, um Beschnitt bei Überlauf zu verhindern */
    justify-content: flex-start;
    /* 20px oben für Optik, 80px unten als Puffer für das Ende der Description */
    padding: 20px 20px 80px 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch; /* Geschmeidiges Scrollen auf iOS */
    width: 100%;
    height: 100%;

    outline: none !important; /* Entfernt den Standard-Fokus-Rahmen */
    box-shadow: none !important; /* Sicherung gegen Browser-Schatten */
    -webkit-tap-highlight-color: transparent; /* Entfernt das blaue Flashen auf Mobile */
}

/* Das Bild im Normalzustand */
#lightbox-img {
    /* 104px Abzug sorgt für Sichtbarkeit von Headline + 1. Zeile Description */
    max-height: calc(100vh - 104px) !important;
    max-width: 95%;
    width: auto;
    height: auto;
    object-fit: contain;
    margin: 0 auto;
    display: block;
    /* Verhindert, dass das Bild gestaucht wird, wenn der Text Platz beansprucht */
    flex-shrink: 0;
}

/* ========================================================== */
/* ZOOM-LOGIK (Ersetzt den alten "Width Fix")                 */
/* ========================================================== */

/* ZOOM-MODUS: Oben-Mittig Ausrichtung */
.lightbox.is-zoomed .lightbox-content {
    justify-content: flex-start; /* Bild startet oben */
}

/* 2. Bild nimmt intelligente Breite an */
/*
.lightbox.is-zoomed #lightbox-img {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    top: 0 !important;
    max-width: calc(100vw - 40px) !important;
    max-height: none !important;
}*/

.lightbox.is-zoomed #lightbox-img {
    max-width: calc(100vw - 40px) !important;
    width: auto !important;
    max-height: none !important;
    height: auto !important;
    cursor: zoom-out;
    margin: 0 auto;
}

/* Caption */
#lightbox-caption {
    width: 100%;
    max-width: 700px;
    /* Fester Abstand für ein konsistentes Design auf Desktop & Mobile */
    margin-top: 22px !important;
    text-align: center;
    color: #ffffff;
    flex-shrink: 0;
}

#lightbox-caption .caption-wrapper {
    width: 100% !important;
    max-width: 1200px;
}

/* Caption Wrapper (mit Text) */
#lightbox-caption .caption-wrapper:has(.caption-text) {
    width: 92% !important;
}

/* Caption Wrapper Base */
.caption-wrapper {
    display: block !important;
    width: 92% !important;
    max-width: 1200px;
    margin: 15px auto;
    position: relative;
    text-align: center;
}

/* Caption Text */
.caption-text {
    width: 100% !important;
    display: block !important;
    transition: max-height 0.35s ease;
}

/* Collapsed Caption */
.caption-text.is-collapsed {
    display: -webkit-box !important;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
    max-height: 1.5em;
    position: relative;
    transition: max-height 0.3s ease;
}

/* Expanded Caption */
.caption-text:not(.is-collapsed) {
    max-height: 500px;
}

/* Caption Headline */
.caption-headline {
    display: block;
    width: 100%;
    color: #ffffff !important;
    font-weight: bold;
    font-size: 1.2rem; /* Aus meinem Vorschlag */
    margin-bottom: 6px; /* Ein Mittelweg für den perfekten Look */
}

/* Caption Description */
.caption-description {
    display: block; /* Damit Abstände sauber greifen */
    color: #ffffff;
    opacity: 0.9;
    font-size: 1rem; /* Aus meinem Vorschlag */
    line-height: 1.5; /* Für bessere Lesbarkeit bei viel Text */
}

/* Read More Button */
.read-more-btn {
    display: none;
    color: var(--color-primary);
    cursor: pointer;
    text-decoration: underline;
    font-size: 0.85rem;
    margin-top: 6px;
}

.read-more-btn.is-expanded {
    position: relative !important;
    display: block !important;
    right: auto !important;
    bottom: auto !important;
    margin-top: 12px !important;
    padding-left: 0 !important;
    background: none !important;
}

/* Lightbox Buttons (Prev/Next/Close) */
.lightbox-btn {
    position: fixed;
    width: 44px;
    height: 44px;
    /*background: color-mix(in srgb, var(--color-background-dark), transparent 40%);*/
    background-color: transparent;
    color: var(--color-lightboxb-btn);
    border: 1px solid var(--color-lightboxb-btn);
    border-radius: 6px;
    cursor: pointer;
    z-index: 200000 !important;
    pointer-events: auto !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.lightbox-btn:hover {
    background-color: transparent;
    transform: translateY(-50%) scale(1.1);
    transition: all 0.2s ease;
    cursor: pointer;
}

/* Close Button */
.lightbox-close {
    top: 20px;
    right: 20px;
    font-size: 3rem;
    color: var(--color-lightboxb-btn) !important;
    border: none;

    /* Mischen der Variable mit 'transparent', um 50% bzw. 80% Deckkraft zu erhalten */
    /*text-shadow:
        0 0 10px color-mix(in srgb, var(--color-background-dark), transparent 50%),
        0 0 2px color-mix(in srgb, var(--color-background-dark), transparent 20%);*/

    z-index: 2000;
}

.lightbox-close:hover {
    transform: rotate(-180deg); /* 90° nach links */
}

/* Prev/Next Buttons */
.lightbox-prev {
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

/* Zoom Mode */
.lightbox.is-zoomable #lightbox-img {
    cursor: zoom-in;
}

.lightbox.is-zoomable #lightbox-img.is-zoomed {
    cursor: zoom-out;
    display: inline-block;
    margin: 0 0 2rem 0; /* Breite niemals größer als Viewport minus Gutter */
    max-width: calc(
        100vw - 40px
    ); /* 20px padding pro Seite; anpassen falls nötig */ /* Höhe darf größer werden (vertikales Scrollen erlaubt) */
    max-height: none; /* Keine erzwungene Mindestgröße mehr */
    min-width: auto;
    min-height: auto; /* Standardverhalten: Breite automatisch, Höhe automatisch */
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Mobile: sicheres, flüssiges Scrollen innerhalb der Lightbox */
.lightbox-content {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch; /* iOS: smoother scrolling */
    touch-action: pan-y; /* erlaubt vertikales Scrollen */
    overscroll-behavior: contain; /* verhindert Background-bounce */
}

/* Overlay selbst darf keine Touch-Aktionen blockieren, damit inneres pan-y greifen kann */
.lightbox {
    /* kein touch-action: none hier — das würde inneres Scrollen blockieren */
    -webkit-overflow-scrolling: touch;
}

/* ========================================================== */
/* 9. VIDEO-CONTAINER (für Animationen-Seite)                 */
/* ========================================================== */

.video-container {
    width: 100%;
    max-width: 1400px; /* gleiche Max-Breite wie deine Galerie */
    margin: 0 auto;

    /* Automatische Höhe im 16:9 Format */
    aspect-ratio: 16 / 9;

    background-color: #000;
    border-radius: 0.25rem;
    overflow: hidden;
}

.video-container iframe {
    width: 100% !important;
    height: 100% !important;
    border: none;
    display: block;
}

/* ========================================================== */
/* 10. KONTAKT & FORMULARE                                    */
/* ========================================================== */

.input-group {
    position: relative;
    margin-bottom: 1.5rem;
    text-align: left;
}

.input-group input,
.input-group textarea {
    width: 100%;
    padding: 1rem 0.75rem;
    border: 1px solid #7a7a80;
    border-radius: 0.25rem;
    background: transparent;
    color: #fff;
    outline: none;
}

.input-group label {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 12px;
    padding: 0 0.25rem;
    color: #7a7a80;
    pointer-events: none;
    transition: 0.2s ease;
    z-index: 1;
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
    transform: translateY(-2.3rem) translateX(-0.3125rem);
    font-size: 0.8rem;
    color: var(--color-primary);
    background-color: var(--color-background-dark);
}

.input-group textarea {
    width: 100%;
    padding: 1.5rem 0.75rem 0.5rem 0.75rem;
    border: 1px solid #7a7a80;
    border-radius: 0.25rem;
    background: transparent;
    color: #fff;
    outline: none;
    resize: vertical;
    line-height: 1.5rem;
    display: block;
}

.input-group textarea:focus + label,
.input-group textarea:not(:placeholder-shown) + label {
    transform: translateY(-1.8rem) translateX(-0.3125rem);
    font-size: 0.8rem;
    color: var(--color-primary);
    background-color: var(--color-background-dark);
}

.input-group textarea {
    vertical-align: top;
}

.input-group textarea + label {
    top: 1rem;
    transform: translateY(0);
}

.input-group textarea::placeholder {
    vertical-align: top;
}

#contact-main .wrapper {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

#contact-main,
#impressum-main {
    padding-top: calc(var(--header-height) + 48px);
}

#contact-main .btn-primary {
    display: block;
    width: 100%;
    margin-top: 2rem;
}

/* ========================================================== */
/* 11. UTILITIES                                              */
/* ========================================================== */

/* Visibility */
.hidden {
    display: none !important;
}

.invisible {
    visibility: hidden !important;
}

/* Text Utilities */
.text-center {
    text-align: center !important;
}

.text-left {
    text-align: left !important;
}

.text-right {
    text-align: right !important;
}

/* Layout Utilities */
.full-width {
    width: 100% !important;
}

.max-width-1400 {
    max-width: 1400px !important;
    margin: 0 auto !important;
}

.no-padding {
    padding: 0 !important;
}

.no-margin {
    margin: 0 !important;
}

/* Scroll Lock (z. B. für Lightbox) */
.no-scroll {
    overflow: hidden !important;
    height: 100vh !important;
}

/* Z-Index Helpers */
.z-top {
    z-index: 9999 !important;
}

.z-behind {
    z-index: -1 !important;
}

/* Pointer Utilities */
.pointer-none {
    pointer-events: none !important;
}

.pointer-auto {
    pointer-events: auto !important;
}

/* Opacity */
.opacity-0 {
    opacity: 0 !important;
}

.opacity-100 {
    opacity: 1 !important;
}

/* Flex Utilities */
.flex {
    display: flex !important;
}

.flex-center {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

.flex-column {
    display: flex !important;
    flex-direction: column !important;
}

.flex-between {
    display: flex !important;
    justify-content: space-between !important;
}

/* Spacing Helpers */
.mt-1 {
    margin-top: 1rem !important;
}

.mb-1 {
    margin-bottom: 1rem !important;
}

.mt-2 {
    margin-top: 2rem !important;
}

.mb-2 {
    margin-bottom: 2rem !important;
}

/* ========================================================== */
/* 11b. FOOTER                                                 */
/* ========================================================== */

footer {
    flex-shrink: 0;
    background-color: var(--color-background-dark);
    padding: 2rem 0;
    position: relative;
    z-index: 20;
    text-align: center;
}

/* Footer Navigation */
.footer-navigation ul {
    list-style: none; /* Bullet-Points entfernen */
    margin: 0;
    padding: 0;

    display: flex; /* Elemente nebeneinander */
    justify-content: center; /* zentriert */
    align-items: center;
    gap: 1rem; /* Abstand zwischen den Links */
}

/* Footer Links */
.footer-navigation a {
    color: var(--color-text-light);
    opacity: 0.8;
    font-size: 0.85rem;
    text-decoration: none;
    transition:
        opacity 0.2s ease,
        color 0.2s ease;
}

.footer-navigation a:hover {
    opacity: 1;
    color: var(--color-primary);
}

/* ========================================================== */
/* 12. MEDIA QUERIES (geordnet)                               */
/* ========================================================== */

/* ========================================================== */
/* 12.0 GLOBAL LAYOUT (Desktop)                               */
/* ========================================================== */
@media (min-width: 1200px) {
    #header,
    main,
    footer {
        max-width: 1400px;
        margin: 0 auto;
        width: 100%;
    }

    h1 {
        font-size: 3.5rem;
        line-height: 1.2;
    }
}

/* ========================================================== */
/* 12.1 HEADER & NAVIGATION (Desktop)                         */
/* ========================================================== */
/* Mobile bleibt Mobile – auch im Landscape */
@media (hover: none) and (pointer: coarse) {
    @media (max-height: 599px), (max-width: 839px) {
        .navigation {
            display: none;
        }
        .hamburger-menu-btn {
            display: block;
        }
    }
}

/* Desktop-Navigation nur auf echten Desktop-Screens */
@media (hover: hover) and (pointer: fine) and (min-width: 840px) and (min-height: 600px) {
    .hamburger-menu-btn {
        display: none;
    }

    #header .wrapper {
        display: flex;
        align-items: center;
        height: var(--header-height);
    }

    .navigation {
        display: flex;
        align-items: center;
        height: 100%;
    }

    .navigation.is-open {
        display: none !important;
    }

    .navigation ul {
        display: flex;
        align-items: center;
        height: 100%;
        margin: 0;
        padding: 0;
    }

    .navigation ul li a {
        display: flex;
        align-items: center;
        height: 100%;
        padding: 0;
        color: var(--color-text-light);
        text-decoration: none;
        line-height: 1.75;
    }

    .navigation ul li a span {
        display: inline-block;
        padding: 0 0.75rem 6px 0.75rem;
        border-bottom: 2px solid transparent;
        transition: border-color 0.3s ease;
    }

    .navigation ul li a:hover {
        color: var(--color-primary);
    }

    .navigation ul li a:hover span {
        border-bottom-color: var(--color-primary);
    }

    .navigation ul li a.active {
        color: var(--color-text-light);
    }

    .navigation ul li a.active span {
        border-bottom-color: var(--color-primary);
    }
}

/* ========================================================== */
/* 12.2 HERO-SYSTEM                                            */
/* ========================================================== */

@media (orientation: landscape) {
    .hero {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        min-height: 100vh;
        padding-top: 2rem;
        position: relative;
    }

    .hero-content {
        order: 1;
        flex: 1 1 55%;
        padding-top: 1.5rem;
        padding-right: 45vw;
        text-align: left;
        z-index: 2;
        width: auto;
    }

    .hero-content::before {
        display: none !important;
    }

    .hero-content .wrapper {
        max-width: 600px;
        margin: 0 auto;
        padding-top: 1rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .hero-image {
        position: fixed;
        top: var(--header-height);
        right: 0;
        left: auto;
        width: 45vw; /* feste Breite – verhindert das Verschwinden */
        height: calc(100vh - var(--header-height));
        background-size: cover;
        background-position: 60% center;
        z-index: 1;
    }

    .hero-image::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: 20%;
        background: linear-gradient(to bottom, transparent, #0d0d0d);
        pointer-events: none;
        z-index: 2;
    }

    .hero-content h1 {
        margin-bottom: 0.6rem;
        text-align: left;
    }

    .hero-content p {
        font-size: 0.9rem;
        line-height: 1.35;
        margin-bottom: 0.9rem;
    }
}

@media (orientation: landscape) and (hover: none) and (pointer: coarse) {
    .btn-grp {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.6rem;
        margin-top: 1rem;
    }
}

/* Desktop Hero nur für echte Desktop-Geräte */
@media (hover: hover) and (pointer: fine) and (min-width: 840px) {
    .hero {
        display: block;
        width: auto;
        padding-top: 4rem;
        padding-bottom: 6rem;
    }

    .hero-image {
        top: 2rem;
        height: calc(70vh - 2rem);
        background-position-x: center;
        background-position-y: 20%;
    }

    .btn-grp {
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-start;
    }
}

/* iPad Pro Portrait – Hero-Content wieder zentrieren */
@media (min-width: 840px) and (max-width: 1199px) and (orientation: portrait) and (hover: none) and (pointer: coarse) {
    body.index-page .hero-content {
        width: 100%;
    }
}

/* Large Desktop Hero */
@media (min-width: 1200px) {
    .hero {
        display: flex;
        justify-content: space-between;
        align-items: center;
        min-height: 100vh;
        padding-top: var(--header-height);
        padding-bottom: 6rem;
        position: relative;
    }

    .hero .wrapper {
        padding: 0;
    }

    .hero-content {
        flex: 1 1 55%;
        padding-top: 0;
        padding-bottom: 0;
        text-align: left;
        z-index: 2;
        order: 1;
    }

    .hero-image {
        top: 2rem;
        height: 70vh;
        background-position: center 20%;
    }
}

@media (min-width: 1200px) {
    body.index-page .hero {
        align-items: flex-start; /* statt center */
        padding-top: 10rem; /* optional: Feintuning */
    }
}

/* ========================================================== */
/* 12.3 PORTFOLIO & GALERIE                                   */
/* ========================================================== */

@media (hover: hover) and (pointer: fine) {
    /* Initialzustand auf Desktop: Fast transparent (10%) */
    .galerie-item::after {
        background-color: rgba(10, 10, 14, 0.3);
    }

    /* Hover-Effekt: Zoom, Farbe und Balken wird dunkel */
    .galerie-item:hover img {
        transform: scale(1.05);
        filter: grayscale(0%);
    }

    .galerie-item:hover::after {
        background-color: rgba(10, 10, 14, 0.75);
    }
}

@media (min-width: 840px) {
    #portfolio-section .wrapper {
        max-width: 600px;
    }

    .galerie-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 1200px) {
    #portfolio-section .wrapper {
        max-width: 684px; /* aus der 1400px-Galeriebreite berechnet */
        margin: 0 auto;
    }

    .galerie-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========================================================== */
/* 12.4 LIGHTBOX                                               */
/* ========================================================== */

@media (orientation: portrait) {
    .lightbox {
        justify-content: center;
        align-items: center;
        padding: 0; /* optional: verhindert zusätzlichen Innenabstand */
    }

    .lightbox-content {
        width: auto;
        height: auto;
        max-width: 92%;
        max-height: 90vh;
        margin: 0 auto;
        padding: 20px 16px;
        box-sizing: border-box;
        overflow-y: auto;
        overflow-x: hidden;
        text-align: center;
    }

    /* ---------------------------
   NORMALZUSTAND – ZENTRIERT
--------------------------- */
    .lightbox:not(.is-zoomed) .lightbox-content {
        display: flex;
        flex-direction: column;
        justify-content:flex-start;
        align-items: center;
    }

    /* ---------------------------
   ZOOMZUSTAND – SCROLLMODUS
--------------------------- */
    .lightbox.is-zoomed .lightbox-content {
        display: block;
        max-width: 100%;
        width: 100%;
        padding-left: 16px;
        padding-right: 16px;
    }

    #lightbox-caption {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        color: #fff;
        margin-top: 8px;
        overflow: auto;
    }

    /* Optional: Caption-Wrapper begrenzen, damit Lesen angenehm bleibt */
    .caption-wrapper {
        max-width: 95%;
        margin: 0 auto;
    }
}

@media (min-width: 840px) {
    #lightbox-img {
        max-width: 70%;
        max-height: 80vh;
    }

    .lightbox-prev {
        left: 30px;
    }

    .lightbox-next {
        right: 30px;
    }
}

/* ========================================================== */
/* 12.5 VIDEO-CONTAINER                                        */
/* ========================================================== */

@media (min-width: 1200px) {
    .video-container {
        max-width: 1600px;
    }
}

/* ========================================================== */
/* 12.6 KONTAKT & FORMULARE                                    */
/* ========================================================== */

@media (min-width: 840px) {
    .form-wrapper {
        max-width: 700px;
    }
}

/* ========================================================== */
/* 12.7 UTILITIES / SONSTIGES                                  */
/* ========================================================== */

@media (min-width: 840px) {
    .text-center-desktop {
        text-align: center !important;
    }
}
