/* ============================================================
   GALLERY MODULE — Om Taxi Service
   Includes: Homepage Collage Gallery, Dedicated Gallery Page,
   Touch Swiper Carousel, Video & Photo Cards
   ============================================================ */

/* ── 1. HOMEPAGE COLLAGE SECTION ── */
.glr-sec {
    position: relative;
    background: #f8f6f2;
    padding: 60px 0 70px;
    border-top: 1px solid #ede8df;
}

.glr-sec::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.glr-eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--theme, #5F2DED);
    margin-bottom: 6px;
}

.glr-collage {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: 150px;
    gap: 8px;
    border-radius: 18px;
    overflow: hidden;
}

/* Each cell position — collage layout */
.glr-collage .glr-cell:nth-child(1)  { grid-column: 1 / 5;  grid-row: 1 / 3; } /* tall left */
.glr-collage .glr-cell:nth-child(2)  { grid-column: 5 / 8;  grid-row: 1 / 2; } /* mid top */
.glr-collage .glr-cell:nth-child(3)  { grid-column: 8 / 13; grid-row: 1 / 2; } /* wide top right */
.glr-collage .glr-cell:nth-child(4)  { grid-column: 5 / 7;  grid-row: 2 / 3; } /* mid small */
.glr-collage .glr-cell:nth-child(5)  { grid-column: 7 / 10; grid-row: 2 / 3; } /* mid small */
.glr-collage .glr-cell:nth-child(6)  { grid-column: 10 / 13;grid-row: 2 / 3; } /* mid right */
.glr-collage .glr-cell:nth-child(7)  { grid-column: 1 / 4;  grid-row: 3 / 4; } /* bottom left */
.glr-collage .glr-cell:nth-child(8)  { grid-column: 4 / 7;  grid-row: 3 / 4; } /* bottom mid */
.glr-collage .glr-cell:nth-child(9)  { grid-column: 7 / 10; grid-row: 3 / 4; } /* bottom mid */
.glr-collage .glr-cell:nth-child(10) { grid-column: 10 / 13;grid-row: 3 / 4; } /* bottom right */

.glr-cell {
    position: relative;
    overflow: hidden;
    background: #e2e8f0;
    border-radius: 8px;
}

.glr-cell a {
    display: block;
    width: 100%;
    height: 100%;
}

.glr-cell img,
.glr-cell video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.glr-cell:hover img,
.glr-cell:hover video {
    transform: scale(1.06);
}

.glr-cell-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.6) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.35s ease;
    display: flex;
    align-items: flex-end;
    padding: 14px;
}

.glr-cell:hover .glr-cell-overlay {
    opacity: 1;
}

.glr-cell-overlay-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

.glr-cell-zoom {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: var(--theme, #5F2DED);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.glr-cell-title {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.glr-vid-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
}

.glr-play-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.85);
    color: var(--second, #F2277E);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transition: transform 0.25s, background 0.25s;
    pointer-events: none;
}

.glr-cell:hover .glr-play-circle {
    background: #ffffff;
    transform: translate(-50%, -50%) scale(1.1);
}

.glr-collage .glr-cell:nth-child(n+11) {
    display: none;
}

.glr-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--theme, #5F2DED);
    color: #ffffff !important;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(95, 45, 237, 0.3);
}

.glr-more-btn:hover {
    background: #4c20c9;
    box-shadow: 0 8px 24px rgba(95, 45, 237, 0.4);
}

.glr-arrow {
    transition: transform 0.25s;
}

.glr-more-btn:hover .glr-arrow {
    transform: translateX(4px);
}

/* ── 2. DEDICATED GALLERY PAGE (gallery.php) ── */
.glr-filter-pills-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
}

.glr-filter-btn {
    background: #ffffff;
    border: 1.5px solid var(--border, #e2e8f0);
    color: #475569;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.glr-filter-btn:hover {
    background: #f4efff;
    border-color: var(--theme, #5F2DED);
    color: var(--theme, #5F2DED);
    box-shadow: 0 4px 12px rgba(95, 45, 237, 0.12);
}

.glr-filter-btn.active {
    background: var(--theme, #5F2DED);
    border-color: var(--theme, #5F2DED);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(95, 45, 237, 0.28);
}

/* Desktop Gallery Grid */
.glr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.glr-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #f1f5f9;
    height: 240px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glr-card:hover {
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
}

.glr-card-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.glr-card:hover .glr-card-media {
    transform: scale(1.08);
}

.glr-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--theme, #5F2DED);
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 20px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.glr-badge-purple {
    background: var(--theme, #5F2DED);
    color: #ffffff;
}

.glr-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.78) 0%, rgba(15, 23, 42, 0.2) 45%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
    z-index: 2;
}

.glr-card:hover .glr-card-overlay {
    opacity: 1;
}

.glr-card-title {
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    margin: 0 0 4px;
    line-height: 1.3;
}

/* ── 3. MOBILE TOUCH SWIPER VIEW ── */
.glr-touch-swiper {
    padding-bottom: 10px;
}

.glr-touch-slide {
    width: 85%;
    max-width: 320px;
}

.glr-touch-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #f1f5f9;
    height: 280px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.glr-touch-media {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.glr-touch-info {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.85) 0%, transparent 60%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 16px;
}

.glr-touch-title {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 6px;
}

.glr-touch-btn {
    align-self: flex-start;
    background: var(--theme, #5F2DED);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

.glr-touch-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
}

.glr-touch-prev,
.glr-touch-next {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    border: 1.5px solid var(--border, #e2e8f0);
    color: var(--theme, #5F2DED);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ── 4. INNER PAGES SIMPLE GALLERY GRID ── */
.pg-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
}

.pg-gal-item,
.pg-gallery-item {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: #f1f5f9;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
}

.pg-gal-item img,
.pg-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.pg-gal-item:hover img,
.pg-gallery-item:hover img {
    transform: scale(1.08);
}

.pg-gal-cap,
.pg-gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.65) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pg-gal-item:hover .pg-gal-cap,
.pg-gallery-item:hover .pg-gallery-overlay {
    opacity: 1;
}

.pg-gallery-title {
    color: #ffffff;
    font-size: 13.5px;
    font-weight: 700;
    margin: 0;
}

/* ── RESPONSIVE ── */
@media (max-width: 767px) {
    .glr-collage {
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: auto;
        gap: 5px;
    }
    .glr-collage .glr-cell:nth-child(1)  { grid-column: 1 / 3; height: 220px; }
    .glr-collage .glr-cell:nth-child(2)  { grid-column: 1 / 2; height: 160px; }
    .glr-collage .glr-cell:nth-child(3)  { grid-column: 2 / 3; height: 160px; }
    .glr-collage .glr-cell:nth-child(4)  { grid-column: 1 / 2; height: 160px; }
    .glr-collage .glr-cell:nth-child(5)  { grid-column: 2 / 3; height: 160px; }
    .glr-collage .glr-cell:nth-child(6)  { grid-column: 1 / 3; height: 180px; }
    .glr-collage .glr-cell:nth-child(7)  { grid-column: 1 / 2; height: 150px; }
    .glr-collage .glr-cell:nth-child(8)  { grid-column: 2 / 3; height: 150px; }
    .glr-collage .glr-cell:nth-child(9)  { grid-column: 1 / 2; height: 150px; }
    .glr-collage .glr-cell:nth-child(10) { grid-column: 2 / 3; height: 150px; }
}

@media (max-width: 480px) {
    .glr-collage {
        gap: 4px;
    }
    .glr-collage .glr-cell:nth-child(1) { height: 180px; }
    .glr-collage .glr-cell:nth-child(6) { height: 150px; }
}