/* Homepage Swiper carousels — certifications, tutorials, clients */

.home-carousel {
  position: relative;
  margin-top: clamp(1.25rem, 2.5vw, 1.75rem);
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.home-carousel__swiper {
  padding: 0.2rem 0 0.35rem;
  overflow: hidden;
  width: 100%;
}

.home-carousel__swiper.swiper {
  margin-inline: 0;
}

/* Progressive enhancement when Swiper JS has not run yet */
.home-carousel[data-home-swiper]:not(.is-swiper-ready) .swiper-wrapper {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.home-carousel[data-home-swiper]:not(.is-swiper-ready) .swiper-wrapper::-webkit-scrollbar {
  display: none;
}

.home-carousel[data-home-swiper]:not(.is-swiper-ready) .swiper-slide {
  flex: 0 0 min(88%, 320px);
  scroll-snap-align: start;
  width: auto !important;
  height: auto;
}

@media (min-width: 640px) {
  .home-carousel[data-home-swiper]:not(.is-swiper-ready) .swiper-slide {
    flex: 0 0 calc((100% - 16px) / 2);
  }
}

@media (min-width: 768px) {
  .home-carousel[data-home-swiper]:not(.is-swiper-ready) .swiper-wrapper {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    overflow: visible;
    transform: none !important;
  }

  .home-carousel[data-home-swiper]:not(.is-swiper-ready) .swiper-slide {
    flex: none;
    width: auto !important;
    margin: 0 !important;
  }
}

.home-carousel__slide {
  height: auto;
  box-sizing: border-box;
}

.home-carousel__nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: none;
  background: rgba(128, 128, 128, 0.9);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.home-carousel__nav::before {
  content: "";
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
}

.home-carousel__nav:hover {
  transform: translateY(-50%) scale(1.04);
  background: rgba(88, 88, 88, 0.96);
}

.home-carousel__nav--prev {
  left: 0;
}

.home-carousel__nav--prev::before {
  transform: rotate(-135deg);
  margin-left: 3px;
}

.home-carousel__nav--next {
  right: 0;
}

.home-carousel__nav--next::before {
  transform: rotate(45deg);
  margin-right: 3px;
}

.home-carousel__nav.swiper-button-disabled {
  opacity: 0.45;
  cursor: default;
}

.home-carousel__pagination {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin: 1.1rem 0 0;
  padding: 0;
}

.home-carousel__pagination .swiper-pagination-bullet {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c4cad6;
  opacity: 1;
  margin: 0 !important;
  cursor: pointer;
  transition: background 0.2s ease, width 0.2s ease;
}

.home-carousel__pagination .swiper-pagination-bullet-active {
  background: #3cbeb2;
  width: 18px;
  border-radius: 999px;
}

/* —— Certifications & Awards —— */
.figma-certs-awards {
  padding-top: 3rem;
  padding-bottom: 3rem;
  background: #f4f6f8;
}

.figma-certs-awards__title {
  text-align: center;
}

.figma-certs-awards__carousel .swiper-wrapper {
  align-items: flex-start;
}

.figma-certs-awards__carousel .swiper-slide {
  height: auto;
  display: flex;
}

.figma-certs-awards__card {
  display: block;
  width: 100%;
  margin: 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

/* Natural certificate aspect — no letterboxed frame */
.figma-certs-awards__card-media {
  display: block;
  width: 100%;
  padding: 0;
  background: transparent;
  box-sizing: border-box;
}

.figma-certs-awards__card-media img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(15, 27, 46, 0.1);
  border-radius: 4px;
  box-sizing: border-box;
}

.figma-certs-awards__card-title {
  margin: 0;
  min-height: 2.75rem;
  padding: 0.5rem 0.65rem 0.65rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
  color: #000000;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

/* —— Product tutorials —— */
.figma-tutorials .figma-section-title {
  text-align: center;
}

.figma-tutorial-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 27, 46, 0.06);
}

.figma-tutorial-card h3 {
  margin: 0;
  padding: 0.85rem 1rem 1rem;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  text-align: center;
}

.figma-tutorial-card h3 a {
  color: inherit;
  text-decoration: none;
}

.figma-tutorial-card h3 a:hover {
  text-decoration: underline;
}

.figma-tutorial-card p {
  display: none;
}

.figma-tutorial-thumb {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #e8ecef;
}

.figma-tutorial-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.figma-tutorial-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

/* —— Our clients —— */
.figma-clients .figma-section-title {
  text-align: center;
}

.figma-clients .about-clients__tile,
.figma-clients .about-clients__tile.client-logo {
  width: 100%;
  max-width: none;
  aspect-ratio: 2.15 / 1;
  min-height: 0;
  padding: 0.55rem 0.75rem;
  border-radius: 22px;
  border: none;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 27, 46, 0.08);
  overflow: hidden;
}

.figma-clients__tile {
  width: 100%;
  max-width: none;
  aspect-ratio: 2.15 / 1;
  min-height: 0;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.75rem;
  border-radius: 22px;
  border: none;
  background: #ffffff;
  box-sizing: border-box;
  box-shadow: 0 10px 26px rgba(15, 27, 46, 0.08);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.figma-clients__slide.swiper-slide-active .figma-clients__tile {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(15, 27, 46, 0.14);
}

.figma-clients .about-clients__tile img,
.figma-clients__tile img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
}

@media (min-width: 901px) {
  .figma-clients .about-clients__tile,
  .figma-clients__tile {
    min-height: 7.5rem;
    padding: 0.65rem 0.85rem;
    border-radius: 24px;
  }

  .figma-clients .about-clients__tile img,
  .figma-clients__tile img {
    max-width: 100%;
    max-height: 100%;
  }
}

@media (max-width: 900px) {
  .home-carousel {
    padding-inline: 1.1rem;
  }
}

@media (max-width: 640px) {
  .home-carousel {
    padding-inline: 0.2rem;
  }

  .home-carousel__nav {
    display: none;
  }

  .figma-clients .about-clients__tile,
  .figma-clients__tile {
    padding: 0.25rem 0.35rem;
    border-radius: 16px;
    aspect-ratio: 2.2 / 1;
  }
}
