/* --- SCOPED CSS FOR GALLERY PAGE --- */

.gal-wrapper {
    font-family: 'Inter', sans-serif;
    margin-bottom: 20px;
}

/* Header Text */
.gal-header-text {
    margin-bottom: 16px;
}

    .gal-header-text h1 {
        font-size: 22px;
        font-weight: 700;
        color: #3f3f46;
        margin: 0 0 6px 0;
    }

    .gal-header-text p {
        font-size: 14px;
        color: #52525b;
        margin: 0;
    }

/* Controls Row (Tabs + Search/Sort) */
.gal-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
    flex-wrap: wrap; /* Allows stacking on smaller screens */
}

/* Category Tabs */
.gal-tabs {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.gal-tab {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    color: #71717a;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    white-space: nowrap;
}

    .gal-tab:hover:not(.active) {
        border-color: #cbd5e1;
        color: #3f3f46;
        background-color: #f8fafc;
    }

    .gal-tab.active {
        border-color: #10b981; /* Figma Green */
        color: #10b981;
        font-weight: 600;
        background-color: #f0fdf4; /* Very light green tint */
    }

/* Filters (Search & Dropdown) */
.gal-filters {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gal-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.gal-search-icon {
    position: absolute;
    left: 12px;
    color: #94a3b8;
    width: 16px;
    height: 16px;
    pointer-events: none;
}

.gal-search-input {
    appearance: none;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 12px 8px 36px; /* Extra left padding for icon */
    font-size: 13px;
    color: #3f3f46;
    width: 220px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}

    .gal-search-input::placeholder {
        color: #94a3b8;
    }

    .gal-search-input:focus {
        border-color: #3b82f6;
    }

.gal-sort-select {
    appearance: none;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 8px 32px 8px 12px; /* Right padding for custom arrow */
    font-size: 13px;
    color: #3f3f46;
    font-family: inherit;
    outline: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color 0.2s;
}

    .gal-sort-select:focus {
        border-color: #3b82f6;
    }

/* Section Sub-heading */
.gal-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #3f3f46;
    margin: 0 0 16px 0;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .gal-controls-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .gal-search-input {
        width: 100%;
    }

    .gal-filters {
        width: 100%;
    }

    .gal-search-box {
        flex: 1;
    }
}
/* --- Masonry Photo Grid --- */

.gal-masonry-grid {
    /* This creates the 3-column staggered layout */
    column-count: 3;
    column-gap: 20px;
    width: 100%;
    margin-top: 16px;
}

.gal-masonry-item {
    /* Prevents an image from being split across columns */
    break-inside: avoid;
    margin-bottom: 20px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    /* Smooth transition for the hover lift effect */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .gal-masonry-item:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
        z-index: 2;
    }

    .gal-masonry-item img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 12px;
        /* Smooth transition for the image scale effect */
        transition: transform 0.4s ease;
    }

    .gal-masonry-item:hover img {
        transform: scale(1.03); /* Slight zoom on hover */
    }

/* Responsive Adjustments for Tablets and Mobile */
@media (max-width: 1024px) {
    .gal-masonry-grid {
        column-count: 2; /* 2 columns on medium screens */
    }
}

@media (max-width: 600px) {
    .gal-masonry-grid {
        column-count: 1; /* 1 column on small mobile screens */
    }
}
/* --- Photo Overlay (Hover Effect) --- */

.gal-photo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Dark semi-transparent background */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0; /* Hidden by default */
    transition: opacity 0.3s ease;
    z-index: 2;
    padding: 20px;
    text-align: center;
}

.gal-masonry-item:hover .gal-photo-overlay {
    opacity: 1; /* Show on hover */
}

.gal-photo-title {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.gal-photo-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #cbd5e1; /* Light gray text */
    font-size: 11px;
    font-weight: 500;
    margin-bottom: 16px;
}

    .gal-photo-meta span {
        display: flex;
        align-items: center;
        gap: 6px;
    }

    .gal-photo-meta svg {
        width: 14px;
        height: 14px;
        stroke: currentColor;
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

.gal-btn-album {
    background-color: #ffffff;
    color: #0f172a;
    border: none;
    padding: 8px 24px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.2s;
    font-family: inherit;
}

    .gal-btn-album:hover {
        background-color: #f8fafc;
        transform: translateY(-1px);
    }
/* --- Videos Grid Section --- */

/* Ensure there is space between the photo grid above and this new section */
.gal-section-title.gal-mt-48 {
    margin-top: 48px;
}

.gal-video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 16px;
    margin-bottom: 48px;
}

.gal-video-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

    .gal-video-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    }

/* Video Thumbnail Area */
.gal-video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* Standard video aspect ratio */
    background-color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gal-play-btn {
    width: 56px;
    height: 56px;
    background-color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

    .gal-play-btn svg {
        width: 24px;
        height: 24px;
        fill: #000000;
        margin-left: 4px; /* Optical alignment so the triangle looks perfectly centered */
    }

/* Enlarge play button slightly when hovering over the card */
.gal-video-card:hover .gal-play-btn {
    transform: scale(1.1);
}

.gal-video-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    backdrop-filter: blur(4px);
}

/* Video Text Content Area */
.gal-video-info {
    padding: 16px;
}

.gal-video-title {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px 0;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gal-video-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #64748b;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1024px) {
    .gal-video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .gal-video-grid {
        grid-template-columns: 1fr;
    }
}