/* ===================================================
   Gallery Slider
   =================================================== */

ul.slides {
    display: none;
}

/* Fullscreen modal */
#gallery-slider-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 30000;
    /* Prevent browser's native pinch-to-zoom and scroll inside the modal */
    touch-action: none;
}

#gallery-slider-modal.active {
    display: block;
}

/* Overlay */
.gs-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    cursor: pointer;
}

/*
    Blur the wrapper when slider is open.
    Uses a custom class (not body.modal-active) to avoid
    triggering the site's #wrapper:after overlay transition,
    which caused the footer to jerk on close.
    The #wrapper already has filter transition defined in main.css.
*/
body.gs-modal-open #wrapper {
    -webkit-filter: blur(6px);
    filter: blur(6px);
}

/* Image area — leaves room for caption bar at bottom */
.gs-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 5.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.gs-img {
    max-width: calc(100vw - 7rem);
    max-height: 100%;
    object-fit: contain;
    display: block;
    pointer-events: auto;
    transition: opacity 0.2s;
    cursor: zoom-in;
    will-change: transform;
    /* Prevent image dragging / text selection while panning */
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    transform-origin: center center;
}

.gs-img.loading {
    opacity: 0.2;
}

/* Smooth animated zoom (double-click / double-tap) */
.gs-img.gs-animate {
    transition: transform 0.25s ease, opacity 0.2s;
}

/* ---- Buttons: no box, just thin shapes ---- */

.gs-btn {
    position: fixed;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 30002;
    opacity: 0.45;
    transition: opacity 0.2s;
}

.gs-btn:hover {
    opacity: 1;
}

/* Prev / Next — thin chevron arrows */
.gs-prev,
.gs-next {
    /* Centered in image area (not full viewport height) */
    top: calc(50% - 2.75rem);
    transform: translateY(-50%);
    width: 2.8rem;
    height: 2.8rem;
}

.gs-prev {
    left: 1.2rem;
}

.gs-next {
    right: 1.2rem;
}

.gs-prev::before,
.gs-next::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 11px;
    height: 11px;
    border-top: 1.5px solid #fff;
    border-right: 1.5px solid #fff;
}

.gs-prev::before {
    transform: translate(-25%, -50%) rotate(-135deg);
}

.gs-next::before {
    transform: translate(-75%, -50%) rotate(45deg);
}

/* Close — thin × */
.gs-close {
    top: 1.4rem;
    right: 1.5rem;
    width: 2rem;
    height: 2rem;
}

.gs-close::before,
.gs-close::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 18px;
    height: 1.5px;
    background: #fff;
    border-radius: 1px;
}

.gs-close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.gs-close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

/* ---- Caption bar ---- */
.gs-caption {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 5.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.75rem 6rem;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.6));
    z-index: 30001;
    pointer-events: none;
}

.gs-caption-title {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    margin: 0;
    text-align: center;
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.gs-caption-text {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.78rem;
    font-weight: 300;
    font-family: inherit;
    margin: 0;
    text-align: center;
    line-height: 1.45;
    max-width: 60ch;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Counter — bottom-right */
.gs-counter {
    position: fixed;
    bottom: 1rem;
    right: 1.5rem;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.72rem;
    font-family: inherit;
    letter-spacing: 0.12em;
    z-index: 30002;
    pointer-events: none;
}

/* Single slide: hide navigation */
.gs-single .gs-prev,
.gs-single .gs-next,
.gs-single .gs-counter {
    display: none;
}

/* ---- Mobile (≤ 736px) ---- */
@media (max-width: 736px) {
    .gs-caption {
        padding: 0.6rem 4rem;
    }

    .gs-caption-title {
        font-size: 0.85rem;
    }

    .gs-caption-text {
        font-size: 0.72rem;
        -webkit-line-clamp: 1;
    }

    .gs-prev {
        left: 0.4rem;
    }

    .gs-next {
        right: 0.4rem;
    }

    .gs-counter {
        bottom: 0.7rem;
        right: 0.75rem;
    }
}

@media (max-width: 480px) {
    .gs-img {
        max-width: 100vw;
    }
}

/* ---- Contact form feedback messages ---- */
.cf-msg {
    margin-top: 0.75rem;
    padding: 0.55rem 0.85rem;
    border-radius: 3px;
    font-size: 0.85rem;
    font-family: inherit;
}

.cf-msg--success {
    background: rgba(80, 180, 100, 0.15);
    border: 1px solid rgba(151, 43, 165, 0.514);
    color: #7c34a5;
}

.cf-msg--error {
    background: rgba(200, 70, 70, 0.15);
    border: 1px solid rgba(200, 70, 70, 0.4);
    color: #e08080;
}