:root {
    --page-bg: #02060d;
    --panel-bg: #060d17;
    --panel-bg-soft: #08111d;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-active: rgba(93, 173, 255, 0.75);
    --text-main: #eef4ff;
    --text-muted: #7f91a8;
    --accent: #5dadef;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text-main);
    background:
        radial-gradient(circle at 50% -20%, rgba(26, 75, 135, 0.18), transparent 38%),
        linear-gradient(180deg, #050b14 0%, var(--page-bg) 100%);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.gallery-page {
    min-height: 100vh;
}

.gallery-shell {
    max-width: 1380px;
}

.gallery-header {
    margin-bottom: 1.1rem;
}

.gallery-header .eyebrow {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 0.66rem;
    font-weight: 700;
}

.gallery-title {
    font-size: clamp(1.9rem, 3vw, 2.9rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
    margin-bottom: 0.25rem;
}

.gallery-subtitle,
.text-secondary {
    color: var(--text-muted) !important;
}

.gallery-subtitle {
    font-size: 0.9rem;
}

code {
    color: #bfe2ff;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 0.35rem;
    padding: 0.08rem 0.3rem;
}


.equipment-panel {
    margin-bottom: 0.9rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.9rem;
    background: rgba(6, 13, 23, 0.78);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.equipment-heading {
    margin-bottom: 0.75rem;
}

.equipment-eyebrow {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.62rem;
    font-weight: 700;
}

.equipment-title {
    font-size: 1.15rem;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.equipment-notes {
    margin: 0 0 0.85rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
}

.equipment-item {
    min-width: 0;
    padding: 0.72rem 0.78rem;
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 0.65rem;
    background: rgba(255, 255, 255, 0.025);
}

.equipment-label,
.equipment-value {
    display: block;
}

.equipment-label {
    margin-bottom: 0.24rem;
    color: var(--text-muted);
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.equipment-value {
    color: var(--text-main);
    font-size: 0.88rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.gallery-card {
    overflow: hidden;
    border: 1px solid var(--border-color);
    border-radius: 0.9rem;
    background: var(--panel-bg);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

.image-stage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 62vh;
    max-height: 74vh;
    padding: 0.55rem;
    background: #030811;
}

.gallery-image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 0.5rem;
}

.custom-caption {
    position: static;
    width: auto;
    padding: 0.72rem 1rem;
    border-top: 1px solid var(--border-color);
    background: rgba(3, 8, 17, 0.96);
    color: var(--text-main);
}

.caption-title {
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.12rem;
}

.caption-count {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.carousel-control-prev,
.carousel-control-next {
    width: 7%;
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 2.3rem;
    height: 2.3rem;
    border-radius: 999px;
    background-color: rgba(2, 6, 13, 0.78);
    background-size: 45%;
    border: 1px solid rgba(255, 255, 255, 0.09);
    transition: background-color 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    background-color: rgba(8, 17, 29, 0.98);
    border-color: rgba(93, 173, 239, 0.45);
    transform: scale(1.04);
}

.gallery-layout {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 0.75rem;
    align-items: stretch;
}

.gallery-layout.single-image {
    grid-template-columns: minmax(0, 1fr);
}

.gallery-layout .gallery-card {
    min-width: 0;
}

.thumbnail-sidebar {
    min-height: 0;
    max-height: calc(74vh + 52px);
    padding: 0.45rem;
    border: 1px solid var(--border-color);
    border-radius: 0.8rem;
    background: rgba(6, 13, 23, 0.82);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(93, 173, 239, 0.55) rgba(255, 255, 255, 0.035);
}

.thumbnail-sidebar::-webkit-scrollbar {
    width: 9px;
}

.thumbnail-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.035);
    border-radius: 999px;
}

.thumbnail-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(
        180deg,
        rgba(93, 173, 239, 0.72),
        rgba(60, 120, 185, 0.62)
    );
    border: 2px solid rgba(6, 13, 23, 0.95);
    border-radius: 999px;
}

.thumbnail-sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(
        180deg,
        rgba(118, 191, 255, 0.92),
        rgba(72, 139, 208, 0.82)
    );
}

.thumbnail-strip {
    display: flex;
    flex-direction: column;
    gap: 0.48rem;
    width: 100%;
}

.thumbnail-button {
    width: 100%;
    height: 68px;
    padding: 0;
    border: 1px solid var(--border-color);
    border-radius: 0.55rem;
    overflow: hidden;
    background: var(--panel-bg-soft);
    opacity: 0.55;
    transition: opacity 160ms ease, border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.thumbnail-button:hover,
.thumbnail-button.active {
    opacity: 1;
    border-color: var(--border-color-active);
    transform: translateY(-1px);
    box-shadow: 0 0 0 2px rgba(93, 173, 239, 0.12);
}

.thumbnail-button img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: saturate(0.9) contrast(1.04);
}

.empty-gallery {
    border: 1px solid var(--border-color);
    border-radius: 0.9rem;
    background: var(--panel-bg);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

@media (max-width: 980px) {
    .gallery-content {
        grid-template-columns: minmax(0, 1fr) 260px;
    }
}

@media (max-width: 768px) {
    .gallery-content {
        grid-template-columns: 1fr;
    }

    .image-detail-panel {
        position: static;
    }
    .gallery-layout {
        display: flex;
        flex-direction: column;
        gap: 0.65rem;
    }

    .thumbnail-sidebar {
        order: 2;
        max-height: none;
        padding: 0.4rem;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: thin;
    }

    .thumbnail-sidebar::-webkit-scrollbar {
        width: auto;
        height: 8px;
    }

    .thumbnail-strip {
        flex-direction: row;
        width: max-content;
    }

    .thumbnail-button {
        flex: 0 0 78px;
        width: 78px;
        height: 52px;
    }

    .gallery-shell {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .gallery-header {
        margin-bottom: 0.9rem;
    }

    .equipment-panel {
        padding: 0.85rem;
    }

    .equipment-grid {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .equipment-item {
        padding: 0.65rem 0.7rem;
    }

    .gallery-title {
        font-size: 2rem;
    }

    .gallery-subtitle {
        font-size: 0.84rem;
    }

    .image-stage {
        min-height: 50vh;
        max-height: 64vh;
        padding: 0.4rem;
    }

    .gallery-image {
        max-height: 60vh;
        border-radius: 0.45rem;
    }

    .custom-caption {
        padding: 0.65rem 0.8rem;
    }

    .caption-title {
        font-size: 0.98rem;
    }

    .caption-count {
        font-size: 0.78rem;
    }

    .carousel-control-prev,
    .carousel-control-next {
        width: 14%;
    }

    .carousel-control-prev-icon,
    .carousel-control-next-icon {
        width: 2rem;
        height: 2rem;
    }

    .thumbnail-button {
        border-radius: 0.45rem;
    }
}

.category-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}

.category-button {
    padding: 0.42rem 0.72rem;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    color: var(--text-muted);
    background: rgba(6, 13, 23, 0.78);
    font-size: 0.78rem;
    font-weight: 600;
    transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.category-button:hover,
.category-button.active {
    color: var(--text-main);
    border-color: rgba(93, 173, 239, 0.5);
    background: rgba(93, 173, 239, 0.11);
}

.gallery-main {
    min-width: 0;
}

.gallery-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 0.75rem;
    align-items: start;
}

.fullscreen-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0;
    border: 0;
    outline: none;
    box-shadow: none;
    background: transparent;
    cursor: zoom-in;
}

.fullscreen-trigger:focus,
.fullscreen-trigger:focus-visible,
.fullscreen-trigger:active {
    outline: none;
    box-shadow: none;
}

.custom-caption {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.original-button {
    flex: 0 0 auto;
    padding: 0.38rem 0.62rem;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 0.5rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.035);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.original-button:hover {
    color: var(--text-main);
    border-color: rgba(93, 173, 239, 0.42);
    background: rgba(93, 173, 239, 0.10);
}

.image-details {
    margin-top: 0;
    min-width: 0;
}

.image-detail-panel {
    display: none;
    position: sticky;
    top: 1rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 0.85rem;
    background: rgba(6, 13, 23, 0.8);
}

.image-detail-panel.active {
    display: block;
}

.detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.detail-eyebrow {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.62rem;
    font-weight: 700;
}

.detail-title {
    font-size: 1.12rem;
    font-weight: 650;
}

.featured-badge {
    padding: 0.3rem 0.52rem;
    border: 1px solid rgba(93, 173, 239, 0.4);
    border-radius: 999px;
    color: #cfe9ff;
    background: rgba(93, 173, 239, 0.1);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.detail-description,
.detail-empty {
    color: var(--text-muted);
    font-size: 0.86rem;
    line-height: 1.55;
}

.detail-description {
    margin-bottom: 0.85rem;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.detail-item {
    min-width: 0;
    padding: 0.64rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.6rem;
    background: rgba(255, 255, 255, 0.025);
}

.detail-label,
.detail-value {
    display: block;
}

.detail-label {
    margin-bottom: 0.22rem;
    color: var(--text-muted);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.detail-value {
    color: var(--text-main);
    font-size: 0.82rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.75rem 0.15rem 0.1rem;
    color: #617188;
    font-size: 0.72rem;
}

.fullscreen-open {
    overflow: hidden;
}

.fullscreen-viewer {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(1, 4, 10, 0.97);
    backdrop-filter: blur(8px);
}

.fullscreen-viewer.open {
    display: flex;
}

.fullscreen-viewer img {
    max-width: 94vw;
    max-height: 88vh;
    object-fit: contain;
    user-select: none;
}

.fullscreen-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
    font-size: 1.65rem;
    line-height: 1;
}

.fullscreen-title {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    color: var(--text-muted);
    text-align: center;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .custom-caption {
        align-items: flex-start;
    }

    .original-button {
        font-size: 0.7rem;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .site-footer {
        flex-direction: column;
        gap: 0.2rem;
        text-align: center;
    }

    .fullscreen-viewer {
        padding: 1rem;
    }
}
