:root {
  --csfg-blue: #0d56a6;
  --csfg-ink: #111317;
  --csfg-muted: #71757b;
  --csfg-line: #deddd9;
  --csfg-panel: #f2f0ec;
  --csfg-white: #fff;
}

.csfg,
.csfg * {
  box-sizing: border-box;
}

.csfg {
  width: 100%;
  color: var(--csfg-ink);
  font-family: Arial, Helvetica, sans-serif;
}

.csfg button {
  font: inherit;
}

.csfg__intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin: 0 0 34px;
}

.csfg__eyebrow {
  margin: 0 0 10px;
  color: var(--csfg-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.csfg h1 {
  margin: 0;
  color: var(--csfg-blue);
  font-size: clamp(52px, 6.1vw, 88px);
  font-weight: 700;
  letter-spacing: -.055em;
  line-height: .96;
}

.csfg__intro-copy {
  max-width: 590px;
  margin: 19px 0 0;
  color: #5f6268;
  font-size: 17px;
  line-height: 1.55;
}

.csfg__photo-count {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 220px;
  padding-bottom: 3px;
}

.csfg__photo-count strong {
  color: var(--csfg-blue);
  font-size: 33px;
  line-height: 1;
}

.csfg__photo-count span {
  color: #74777b;
  font-size: 12px;
  line-height: 1.35;
}

.csfg__filters {
  margin-bottom: 50px;
  padding: 24px;
  border: 1px solid #e3e2de;
  border-radius: 22px;
  background: var(--csfg-panel);
}

.csfg__filter-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.csfg__filter-heading > div,
.csfg__year-label {
  display: flex;
  align-items: center;
  gap: 10px;
}

.csfg__filter-heading > span {
  color: #777a7f;
  font-size: 12px;
}

.csfg__step {
  display: grid;
  place-items: center;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--csfg-blue);
  color: var(--csfg-white);
  font-size: 11px;
  font-weight: 800;
}

.csfg__fair-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.csfg__fair-grid button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: 56px;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--csfg-white);
  color: var(--csfg-ink);
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.csfg__fair-grid button:hover {
  transform: translateY(-1px);
  border-color: #b9cde3;
  box-shadow: 0 5px 14px rgba(22, 58, 95, .08);
}

.csfg__fair-grid button[aria-pressed="true"] {
  border-color: var(--csfg-blue);
  box-shadow: 0 0 0 1px var(--csfg-blue);
}

.csfg__fair-grid button > span:nth-child(2) {
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.csfg__fair-grid button > b {
  position: absolute;
  top: 7px;
  right: 8px;
  color: transparent;
  font-size: 10px;
}

.csfg__fair-grid button[aria-pressed="true"] > b {
  color: var(--csfg-blue);
}

.csfg__initials {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: #eceef1;
  color: #384b63;
  font-size: 10px;
  font-weight: 800;
}

.csfg__fair-grid button[aria-pressed="true"] .csfg__initials {
  background: var(--csfg-blue);
  color: var(--csfg-white);
}

.csfg__year-row {
  display: grid;
  grid-template-columns: 150px auto 1fr;
  align-items: center;
  gap: 18px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #dcdbd6;
}

.csfg__years,
.csfg__collections {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.csfg__years button,
.csfg__collections button {
  min-width: 64px;
  padding: 9px 14px;
  border: 1px solid #d7d9dd;
  border-radius: 9px;
  background: var(--csfg-white);
  color: var(--csfg-ink);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .2s, background-color .2s, color .2s;
}

.csfg__years button:hover,
.csfg__collections button:hover {
  border-color: #9ab9da;
}

.csfg__years button[aria-pressed="true"],
.csfg__collections button[aria-pressed="true"] {
  border-color: var(--csfg-blue);
  background: var(--csfg-blue);
  color: var(--csfg-white);
}

.csfg__year-row p {
  margin: 0;
  color: #85878b;
  font-size: 11px;
  text-align: right;
}

.csfg__gallery-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 17px;
}

.csfg__gallery-heading p {
  margin: 0 0 5px;
  color: var(--csfg-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.csfg__gallery-heading h2 {
  margin: 0;
  color: var(--csfg-ink);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.2;
}

.csfg__result-count {
  color: #75777b;
  font-size: 12px;
  font-weight: 400;
}

.csfg__result-count b {
  font-weight: 700;
}

.csfg__collections {
  margin: -4px 0 18px;
}

.csfg__collections[hidden] {
  display: none;
}

.csfg__collections button {
  min-width: 0;
  padding: 8px 13px;
}

.csfg__status {
  margin: 0 0 14px;
  padding: 11px 14px;
  border-radius: 8px;
  background: #eaf3fd;
  color: var(--csfg-blue);
  font-size: 13px;
  font-weight: 700;
}

.csfg__status[hidden] {
  display: none;
}

.csfg__gallery {
  min-height: 180px;
  transition: opacity .2s;
}

.csfg__gallery.is-loading {
  opacity: .35;
  pointer-events: none;
}

.csfg-notice {
  padding: 16px 18px;
  border-left: 4px solid #d63638;
  background: #fff;
  color: #222;
}

/* 10Web ostane motor galerije; spodaj je samo varna vizualna preobleka. */
.csfg__gallery .bwg-background,
.csfg__gallery .bwg_container,
.csfg__gallery [class*="bwg-container-"] {
  max-width: 100% !important;
  background-color: transparent !important;
}

.csfg__gallery .bwg-standard-thumbnails {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 7px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}

.csfg__gallery .bwg-standard-thumbnails .bwg-item {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
}

.csfg__gallery .bwg-standard-thumbnails .bwg-item > a {
  display: block !important;
  overflow: hidden !important;
  width: 100% !important;
  margin: 0 !important;
  border-radius: 8px !important;
  background: #d8d8d8 !important;
}

.csfg__gallery .bwg-standard-thumbnails .bwg-item0 {
  overflow: hidden !important;
  width: 100% !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  box-shadow: none !important;
  background: #d8d8d8 !important;
}

.csfg__gallery .bwg-standard-thumbnails .bwg-item1 {
  padding-top: 68.75% !important;
  border-radius: 8px !important;
}

.csfg__gallery .bwg-standard-thumbnails .bwg-item1 img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: cover !important;
  transition: transform .45s ease !important;
}

.csfg__gallery .bwg-standard-thumbnails .bwg-item:hover img {
  transform: scale(1.035) !important;
}

.csfg__gallery .bwg-standard-thumbnails .bwg-title1 {
  top: auto !important;
  bottom: 0 !important;
  justify-content: flex-end !important;
  height: auto !important;
  min-height: 48% !important;
  padding: 42px 12px 11px !important;
  background: linear-gradient(transparent, rgba(2, 18, 32, .82)) !important;
  opacity: 0 !important;
  transform: translateY(5px);
  transition: opacity .25s, transform .25s !important;
}

.csfg__gallery .bwg-standard-thumbnails .bwg-item:hover .bwg-title1,
.csfg__gallery .bwg-standard-thumbnails .bwg-item a:focus .bwg-title1 {
  opacity: 1 !important;
  transform: translateY(0);
}

.csfg__gallery .bwg-standard-thumbnails .bwg-title2 {
  padding: 0 !important;
  color: #fff !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  text-align: left !important;
  text-shadow: none !important;
}

.csfg__gallery .bwg_nav_cont,
.csfg__gallery [class^="bwg_nav_cont_"] {
  display: block !important;
  width: 100% !important;
}

.csfg__gallery .bwg_load_btn {
  display: table !important;
  margin: 28px auto 0 !important;
  padding: 12px 18px !important;
  border: 1px solid var(--csfg-blue) !important;
  border-radius: 10px !important;
  background: transparent !important;
  color: var(--csfg-blue) !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-decoration: none !important;
  box-shadow: none !important;
}

.csfg__gallery .bwg_load_btn:hover {
  background: var(--csfg-blue) !important;
  color: #fff !important;
}

@media (max-width: 1180px) {
  .csfg__fair-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1024px) {
  .csfg__fair-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .csfg__filters {
    margin-bottom: 38px;
    padding: 21px;
  }

  .csfg__year-row {
    grid-template-columns: 135px 1fr;
  }

  .csfg__year-row p {
    grid-column: 1 / -1;
    text-align: left;
  }

  .csfg__gallery .bwg-standard-thumbnails {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 680px) {
  .csfg {
    max-width: 100%;
    overflow-x: hidden;
  }

  .csfg__intro {
    display: block;
    margin-bottom: 26px;
  }

  .csfg h1 {
    font-size: 54px;
  }

  .csfg__intro-copy {
    margin-top: 14px;
    font-size: 15px;
  }

  .csfg__photo-count {
    margin-top: 18px;
  }

  .csfg__photo-count strong {
    font-size: 27px;
  }

  .csfg__filters {
    width: 100%;
    margin: 0 0 28px;
    padding: 17px;
    border-radius: 16px;
  }

  .csfg__filter-heading {
    margin-bottom: 13px;
  }

  .csfg__filter-heading > span {
    display: none;
  }

  .csfg__step {
    width: 26px;
    height: 26px;
    font-size: 12px;
  }

  .csfg__fair-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
    padding: 0;
  }

  .csfg__fair-grid button {
    width: 100%;
    min-height: 62px;
    padding: 9px 10px;
    touch-action: manipulation;
  }

  .csfg__fair-grid button > span:nth-child(2) {
    display: -webkit-box;
    overflow: hidden;
    font-size: 12px;
    line-height: 1.2;
    text-overflow: ellipsis;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .csfg__initials {
    width: 34px;
    height: 34px;
  }

  .csfg__year-row {
    display: block;
    margin-top: 17px;
    padding-top: 16px;
  }

  .csfg__years {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    margin-top: 13px;
    gap: 7px;
    overflow: visible;
  }

  .csfg__years button {
    min-width: 0;
    min-height: 46px;
    padding: 8px 4px;
    font-size: 13px;
    touch-action: manipulation;
  }

  .csfg__year-row p {
    margin-top: 12px;
    font-size: 11px;
    line-height: 1.45;
  }

  .csfg__gallery-heading {
    margin-bottom: 14px;
  }

  .csfg__gallery-heading h2 {
    font-size: 28px;
  }

  .csfg__result-count {
    display: none;
  }

  .csfg__collections {
    width: 100%;
    max-width: 100%;
    margin: -2px 0 15px;
    padding: 1px 0 7px;
    flex-wrap: nowrap;
    gap: 7px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .csfg__collections::-webkit-scrollbar {
    display: none;
  }

  .csfg__collections button {
    min-height: 44px;
    flex: 0 0 auto;
    padding: 9px 14px;
    scroll-snap-align: start;
    touch-action: manipulation;
  }

  .csfg__gallery,
  .csfg__gallery .bwg-background,
  .csfg__gallery .bwg_container,
  .csfg__gallery [class*="bwg-container-"] {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  .csfg__gallery .bwg-standard-thumbnails {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 5px !important;
  }

  .csfg__gallery .bwg-standard-thumbnails .bwg-item > a,
  .csfg__gallery .bwg-standard-thumbnails .bwg-item0,
  .csfg__gallery .bwg-standard-thumbnails .bwg-item1 {
    border-radius: 5px !important;
  }

  .csfg__gallery .bwg-standard-thumbnails .bwg-title1 {
    display: none !important;
  }
}

@media (max-width: 420px) {
  .csfg__filters {
    padding: 14px;
    border-radius: 14px;
  }

  .csfg__fair-grid {
    gap: 6px;
  }

  .csfg__fair-grid button {
    min-height: 58px;
    padding: 8px;
    gap: 8px;
  }

  .csfg__initials {
    width: 31px;
    height: 31px;
    font-size: 9px;
  }

  .csfg__fair-grid button > span:nth-child(2) {
    font-size: 11px;
  }

  .csfg__years {
    gap: 5px;
  }

  .csfg__years button {
    min-height: 44px;
    font-size: 12px;
  }

  .csfg__gallery-heading h2 {
    font-size: 26px;
  }

  .csfg__gallery .bwg-standard-thumbnails {
    gap: 4px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .csfg *,
  .csfg *::before,
  .csfg *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}
