/* ═══════════════════════════════════════════
   Resort Reels Gallery v4.0 — gallery.css
═══════════════════════════════════════════ */

/* ── Grid ── */
.rrg-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 100%;
}

/* ── Card ── */
.rrg-item {
    position: relative;
    aspect-ratio: 9/16;
    overflow: hidden;
    border-radius: 14px;
    display: block;
    text-decoration: none;
    background: #111;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.26s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.26s ease;
}

.rrg-item:hover {
    transform: translateY(-5px) scale(1.018);
    box-shadow: 0 20px 48px rgba(0,0,0,0.32);
}

.rrg-item:focus-visible {
    outline: 2px solid rgba(255,255,255,0.75);
    outline-offset: 3px;
}

/* ── Thumbnail ── */
.rrg-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.rrg-item:hover .rrg-thumb {
    transform: scale(1.06);
}

/* ── Placeholder quando non c'è thumbnail ── */
.rrg-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #181818;
}

.rrg-placeholder svg {
    width: 40px;
    height: 40px;
    fill: rgba(255,255,255,0.15);
}

/* ══════════════════════════════════════
   ICONA PLAY — sempre visibile, centro
══════════════════════════════════════ */
.rrg-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    color: #fff;
    pointer-events: none;
    transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1), opacity 0.2s ease;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,0.5));
}

.rrg-item:hover .rrg-play {
    transform: translate(-50%, -50%) scale(1.15);
}

.rrg-play--circle {
    background: rgba(0,0,0,0.42);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.15);
}

.rrg-play--triangle {
    background: transparent;
}

.rrg-play svg {
    width: 22px;
    height: 22px;
    display: block;
    margin-left: 3px; /* optical center */
}

/* ══════════════════════════════════════
   DIDASCALIA — gradient bar in basso
   Stile professionale: gradiente scuro,
   testo uppercase con letter-spacing
══════════════════════════════════════ */
.rrg-caption {
    --rrg-grad-start: rgba(0,0,0,0);
    --rrg-grad-end:   rgba(0,0,0,0.75);

    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 4;
    padding: 48px 14px 14px;
    background: linear-gradient(to bottom, var(--rrg-grad-start), var(--rrg-grad-end));
    pointer-events: none;
}

.rrg-caption__text {
    display: block;
    margin: 0;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.4;
    text-shadow: 0 1px 6px rgba(0,0,0,0.8);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    /* Barra accent a sinistra */
    border-left: 2px solid rgba(255,255,255,0.55);
    padding-left: 8px;
}

/* ══════════════════════════════════════
   LOGO INSTAGRAM — angolo basso destra
══════════════════════════════════════ */
.rrg-ig {
    position: absolute;
    bottom: 12px;
    right: 12px;
    z-index: 5;
    line-height: 0;
    filter: drop-shadow(0 1px 5px rgba(0,0,0,0.7));
    transition: transform 0.2s ease, opacity 0.2s ease;
    opacity: 0.85;
}

.rrg-ig svg {
    width: 20px;
    height: 20px;
    display: block;
    fill: #fff;
}

.rrg-item:hover .rrg-ig {
    opacity: 1;
    transform: scale(1.1);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .rrg-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .rrg-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .rrg-item, .rrg-thumb, .rrg-play, .rrg-ig { transition: none !important; }
}
