:root {
    --gallery-navy: #0d2b45;
    --gallery-blue: #155b8f;
    --gallery-sky: #2b82b9;
    --gallery-gold: #eeb64b;
    --gallery-ink: #17324a;
    --gallery-muted: #6a7c8d;
    --gallery-paper: #f5f8fb;
    --gallery-shadow: 0 18px 45px rgba(13, 43, 69, 0.12);
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--gallery-paper);
    color: var(--gallery-ink);
    font-family: "Inter", "Segoe UI", sans-serif;
}

a {
    color: var(--gallery-blue);
}

.gallery-navbar {
    background: rgba(8, 31, 52, 0.97);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.gallery-navbar .navbar-brand {
    font-weight: 800;
    letter-spacing: -0.02em;
}

.brand-mark {
    align-items: center;
    background: var(--gallery-gold);
    border-radius: 12px;
    color: var(--gallery-navy);
    display: inline-flex;
    height: 38px;
    justify-content: center;
    margin-right: 10px;
    width: 38px;
}

.gallery-hero {
    background:
        radial-gradient(circle at 88% 20%, rgba(238, 182, 75, 0.3), transparent 22rem),
        linear-gradient(135deg, #0b2c4a 0%, #155b8f 70%, #2477a9 100%);
    color: #fff;
    overflow: hidden;
    padding: 4.75rem 0 5.75rem;
    position: relative;
}

.gallery-hero::after {
    background: rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    content: "";
    height: 24rem;
    position: absolute;
    right: -8rem;
    top: -10rem;
    width: 24rem;
}

.gallery-hero h1 {
    font-size: clamp(2.15rem, 5vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.04em;
}

.gallery-hero .lead {
    color: rgba(255, 255, 255, 0.78);
    max-width: 650px;
}

.gallery-breadcrumb {
    --bs-breadcrumb-divider-color: rgba(255, 255, 255, 0.52);
    --bs-breadcrumb-item-active-color: rgba(255, 255, 255, 0.64);
}

.gallery-breadcrumb a {
    color: #fff;
    text-decoration: none;
}

.search-panel {
    background: #fff;
    border: 1px solid rgba(13, 43, 69, 0.07);
    border-radius: 20px;
    box-shadow: var(--gallery-shadow);
    margin-top: -2.25rem;
    padding: 1rem;
    position: relative;
    z-index: 2;
}

.search-panel .form-control {
    border: 0;
    box-shadow: none;
    min-height: 48px;
}

.btn-gallery {
    background: var(--gallery-gold);
    border: 0;
    color: var(--gallery-navy);
    font-weight: 800;
    padding: 0.75rem 1.4rem;
}

.btn-gallery:hover,
.btn-gallery:focus {
    background: #f8c65e;
    color: var(--gallery-navy);
    transform: translateY(-1px);
}

.section-kicker {
    color: var(--gallery-blue);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.album-card {
    background: #fff;
    border: 0;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(13, 43, 69, 0.08);
    height: 100%;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.album-card:hover {
    box-shadow: var(--gallery-shadow);
    transform: translateY(-8px);
}

.album-cover {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
}

.album-cover img {
    height: 100%;
    object-fit: cover;
    transition: transform 0.55s ease;
    width: 100%;
}

.album-card:hover .album-cover img {
    transform: scale(1.07);
}

.photo-count-badge {
    backdrop-filter: blur(10px);
    background: rgba(8, 31, 52, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    bottom: 14px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    left: 14px;
    padding: 0.48rem 0.72rem;
    position: absolute;
}

.album-card .card-title {
    color: var(--gallery-navy);
    font-size: 1.08rem;
    font-weight: 800;
}

.album-card .card-text {
    color: var(--gallery-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

.album-link {
    color: var(--gallery-blue);
    font-size: 0.85rem;
    font-weight: 800;
    text-decoration: none;
}

.album-link i {
    transition: transform 0.2s ease;
}

.album-card:hover .album-link i {
    transform: translateX(4px);
}

.album-summary {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: space-between;
}

.album-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.album-navigation .btn {
    border-radius: 999px;
}

.masonry-gallery {
    column-count: 4;
    column-gap: 1rem;
}

.gallery-photo-card {
    break-inside: avoid;
    display: inline-block;
    margin-bottom: 1rem;
    position: relative;
    width: 100%;
}

.gallery-photo-link {
    background: #dce6ed;
    border-radius: 16px;
    box-shadow: 0 9px 24px rgba(13, 43, 69, 0.1);
    display: block;
    overflow: hidden;
    position: relative;
}

.gallery-photo-link img {
    display: block;
    height: auto;
    transition: filter 0.3s ease, transform 0.45s ease;
    width: 100%;
}

.gallery-photo-link::after {
    align-items: center;
    background: rgba(8, 31, 52, 0.48);
    color: #fff;
    content: "\f00e";
    display: flex;
    font-family: "Font Awesome 6 Free";
    font-size: 1.5rem;
    font-weight: 900;
    inset: 0;
    justify-content: center;
    opacity: 0;
    position: absolute;
    transition: opacity 0.3s ease;
}

.gallery-photo-link:hover img {
    transform: scale(1.025);
}

.gallery-photo-link:hover::after {
    opacity: 1;
}

.photo-caption {
    background: linear-gradient(transparent, rgba(8, 31, 52, 0.86));
    bottom: 0;
    color: #fff;
    font-size: 0.82rem;
    left: 0;
    padding: 2rem 1rem 0.85rem;
    position: absolute;
    right: 0;
}

.empty-state {
    background: #fff;
    border: 1px dashed #b8c8d4;
    border-radius: 22px;
    padding: 4rem 1.5rem;
    text-align: center;
}

.empty-state i {
    color: var(--gallery-sky);
    font-size: 3rem;
}

.pagination {
    gap: 0.35rem;
    justify-content: center;
}

.page-link {
    border: 0;
    border-radius: 10px !important;
    color: var(--gallery-blue);
}

.page-item.active .page-link {
    background: var(--gallery-blue);
}

.single-photo-frame {
    background: #081f34;
    border-radius: 22px;
    box-shadow: var(--gallery-shadow);
    overflow: hidden;
    text-align: center;
}

.single-photo-frame img {
    max-height: 75vh;
    max-width: 100%;
    object-fit: contain;
}

.gallery-footer {
    background: #081f34;
    color: rgba(255, 255, 255, 0.68);
    margin-top: 5rem;
    padding: 2rem 0;
}

@media (max-width: 1199.98px) {
    .masonry-gallery {
        column-count: 3;
    }
}

@media (max-width: 767.98px) {
    .gallery-hero {
        padding: 3.5rem 0 4.75rem;
    }

    .masonry-gallery {
        column-count: 2;
    }

    .album-summary {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 419.98px) {
    .album-grid-item {
        flex: 0 0 auto;
        width: 100%;
    }

    .masonry-gallery {
        column-count: 1;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
