/* AMCO Gallery – gallery.css v1.3.1 */

.r4d-gal-section {
    width: 100%;
    box-sizing: border-box;
}

/* ── Header ────────────────────────────────────────────────── */
.r4d-gal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.r4d-gal-title {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    margin: 0;
    line-height: 1.15;
}

/* ── Tour button ───────────────────────────────────────────── */
.r4d-gal-tour-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    color: #111827;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    border: 1.5px solid #E5E7EB;
    transition: box-shadow 0.22s ease, transform 0.18s ease, border-color 0.22s ease;
    white-space: nowrap;
}
.r4d-gal-tour-btn:hover {
    box-shadow: 0 6px 22px rgba(0,0,0,0.14);
    transform: translateY(-1px);
    border-color: #d1d5db;
}
.r4d-gal-tour-icon {
    display: flex;
    align-items: center;
    color: #4CAF50;
    flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════ */
/* MAIN GRID                                                    */
/* ═══════════════════════════════════════════════════════════ */
.r4d-gal-grid {
    display: grid;
    grid-template-columns: 55fr 45fr;
    gap: 10px;
    height: 500px;    /* default, overridden by Elementor slider */
    align-items: stretch;
}

/* ── Main image column ─────────────────────────────────────── */
.r4d-gal-main {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #e5e7eb;
    /* KEY FIX: fill the full grid row height */
    height: 100%;
    min-height: 0;
}

/* ── Right column ──────────────────────────────────────────── */
.r4d-gal-right {
    display: grid;
    gap: 10px;
    /* KEY FIX: fill the full grid row height */
    height: 100%;
    min-height: 0;
    align-items: stretch;
}

/* 2 thumbs: stacked */
.r4d-gal-right.r4d-gal-count-2 {
    grid-template-rows: 1fr 1fr;
    grid-template-columns: 1fr;
}
/* 3 thumbs: top full-width + 2 below */
.r4d-gal-right.r4d-gal-count-3 {
    grid-template-rows: 1fr 1fr;
    grid-template-columns: 1fr 1fr;
}
.r4d-gal-right.r4d-gal-count-3 .r4d-gal-thumb:first-child {
    grid-column: 1 / -1;
}
/* 4 thumbs: 2×2 */
.r4d-gal-right.r4d-gal-count-4 {
    grid-template-rows: 1fr 1fr;
    grid-template-columns: 1fr 1fr;
}

/* ── Each thumb ────────────────────────────────────────────── */
.r4d-gal-thumb {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    background: #e5e7eb;
    /* KEY FIX: must stretch to fill its grid cell */
    min-height: 0;
    height: 100%;
}

/* ── Generic item shared styles ────────────────────────────── */
.r4d-gal-item {
    cursor: pointer;
}

/* ── Link fills cell ───────────────────────────────────────── */
.r4d-gal-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
}

/* ── Image fills cell completely ───────────────────────────── */
.r4d-gal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.r4d-gal-item:hover .r4d-gal-img {
    transform: scale(1.06);
}

/* ── Overlay gradient ──────────────────────────────────────── */
.r4d-gal-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.50) 0%, transparent 55%);
    opacity: 0.65;
    transition: opacity 0.35s ease;
    pointer-events: none;
    z-index: 1;
}
.r4d-gal-item:hover .r4d-gal-overlay {
    opacity: 0.90;
}

/* ── Placeholder when no image ─────────────────────────────── */
.r4d-gal-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
}

/* ── Label chip ────────────────────────────────────────────── */
.r4d-gal-label {
    position: absolute;
    bottom: 16px;
    left: 16px;
    background: rgba(0,0,0,0.45);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: none;
    z-index: 2;
    transition: transform 0.30s ease;
}
.r4d-gal-label--sm {
    font-size: 13px;
    padding: 4px 10px;
    bottom: 12px;
    left: 12px;
}
.r4d-gal-item:hover .r4d-gal-label {
    transform: translateY(-3px);
}

/* ── Entrance animation ────────────────────────────────────── */
.r4d-gal-anim {
    opacity: 0;
    transform: scale(0.97) translateY(10px);
    transition: opacity 0.55s ease, transform 0.55s ease;
    transition-delay: var(--gal-delay, 0s);
}
.r4d-gal-anim.r4d-gal-visible {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* ═══════════════════════════════════════════════════════════ */
/* RESPONSIVE                                                   */
/* ═══════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .r4d-gal-grid {
        grid-template-columns: 1fr;
        height: auto !important;
    }
    .r4d-gal-main {
        height: 300px;
    }
    .r4d-gal-right {
        height: auto;
    }
    .r4d-gal-right.r4d-gal-count-2,
    .r4d-gal-right.r4d-gal-count-3,
    .r4d-gal-right.r4d-gal-count-4 {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }
    .r4d-gal-thumb {
        height: 160px;
    }
    .r4d-gal-right.r4d-gal-count-3 .r4d-gal-thumb:first-child {
        grid-column: 1 / -1;
        height: 160px;
    }
}
@media (max-width: 540px) {
    .r4d-gal-title { font-size: 22px; }
    .r4d-gal-right.r4d-gal-count-2,
    .r4d-gal-right.r4d-gal-count-3,
    .r4d-gal-right.r4d-gal-count-4 {
        grid-template-columns: 1fr;
    }
    .r4d-gal-right.r4d-gal-count-3 .r4d-gal-thumb:first-child {
        grid-column: auto;
    }
    .r4d-gal-thumb { height: 180px; }
}
