:root {
  --tsv-gallery-green: #158b36;
  --tsv-gallery-green-dark: #0b6a28;
  --tsv-gallery-black: #0b0e0c;
  --tsv-gallery-text: #151915;
  --tsv-gallery-muted: #68706a;
  --tsv-gallery-light: #f5f7f5;
  --tsv-gallery-border: #dfe5e0;
  --tsv-gallery-shadow: 0 14px 36px rgba(0, 0, 0, .12);
}

/* The7/WPBakery title and content wrappers on the gallery page. */
.tsv-modern-gallery-active .entry-title,
.tsv-modern-gallery-active .page-title,
.tsv-modern-gallery-active .page-header,
.tsv-modern-gallery-active .post-header,
.tsv-modern-gallery-active .entry-header,
.tsv-modern-gallery-active #fancy-header,
.tsv-modern-gallery-active .fancy-header,
.tsv-modern-gallery-active .page-title-wrapper,
.tsv-modern-gallery-active .page-inner-title,
.tsv-modern-gallery-active .title-area,
.tsv-modern-gallery-active .breadcrumbs,
.tsv-modern-gallery-active .ph-wrap,
.tsv-modern-gallery-active .dt-breadcrumb-for-mobile {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.tsv-modern-gallery-active #main,
.tsv-modern-gallery-active .site-content,
.tsv-modern-gallery-active .content,
.tsv-modern-gallery-active .content-area,
.tsv-modern-gallery-active .entry-content,
.tsv-modern-gallery-active .wf-wrap,
.tsv-modern-gallery-active .wf-container-main,
.tsv-modern-gallery-active .wf-container,
.tsv-modern-gallery-active .page-content,
.tsv-modern-gallery-active .page-wrapper {
  max-width: none !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.tsv-modern-gallery-active .entry-content {
  margin: 0 !important;
  padding: 0 !important;
}

.tsv-gallery-page,
.tsv-gallery-page * {
  box-sizing: border-box;
}

.tsv-gallery-page {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  overflow: hidden;
  background: #fff;
  color: var(--tsv-gallery-text);
  font-family: Arial, Helvetica, sans-serif;
}

.tsv-gallery-shell {
  width: min(1240px, calc(100% - 42px));
  margin-inline: auto;
}

.tsv-gallery-hero {
  position: relative;
  min-height: 520px;
  overflow: hidden;
  background: #121613;
  color: #fff;
}

.tsv-gallery-hero__mosaic {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.1fr 1.2fr .9fr .9fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  background: #111;
}

.tsv-gallery-hero__tile {
  min-width: 0;
  background-position: center;
  background-size: cover;
  filter: saturate(.9) contrast(1.04);
}

.tsv-gallery-hero__tile--1 { grid-row: 1 / 3; }
.tsv-gallery-hero__tile--2 { grid-column: 2 / 3; grid-row: 1 / 2; }
.tsv-gallery-hero__tile--3 { grid-column: 2 / 3; grid-row: 2 / 3; }
.tsv-gallery-hero__tile--4 { grid-column: 3 / 4; grid-row: 1 / 2; }
.tsv-gallery-hero__tile--5 { grid-column: 3 / 5; grid-row: 2 / 3; }
.tsv-gallery-hero__tile--6 { grid-column: 4 / 5; grid-row: 1 / 2; }
.tsv-gallery-hero__tile--fallback { grid-column: 1 / 5; grid-row: 1 / 3; background: linear-gradient(135deg, #0d2515, #101510); }

.tsv-gallery-hero__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 10, 6, .93) 0%, rgba(5, 12, 7, .82) 38%, rgba(5, 10, 7, .38) 72%, rgba(4, 8, 5, .48) 100%),
    linear-gradient(0deg, rgba(4, 8, 5, .35), rgba(4, 8, 5, .04));
}

.tsv-gallery-hero__content {
  position: relative;
  z-index: 2;
  min-height: 520px;
  padding-block: 74px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.tsv-gallery-kicker,
.tsv-gallery-latest {
  display: inline-flex;
  align-items: center;
  padding: 9px 14px;
  border-radius: 7px;
  background: rgba(20, 139, 54, .92);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.tsv-gallery-hero h1 {
  max-width: 760px;
  margin: 18px 0 20px;
  color: #fff;
  font-size: clamp(42px, 5.6vw, 74px);
  line-height: 1.01;
  letter-spacing: -.035em;
}

.tsv-gallery-hero p {
  max-width: 720px;
  margin: 0 0 26px;
  color: rgba(255,255,255,.9);
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.65;
}

.tsv-gallery-button,
.tsv-gallery-outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 14px 23px;
  border-radius: 8px;
  text-decoration: none !important;
  font-size: 16px;
  font-weight: 800;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}

.tsv-gallery-button {
  background: var(--tsv-gallery-green);
  color: #fff !important;
  box-shadow: 0 10px 24px rgba(7, 52, 20, .26);
}

.tsv-gallery-button:hover,
.tsv-gallery-button:focus {
  transform: translateY(-2px);
  background: var(--tsv-gallery-green-dark);
  color: #fff !important;
}

.tsv-gallery-feature-wrap {
  position: relative;
  z-index: 3;
  margin-top: -42px;
}

.tsv-gallery-feature {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  overflow: hidden;
  border: 1px solid var(--tsv-gallery-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--tsv-gallery-shadow);
}

.tsv-gallery-feature__image {
  min-height: 340px;
  overflow: hidden;
  background: #e9ece9;
}

.tsv-gallery-feature__image img {
  width: 100%;
  height: 100%;
  min-height: 340px;
  object-fit: cover;
  transition: transform .35s ease;
}

.tsv-gallery-feature__image:hover img { transform: scale(1.025); }

.tsv-gallery-feature__content {
  padding: 44px 46px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.tsv-gallery-latest {
  padding: 7px 11px;
  background: #dff2e3;
  color: var(--tsv-gallery-green-dark);
  font-size: 11px;
}

.tsv-gallery-feature h2 {
  margin: 14px 0 12px;
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.1;
  letter-spacing: -.025em;
}

.tsv-gallery-feature p,
.tsv-gallery-single-heading p {
  margin: 16px 0 23px;
  color: #4d554f;
  font-size: 17px;
  line-height: 1.65;
}

.tsv-gallery-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: #68706a;
  font-size: 14px;
  font-weight: 700;
}

.tsv-gallery-meta span::before {
  content: "●";
  margin-right: 7px;
  color: var(--tsv-gallery-green);
  font-size: 9px;
  vertical-align: 2px;
}

.tsv-gallery-archive {
  padding: 52px 0 70px;
  background: #fff;
}

.tsv-gallery-filters {
  margin-bottom: 30px;
}

.tsv-gallery-filter-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-bottom: 12px;
}

.tsv-gallery-filter-row button {
  min-height: 40px;
  padding: 9px 17px;
  border: 1px solid #dce3dd;
  border-radius: 8px;
  background: #fff;
  color: #242a25;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, color .18s ease;
}

.tsv-gallery-filter-row button:hover,
.tsv-gallery-filter-row button.is-active {
  border-color: var(--tsv-gallery-green);
  background: var(--tsv-gallery-green);
  color: #fff;
}

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

.tsv-gallery-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--tsv-gallery-border);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.055);
  transition: transform .2s ease, box-shadow .2s ease;
}

.tsv-gallery-card[hidden] { display: none !important; }

.tsv-gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,.11);
}

.tsv-gallery-card__image {
  position: relative;
  display: block;
  height: 210px;
  overflow: hidden;
  background: #e7ebe7;
}

.tsv-gallery-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .32s ease;
}

.tsv-gallery-card:hover .tsv-gallery-card__image img { transform: scale(1.045); }

.tsv-gallery-card__count {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 9px;
  border-radius: 6px;
  background: rgba(4, 12, 7, .82);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(5px);
}

.tsv-gallery-card__body { padding: 18px 18px 20px; }

.tsv-gallery-card h3 {
  margin: 0 0 9px;
  font-size: 20px;
  line-height: 1.25;
}

.tsv-gallery-card h3 a { color: #171b18 !important; text-decoration: none !important; }
.tsv-gallery-card__meta { color: #737b75; font-size: 13px; margin-bottom: 15px; }
.tsv-gallery-card__link { color: var(--tsv-gallery-green-dark) !important; font-size: 14px; font-weight: 800; text-decoration: none !important; }

.tsv-gallery-empty-filter,
.tsv-gallery-no-albums {
  padding: 42px;
  border: 1px dashed #cad3cb;
  border-radius: 12px;
  background: var(--tsv-gallery-light);
  text-align: center;
  color: #5d665f;
}

.tsv-gallery-cta {
  padding: 46px 0;
  background:
    radial-gradient(circle at 75% 40%, rgba(21,139,54,.22), transparent 30%),
    linear-gradient(135deg, #070a08, #151a16);
  color: #fff;
}

.tsv-gallery-cta__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 36px;
}

.tsv-gallery-cta h2 { margin: 0 0 10px; color: #fff; font-size: clamp(28px, 3.5vw, 43px); }
.tsv-gallery-cta p { max-width: 760px; margin: 0; color: rgba(255,255,255,.8); font-size: 16px; line-height: 1.65; }

/* Single album. */
.tsv-gallery-single-hero {
  position: relative;
  min-height: 430px;
  display: flex;
  align-items: flex-end;
  background-image: var(--tsv-album-cover);
  background-position: center;
  background-size: cover;
  color: #fff;
}

.tsv-gallery-single-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(3,9,5,.92), rgba(4,10,6,.64) 55%, rgba(4,8,5,.34));
}

.tsv-gallery-single-hero__content {
  position: relative;
  z-index: 1;
  padding-block: 60px;
}

.tsv-gallery-back {
  display: inline-flex;
  margin-bottom: 30px;
  color: rgba(255,255,255,.88) !important;
  text-decoration: none !important;
  font-weight: 700;
}

.tsv-gallery-single-hero h1 {
  max-width: 920px;
  margin: 18px 0 15px;
  color: #fff;
  font-size: clamp(38px, 5.5vw, 68px);
  line-height: 1.02;
}

.tsv-gallery-meta--light { color: rgba(255,255,255,.82); }

.tsv-gallery-single-content { padding: 55px 0 75px; }

.tsv-gallery-single-heading {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
  margin-bottom: 32px;
}

.tsv-gallery-single-heading h2 { margin: 0; font-size: clamp(29px, 3.5vw, 45px); }
.tsv-gallery-single-heading p { max-width: 850px; margin-bottom: 0; }

.tsv-gallery-outline-button {
  border: 2px solid var(--tsv-gallery-green);
  color: var(--tsv-gallery-green-dark) !important;
  background: #fff;
}

.tsv-gallery-outline-button:hover { background: var(--tsv-gallery-green); color: #fff !important; }

.tsv-gallery-masonry {
  column-count: 3;
  column-gap: 15px;
}

.tsv-gallery-photo {
  position: relative;
  display: block;
  margin: 0 0 15px;
  break-inside: avoid;
  overflow: hidden;
  border-radius: 9px;
  background: #e9ece9;
}

.tsv-gallery-photo img {
  width: 100%;
  height: auto;
  transition: transform .3s ease, filter .3s ease;
}

.tsv-gallery-photo:hover img { transform: scale(1.025); filter: brightness(.76); }

.tsv-gallery-photo__zoom {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  transform: translate(-50%, -40%) scale(.8);
  border-radius: 50%;
  background: var(--tsv-gallery-green);
  color: #fff;
  font-size: 28px;
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
}

.tsv-gallery-photo:hover .tsv-gallery-photo__zoom { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.tsv-gallery-lightbox {
  position: fixed;
  z-index: 999999;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 35px 80px;
  background: rgba(2,5,3,.95);
  color: #fff;
}

.tsv-gallery-lightbox[hidden] { display: none !important; }
.tsv-gallery-lightbox figure { max-width: min(1300px, 92vw); max-height: 90vh; margin: 0; display: flex; flex-direction: column; align-items: center; }
.tsv-gallery-lightbox figure img { max-width: 100%; max-height: 82vh; object-fit: contain; }
.tsv-gallery-lightbox figcaption { width: 100%; padding-top: 12px; display: flex; justify-content: space-between; gap: 20px; color: rgba(255,255,255,.78); font-size: 14px; }
.tsv-gallery-lightbox__close,
.tsv-gallery-lightbox__nav { position: absolute; border: 0; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; }
.tsv-gallery-lightbox__close { top: 18px; right: 22px; width: 48px; height: 48px; border-radius: 50%; font-size: 32px; }
.tsv-gallery-lightbox__nav { top: 50%; width: 54px; height: 74px; transform: translateY(-50%); border-radius: 8px; font-size: 48px; line-height: 1; }
.tsv-gallery-lightbox__nav--prev { left: 18px; }
.tsv-gallery-lightbox__nav--next { right: 18px; }
body.tsv-gallery-lightbox-open { overflow: hidden !important; }

@media (max-width: 980px) {
  .tsv-gallery-hero { min-height: 470px; }
  .tsv-gallery-hero__content { min-height: 470px; }
  .tsv-gallery-feature { grid-template-columns: 1fr; }
  .tsv-gallery-feature__image,
  .tsv-gallery-feature__image img { min-height: 300px; max-height: 420px; }
  .tsv-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tsv-gallery-cta__inner,
  .tsv-gallery-single-heading { grid-template-columns: 1fr; }
  .tsv-gallery-masonry { column-count: 2; }
}

@media (max-width: 680px) {
  .tsv-gallery-shell { width: min(100% - 24px, 1240px); }
  .tsv-gallery-hero__mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: repeat(3, 1fr); }
  .tsv-gallery-hero__tile--1 { grid-column: 1 / 2; grid-row: 1 / 3; }
  .tsv-gallery-hero__tile--2 { grid-column: 2 / 3; grid-row: 1 / 2; }
  .tsv-gallery-hero__tile--3 { grid-column: 2 / 3; grid-row: 2 / 3; }
  .tsv-gallery-hero__tile--4 { grid-column: 1 / 2; grid-row: 3 / 4; }
  .tsv-gallery-hero__tile--5 { grid-column: 2 / 3; grid-row: 3 / 4; }
  .tsv-gallery-hero__tile--6 { display: none; }
  .tsv-gallery-hero__shade { background: rgba(3,9,5,.78); }
  .tsv-gallery-hero h1 { font-size: 42px; }
  .tsv-gallery-feature-wrap { margin-top: -22px; }
  .tsv-gallery-feature__content { padding: 28px 23px; }
  .tsv-gallery-feature__image,
  .tsv-gallery-feature__image img { min-height: 230px; }
  .tsv-gallery-archive { padding-top: 38px; }
  .tsv-gallery-filter-row { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 5px; }
  .tsv-gallery-filter-row button { white-space: nowrap; }
  .tsv-gallery-grid { grid-template-columns: 1fr; }
  .tsv-gallery-card__image { height: 230px; }
  .tsv-gallery-cta__inner { text-align: left; }
  .tsv-gallery-cta .tsv-gallery-button { width: 100%; }
  .tsv-gallery-single-hero { min-height: 360px; }
  .tsv-gallery-single-hero__content { padding-block: 42px; }
  .tsv-gallery-masonry { column-count: 1; }
  .tsv-gallery-lightbox { padding: 60px 12px 35px; }
  .tsv-gallery-lightbox__nav { top: auto; bottom: 14px; width: 48px; height: 48px; border-radius: 50%; font-size: 34px; }
  .tsv-gallery-lightbox__nav--prev { left: calc(50% - 58px); }
  .tsv-gallery-lightbox__nav--next { right: calc(50% - 58px); }
  .tsv-gallery-lightbox figcaption { padding-bottom: 54px; }
}
