/* ── SOLEA GALLERY — gallery.css ── */

/* ── Hero ── */
.gal-hero {
    background: var(--oak);
    background-size: cover;
    background-position: center;
    padding: 120px 40px 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.gal-hero--photo { background-color: transparent; }
.gal-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(30,10,0,.72) 0%, rgba(50,20,0,.60) 100%);
    z-index: 0;
}
.gal-hero__content { position: relative; z-index: 1; }
.gal-hero::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 0; right: 0;
    height: 64px;
    background: var(--cream-bg);
    clip-path: ellipse(55% 100% at 50% 100%);
}
.gal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    font-family: var(--font-sans);
    font-size: 10px;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: var(--oak-light);
    margin-bottom: 20px;
}
.gal-eyebrow__line {
    display: inline-block;
    width: 32px;
    height: 1px;
    background: var(--oak-light);
}
.gal-hero__title {
    font-family: var(--font-serif);
    font-size: clamp(48px, 7vw, 88px);
    font-weight: 300;
    color: var(--milk);
    line-height: 1;
    margin-bottom: 20px;
}
.gal-hero__title em { font-style: italic; color: var(--oak-light); }
.gal-hero__sub {
    font-family: var(--font-serif);
    font-size: clamp(15px, 2vw, 19px);
    font-weight: 300;
    color: rgba(255,248,217,0.55);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ── Filtra ── */
.gal-filters {
    background: var(--cream-bg);
    padding: 48px 40px 0;
    position: relative;
    z-index: 2;
}
.gal-filters__inner {
    max-width: 1080px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    border-bottom: 1px solid var(--sand);
    padding-bottom: 32px;
}
.gal-filter-btn {
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--oak-mid);
    background: transparent;
    border: 1px solid var(--sand);
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.25s ease;
}
.gal-filter-btn:hover,
.gal-filter-btn.active {
    background: var(--oak);
    border-color: var(--oak);
    color: var(--milk);
}
.gal-filter-btn:focus-visible {
    outline: 2px solid var(--oak-light);
    outline-offset: 2px;
}

/* ── Grid ── */
.gal-grid-wrap {
    background: var(--cream-bg);
    padding: 48px 40px 80px;
}
.gal-grid {
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
}
.gal-item--hidden { display: none !important; }

/* ── Item ── */
.gal-item {
    background: var(--cream-deep);
    position: relative;
    overflow: hidden;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.gal-item:hover {
    z-index: 1;
    box-shadow: 0 8px 40px rgba(69,28,0,0.15);
    transform: translateY(-2px);
}

/* ── Foto ── */
.gal-item__media {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    cursor: pointer;
}
.gal-item__img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
    display: block;
}
.gal-item:hover .gal-item__img { transform: scale(1.04); }

.gal-item__overlay {
    position: absolute;
    inset: 0;
    background: rgba(69,28,0,0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}
.gal-item__media:hover .gal-item__overlay { background: rgba(69,28,0,0.35); }

.gal-item__zoom,
.gal-item__play {
    color: var(--milk);
    opacity: 0;
    transform: scale(0.7);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.gal-item__media:hover .gal-item__zoom,
.gal-item__media:hover .gal-item__play { opacity: 1; transform: scale(1); }

.gal-item__overlay--video { background: rgba(69,28,0,0.2); }
.gal-item__overlay--video .gal-item__play { opacity: 1; transform: scale(1); }
.gal-item__overlay--video:hover { background: rgba(69,28,0,0.45); }

/* ── Before & After ── */
.gal-ba {
    position: relative;
    aspect-ratio: 3/4;
    overflow: hidden;
    user-select: none;
    cursor: col-resize;
}
.gal-ba__before,
.gal-ba__after { position: absolute; inset: 0; }
.gal-ba__before { z-index: 1; }
.gal-ba__after  { z-index: 2; clip-path: inset(0 50% 0 0); }

.gal-ba__before img,
.gal-ba__after  img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

/* Etiketa — z-index 30 (mbi handle) dhe jashtë clip-path */
.gal-ba__label {
    position: absolute;
    bottom: 14px;
    font-family: var(--font-sans);
    font-size: 8px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    padding: 5px 10px;
    background: rgba(255,248,217,0.92);
    color: var(--oak);
    font-weight: 500;
    z-index: 30;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.gal-ba__label--before { left: 14px; }
.gal-ba__label--after  { right: 14px; }

/* Handle */
.gal-ba__handle {
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: col-resize;
}
.gal-ba__handle:focus-visible { outline: 2px solid var(--oak-light); outline-offset: 2px; }

/* Linja vertikale — 2px si në preview */
.gal-ba__handle-line {
    width: 2px;
    flex: 1;
    background: linear-gradient(to bottom, transparent 0%, var(--milk) 12%, var(--milk) 88%, transparent 100%);
    opacity: 0.9;
}

/* Rrethi i handle-it — i njëjtë me preview-n */
.gal-ba__handle-circle {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--milk);
    border: 1.5px solid var(--oak-light);
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--oak);
    box-shadow: 0 2px 16px rgba(0,0,0,0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gal-ba:hover .gal-ba__handle-circle {
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

/* ── Info ── */
.gal-item__info {
    padding: 16px 18px 20px;
    background: var(--cream-bg);
    border-top: 1px solid var(--sand);
}
.gal-item__title {
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 400;
    color: var(--oak);
    margin-bottom: 4px;
    line-height: 1.2;
}
.gal-item__meta {
    font-family: var(--font-sans);
    font-size: 11px;
    color: var(--oak-mid);
    font-weight: 300;
    margin-bottom: 4px;
}
.gal-item__cat {
    font-family: var(--font-sans);
    font-size: 10px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--oak-light);
}

/* ── Empty / No results ── */
.gal-empty,
.gal-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 40px;
    font-family: var(--font-serif);
    font-size: 22px;
    font-weight: 300;
    font-style: italic;
    color: var(--sand);
}

/* ── Lightbox ── */
.gal-lightbox__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(26,9,0,0.92);
    z-index: 9998;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.gal-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}
.gal-lightbox__close {
    position: absolute;
    top: 24px; right: 28px;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255,248,217,0.6);
    transition: color 0.2s;
    padding: 8px;
}
.gal-lightbox__close:hover { color: var(--milk); }
.gal-lightbox__content {
    max-width: min(90vw, 900px);
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gal-lightbox__content img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
}
.gal-lightbox__content iframe {
    width: min(90vw, 900px);
    height: min(50.625vw, 506px);
    border: none;
}
.gal-lightbox__caption {
    margin-top: 16px;
    font-family: var(--font-serif);
    font-size: 16px;
    font-weight: 300;
    font-style: italic;
    color: rgba(255,248,217,0.5);
    text-align: center;
}

/* ── Responsive ── */
@media (max-width: 900px) {
    .gal-grid { grid-template-columns: repeat(2, 1fr); }
    .gal-hero, .gal-filters, .gal-grid-wrap { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 540px) {
    .gal-grid { grid-template-columns: 1fr; }
    .gal-hero { padding: 60px 20px 70px; }
}
@media (max-width: 480px) {
    .gal-hero { padding: 70px 20px 80px; }
    .gal-hero__title { font-size: 36px; line-height: 1.1; }
    .gal-eyebrow { font-size: 9px; letter-spacing: 3px; }
    .gal-filters { padding: 32px 16px 0; gap: 8px; }
    .gal-filter-btn { font-size: 10px; padding: 8px 14px; }
    .gal-grid-wrap { padding: 32px 16px 60px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
