/* =========================================================
   Projekte-Seite – Joiner Theme
   ========================================================= */

/* ---- Hero: rotierende Slides ---- */
.jn-proj-hero {
    position: relative;
    min-height: 520px;
    overflow: hidden;
    display: flex;
    align-items: center;
    background: #1a1208;
    color: #fff;
}
.jn-proj-hero-slide {
    position: absolute; inset: 0;
    background-size: cover; background-position: center;
    opacity: 0;
    transition: opacity 1.4s ease;
    z-index: 0;
}
.jn-proj-hero-slide.is-active { opacity: 1; }
.jn-proj-hero-overlay {
    position: absolute; inset: 0; z-index: 1;
    background: linear-gradient(90deg,rgba(20,13,7,.85) 0%,rgba(28,18,10,.62) 50%,rgba(28,18,10,.28) 100%);
}
.jn-eyebrow--light { color: #c9a96e; }
.jn-proj-hero-title {
    margin: 10px 0 20px;
    font-size: clamp(40px,5.2vw,72px); font-weight: 800;
    line-height: 1.1; letter-spacing: -0.035em; max-width: 820px;
}
.jn-proj-hero-text {
    max-width: 580px; color: rgba(255,255,255,.88);
    font-size: 16px; line-height: 1.65; margin: 0;
}

/* ---- Gallery intro ---- */
.jn-gallery-intro { max-width: 720px; margin-bottom: 36px; }

/* ---- Filter-Tabs ---- */
.jn-filter-bar {
    display: flex; flex-wrap: wrap; gap: 6px;
    background: #f0ece6; border-radius: 999px;
    padding: 6px 8px; width: fit-content;
    margin-bottom: 44px;
}
.jn-filter-btn {
    padding: 10px 22px; border-radius: 999px; border: none;
    background: transparent; font-family: inherit;
    font-size: 15px; font-weight: 500; cursor: pointer;
    color: #322923; transition: background .2s ease, color .2s ease;
    white-space: nowrap;
}
.jn-filter-btn.is-active { background: #322923; color: #fff; }
.jn-filter-btn:hover:not(.is-active) { background: #e3dbd0; }

/* ---- Projekt-Grid ---- */
.jn-proj-grid {
    display: grid; grid-template-columns: repeat(3,1fr);
    gap: 44px 24px;
}
.jn-pc { cursor: pointer; outline: none; }
.jn-pc:focus-visible .jn-pc-photo { outline: 3px solid #b49a67; outline-offset: 2px; }

.jn-pc-photo {
    width: 100%; aspect-ratio: 4/3; border-radius: 10px;
    background-color: #e8e1d6; background-size: cover; background-position: center;
    position: relative; overflow: hidden; margin-bottom: 16px;
    transition: transform .35s ease;
}
.jn-pc:hover .jn-pc-photo { transform: scale(1.02); }
.jn-pc-count {
    position: absolute; top: 10px; right: 12px;
    background: rgba(28,20,14,.62); color: #fff;
    font-size: 11px; font-weight: 700; padding: 2px 8px;
    border-radius: 99px; letter-spacing: .04em; pointer-events: none;
}
.jn-pc-meta {
    display: block; font-size: 12px; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase;
    color: #b49a67; margin-bottom: 7px;
}
.jn-pc-title {
    margin: 0 0 8px; font-size: 20px; font-weight: 700;
    color: #322923; line-height: 1.28; letter-spacing: -0.012em;
}
.jn-pc-desc {
    margin: 0; font-size: 14px; color: #7a6d65; line-height: 1.6;
}

/* =========================================================
   LIGHTBOX
   ========================================================= */
.jn-lb {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(10,7,5,.88); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}
.jn-lb.is-open { opacity: 1; visibility: visible; }
body.jn-lb-open { overflow: hidden; }

/* Lightbox-Karte */
.jn-lb-inner {
    display: flex;
    width: min(1160px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    background: #fff; border-radius: 16px; overflow: hidden;
    box-shadow: 0 32px 80px rgba(0,0,0,.45);
}

/* ---- Foto-Seite (links) ---- */
.jn-lb-photo-col {
    flex: 1; min-width: 0; background: #0e0a07;
    display: flex; flex-direction: column;
}
.jn-lb-photo-wrap {
    position: relative; flex: 1;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.jn-lb-img {
    display: block; width: 100%; height: 100%; object-fit: cover;
}
/* Foto-Counter unten links */
.jn-lb-counter {
    position: absolute; bottom: 14px; left: 16px; z-index: 3;
    background: rgba(0,0,0,.55); color: #fff;
    font-size: 13px; font-weight: 700; padding: 4px 12px;
    border-radius: 99px; letter-spacing: .03em;
}
/* Prev/Next Buttons auf dem Foto */
.jn-lb-nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
    width: 48px; height: 48px; border-radius: 50%; border: none;
    background: rgba(255,255,255,.18); color: #fff; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s ease;
}
.jn-lb-nav:hover:not(:disabled) { background: rgba(255,255,255,.32); }
.jn-lb-nav:disabled { opacity: .2; cursor: default; }
.jn-lb-nav svg { width: 22px; height: 22px; }
.jn-lb-prev { left: 14px; }
.jn-lb-next { right: 14px; }

/* Thumbnail-Streifen unter dem Foto */
.jn-lb-thumbstrip {
    display: flex; gap: 6px; padding: 10px 14px;
    background: #1a1208; flex-shrink: 0; flex-wrap: wrap;
}
.jn-lb-thumbstrip img {
    width: 70px; height: 52px; object-fit: cover; border-radius: 5px;
    cursor: pointer; opacity: .55; border: 2px solid transparent;
    transition: opacity .2s ease, border-color .2s ease;
    flex-shrink: 0;
}
.jn-lb-thumbstrip img:hover { opacity: .85; }
.jn-lb-thumbstrip img.is-active { opacity: 1; border-color: #b49a67; }

/* ---- Info-Panel (rechts) ---- */
.jn-lb-panel {
    width: 400px; flex-shrink: 0;
    display: flex; flex-direction: column;
    border-left: 1px solid #ede8e2;
    position: relative;
}
/* × oben rechts im weißen Panel */
.jn-lb-close {
    position: absolute; top: 14px; right: 16px;
    width: 38px; height: 38px; border-radius: 50%; border: none;
    background: #f0ece6; color: #322923; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s ease; z-index: 2;
}
.jn-lb-close:hover { background: #e3dbd0; }
.jn-lb-close svg { width: 18px; height: 18px; }

/* Panel-Inhalt: scrollbar, zentriert */
.jn-lb-panel-body {
    flex: 1; overflow-y: auto;
    padding: 44px 36px 24px;
    display: flex; flex-direction: column;
    align-items: center; text-align: center;
}
.jn-lb-cat-label {
    font-size: 13px; font-weight: 700; color: #b49a67;
    letter-spacing: .04em; text-transform: uppercase;
    display: block; margin-bottom: 10px;
}
.jn-lb-title {
    font-size: clamp(26px,2.6vw,36px); font-weight: 800;
    color: #1e1510; line-height: 1.15; letter-spacing: -0.025em;
    margin: 0 0 10px;
}
.jn-lb-location {
    font-size: 14px; font-weight: 600; color: #7a6d65;
    margin: 0 0 20px;
}
.jn-lb-desc {
    font-size: 14px; color: #4b4038; line-height: 1.72;
    margin: 0 0 24px;
}
.jn-lb-divider {
    width: 100%; border: none; border-top: 1px solid #ede8e2;
    margin: 0 0 20px;
}
.jn-lb-mat-title {
    font-size: 12px; font-weight: 700; color: #b49a67;
    letter-spacing: .05em; text-transform: uppercase;
    margin: 0 0 10px;
}
.jn-lb-mat {
    font-size: 13.5px; color: #4b4038; line-height: 1.75;
    margin: 0;
}

/* Projekt-Navigation ganz unten */
.jn-lb-project-nav {
    display: flex; gap: 8px; flex-shrink: 0;
    padding: 14px 20px 18px;
    border-top: 1px solid #ede8e2;
}
.jn-lb-proj-btn {
    flex: 1; display: flex; align-items: center; justify-content: center;
    gap: 6px; padding: 11px 10px;
    border: 1px solid #ddd8d0; border-radius: 10px;
    background: none; color: #322923;
    font-size: 13px; font-weight: 600; font-family: inherit;
    cursor: pointer; transition: background .2s ease, border-color .2s ease;
    text-align: center;
}
.jn-lb-proj-btn:hover:not(:disabled) { background: #f7f4f0; border-color: #b49a67; }
.jn-lb-proj-btn:disabled { opacity: .28; cursor: default; }
.jn-lb-proj-btn svg { width: 15px; height: 15px; flex-shrink: 0; }

/* =========================================================
   CLOSING CTA – Karte mit Foto-Hintergrund
   ========================================================= */
.jn-proj-cta-section { padding: 80px 0; }
.jn-proj-cta-card {
    --cta-photo: none;
    border-radius: 18px; overflow: hidden;
    padding: 70px 60px; min-height: 360px;
    display: flex; flex-direction: column; justify-content: center;
    color: #fff;
    background-image:
        linear-gradient(90deg,rgba(14,8,4,.90) 0%,rgba(20,12,6,.76) 45%,rgba(28,18,10,.44) 100%),
        var(--cta-photo),
        linear-gradient(135deg,#1e1510,#4a3828);
    background-size: cover; background-position: center;
}
.jn-proj-cta-eyebrow {
    display: block; font-size: 13px; font-weight: 700;
    color: #c9a96e; letter-spacing: .05em; text-transform: uppercase;
    margin-bottom: 14px;
}
.jn-proj-cta-title {
    margin: 0 0 18px; max-width: 640px;
    font-size: clamp(30px,3.4vw,48px); font-weight: 800;
    line-height: 1.12; letter-spacing: -0.03em;
}
.jn-proj-cta-text {
    margin: 0 0 28px; max-width: 520px;
    font-size: 16px; color: rgba(255,255,255,.84); line-height: 1.6;
}
.jn-proj-cta-btn { align-self: flex-start; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 1080px) {
    .jn-lb-panel { width: 360px; }
    .jn-lb-panel-body { padding: 40px 28px 20px; }
}

@media (max-width: 900px) {
    .jn-proj-grid { grid-template-columns: repeat(2,1fr); gap: 36px 18px; }
    .jn-proj-hero { min-height: 420px; }
    .jn-filter-bar { border-radius: 12px; width: 100%; }

    /* Lightbox: Foto oben, Panel unten */
    .jn-lb-inner { flex-direction: column; max-height: 95vh; border-radius: 12px; }
    .jn-lb-photo-col { max-height: 52vh; }
    .jn-lb-photo-wrap { height: 100%; }
    .jn-lb-panel { width: 100%; max-height: 43vh; }
    .jn-lb-panel-body { padding: 14px 20px 10px; text-align: left; align-items: flex-start; }
    .jn-lb-title { font-size: 20px; }
    .jn-lb-close { top: 10px; right: 12px; }
}

@media (max-width: 620px) {
    .jn-proj-grid { grid-template-columns: 1fr; gap: 32px; }
    .jn-proj-hero { min-height: 360px; }
    .jn-proj-cta-card { padding: 44px 28px; }
    .jn-lb-thumbstrip { display: none; }
    .jn-filter-btn { font-size: 13.5px; padding: 9px 16px; }
}
