:root {
    --gallery-primary: #59050a;
    --gallery-primary-deep: #3c0407;
    --gallery-accent: #17bed2;
    --gallery-accent-soft: rgba(23, 190, 210, 0.14);
    --gallery-surface: #ffffff;
    --gallery-surface-soft: #f4f8fb;
    --gallery-border: #dfe9f1;
    --gallery-text: #223247;
    --gallery-muted: #66768c;
    --gallery-shadow: 0 24px 60px rgba(34, 50, 71, 0.12);
    --gallery-shadow-soft: 0 16px 36px rgba(34, 50, 71, 0.08);
}

.gallery-page {
    background:
        radial-gradient(circle at top left, rgba(23, 190, 210, 0.08), transparent 22%),
        linear-gradient(180deg, #f8fbfd 0%, #ffffff 36%, #f7fafc 100%);
    color: var(--gallery-text);
}

.gallery-shell {
    padding-top: 118px;
    padding-bottom: 42px;
}

.gallery-app {
    min-height: 40vh;
}

.gallery-hero {
    padding: 18px 0 12px;
}

.gallery-hero-card {
    position: relative;
    overflow: hidden;
    border-radius: 34px;
    padding: 48px 44px;
    background:
        radial-gradient(circle at top right, rgba(23, 190, 210, 0.16), transparent 34%),
        linear-gradient(135deg, rgba(89, 5, 10, 0.98) 0%, rgba(110, 16, 24, 0.96) 54%, rgba(42, 58, 88, 0.94) 100%);
    box-shadow: 0 30px 70px rgba(34, 50, 71, 0.18);
}

.gallery-hero-card:before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0.05), transparent 45%);
    pointer-events: none;
}

.gallery-hero-content,
.gallery-stats-grid {
    position: relative;
    z-index: 1;
}

.gallery-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.gallery-title {
    margin: 18px 0 16px;
    color: #fff;
    font-size: 52px;
    line-height: 1.05;
}

.gallery-copy {
    max-width: 620px;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.72;
}

.gallery-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.gallery-btn-primary,
.gallery-btn-secondary,
.gallery-btn-inline,
.gallery-download-btn,
.gallery-lightbox-download,
.gallery-lightbox-close,
.gallery-lightbox-nav {
    transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.gallery-btn-primary,
.gallery-btn-secondary,
.gallery-btn-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 14px 20px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.gallery-btn-primary {
    background: #fff;
    color: var(--gallery-primary);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.15);
}

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

.gallery-btn-secondary {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.gallery-btn-secondary:hover,
.gallery-btn-secondary:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.gallery-btn-inline {
    min-height: 42px;
    padding: 10px 16px;
    background: var(--gallery-accent-soft);
    color: var(--gallery-accent);
}

.gallery-btn-inline:hover,
.gallery-btn-inline:focus {
    color: #fff;
    background: var(--gallery-accent);
}

.gallery-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 8px;
}

.gallery-stat-card {
    padding: 20px 18px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.gallery-stat-value {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.gallery-stat-label {
    color: rgba(255, 255, 255, 0.78);
    font-size: 13px;
    line-height: 1.5;
}

.gallery-section {
    padding: 28px 0;
}

.gallery-section-heading {
    margin-bottom: 18px;
}

.gallery-section-heading h2 {
    margin-bottom: 10px;
    color: var(--gallery-primary);
    font-size: 36px;
    line-height: 1.12;
}

.gallery-section-heading p {
    max-width: 760px;
    margin-bottom: 0;
    color: var(--gallery-muted);
    font-size: 17px;
    line-height: 1.8;
}

.gallery-portal-card,
.gallery-album-card,
.gallery-grid-surface,
.gallery-empty-state {
    border-radius: 28px;
    background: var(--gallery-surface);
    border: 1px solid var(--gallery-border);
    box-shadow: var(--gallery-shadow-soft);
}

.gallery-portal-card {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 22px;
    padding: 30px;
}

.gallery-portal-card h3 {
    margin: 0 0 14px;
    color: var(--gallery-primary);
    font-size: 30px;
    line-height: 1.15;
}

.gallery-portal-card p {
    margin-bottom: 0;
    color: var(--gallery-muted);
    font-size: 16px;
    line-height: 1.75;
}

.gallery-portal-highlights {
    display: grid;
    gap: 12px;
}

.gallery-portal-highlight {
    padding: 18px;
    border-radius: 22px;
    background: var(--gallery-surface-soft);
    border: 1px solid var(--gallery-border);
}

.gallery-portal-highlight strong {
    display: block;
    margin-bottom: 6px;
    color: var(--gallery-primary);
    font-size: 18px;
}

.gallery-hub-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.gallery-album-card {
    overflow: hidden;
}

.gallery-album-card-media {
    position: relative;
    display: block;
    background:
        linear-gradient(140deg, rgba(89, 5, 10, 0.95), rgba(31, 72, 100, 0.92));
    aspect-ratio: 16 / 10;
}

.gallery-album-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-card-fallback {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 22px;
    text-align: center;
    color: rgba(255, 255, 255, 0.92);
    font-size: 16px;
    font-weight: 700;
}

.gallery-card-fallback.is-visible {
    display: flex;
}

.gallery-album-card-body {
    padding: 24px;
}

.gallery-album-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: var(--gallery-accent-soft);
    color: var(--gallery-accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.gallery-album-card-title {
    margin: 16px 0 12px;
    color: var(--gallery-primary);
    font-size: 30px;
    line-height: 1.14;
}

.gallery-album-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.gallery-album-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--gallery-surface-soft);
    color: var(--gallery-muted);
    font-size: 12px;
    font-weight: 600;
}

.gallery-album-card-copy {
    margin-bottom: 18px;
    color: var(--gallery-muted);
    font-size: 16px;
    line-height: 1.72;
}

.gallery-album-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.gallery-grid-surface {
    padding: 28px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.gallery-image-card {
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--gallery-border);
    background: var(--gallery-surface);
    box-shadow: var(--gallery-shadow-soft);
}

.gallery-image-button {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.gallery-image-frame {
    position: relative;
    background: linear-gradient(145deg, rgba(89, 5, 10, 0.96), rgba(27, 67, 101, 0.9));
    aspect-ratio: 1 / 1;
}

.gallery-image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-image-card-body {
    padding: 16px 16px 18px;
}

.gallery-image-caption {
    margin-bottom: 12px;
    color: var(--gallery-primary);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
}

.gallery-card-actions {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.gallery-card-actions button,
.gallery-card-actions a {
    flex: 1;
}

.gallery-image-action,
.gallery-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--gallery-border);
    background: var(--gallery-surface-soft);
    color: var(--gallery-text);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.gallery-image-action:hover,
.gallery-image-action:focus,
.gallery-download-btn:hover,
.gallery-download-btn:focus {
    background: #fff;
    border-color: var(--gallery-accent);
    color: var(--gallery-accent);
    transform: translateY(-1px);
}

.gallery-download-btn {
    color: var(--gallery-primary);
}

.gallery-empty-state {
    padding: 34px 28px;
    text-align: left;
}

.gallery-empty-state h3 {
    margin: 0 0 12px;
    color: var(--gallery-primary);
    font-size: 28px;
}

.gallery-empty-state p {
    max-width: 760px;
    margin-bottom: 18px;
    color: var(--gallery-muted);
    font-size: 16px;
    line-height: 1.75;
}

.gallery-empty-state.is-hidden {
    display: none;
}

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(11, 18, 28, 0.9);
}

.gallery-lightbox.is-active {
    display: flex;
}

.gallery-lightbox-dialog {
    position: relative;
    width: min(1080px, 100%);
    max-height: calc(100vh - 48px);
    overflow: hidden;
    border-radius: 28px;
    background: #0d1520;
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.45);
}

.gallery-lightbox-toolbar {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 10px;
    z-index: 2;
}

.gallery-lightbox-close,
.gallery-lightbox-nav {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
}

.gallery-lightbox-close:hover,
.gallery-lightbox-close:focus,
.gallery-lightbox-nav:hover,
.gallery-lightbox-nav:focus {
    background: rgba(255, 255, 255, 0.14);
}

.gallery-lightbox-stage {
    position: relative;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 72px;
    align-items: center;
    min-height: 420px;
}

.gallery-lightbox-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 28px 18px;
    min-height: 420px;
}

.gallery-lightbox-image {
    max-width: 100%;
    max-height: calc(100vh - 220px);
    border-radius: 18px;
    display: block;
}

.gallery-lightbox-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 0 26px 24px;
}

.gallery-lightbox-copy {
    color: rgba(255, 255, 255, 0.82);
}

.gallery-lightbox-copy strong {
    display: block;
    margin-bottom: 6px;
    color: #fff;
    font-size: 18px;
}

.gallery-lightbox-copy span {
    display: block;
    font-size: 14px;
    line-height: 1.6;
}

.gallery-lightbox-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 12px 18px;
    border-radius: 999px;
    background: var(--gallery-accent);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.gallery-lightbox-download:hover,
.gallery-lightbox-download:focus {
    color: #fff;
    background: #129fb1;
}

.gallery-note {
    margin-top: 16px;
    color: var(--gallery-muted);
    font-size: 14px;
    line-height: 1.7;
}

@media (min-width: 992px) {
    .gallery-header-smart .header .navbar {
        background: rgba(255, 255, 255, 0.92);
        border-bottom-color: rgba(34, 50, 71, 0.08);
        box-shadow: 0 14px 34px rgba(34, 50, 71, 0.08);
        backdrop-filter: blur(12px);
    }

    .gallery-header-smart .header .nav-item-child {
        color: #324255;
        text-shadow: none;
    }

    .gallery-header-smart .header .nav-item-hover.active,
    .gallery-header-smart .header .nav-item-child:hover,
    .gallery-header-smart .header .nav-item-child:focus {
        color: var(--gallery-primary);
    }

    .gallery-header-smart .header .nav-item-hover:after {
        top: 45px;
        opacity: 1;
    }

    .gallery-header-smart .header .logo-img-main {
        display: none;
    }

    .gallery-header-smart .header .logo-img-active {
        display: inline-block;
    }

    .gallery-header-smart.gallery-header-on-dark .header .navbar {
        background: rgba(27, 31, 47, 0.22);
        border-bottom-color: rgba(255, 255, 255, 0.16);
        box-shadow: none;
    }

    .gallery-header-smart.gallery-header-on-dark .header .nav-item-child {
        color: rgba(255, 255, 255, 0.96);
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    }

    .gallery-header-smart.gallery-header-on-dark .header .nav-item-hover.active,
    .gallery-header-smart.gallery-header-on-dark .header .nav-item-child:hover,
    .gallery-header-smart.gallery-header-on-dark .header .nav-item-child:focus {
        color: #ffffff;
    }

    .gallery-header-smart.gallery-header-on-dark .header .nav-item-hover:after {
        background: #7fe9f3;
    }
}

@media (max-width: 1199px) {
    .gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .gallery-shell {
        padding-top: 102px;
    }

    .gallery-hero-card {
        padding: 40px 30px;
        border-radius: 28px;
    }

    .gallery-title {
        font-size: 42px;
    }

    .gallery-copy {
        font-size: 17px;
    }

    .gallery-stats-grid,
    .gallery-hub-grid,
    .gallery-portal-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .gallery-shell {
        padding-top: 90px;
        padding-bottom: 28px;
    }

    .gallery-hero {
        padding-top: 12px;
    }

    .gallery-hero-card {
        padding: 30px 22px;
        border-radius: 24px;
    }

    .gallery-title {
        font-size: 34px;
    }

    .gallery-copy,
    .gallery-section-heading p,
    .gallery-portal-card p,
    .gallery-album-card-copy,
    .gallery-empty-state p {
        font-size: 15px;
        line-height: 1.68;
    }

    .gallery-section-heading h2,
    .gallery-portal-card h3,
    .gallery-album-card-title,
    .gallery-empty-state h3 {
        font-size: 26px;
    }

    .gallery-grid-surface,
    .gallery-portal-card,
    .gallery-empty-state {
        padding: 20px;
        border-radius: 22px;
    }

    .gallery-hub-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .gallery-album-card-body {
        padding: 20px;
    }

    .gallery-card-actions {
        flex-direction: column;
    }

    .gallery-lightbox {
        padding: 12px;
    }

    .gallery-lightbox-dialog {
        border-radius: 20px;
    }

    .gallery-lightbox-stage {
        grid-template-columns: 56px minmax(0, 1fr) 56px;
        min-height: 280px;
    }

    .gallery-lightbox-image-wrap {
        padding: 56px 12px 12px;
        min-height: 280px;
    }

    .gallery-lightbox-footer {
        flex-direction: column;
        align-items: stretch;
        padding: 0 16px 18px;
    }

    .gallery-lightbox-download {
        width: 100%;
    }
}
