/* galleryPage styles */

/* ===== PAGE HERO ===== */
.gallery-page-hero {
    background: linear-gradient(135deg, #05406d 0%, #075694 60%, #0a6cb8 100%);
    padding: 120px 0 70px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.gallery-page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.gallery-page-hero h1 {
    font-size: 3rem;
    color: white;
    margin-bottom: 14px;
    position: relative;
}
.gallery-page-hero p {
    color: rgba(255,255,255,0.82);
    font-size: 1.1rem;
    max-width: 560px;
    margin: 0 auto 20px;
    position: relative;
}
.gallery-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.65);
    position: relative;
    margin-bottom: 10px;
}
.gallery-breadcrumb a { color: rgba(255,255,255,0.85); }
.gallery-breadcrumb a:hover { color: var(--color-accent); }
.gallery-breadcrumb i { font-size: 0.7rem; }

/* ===== FILTER BAR ===== */
.filter-bar {
    background: white;
    padding: 20px 0;
    box-shadow: 0 4px 20px rgba(7,86,148,0.08);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 3px solid var(--color-accent);
}
.filter-inner {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}
.filter-label {
    font-weight: 700;
    color: var(--color-primary-dark);
    font-size: 0.95rem;
    white-space: nowrap;
}
.filter-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
}
.filter-tab {
    padding: 7px 18px;
    border-radius: 50px;
    border: 2px solid #e0e8f5;
    background: white;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text-light);
    cursor: pointer;
    transition: all 0.25s;
}
.filter-tab:hover { border-color: var(--color-primary); color: var(--color-primary); }
.filter-tab.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}
.gallery-count {
    font-size: 0.88rem;
    color: var(--color-text-light);
    white-space: nowrap;
}
.gallery-count strong { color: var(--color-primary); }

/* ===== MASONRY GRID ===== */
.gallery-page-grid {
    columns: 3 280px;
    column-gap: 20px;
    padding: 48px 0 80px;
}
.gallery-page-item {
    break-inside: avoid;
    margin-bottom: 20px;
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(7,86,148,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.gallery-page-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(7,86,148,0.2);
}
.gallery-page-item img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}
.gallery-page-item:hover img {
    transform: scale(1.04);
}
.gallery-page-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5,64,109,0.9) 0%, rgba(7,86,148,0.3) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}
.gallery-page-item:hover .gallery-page-overlay { opacity: 1; }
.gallery-page-overlay-content {
    transform: translateY(12px);
    transition: transform 0.3s;
}
.gallery-page-item:hover .gallery-page-overlay-content { transform: translateY(0); }
.gallery-page-overlay h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 4px;
}
.gallery-page-overlay .tag-badge {
    display: inline-block;
    background: var(--color-accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
}
.gallery-overlay-zoom {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(6px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s;
}
.gallery-page-item:hover .gallery-overlay-zoom { opacity: 1; }

/* ===== LOADING STATE ===== */
.gallery-loading {
    text-align: center;
    padding: 80px 20px;
    color: var(--color-text-light);
}
.gallery-loading .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e0e8f5;
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== EMPTY STATE ===== */
.gallery-empty {
    text-align: center;
    padding: 80px 20px;
}
.gallery-empty i { font-size: 4rem; color: #d1d9e6; margin-bottom: 20px; }
.gallery-empty h3 { color: var(--color-primary-dark); margin-bottom: 10px; }
.gallery-empty p { color: var(--color-text-light); }

/* ===== LIGHTBOX ===== */
.lightbox-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10,20,40,0.97);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.25s ease;
}
.lightbox-backdrop.active { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.lightbox-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.lightbox-img {
    max-width: 90vw;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.6);
    animation: scaleIn 0.3s ease;
}
@keyframes scaleIn { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.lightbox-caption {
    margin-top: 16px;
    text-align: center;
}
.lightbox-caption h4 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 6px;
}
.lightbox-caption span {
    background: var(--color-accent);
    color: white;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.12);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); }

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 10000;
}
.lightbox-nav:hover { background: var(--color-accent); border-color: var(--color-accent); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-counter {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.1);
    color: white;
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 600;
    z-index: 10000;
    backdrop-filter: blur(6px);
}

/* ===== CTA BOTTOM ===== */
.gallery-cta {
    background: linear-gradient(135deg, #05406d 0%, #0a6cb8 100%);
    padding: 60px 0;
    text-align: center;
}
.gallery-cta h2 { color: white; margin-bottom: 12px; }
.gallery-cta p { color: rgba(255,255,255,0.82); margin-bottom: 28px; }

@media (max-width: 768px) {
    .gallery-page-hero h1 { font-size: 2rem; }
    .gallery-page-grid { columns: 1 280px; }
    .lightbox-nav { display: none; }
}
