/* =========================================
   LIGHTBOX — FINAL SYSTEM (AENIR 40 CLEAN)
========================================= */

/* =========================
   CORE
========================= */

.lightbox {
    position: fixed;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(0,0,0,0.85);

    z-index: 9999;

    opacity: 0;
    pointer-events: none;
    visibility: hidden;

    transition: opacity 0.3s ease;

    overscroll-behavior: none;
    touch-action: pan-y;
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

/* =========================
   OVERLAY
========================= */

.lightbox-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;

    cursor: pointer;
    pointer-events: auto;
}

/* =========================
   CONTENT
========================= */

.lightbox-content {
    position: relative;
    z-index: 2;

    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    pointer-events: none; /* overlay click fix */
}

/* =========================
   STACK (STRUCTURE)
========================= */

.lightbox-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    pointer-events: auto;
}

/* =========================
   MEDIA
========================= */

.lightbox-media {
    position: relative;

    display: inline-flex;
    flex-direction: column;
    align-items: center;

    max-width: 90vw;
    max-height: 80vh;

    z-index: 3;
    pointer-events: auto;
}

/* =========================
   IMAGE
========================= */

.lightbox-img {
    display: block;

    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;

    pointer-events: auto;
}

/* =========================
   CAPTION (FINAL SYSTEM)
========================= */

.lightbox-caption {
    position: static;

    width: 100%;
    max-width: 100%;

    margin-top: 12px;

    padding: 10px 16px;

    text-align: center;
    font-size: 0.9rem;
    line-height: 1.4;

    color: #fff;
    background: rgba(40,40,40,0.75);

    border-radius: 10px;

    display: block;
}

/* =========================
   NAVIGATION ZONES
========================= */

.lightbox-zone {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    width: 80px;
    height: 80px;

    display: flex;
    align-items: center;

    z-index: 4;

    pointer-events: auto;
    visibility: visible;
}

.lightbox.active .lightbox-zone {
    pointer-events: auto;
    visibility: visible;
}

.lightbox-zone.prev {
    left: 0;
    transform: translate(0, -50%);
    justify-content: flex-start;
}

.lightbox-zone.next {
    right: 0;
    transform: translate(0, -50%);
    justify-content: flex-end;
}

.lightbox-zone.disabled {
    pointer-events: none;
    visibility: hidden;
}

/* =========================
   NAV VISUAL (CIRCLE)
========================= */

.lightbox-zone::before {
    content: "";

    position: absolute;
    width: 64px;
    height: 64px;

    border-radius: 50%;

    background: rgba(80, 80, 80, 0.4);
    backdrop-filter: blur(4px);
    box-shadow: 0 0 12px rgba(0,0,0,0.3);

    opacity: 0;
    transform: scale(0.7) translateY(-1px);

    transition: opacity 0.25s ease, transform 0.25s ease;

    pointer-events: none;
}

/* hover only */

@media (hover: hover) {
    .lightbox-zone:hover::before {
        opacity: 1;
        transform: translateY(-1px) scale(1);
    }
}

/* =========================
   ARROWS
========================= */

.lightbox-arrow {
    width: 46px;
    height: 46px;

    stroke: rgb(58, 58, 58);
    stroke-width: 2.6;
    fill: none;

    opacity: 0;
    transform: scale(0.85);

    transition: opacity 0.28s ease, transform 0.32s ease;

    position: relative;
    z-index: 2;
}

/* hover only */

@media (hover: hover) {
    .lightbox-zone:hover .lightbox-arrow {
        opacity: 1;
        transform: scale(1);
    }
}

/* touch devices */

@media (hover: none) {
    .lightbox-arrow {
        display: none;
    }
}

/* =========================
   CLOSE BUTTON
========================= */

.lightbox-close {
    position: absolute;
    top: 10px;
    right: 10px;

    width: 40px;
    height: 40px;

    border: none;
    border-radius: 50%;

    background: rgba(80, 80, 80, 0.15);
    color: rgb(58, 58, 58);

    font-size: 26px;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    z-index: 10;

    pointer-events: auto;
}

@media (hover: hover) {
    .lightbox-close:hover {
        background: rgba(80, 80, 80, 0.4);
        backdrop-filter: blur(4px);
        box-shadow: 0 0 12px rgba(0,0,0,0.3);
    }
}

/* =========================
   STATES
========================= */

body.lightbox-open {
    overflow: hidden;
    overscroll-behavior: none;
}

.lightbox.is-swiping .lightbox-zone {
    opacity: 0 !important;
    pointer-events: none;
}

/* =========================
   NETLIFY HONEYPOT
========================= */

.honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

input[name="bot-field"] {
    display: none !important;
}