.tl-instagram-section .tl-instagram-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  width: min(1500px, 100%) !important;
  margin: 0 auto !important;
  gap: 10px !important;
}

.tl-api-item,
.tl-api-skeleton {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  aspect-ratio: 1 / 1;
  background: #eeeeee;
}

.tl-api-item {
  cursor: pointer;
}

.tl-api-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease, filter .35s ease;
}

.tl-api-item::after {
  position: absolute;
  inset: 0;
  content: "";
  background: rgba(0, 0, 0, 0);
  transition: background .35s ease;
}

.tl-api-item:hover img {
  transform: scale(1.06);
}

.tl-api-item:hover::after {
  background: rgba(0, 0, 0, .13);
}

.tl-api-play {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  padding-left: 4px;
  border: 2px solid rgba(255, 255, 255, .85);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, .62);
  color: #ffffff;
  font-size: 24px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, .3);
}

.tl-api-skeleton {
  overflow: hidden;
  background: #ececec;
}

.tl-api-skeleton::after {
  position: absolute;
  inset: 0;
  content: "";
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, .7),
    transparent
  );
  animation: tl-api-loading 1.25s infinite;
}

@keyframes tl-api-loading {
  100% {
    transform: translateX(100%);
  }
}

.tl-api-lightbox {
  position: fixed;
  z-index: 999999;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 55px 80px;
  background: rgba(0, 0, 0, .94);
}

.tl-api-lightbox[hidden] {
  display: none !important;
}

.tl-api-lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(1050px, 100%);
  max-height: 92vh;
}

.tl-api-media {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-height: calc(92vh - 110px);
}

.tl-api-media img,
.tl-api-media video {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 110px);
  border-radius: 10px;
  object-fit: contain;
  background: #000000;
}

.tl-api-caption {
  max-width: 850px;
  max-height: 54px;
  margin: 12px 0 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.tl-api-instagram-link {
  display: inline-flex;
  margin-top: 12px;
  padding: 10px 22px;
  border-radius: 25px;
  background: #ffffff;
  color: #222222 !important;
  font-weight: 700;
  text-decoration: none !important;
}

.tl-api-close,
.tl-api-prev,
.tl-api-next {
  position: absolute;
  z-index: 5;
  border: 0;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
}

.tl-api-close {
  top: 12px;
  right: 22px;
  font-size: 52px;
  line-height: 1;
}

.tl-api-prev,
.tl-api-next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 74px;
}

.tl-api-prev {
  left: 20px;
}

.tl-api-next {
  right: 20px;
}

body.tl-api-open {
  overflow: hidden;
}

.tl-api-error {
  grid-column: 1 / -1;
  padding: 35px;
  border-radius: 12px;
  background: #ffffff;
  text-align: center;
}

.tl-api-error a {
  color: #d62976;
  font-weight: 700;
}

@media (max-width: 767px) {
  .tl-instagram-section .tl-instagram-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  .tl-api-item,
  .tl-api-skeleton {
    border-radius: 7px;
  }

  .tl-api-play {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }

  .tl-api-lightbox {
    padding: 55px 12px 75px;
  }

  .tl-api-prev,
  .tl-api-next {
    top: auto;
    bottom: 8px;
    font-size: 58px;
  }

  .tl-api-prev {
    left: 25px;
  }

  .tl-api-next {
    right: 25px;
  }

  .tl-api-caption {
    max-height: 42px;
    font-size: 12px;
  }
}

/* TOYLINA WINDOWED LIGHTBOX START */

.tl-api-lightbox {
  padding: 24px !important;
  background: rgba(0, 0, 0, .68) !important;
  backdrop-filter: blur(4px);
}

.tl-api-lightbox-content {
  position: relative !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;

  width: min(900px, calc(100vw - 80px)) !important;
  height: min(760px, calc(100vh - 70px)) !important;
  max-width: 900px !important;
  max-height: 760px !important;

  padding: 18px !important;
  overflow: hidden !important;

  border-radius: 18px !important;
  background: #ffffff !important;
  box-shadow: 0 25px 80px rgba(0, 0, 0, .42) !important;
}

.tl-api-media {
  width: 100% !important;
  height: calc(100% - 100px) !important;
  max-height: none !important;

  overflow: hidden !important;
  border-radius: 13px !important;
  background: #111111 !important;
}

.tl-api-media img,
.tl-api-media video {
  width: 100% !important;
  height: 100% !important;

  max-width: none !important;
  max-height: none !important;

  border-radius: 13px !important;
  object-fit: contain !important;
  background: #111111 !important;
}

.tl-api-caption {
  width: 100% !important;
  max-width: 760px !important;
  max-height: 42px !important;

  margin: 10px 0 0 !important;

  overflow: hidden !important;
  color: #333333 !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  text-align: center !important;
}

.tl-api-instagram-link {
  margin-top: 10px !important;
  padding: 9px 21px !important;

  background: linear-gradient(
    45deg,
    #feda75,
    #fa7e1e,
    #d62976,
    #962fbf,
    #4f5bd5
  ) !important;

  color: #ffffff !important;
  border-radius: 24px !important;
}

.tl-api-close {
  top: 10px !important;
  right: 12px !important;

  width: 42px !important;
  height: 42px !important;

  border-radius: 50% !important;
  background: rgba(0, 0, 0, .68) !important;

  color: #ffffff !important;
  font-size: 34px !important;
  line-height: 36px !important;
}

.tl-api-prev,
.tl-api-next {
  top: 50% !important;
  bottom: auto !important;

  width: 46px !important;
  height: 58px !important;

  border-radius: 12px !important;
  transform: translateY(-50%) !important;

  background: rgba(0, 0, 0, .62) !important;
  color: #ffffff !important;

  font-size: 47px !important;
  line-height: 48px !important;
}

.tl-api-prev {
  left: 12px !important;
}

.tl-api-next {
  right: 12px !important;
}

@media (max-width: 767px) {
  .tl-api-lightbox {
    padding: 12px !important;
  }

  .tl-api-lightbox-content {
    width: 94vw !important;
    height: 78vh !important;

    max-width: none !important;
    max-height: none !important;

    padding: 12px !important;
    border-radius: 14px !important;
  }

  .tl-api-media {
    height: calc(100% - 88px) !important;
    border-radius: 10px !important;
  }

  .tl-api-media img,
  .tl-api-media video {
    border-radius: 10px !important;
  }

  .tl-api-caption {
    max-height: 36px !important;
    margin-top: 7px !important;
    font-size: 11px !important;
  }

  .tl-api-instagram-link {
    margin-top: 7px !important;
    padding: 8px 17px !important;
    font-size: 13px !important;
  }

  .tl-api-close {
    top: 6px !important;
    right: 7px !important;

    width: 38px !important;
    height: 38px !important;

    font-size: 30px !important;
  }

  .tl-api-prev,
  .tl-api-next {
    top: 50% !important;
    bottom: auto !important;

    width: 39px !important;
    height: 50px !important;

    font-size: 39px !important;
  }

  .tl-api-prev {
    left: 6px !important;
  }

  .tl-api-next {
    right: 6px !important;
  }
}

/* TOYLINA WINDOWED LIGHTBOX END */

/* TOYLINA PLAY ICON FIX START */

.tl-api-play {
  font-size: 0 !important;
  padding-left: 0 !important;
}

.tl-api-play::before {
  display: block;
  width: 0;
  height: 0;
  margin-left: 4px;
  content: "";
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 17px solid #ffffff;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35));
}

@media (max-width: 767px) {
  .tl-api-play::before {
    margin-left: 3px;
    border-top-width: 8px;
    border-bottom-width: 8px;
    border-left-width: 13px;
  }
}

/* TOYLINA PLAY ICON FIX END */
