/* =====================================
   Merineo Fancy Gallery — Frontend CSS
   ===================================== */

:root {
    --merineo-fg-accent: #4f46e5;
}

/* Basic layout */
.merineo-fg {
    margin: 1.5rem 0;
}

.merineo-fg-title {
    margin: 0 0 .5rem;
}

.merineo-fg-description {
    margin: 0 0 1rem;
}

/* Filter pills */
.merineo-fg-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: .5rem;
    margin-bottom: 36px;
}

.merineo-fg-filter button {
    border: 1px solid var(--merineo-fg-accent);
    color: #fff;
    background-color: var(--merineo-fg-accent);
    padding: 10px 30px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform .2s ease, background-color .2s ease, color .2s ease, opacity .2s ease;
}

.merineo-fg-filter button.is-active,
.merineo-fg-filter button:hover {
    background-color: transparent;
    color: var(--merineo-fg-accent);
}

/* Masonry grid (positions computed by JS) */
.merineo-fg-grid {
    position: relative;
}

.merineo-fg-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transform-origin: 50% 50%;
    transition: transform .28s ease, opacity .28s ease;
}

.merineo-fg-item.is-hiding {
    transform: scale(.8);
    opacity: 0;
}

.merineo-fg-item.is-appearing {
    transform: scale(1.02);
}

.merineo-fg-link {
    display: block;
}

.merineo-fg-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* =====================================
   Simple Lightbox
   ===================================== */

.merineo-fg-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .86);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999999;
}

.merineo-fg-lightbox.is-open {
    display: flex;
}

/* Image in the lightbox */
.merineo-fg-lightbox img {
    max-width: 96vw;
    max-height: 92vh;
    border-radius: 8px;
    /* ensure buttons stack above the image */
    position: relative;
    z-index: 1;
}

/* Button base */
.merineo-fg-lightbox button {
    background: rgba(255, 255, 255, .15);
    color: #fff;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

/* Close button (× comes from JS) */
.merineo-fg-lightbox .lb-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    z-index: 2;
}

/* Prev/Next buttons (inline SVG inside) */
.merineo-fg-lightbox .lb-prev,
.merineo-fg-lightbox .lb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px; /* comfortable hit area */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2; /* above image */
    pointer-events: auto;
}

.merineo-fg-lightbox .lb-prev {
    left: 16px;
}

.merineo-fg-lightbox .lb-next {
    right: 16px;
}

/* SVG arrows (provided inline in HTML by JS) */
.merineo-fg-lightbox .lb-prev svg,
.merineo-fg-lightbox .lb-next svg {
    width: 24px;
    height: 24px;
    stroke: #fff; /* arrow color */
    fill: none;
    display: block;
}

/* Force arrow SVG to render with explicit size and visible stroke */
.merineo-fg-lightbox .lb-prev svg,
.merineo-fg-lightbox .lb-next svg {
    width: 28px !important; /* make it a bit larger */
    height: 28px !important;
    display: block;
    overflow: visible;
    stroke: #fff !important; /* force white stroke even if theme overrides */
    fill: none !important;
    pointer-events: none; /* clicks go to the button, not the SVG */
}

/* Interaction states */
.merineo-fg-lightbox button:hover {
    background: rgba(255, 255, 255, .22);
}

.merineo-fg-lightbox button:focus {
    outline: 2px solid rgba(255, 255, 255, .5);
    outline-offset: 2px;
}

/* =====================================
   Responsive notes
   (column count is handled by JS)
   ===================================== */
@media (max-width: 959px) {
}

@media (max-width: 599px) {
}