.mgc-section:nth-child(odd) {
  background-image: linear-gradient(transparent, #f3f5f9, transparent);
}

.mgc-section .mgc-section-title {
  margin-bottom: 3rem;
}

.gallery {
  --btn-size: 3rem;
  --height: 50rem;
  --panes-pad: 4rem;
  display: flex;
  width: 100%;
  height: var(--height);
}

.mgc-section:nth-child(even) .gallery {
  flex-direction: row-reverse;
}

.gallery .cats,
.gallery .pane-content .dots-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery .cats {
  --item-pad: 1rem;
  align-items: stretch;
}

.gallery .cats-control {
  width: 100%;
  height: var(--btn-size);
  padding: 0;
  border-radius: 0;
}

.gallery .cats-control:first-child {
  margin-bottom: var(--item-pad);
}

.gallery .cats-control:last-child {
  margin-top: var(--item-pad);
}

.gallery .cats-slider,
.gallery .items,
.gallery .pane-content .main-content {
  flex: 1 0 0%;
}

.gallery .cats-slider {
  --slider-height: calc(var(--height) - calc(var(--btn-size) * 2) - calc(var(--item-pad) * 2));
  height: var(--slider-height);
  overflow: auto;
}

.gallery .cats-slider.no-scroll {
  margin: calc(var(--btn-size) + var(--item-pad)) 0;
}

.gallery .cats-inner {
  flex-direction: column;
  flex-wrap: nowrap;
}

.gallery .cat {
  --max: 5;
  height: calc(var(--slider-height) / var(--max));
  aspect-ratio: 1/1;
  padding: var(--item-pad);
}

.gallery .cat.active .cat-wrapper,
.gallery .cat-wrapper {
  background-color: white !important;
}

.gallery .cat-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1/1;
  padding: 0.75rem;
  color: #000a88 !important;
  border-radius: 100%;
  border: 3px solid currentColor;
  overflow: hidden;
  transition: color 0.2s linear;
}

.gallery .cat-wrapper:hover,
.gallery .cat-wrapper.active {
  color: #95d600 !important;
}

.gallery .cat .cat-img,
.gallery .pane-content .imgs .item-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery .items {
  padding: var(--panes-pad);
}

.gallery .items .cat-pane {
  --side-col-width: 6rem;
  width: 100%;
  height: 100%;
  padding: var(--panes-pad) 0;
  background-color: white;
  border-radius: 2rem;
  box-shadow: 0 0 1rem 0.25rem gainsboro;
}

.gallery .pane-content,
.gallery .coming-soon,
.gallery .item-pane,
.gallery .main-content .tab-content,
.gallery .pane-content .item-pane .pane-wrapper {
  height: 100%;
}

.gallery .pane-content {
  display: flex;
}

.mgc-section:nth-child(even) .pane-content {
  flex-direction: row-reverse;
}

.gallery .coming-soon {
  width: 100%;
}

.gallery .coming-soon .msg {
  font-size: 4rem;
  color: gainsboro;
}

.gallery .pane-content .dots,
.gallery .pane-content .items-tabs {
  width: var(--side-col-width);
}

.gallery .pane-content .dots {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 0;
}

.gallery .pane-content .cat-name-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1 0 0%;
  width: 100%;
}

.gallery .pane-content .cat-name {
  --font-size: 2rem;
  flex: 0 0 auto;
  width: max-content;
  margin-bottom: 0;
  color: #3fae2a;
  font-weight: 500;
  font-size: var(--font-size);
  transform: rotate(-90deg);
}

.mgc-section:nth-child(even) .pane-content .cat-name {
  transform: rotate(90deg);
}

.gallery .pane-content .dot {
  width: 0.5rem;
  padding: 0;
  background-color: #838383;
}

.gallery .pane-content .dot.active,
.gallery .pane-content .dot:hover,
.gallery .pane-content .dot:active {
  background-color: #3fae2a;
}

.gallery .pane-content .dot:not(:last-child) {
  margin-bottom: 1rem;
}

.gallery .pane-content .main-content,
.gallery .item-desc .desc .page {
  background-color: #f3f5f9;
}

.gallery .pane-content .main-content {
  padding: 2rem;
}

.gallery .pane-content .main-content.single {
  margin-inline-end: var(--side-col-width);
}

.mgc-section:nth-child(even) .pane-content .main-content.single {
  margin-inline-start: var(--side-col-width);
  margin-inline-end: 0;
}

.gallery .pane-content .items-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery .pane-content .items-tabs .tabs-wrapper,
.gallery .pane-content .item-tab {
  flex: 0 0 auto;
}

.gallery .pane-content .items-tabs .tabs-wrapper {
  justify-content: center;
  width: calc(var(--height) - calc(var(--panes-pad) * 4));
  transform: rotate(90deg);
}

.mgc-section:nth-child(even) .pane-content .items-tabs .tabs-wrapper {
  transform: rotate(-90deg);
}

.gallery .pane-content .item-tab {
  font-size: 0.85rem;
  border-radius: 0;
  background: none;
  color: #838383;
  font-weight: bold;
  transition: color 0.2s linear;
}

.gallery .pane-content .item-tab.active,
.gallery .pane-content .item-tab:hover,
.gallery .pane-content .item-tab:active {
  color: #3fae2a;
}

.gallery .pane-content .item-pane .pane-wrapper {
  --title-height: 4rem;
  display: flex;
  flex-direction: column;
  /* text-align: center; */
}

.gallery .pane-content .item-title {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--title-height);
  color: #000a88;
  font-weight: bold;
  font-size: 1.5rem;
}

.gallery .pane-content .item-desc {
  --text-pad: 1.5rem;
  display: flex;
  justify-content: space-between;
  flex: 1 0 0%;
  height: calc(100% - var(--title-height));
}

.gallery .item-desc.pl-start {
  flex-direction: row-reverse;
}

.gallery .item-desc.pl-bottom {
  flex-direction: column;
}

.gallery .item-desc .overflow-parent .overflow-wrapper {
  display: flex;
  flex-direction: column;
  text-align: center;
}

.gallery .item-desc .overflow-parent .overflow-wrapper:only-child {
  justify-content: center;
}

.gallery .item-desc .desc {
  flex: 1 0 0%;
}

.gallery .item-desc.pl-start .desc {
  padding-inline-start: var(--text-pad);
}

.gallery .item-desc.pl-end .desc {
  padding-inline-end: var(--text-pad);
}

.gallery .item-desc.pl-bottom .desc {
  margin-bottom: var(--text-pad);
}

.gallery .item-desc .overflow-parent .overflow-wrapper li {
  justify-content: center;
}

.mgc-section:nth-child(even) .pane-content .desc .carousel {
  flex-direction: row-reverse;
}

.gallery .item-desc .buttons {
  justify-content: center;
}

.gallery .item-desc .desc ul:only-child {
  padding-inline-start: 0;
}

.mgc-section:nth-child(even) .pane-content .desc .buttons {
  margin-inline-start: 0;
  margin-inline-end: 1rem;
}

.gallery .item-desc.pl-start .imgs,
.gallery .item-desc.pl-end .imgs {
  --col-width: 35%;
  flex-direction: column;
  width: var(--col-width);
  max-height: 100%;
  max-width: var(--col-width);
  flex: 0 0 var(--col-width);
}

.gallery .item-desc.pl-bottom .imgs {
  --row-height: 45%;
  height: var(--row-height);
  max-height: var(--row-height);
  flex: 0 0 var(--row-height);
}

.gallery .pane-content .imgs {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gallery .pane-content .imgs .item-img {
  flex: 1 0 0%;
  padding: 1rem;
}

/* ANCHOR Media queries */

/* Tablet size */
@media (max-width: 991px) {
  .gallery {
    flex-direction: column;
    --height: auto;
  }

  .mgc-section:nth-child(even) .gallery {
    flex-direction: column-reverse;
  }

  .gallery .cats,
  .gallery .cats-inner {
    flex-direction: row;
    width: fit-content;
  }

  .gallery .cats-control {
    width: var(--btn-size);
    height: auto;
  }

  .gallery .cats-control .i {
    rotate: -90deg;
  }

  .gallery .cats-control:first-child {
    margin-bottom: 0;
    margin-inline-end: var(--item-pad);
  }

  .gallery .cats-control:last-child {
    margin-top: 0;
    margin-inline-start: var(--item-pad);
  }

  .gallery .cats-slider {
    --slider-height: auto;
    --slider-width: calc(100vw - 8rem - calc(var(--btn-size) * 2) - calc(var(--item-pad) * 2));
    width: var(--slider-width);
  }

  .gallery .cats-slider.no-scroll {
    display: flex;
    justify-content: center;
    margin: 0 calc(var(--btn-size) + var(--item-pad));
  }

  .gallery .cat {
    width: calc(var(--slider-width) / var(--max));
    height: auto;
  }

  .gallery .items {
    flex: 0 0 auto;
    height: 60rem;
    padding: var(--panes-pad) 0;
  }

  .gallery .items .cat-pane {
    padding: 0 var(--panes-pad);
  }

  .gallery .items .cat-pane:has(.single) {
    padding: 0 var(--panes-pad) var(--side-col-width);
  }

  .gallery .pane-content,
  .mgc-section:nth-child(even) .pane-content {
    flex-direction: column;
  }

  .mgc-section .pane-content .main-content.single,
  .mgc-section:nth-child(2n) .pane-content .main-content.single {
    height: calc(100% - var(--side-col-width));
    margin-inline-start: 0;
    margin-inline-end: 0;
  }

  .gallery .pane-content .dots,
  .gallery .pane-content .items-tabs {
    width: 100%;
    height: var(--side-col-width);
  }

  .gallery .pane-content .dots,
  .gallery .pane-content .dots-wrapper {
    flex-direction: row;
  }

  .gallery .pane-content .cat-name,
  .mgc-section:nth-child(even) .pane-content .cat-name,
  .gallery .pane-content .items-tabs .tabs-wrapper {
    transform: rotate(0deg);
  }

  .gallery .pane-content .cat-name-wrapper {
    justify-content: flex-start;
  }

  .gallery .pane-content .cat-name-wrapper:only-child {
    justify-content: center;
  }

  .gallery .pane-content .cat-name-wrapper:not(:last-child) {
    margin-inline-end: 0.5rem;
  }

  .gallery .pane-content .dots {
    flex-shrink: 0;
    padding: 0;
  }

  .gallery .pane-content .dot:not(:last-child) {
    margin-bottom: 0;
    margin-inline-end: 0.5rem;
  }

  .gallery .pane-content .items-tabs .tabs-wrapper {
    width: 100%;
    height: var(--side-col-width);
  }
}

/* Large phone size */
@media (max-width: 650px) {
  .gallery {
    --panes-pad: 3rem;
  }

  .gallery .cats-slider {
    --slider-width: calc(100vw - 3rem - calc(var(--btn-size) * 2) - calc(var(--item-pad) * 2));
  }

  .gallery .item-desc .desc .page {
    font-size: 0.95rem;
  }

  .gallery .item-desc.pl-bottom .imgs {
    --row-height: 40%;
  }
}

/* Phone size */
@media (max-width: 510px) {
  .gallery {
    --panes-pad: 1.5rem;
  }

  .gallery .pane-content .cat-name {
    --font-size: 1.5rem;
  }

  .gallery .pane-content .main-content {
    padding: 1rem;
  }

  .overflow-parent .overflowing .carousel .buttons .arrow {
    width: 2rem;
  }

  .gallery .item-desc.pl-bottom .imgs {
    --row-height: 30%;
  }
}
