/**
 * Gallery index — government media centre layout (Photos grid)
 */

.tcl-gallery-media {
    background: #f4f7f6;
}

/* Subnav + hero tab styles: assets/css/components/page-hero.css */

.tcl-gallery-media .gallery-page-shell {
	padding-top: 0.85rem;
	padding-bottom: 3rem;
}

/* Toolbar */
.tcl-gallery-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem 1rem;
    margin: 0.85rem 0 1.15rem;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border: 1px solid rgba(11, 65, 65, 0.12);
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(11, 65, 65, 0.06);
}

.tcl-gallery-search {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    max-width: 420px;
    margin: 0;
    padding: 0.35rem 0.65rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.tcl-gallery-search i {
    color: #64748b;
    font-size: 0.95rem;
}

.tcl-gallery-search__input {
    width: 100%;
    border: 0;
    background: transparent;
    font-size: 0.9375rem;
    color: #0f172a;
    padding: 0.35rem 0;
    outline: none;
}

.tcl-gallery-search__input::placeholder {
    color: #94a3b8;
}

.tcl-gallery-toolbar__filters {
    flex: 0 0 auto;
    margin-left: auto;
}

.tcl-gallery-sort {
    min-width: 11rem;
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    font-size: 0.875rem;
    font-weight: 500;
}

.tcl-gallery-empty {
    margin: 0 0 1rem;
    padding: 1rem 1.1rem;
    background: #fff8e6;
    border: 1px solid #f0d58c;
    border-radius: 8px;
    color: #7c5e10;
    font-size: 0.9375rem;
}

/* Grid — 3 columns like ministry media page */
.tcl-gallery-media .gallery-page-shell .gallery-albums,
.tcl-gallery-media #gallery-albums-grid {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 1.35rem !important;
}

@media (min-width: 640px) {
    .tcl-gallery-media .gallery-page-shell .gallery-albums,
    .tcl-gallery-media #gallery-albums-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (min-width: 992px) {
    .tcl-gallery-media .gallery-page-shell .gallery-albums,
    .tcl-gallery-media #gallery-albums-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

/* Cards */
.tcl-gallery-media .gallery-album.tcl-media-card {
    position: relative;
    background: #ffffff;
    border: 0;
    border-radius: 12px;
    overflow: hidden !important;
    box-shadow: 0 8px 24px rgba(11, 65, 65, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    height: auto !important;
}

.tcl-gallery-media .gallery-album-link {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
    flex: 1 1 auto;
    text-decoration: none;
    color: #0f172a !important;
}

.tcl-gallery-media .gallery-album.tcl-media-card:hover,
.tcl-gallery-media .gallery-album.tcl-media-card:focus-within {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(11, 65, 65, 0.14);
}

.tcl-gallery-media .gallery-album-thumbnail {
    position: relative !important;
    height: auto !important;
    min-height: 0 !important;
    padding-top: 58% !important;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    background: #e8f0ee;
    flex: 0 0 auto;
}

.tcl-gallery-media .gallery-album-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.35s ease;
}

.tcl-gallery-media .gallery-album:hover .gallery-album-image,
.tcl-gallery-media .gallery-album:focus-within .gallery-album-image {
    transform: scale(1.04);
}

.tcl-gallery-media .gallery-album-overlay {
    display: none !important;
}

.tcl-gallery-media .gallery-album-action {
    position: absolute;
    right: 0.85rem;
    bottom: 0.85rem;
    z-index: 2;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 50%;
    background: #0b4141;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(11, 65, 65, 0.35);
    transition: transform 0.2s ease, background-color 0.2s ease;
    pointer-events: none;
}

.tcl-gallery-media .gallery-album:hover .gallery-album-action,
.tcl-gallery-media .gallery-album:focus-within .gallery-album-action {
    transform: translateX(2px);
    background: #0f5a4a;
}

.tcl-gallery-media .gallery-album-info {
    padding: 1rem 1.05rem 1.1rem !important;
    border-top: 1px solid rgba(11, 65, 65, 0.08);
    background: #ffffff !important;
    min-height: 5.5rem !important;
    flex: 1 1 auto;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 2;
    border-radius: 0 0 12px 12px;
    cursor: pointer;
}

.tcl-gallery-media .gallery-social-share {
    position: absolute;
    right: 0.85rem;
    bottom: 0.85rem;
    z-index: 3;
    cursor: default;
}

.tcl-gallery-media .gallery-album-title,
.tcl-gallery-media .gallery-album-info h2.gallery-album-title {
    font-size: 1rem !important;
    font-weight: 600 !important;
    line-height: 1.45 !important;
    color: #0f172a !important;
    margin: 0 0 0.65rem !important;
    padding-right: 0 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    flex-grow: 0 !important;
}

.tcl-gallery-media .gallery-album-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
}

.tcl-gallery-media .gallery-album-meta time {
    color: #64748b;
}

.tcl-gallery-media .gallery-album-count {
    color: #475569;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-size: 0.75rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.tcl-gallery-media .tcl-gallery-share-hidden {
    display: none !important;
}

.tcl-gallery-media .gallery-page-shell.gallery-container {
    padding-top: 0.25rem;
    padding-bottom: 3rem;
    background: #f4f7f6;
}

.tcl-gallery-media .gallery-album.is-hidden {
    display: none !important;
}

@media (max-width: 767px) {
    .tcl-gallery-hero {
        padding: 1.25rem 0 1.75rem;
    }

    .tcl-gallery-hero::after {
        display: none;
    }

    .tcl-gallery-toolbar__filters {
        margin-left: 0;
        width: 100%;
    }

    .tcl-gallery-search {
        max-width: none;
        flex: 1 1 100%;
    }

    .tcl-gallery-sort {
        width: 100%;
    }
}
