:root {
  --gallery-primary: #e93925;
  --gallery-primary-dark: #b92718;
  --gallery-ink: #11131a;
  --gallery-text: #313743;
  --gallery-muted: #707786;
  --gallery-soft: #f6f7fa;
  --gallery-panel: #ffffff;
  --gallery-line: rgba(17, 19, 26, 0.1);
  --gallery-shadow: 0 20px 55px rgba(17, 19, 26, 0.12);
}

.gallery-breadcrumb-list {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.gallery-breadcrumb-list li {
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
  font-weight: 800;
}

.gallery-breadcrumb-list li + li::before {
  color: rgba(255, 255, 255, 0.7);
  content: "/";
  margin-right: 10px;
}

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

.gallery-breadcrumb-list a:hover {
  color: #ffb4aa;
}

.gallery-hero {
  background:
    radial-gradient(circle at 10% 0%, rgba(233, 57, 37, 0.1), transparent 28%),
    linear-gradient(180deg, #ffffff 0%, var(--gallery-soft) 100%);
  overflow: hidden;
  padding: 70px 0 46px;
  position: relative;
}

.gallery-hero::after {
  display: none;
}

.gallery-hero-content {
  margin: 0 auto;
  max-width: 820px;
  position: relative;
  text-align: center;
  z-index: 1;
}

.gallery-eyebrow {
  align-items: center;
  color: var(--gallery-primary);
  display: inline-flex;
  font-size: 13px;
  font-weight: 800;
  gap: 10px;
  letter-spacing: 0;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.gallery-eyebrow::before {
  background: var(--gallery-primary);
  border-radius: 999px;
  content: "";
  height: 10px;
  width: 10px;
}

.gallery-hero h1 {
  color: var(--gallery-ink);
  font-size: 54px;
  line-height: 1.08;
  margin-bottom: 22px;
  max-width: 820px;
  text-transform: none;
}

.gallery-hero p {
  color: var(--gallery-muted);
  font-size: 18px;
  line-height: 1.75;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 30px;
  max-width: 660px;
}

.gallery-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.gallery-ghost-btn {
  align-items: center;
  border: 1px solid var(--gallery-line);
  border-radius: 999px;
  color: var(--gallery-ink);
  display: inline-flex;
  font-weight: 800;
  gap: 9px;
  padding: 14px 22px;
}

.gallery-ghost-btn:hover {
  background: var(--gallery-primary);
  border-color: var(--gallery-primary);
  color: #ffffff;
}

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

.gallery-stats-wrap {
  background: var(--gallery-soft);
  padding: 0 0 58px;
}

.gallery-stat {
  background: var(--gallery-panel);
  border: 1px solid var(--gallery-line);
  border-radius: 8px;
  box-shadow: var(--gallery-shadow);
  padding: 24px;
}

.gallery-stat strong {
  color: var(--gallery-primary);
  display: block;
  font-size: 32px;
  line-height: 1;
  margin-bottom: 8px;
}

.gallery-stat span {
  color: var(--gallery-text);
  font-weight: 800;
}

.gallery-section {
  background:
    radial-gradient(circle at 8% 0%, rgba(233, 57, 37, 0.08), transparent 26%),
    linear-gradient(180deg, var(--gallery-soft) 0%, #ffffff 100%);
  padding: 30px 0 96px;
}

.gallery-manager-section {
  background: var(--gallery-soft);
  padding: 28px 0 76px;
}

.gallery-uploader,
.uploaded-gallery-wrap {
  background: #ffffff;
  border: 1px solid var(--gallery-line);
  border-radius: 8px;
  box-shadow: 0 16px 38px rgba(17, 19, 26, 0.08);
  padding: 24px;
}

.gallery-dropzone {
  align-items: center;
  background:
    linear-gradient(180deg, rgba(233, 57, 37, 0.04), rgba(17, 19, 26, 0.02));
  border: 2px dashed rgba(233, 57, 37, 0.35);
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  justify-content: center;
  padding: 34px;
  text-align: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.gallery-dropzone:focus,
.gallery-dropzone:hover,
.gallery-dropzone.is-dragover {
  background: rgba(233, 57, 37, 0.08);
  border-color: var(--gallery-primary);
  outline: none;
  transform: translateY(-1px);
}

.gallery-dropzone i {
  align-items: center;
  background: var(--gallery-primary);
  border-radius: 50%;
  color: #ffffff;
  display: inline-flex;
  font-size: 34px;
  height: 76px;
  justify-content: center;
  margin-bottom: 18px;
  width: 76px;
}

.gallery-dropzone h3,
.gallery-preview-header h3 {
  color: var(--gallery-ink);
  font-size: 24px;
  line-height: 1.25;
  margin-bottom: 8px;
  text-transform: none;
}

.gallery-dropzone p {
  color: var(--gallery-muted);
  line-height: 1.7;
  margin: 0 auto 22px;
  max-width: 560px;
}

.gallery-file-input {
  height: 1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  width: 1px;
}

.gallery-upload-btn,
.gallery-submit-btn {
  border: 0;
}

.gallery-upload-status {
  border-radius: 8px;
  font-weight: 800;
  margin-top: 16px;
  padding: 0;
}

.gallery-upload-status.is-success,
.gallery-upload-status.is-error {
  padding: 13px 16px;
}

.gallery-upload-status.is-success {
  background: rgba(25, 135, 84, 0.12);
  color: #137245;
}

.gallery-upload-status.is-error {
  background: rgba(233, 57, 37, 0.12);
  color: var(--gallery-primary-dark);
}

.gallery-progress-wrap {
  margin-top: 18px;
}

.gallery-progress-label {
  align-items: center;
  color: var(--gallery-text);
  display: flex;
  font-weight: 800;
  justify-content: space-between;
  margin-bottom: 9px;
}

.gallery-progress-track {
  background: rgba(17, 19, 26, 0.08);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.gallery-progress-track span {
  background: linear-gradient(90deg, var(--gallery-primary), var(--gallery-primary-dark));
  display: block;
  height: 100%;
  transition: width 0.2s ease;
  width: 0;
}

.gallery-preview-panel {
  border-top: 1px solid var(--gallery-line);
  margin-top: 24px;
  padding-top: 24px;
}

.gallery-preview-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.gallery-preview-header h3 {
  margin-bottom: 0;
}

.gallery-clear-btn,
.gallery-card-action {
  align-items: center;
  background: #ffffff;
  border: 1px solid var(--gallery-line);
  border-radius: 999px;
  color: var(--gallery-text);
  display: inline-flex;
  font-size: 14px;
  font-weight: 900;
  gap: 7px;
  justify-content: center;
  line-height: 1;
  padding: 11px 14px;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.gallery-clear-btn:hover,
.gallery-card-action:hover {
  background: var(--gallery-primary);
  border-color: var(--gallery-primary);
  color: #ffffff;
}

.gallery-preview-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 22px;
}

.gallery-preview-item,
.uploaded-gallery-card {
  background: #ffffff;
  border: 1px solid var(--gallery-line);
  border-radius: 8px;
  overflow: hidden;
}

.gallery-preview-item img,
.uploaded-gallery-card img {
  aspect-ratio: 4 / 3;
  display: block;
  object-fit: cover;
  width: 100%;
}

.gallery-preview-body {
  padding: 14px;
}

.gallery-caption-input {
  border: 1px solid var(--gallery-line);
  border-radius: 8px;
  color: var(--gallery-text);
  display: block;
  font-size: 14px;
  padding: 11px 12px;
  width: 100%;
}

.gallery-caption-input:focus {
  border-color: var(--gallery-primary);
  outline: none;
}

.gallery-preview-meta {
  color: var(--gallery-muted);
  display: block;
  font-size: 13px;
  margin-top: 8px;
}

.uploaded-gallery-wrap {
  margin-top: 28px;
}

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

.uploaded-gallery-card {
  box-shadow: 0 12px 28px rgba(17, 19, 26, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.uploaded-gallery-card:hover {
  box-shadow: 0 18px 40px rgba(17, 19, 26, 0.14);
  transform: translateY(-3px);
}

.uploaded-gallery-thumb {
  background: #11131a;
  border: 0;
  display: block;
  overflow: hidden;
  padding: 0;
  width: 100%;
}

.uploaded-gallery-thumb img {
  transition: filter 0.35s ease, transform 0.35s ease;
}

.uploaded-gallery-thumb:hover img,
.uploaded-gallery-thumb:focus img {
  filter: saturate(1.08) contrast(1.02);
  transform: scale(1.05);
}

.uploaded-gallery-info {
  padding: 15px;
}

.uploaded-gallery-info h3 {
  color: var(--gallery-ink);
  font-size: 17px;
  line-height: 1.3;
  margin-bottom: 12px;
  text-transform: none;
}

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

.gallery-lightbox {
  align-items: center;
  background: rgba(7, 8, 11, 0.9);
  bottom: 0;
  display: flex;
  justify-content: center;
  left: 0;
  padding: 26px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 9999;
}

.gallery-lightbox[hidden] {
  display: none;
}

.gallery-lightbox figure {
  margin: 0;
  max-width: min(100%, 1080px);
  text-align: center;
}

.gallery-lightbox img {
  border-radius: 8px;
  max-height: 78vh;
  max-width: 100%;
  object-fit: contain;
}

.gallery-lightbox figcaption {
  color: #ffffff;
  font-weight: 800;
  margin-top: 14px;
}

.gallery-lightbox-close {
  align-items: center;
  background: #ffffff;
  border: 0;
  border-radius: 50%;
  color: var(--gallery-ink);
  display: inline-flex;
  font-size: 30px;
  height: 46px;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 22px;
  top: 22px;
  width: 46px;
}

.gallery-title {
  margin: 0 auto 34px;
  max-width: 780px;
  text-align: center;
}

.gallery-kicker {
  color: var(--gallery-primary);
  display: block;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.gallery-title h2 {
  color: var(--gallery-ink);
  font-size: 48px;
  line-height: 1.08;
  margin-bottom: 16px;
  text-transform: none;
}

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

.gallery-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin: 0 auto 38px;
  max-width: 820px;
}

.gallery-filter {
  background: #ffffff;
  border: 1px solid var(--gallery-line);
  border-radius: 999px;
  color: var(--gallery-text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  padding: 13px 18px;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.gallery-filter:hover,
.gallery-filter.is-active {
  background: var(--gallery-primary);
  border-color: var(--gallery-primary);
  box-shadow: 0 12px 28px rgba(233, 57, 37, 0.24);
  color: #ffffff;
  transform: translateY(-1px);
}

.gallery-masonry {
  column-count: 1;
  column-gap: 18px;
}

.gallery-card {
  break-inside: avoid;
  display: block;
  margin: 0 0 18px;
  position: relative;
}

.gallery-card.is-hidden {
  display: none;
}

.gallery-card-inner {
  background: #11131a;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(17, 19, 26, 0.14);
  display: block;
  min-height: 220px;
  overflow: hidden;
  position: relative;
  transform: translateZ(0);
}

.gallery-card-inner::after {
  background: linear-gradient(180deg, transparent 28%, rgba(17, 19, 26, 0.88) 100%);
  bottom: 0;
  content: "";
  left: 0;
  opacity: 0.9;
  position: absolute;
  right: 0;
  top: 0;
  transition: opacity 0.25s ease;
  z-index: 1;
}

.gallery-card img {
  display: block;
  height: auto;
  min-height: 220px;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
  width: 100%;
}

.gallery-card.is-tall img {
  aspect-ratio: 4 / 5;
}

.gallery-card.is-wide img {
  aspect-ratio: 16 / 10;
}

.gallery-card.is-square img {
  aspect-ratio: 1 / 1;
}

.gallery-card.is-certificate img {
  aspect-ratio: 4 / 3;
  background: #ffffff;
  object-fit: contain;
  padding: 16px;
}

.gallery-card:hover img {
  filter: saturate(1.08) contrast(1.02);
  transform: scale(1.065);
}

.gallery-card:hover .gallery-card-inner::after {
  opacity: 1;
}

.gallery-card-meta {
  bottom: 0;
  color: #ffffff;
  left: 0;
  padding: 22px;
  position: absolute;
  right: 0;
  transform: translateY(6px);
  transition: transform 0.25s ease;
  z-index: 2;
}

.gallery-card:hover .gallery-card-meta {
  transform: translateY(0);
}

.gallery-card-meta span {
  color: #ffb4aa;
  display: block;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.gallery-card-meta h3 {
  color: #ffffff;
  font-size: 19px;
  line-height: 1.28;
  margin-bottom: 0;
  text-transform: none;
}

.gallery-card-meta i {
  align-items: center;
  background: #ffffff;
  border-radius: 999px;
  color: var(--gallery-primary);
  display: inline-flex;
  font-size: 15px;
  height: 38px;
  justify-content: center;
  margin-top: 16px;
  width: 38px;
}

.gallery-showcase {
  background: #ffffff;
  padding: 92px 0;
}

.gallery-showcase-inner {
  align-items: stretch;
  background: var(--gallery-ink);
  border-radius: 8px;
  box-shadow: var(--gallery-shadow);
  display: grid;
  grid-template-columns: minmax(240px, 410px) minmax(0, 1fr);
  margin: 0 auto;
  max-width: 1060px;
  overflow: hidden;
}

.gallery-showcase-media {
  background: #07080b;
}

.gallery-video {
  aspect-ratio: 9 / 16;
  background: #07080b;
  display: block;
  height: 100%;
  min-height: 540px;
  object-fit: contain;
  width: 100%;
}

.gallery-showcase-copy {
  align-self: center;
  padding: 48px;
}

.gallery-showcase-copy h2 {
  color: #ffffff;
  font-size: 46px;
  line-height: 1.08;
  margin-bottom: 16px;
  text-transform: none;
}

.gallery-showcase-copy p {
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  line-height: 1.75;
  margin-bottom: 26px;
}

.gallery-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.gallery-highlights span {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  padding: 8px 14px;
}

.video-gallery {
  background: var(--gallery-soft);
  padding: 88px 0;
}

.video-card {
  background: #ffffff;
  border: 1px solid var(--gallery-line);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(17, 19, 26, 0.08);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.video-thumb {
  aspect-ratio: 16 / 9;
  display: block;
  overflow: hidden;
  position: relative;
}

.video-thumb img {
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
  width: 100%;
}

.video-card:hover .video-thumb img {
  transform: scale(1.05);
}

.video-play {
  align-items: center;
  background: var(--gallery-primary);
  border-radius: 50%;
  color: #ffffff;
  display: inline-flex;
  font-size: 22px;
  height: 58px;
  justify-content: center;
  left: 50%;
  padding-left: 4px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 58px;
}

.video-info {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 24px;
}

.video-info h3 {
  color: var(--gallery-ink);
  font-size: 22px;
  line-height: 1.3;
  margin-bottom: 10px;
  text-transform: none;
}

.video-info p {
  color: var(--gallery-muted);
  line-height: 1.7;
}

.video-info .btn-primary {
  margin-top: auto;
  width: fit-content;
}

@media (min-width: 576px) {
  .gallery-masonry {
    column-count: 2;
  }

  .uploaded-gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 768px) {
  .uploaded-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .gallery-masonry {
    column-count: 3;
    column-gap: 22px;
  }

  .gallery-card {
    margin-bottom: 22px;
  }

  .uploaded-gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .uploaded-gallery-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 1400px) {
  .uploaded-gallery-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .gallery-hero {
    min-height: auto;
    padding: 58px 0 42px;
  }

  .gallery-stats {
    grid-template-columns: 1fr;
    margin-top: 0;
  }

  .gallery-hero h1 {
    font-size: 44px;
  }

  .gallery-title h2,
  .gallery-showcase-copy h2 {
    font-size: 38px;
  }

  .gallery-showcase-inner {
    grid-template-columns: 1fr;
    max-width: 580px;
  }

  .gallery-video {
    height: auto;
    min-height: 0;
    max-height: 720px;
  }

  .gallery-showcase-copy {
    padding: 34px;
  }

  .gallery-preview-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 575px) {
  .gallery-hero {
    padding: 46px 0 34px;
  }

  .gallery-hero h1 {
    font-size: 34px;
  }

  .gallery-title h2,
  .gallery-showcase-copy h2 {
    font-size: 31px;
  }

  .gallery-hero p,
  .gallery-title p,
  .gallery-showcase-copy p {
    font-size: 16px;
  }

  .gallery-section,
  .gallery-showcase,
  .video-gallery {
    padding: 64px 0;
  }

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

  .gallery-filter-bar {
    justify-content: flex-start;
    margin-bottom: 28px;
    overflow-x: auto;
    padding-bottom: 8px;
  }

  .gallery-filter {
    flex: 0 0 auto;
  }

  .gallery-manager-section {
    padding: 24px 0 56px;
  }

  .gallery-uploader,
  .uploaded-gallery-wrap {
    padding: 18px;
  }

  .gallery-dropzone {
    min-height: 230px;
    padding: 24px 18px;
  }

  .gallery-card-meta {
    padding: 18px;
  }

  .gallery-card-meta h3 {
    font-size: 17px;
  }

  .gallery-showcase-copy {
    padding: 28px;
  }
}
