/* ============================================================
   Wedding Gallery — grid + PhotoSwipe caption
   ============================================================ */

.wedding-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.wedding-gallery-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    background: #f0efed;
    aspect-ratio: 1 / 1;
    text-decoration: none;
}

.wedding-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.wedding-gallery-item:hover img,
.wedding-gallery-item:focus img {
    transform: scale(1.05);
}

/* Overlay caption — sempre visibile, rafforza sull'hover */
.wedding-gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 10px 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.62));
    color: #fff;
    line-height: 1.3;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wedding-gallery-guest {
    font-size: 13px;
    font-weight: 600;
}

.wedding-gallery-msg {
    font-size: 11px;
    opacity: 0.88;
    font-style: italic;
    /* Tronca se troppo lungo */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Messaggio "ancora niente" */
.wedding-gallery-empty {
    text-align: center;
    color: #aaa;
    padding: 48px 0;
    font-size: 15px;
}

/* Paginazione */
.wedding-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 24px;
}

.wedding-page-btn {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid #b8a9a0;
    border-radius: 20px;
    color: #b8a9a0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.18s, color 0.18s;
}

.wedding-page-btn:hover {
    background: #b8a9a0;
    color: #fff;
}

.wedding-page-btn--disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
}

.wedding-page-info {
    font-size: 14px;
    color: #888;
    min-width: 60px;
    text-align: center;
}

/* ---- Filter Gallery ---- */
.wfg-wrap {
    max-width: 100%;
}

.wfg-search-form {
    margin-bottom: 24px;
}

.wfg-search-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.wfg-search-input {
    flex: 1;
    min-width: 200px;
    padding: 10px 16px;
    border: 1px solid #d4d4d4;
    border-radius: 24px;
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.wfg-search-input:focus {
    border-color: #b8a9a0;
    box-shadow: 0 0 0 3px rgba(184, 169, 160, 0.18);
}

.wfg-search-btn {
    padding: 10px 22px;
    background: #b8a9a0;
    color: #fff;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.18s;
    white-space: nowrap;
}

.wfg-search-btn:hover {
    background: #a0928a;
}

.wfg-clear-btn {
    padding: 10px 16px;
    border: 1px solid #d4d4d4;
    border-radius: 24px;
    font-size: 13px;
    color: #888;
    text-decoration: none;
    white-space: nowrap;
    transition: border-color 0.18s, color 0.18s;
}

.wfg-clear-btn:hover {
    border-color: #b8a9a0;
    color: #555;
}

.wfg-result-count {
    margin: 10px 0 0;
    font-size: 13px;
    color: #888;
}

/* Badge privata sulla foto */
.wfg-private {
    outline: 2px solid #e07b39;
    outline-offset: -2px;
}

.wfg-badge-private {
    font-size: 11px;
    margin-left: 4px;
    vertical-align: middle;
}

/* Caption custom in PhotoSwipe lightbox */
.pswp__custom-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    color: #fff;
    font-size: 14px;
    text-align: center;
    pointer-events: none;
}

/* Responsive */
@media (max-width: 600px) {
    .wedding-gallery {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 4px;
    }
}

@media (max-width: 360px) {
    .wedding-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }
}
