/* Our Work category overview and category-specific gallery. */
/* Replace stacked theme section margin + hero padding with one compact gap. */
.our-work-page .page-hero { margin-bottom: 0; padding-bottom: clamp(28px, 4vw, 40px); }
.our-work-page .gallery { margin-top: 0; padding-top: 0; }
.our-work-page .gallery-intro { margin-top: 0; }
.gallery-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.gallery-category-card {
    display: flex; flex-direction: column; gap: 6px; width: 100%; margin: 0;
    padding: 22px; text-align: left; font: inherit; cursor: pointer;
    border: 1px solid var(--line); border-radius: var(--radius);
    background: linear-gradient(180deg, var(--panel-2), var(--panel)); color: var(--text);
    transition: border-color .18s ease, box-shadow .18s ease;
}
.gallery-category-card:last-child { grid-column: 1 / -1; }
.gallery-category-card strong { color: var(--text); font-size: 20px; }
.gallery-category-card span { color: var(--cyan); font-size: 14px; }
.gallery-category-card:hover, .gallery-category-card:focus-visible {
    border-color: var(--blue); box-shadow: 0 0 16px rgb(0 156 255 / .14);
}
.gallery-category-card:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
    .gallery-category-card { transition: none; }
}
.gallery-browser .gallery-filters { justify-content: flex-start; gap: 8px; margin: 20px 0; }
.gallery-browser .filter-chip { margin: 0; padding: 10px 14px; font-size: 14px; }
.gallery-browser > .btn { margin: 0; }
.gallery-browser[hidden], .gallery-overview[hidden], #gallery-empty[hidden] { display: none; }
@media (max-width: 600px) {
    .gallery-overview { grid-template-columns: 1fr; }
    .gallery-category-card { padding: 18px; }
    .gallery-browser .filter-chip { flex: 1 1 140px; justify-content: center; }
}

/* Without JavaScript, closed native details keep browsing category-first.
   Enhancement moves the same product figures into the existing filtered grid. */
.our-work-page:not(.gallery-enhanced) #gallery-back,
.our-work-page:not(.gallery-enhanced) #gallery-category-heading,
.our-work-page:not(.gallery-enhanced) #gallery-empty { display: none; }
.our-work-page:not(.gallery-enhanced) #gallery-grid { columns: auto; }
.gallery-static-group { margin-bottom: 14px; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.gallery-static-group summary { color: var(--cyan); cursor: pointer; font-weight: 700; }
.gallery-static-group[open] summary { margin-bottom: 18px; }
a.gallery-open { text-decoration: none; }

/* Consistent studio cards. Contain every image, including the full-size views. */
.our-work-page .gallery-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px;
    columns: auto; align-items: stretch;
}
.our-work-page:not(.gallery-enhanced) #gallery-grid { display: block; }
.our-work-page .gallery-item {
    display: flex; flex-direction: column; min-width: 0; margin: 0;
    border: 1px solid color-mix(in srgb, var(--blue) 30%, transparent);
    border-radius: 12px; background: var(--panel); transition: none;
}
.our-work-page .gallery-item[hidden] { display: none; }
.our-work-page .gallery-item:hover {
    border-color: color-mix(in srgb, var(--blue) 50%, transparent); box-shadow: none;
}
.our-work-page .gallery-open {
    flex: none; aspect-ratio: 4 / 3; background: #080a0d;
}
.our-work-page .gallery-open img {
    width: 100%; height: 100%; object-fit: contain; transform: none; transition: none;
}
.our-work-page .gallery-open::after { display: none; }
.our-work-page .gallery-zoom { display: none; }
.our-work-page.gallery-enhanced .gallery-item > .gallery-open ~ .gallery-open { display: none; }
/* Always-visible guidance, with wording that follows the input/viewport. */
.our-work-page .gallery-image-instruction {
    margin: 0; padding: 12px 16px 0; color: #a9b3be; font-size: 13px; line-height: 1.5;
}
.our-work-page .gallery-instruction-tap { display: none; }
@media (pointer: coarse), (max-width: 700px) {
    .our-work-page .gallery-instruction-click { display: none; }
    .our-work-page .gallery-instruction-tap { display: inline; }
}
/* Existing files supply compact, keyboard-accessible alternate views. */
.our-work-page .gallery-thumbnails {
    display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px 0;
}
.our-work-page .gallery-thumbnail {
    display: block; flex: 0 0 auto; width: 66px; height: 54px;
    margin: 0; padding: 0; overflow: hidden; cursor: pointer;
    border: 1px solid var(--line); border-radius: 5px;
    background: #080a0d; box-shadow: none; transition: none;
}
.our-work-page .gallery-thumbnail img {
    display: block; width: 100%; height: 100%; object-fit: contain;
}
.our-work-page .gallery-thumbnail[aria-pressed="true"],
.our-work-page .gallery-thumbnail:hover { border-color: var(--blue); }
.our-work-page .gallery-thumbnail:focus-visible {
    outline: 2px solid var(--blue); outline-offset: 3px;
}
.our-work-page .gallery-item figcaption {
    display: flex; flex: 1; flex-direction: column; align-items: flex-start;
    gap: 12px; padding: 20px; text-align: left;
}
.our-work-page .gallery-item figcaption strong { font-size: 18px; line-height: 1.35; }
.our-work-page.gallery-enhanced .gallery-item figcaption > span,
.our-work-page.gallery-enhanced .gallery-item .gallery-description { display: none; }
.our-work-page .gallery-summary {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
    overflow: hidden; margin: 0; color: #a9b3be; font-size: 15px; line-height: 1.55;
}
.our-work-page .gallery-details {
    width: auto; margin: auto 0 0; padding: 8px 0; border: 0; border-radius: 0;
    background: transparent; color: var(--cyan); font-size: 14px; font-weight: 600; line-height: 1.5;
    font-family: inherit; text-align: left; cursor: pointer; box-shadow: none;
}
.our-work-page .gallery-details:hover { text-decoration: underline; }
.our-work-page .gallery-item figcaption > .btn {
    width: auto; padding: 0; border: 0; border-radius: 0; background: none;
    box-shadow: none; color: var(--text); font-size: 12px; line-height: 1.5;
    letter-spacing: .04em; transform: none; text-align: left;
}
.our-work-page .gallery-item figcaption > .btn:hover { color: var(--cyan); }
.our-work-page .gallery-category-card,
.our-work-page .filter-chip { box-shadow: none; transition: none; }
.our-work-page .gallery-category-card:last-child { grid-column: auto; }
.our-work-page .gallery-category-card { padding: 20px; border-radius: 12px; }
/* Keep main categories separate from the selected collection on every view. */
.our-work-page .gallery-browser > #gallery-filters {
    margin: 20px 0 32px; padding-bottom: 28px; border-bottom: 1px solid var(--line);
}
.our-work-page #gallery-holiday-heading {
    margin: 0 0 4px; font-size: clamp(24px, 3vw, 32px); line-height: 1.25;
}
.our-work-page .gallery-holiday-subtitle {
    margin: 0; color: #a9b3be; font-size: 14px; line-height: 1.5;
}
.our-work-page .gallery-browser .gallery-holiday-filters {
    display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 28px; padding: 0;
}
.our-work-page .gallery-holiday-filters .filter-chip {
    flex: 0 0 auto; width: auto; padding: 8px 14px; font-size: 13px; line-height: 1.4;
}
.gallery-holiday-section[hidden], .gallery-holiday-filters[hidden] { display: none; }
.our-work-page #gallery-category-heading { font-size: clamp(22px, 3vw, 30px); line-height: 1.3; margin: 0 0 24px; }

/* Reset framework button spacing without changing the 48px control circles. */
.our-work-page .lightbox > button {
    display: grid; place-items: center; padding: 0;
    line-height: 1; letter-spacing: 0; text-indent: 0; text-align: center;
}
/* Arial's chevrons sit below its line-box center; move only the glyphs. */
.our-work-page .lightbox-prev > span,
.our-work-page .lightbox-next > span { display: block; transform: translateY(-2px); }
/* Existing lightbox doubles as a readable product details view. */
.our-work-page .lightbox { padding: 64px 76px; grid-template-columns: minmax(0, 1fr); }
.our-work-page .lightbox-panel {
    display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: center; gap: 24px 32px; width: 100%; max-width: 1100px; min-width: 0; justify-self: center;
    max-height: calc(100dvh - 128px); overflow-y: auto; overscroll-behavior: contain;
    padding: 8px; text-align: left;
}
.our-work-page .lightbox-img {
    width: 100%; height: auto; max-height: calc(100dvh - 190px);
    object-fit: contain; box-shadow: none; border-radius: 4px;
}
.our-work-page .lightbox-caption { margin: 0; min-width: 0; text-align: left; }
.our-work-page .lightbox-caption .eyebrow { margin: 0 0 14px; font-size: 11px; }
.our-work-page #lightbox-title { margin: 0 0 20px; font-size: clamp(24px, 3vw, 34px); line-height: 1.2; }
.our-work-page .lightbox-description { font-size: 16px; line-height: 1.65; color: #cfd6de; }
.our-work-page .lightbox-description p { margin: 0 0 16px; }
.our-work-page .lightbox-image-heading {
    margin: 20px 0 12px; color: var(--text); font-size: 20px; line-height: 1.35;
}
.our-work-page .lightbox-quote { margin-top: 24px; line-height: 1.4; }
.our-work-page .lightbox-count { grid-column: 1 / -1; margin: 0; text-align: center; }
@media (max-width: 960px) {
    .our-work-page .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}
@media (max-width: 700px) {
    .our-work-page .lightbox { padding: 70px 20px 90px; }
    .our-work-page .lightbox-panel {
        grid-template-columns: minmax(0, 1fr); gap: 20px;
        max-height: calc(100dvh - 160px); padding: 4px;
    }
    .our-work-page .lightbox-img { max-height: 42dvh; }
    .our-work-page .lightbox-prev, .our-work-page .lightbox-next { top: auto; bottom: 22px; transform: none; }
    .our-work-page .lightbox-description { font-size: 15px; }
}
@media (max-width: 600px) {
    .our-work-page .gallery-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
    .our-work-page .gallery-item figcaption { padding: 18px; }
    .our-work-page .gallery-browser .filter-chip { flex: 0 1 auto; }
    .our-work-page .gallery-item figcaption > span { display: block; }
    .our-work-page.gallery-enhanced .gallery-item figcaption > span { display: none; }
}
