/**
 * Galry Frontend Styles (Exact Reference Design Match)
 * Unbordered Filter Navigation, Multi-Column Masonry Grid, and Centered Badges
 */

.galry-grid-wrapper {
    width: 100%;
    margin: 0 0 30px 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

/* ==========================================
   FILTER NAVIGATION BAR (UNBORDERED TEXT LINKS)
   ========================================== */
.galry-filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding: 0 0 12px 0;
    border-bottom: none;
}

.galry-filter-nav {
    display: flex;
    align-items: center;
    gap: 35px;
}

.galry-filter-btn {
    background: none !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #a1a1aa;
    cursor: pointer;
    text-transform: uppercase;
    transition: color 0.2s ease;
}

.galry-filter-btn:hover {
    color: #334155;
}

.galry-filter-btn.active {
    color: #0f172a;
}

.galry-filter-arrow {
    display: flex;
    align-items: center;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.galry-filter-arrow:hover {
    opacity: 1;
}

/* ==========================================
   MULTI-COLUMN MASONRY GRID ENGINE
   ========================================== */
.galry-grid {
    column-count: var(--galry-cols-desktop, 2);
    column-gap: var(--galry-gap, 20px);
    width: 100%;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .galry-grid {
        column-count: var(--galry-cols-tablet, 2);
    }
}

@media (max-width: 640px) {
    .galry-grid {
        column-count: var(--galry-cols-mobile, 1);
    }
}

/* Item Base Styling (Masonry Break Inside Avoid) */
.galry-item {
    break-inside: avoid;
    page-break-inside: avoid;
    -webkit-column-break-inside: avoid;
    margin-bottom: var(--galry-gap, 20px);
    position: relative;
    border-radius: 0;
    overflow: hidden;
    background-color: #d4d4d8;
    transition: opacity 0.35s ease, transform 0.35s ease;
    opacity: 1;
}

.galry-item.galry-filtered-out {
    display: none !important;
    opacity: 0;
    transform: scale(0.95);
}

.galry-item-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Natural Image Scaling (No Black Bars / No Letterboxing) */
.galry-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.galry-item:hover .galry-img {
    transform: scale(1.04);
}

/* Fixed Aspect Ratios (When explicitly enabled) */
.galry-ratio-square .galry-img { aspect-ratio: 1 / 1; height: 100%; }
.galry-ratio-4-3 .galry-img { aspect-ratio: 4 / 3; height: 100%; }
.galry-ratio-16-9 .galry-img { aspect-ratio: 16 / 9; height: 100%; }

/* Camera Placeholder Box (Matches Reference Image 2) */
.galry-camera-placeholder {
    width: 100%;
    height: 100%;
    min-height: 240px;
    background: #d4d4d8;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================
   CENTERED PLAY & CAMERA BADGES (IMAGE 2 MATCH)
   ========================================== */
.galry-lightbox-trigger {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
}

.galry-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1 !important; /* Always visible matching Image 2 */
}

/* Play Badge Ring (Exact Match of Image 2 Tile 1 & 5) */
.galry-icon-badge {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.22);
    border: 3px solid rgba(80, 80, 80, 0.65);
    color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
}

.galry-item:hover .galry-icon-badge {
    transform: scale(1.08);
    background: rgba(0, 0, 0, 0.45);
    border-color: rgba(255, 255, 255, 0.9);
}

/* ==========================================
   WORDPRESS POST CARD STYLING
   ========================================== */
.galry-post-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.galry-post-thumb {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.galry-post-cat-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.galry-post-content {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.galry-post-date {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 6px;
    display: block;
}

.galry-post-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 8px 0;
}

.galry-post-title a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.galry-post-title a:hover {
    color: #2563eb;
}

.galry-post-excerpt {
    font-size: 13px;
    color: #475569;
    line-height: 1.5;
    margin: 0 0 12px 0;
    flex-grow: 1;
}

.galry-post-link {
    font-size: 13px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.galry-post-link:hover {
    text-decoration: underline;
}

/* ==========================================
   MULTI-MEDIA LIGHTBOX MODAL STYLING
   ========================================== */
.galry-lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-sizing: border-box;
}

.galry-lightbox-modal.galry-active {
    opacity: 1;
    visibility: visible;
}

.galry-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.galry-lightbox-img {
    max-width: 90vw;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    user-select: none;
}

/* Responsive Video Container for Lightbox */
.galry-lightbox-video-wrapper {
    position: relative;
    width: 85vw;
    max-width: 960px;
    aspect-ratio: 16 / 9;
    background: #000000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

.galry-lightbox-video-wrapper iframe,
.galry-lightbox-video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.galry-lightbox-caption {
    margin-top: 15px;
    color: #f8fafc;
    text-align: center;
    font-size: 0.95rem;
    font-family: inherit;
    max-width: 800px;
    line-height: 1.4;
}

/* Lightbox Navigation & Close Buttons */
.galry-lightbox-btn {
    position: absolute;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 1000000;
}

.galry-lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.galry-lightbox-close {
    top: 25px;
    right: 25px;
}

.galry-lightbox-prev {
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
}

.galry-lightbox-next {
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
}
