/* ============================================================
   GALLERY PAGE BACKGROUND + THEME
   ============================================================ */

body.gallery-page {
    background: #84a3ab;
    color: #ffffff;
}

/* ============================================================
   GALLERY LAYOUT
   ============================================================ */

.gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.gallery-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */

.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 3rem;
    color: #ffffff;
}

.page-header .subtitle {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
    letter-spacing: 2px;
}

/* ============================================================
   GALLERY HEADER BLOCK
   ============================================================ */

.gallery-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(255,255,255,0.2);
}

.gallery-header h2 {
    font-size: 1.8rem;
    color: #ffffff;
}

.gallery-header p {
    color: rgba(255,255,255,0.8);
}

/* ============================================================
   PHOTO GRID
   ============================================================ */

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.photo-item {
    background: rgba(0,0,0,0.2);
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.photo-item:hover {
    transform: translateY(-4px);
}

.photo-item img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-item:hover img {
    transform: scale(1.05);
}

.photo-caption {
    padding: 0.5rem;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.8);
    text-align: center;
}

/* ============================================================
   SIDEBAR
   ============================================================ */

.sidebar {
    align-self: start;
}

.sidebar-widget {
    background: rgba(0,0,0,0.2);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.sidebar-widget h3 {
    font-size: 1.3rem;
    color: #ffffff;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e89b0f;
}

/* ============================================================
   GALLERY LISTS
   ============================================================ */

.gallery-list,
.sub-gallery-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.gallery-list li a {
    display: block;
    padding: 0.5rem 0;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    transition: 0.2s;
}

.gallery-list li a:hover {
    color: #e89b0f;
    padding-left: 0.5rem;
}

.gallery-list li a.active {
    color: #e89b0f;
    font-weight: bold;
}

.sub-gallery-list {
    padding-left: 1.5rem;
}

.sub-gallery-list li a {
    font-size: 0.8rem;
    border-bottom: none;
    padding: 0.3rem 0;
}

/* ============================================================
   NO RESULTS
   ============================================================ */

.no-results {
    text-align: center;
    padding: 4rem;
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 1.2rem;
    border-radius: 8px;
}


/* Masonry Grid */
.gallery-masonry {
    column-count: 4;
    column-gap: 1.5rem;
}

@media (max-width: 1200px) {
    .gallery-masonry { column-count: 3; }
}

@media (max-width: 900px) {
    .gallery-masonry { column-count: 2; }
}

@media (max-width: 600px) {
    .gallery-masonry { column-count: 1; }
}

.gallery-masonry-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
}

.gallery-masonry-item img {
    width: 100%;
    display: block;
    border-radius: 4px;
}

/* Sub-heading list */
.gallery-sub-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.gallery-sub-list li a {
    padding: 0.4rem 0.8rem;
    background: #eee;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.gallery-sub-list li a.active {
    background: #1a3c3c;
    color: #fff;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
    .gallery-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .gallery-container {
        padding: 1rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}