/*=============== GOOGLE FONTS ===============*/
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500&display=swap");

/*=============== VARIABLES CSS ===============*/
:root {
  /*========== Colors ==========*/
  --first-color: hsl(30, 16%, 50%);
  --text-color: #fff;
  --text-color-black: hsl(30, 8%, 15%);
  --body-color: hsl(30, 100%, 98%);

  /*========== Font and typography ==========*/
  --body-font: 'Poppins', sans-serif;
  --h3-font-size: 1rem;
  --small-font-size: .813rem;
  --smaller-font-size: .75rem;
}

/* Responsive typography */
@media screen and (min-width: 1024px) {
  :root {
    --h3-font-size: 1.125rem;
    --small-font-size: .875rem;
    --smaller-font-size: .813rem;
  }
}

/*=============== BASE ===============*/
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

body {
  font-family: var(--body-font);
  background-color: var(--body-color);
}

img {
  max-width: 100%;
  height: auto;
}

/*=============== GALLERY ===============*/
.gallery {
  height: 100vh;
  display: grid;
  align-content: center;
  justify-content: center;
}

.gallery__card {
  position: relative;
  width: 208px;
  height: 268px;
  border-radius: 3rem;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
}

.gallery__img, 
.gallery__data {
  position: absolute;
}

.gallery__img {
  inset: 0;
  margin: auto;
  transition: transform .3s;
}


.gallery__data {
  bottom: 1.5rem;
  left: 1.75rem;
  z-index: 10;
}

.gallery__title, 
.gallery__subtitle {
  color: var(--text-color);
  font-weight: 500;
}

.gallery__title {
  font-size: var(--h3-font-size);
}

.gallery__subtitle {
  font-size: var(--smaller-font-size);
}

.gallery__overflow {
  position: relative;
}

.gallery__thumbnail {
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 1.5rem;
  overflow: hidden;
  cursor: pointer;
  margin-left: auto;
  margin-right: auto;
  transition: transform .3s;
}

.gallery__thumbnail-img {
  position: absolute;
  inset: 0;
  margin: auto;
}

.gallery-cards:hover .gallery__img {
  transform: scale(1.1);
}


/* Swiper class */
.gallery-cards,
.gallery-thumbs {
  width: 260px;
}

.gallery-cards:hover .gallery__img {
  transform: scale(1.1);
}

.gallery .swiper-wrapper {
  padding: 2.5rem 0;
}

.gallery-thumbs {
  height: 132px;
}

/* Active thumbnail */
.swiper-slide-active .gallery__thumbnail {
  transform: translateY(-1.25rem) scale(1.2);
}

/* Rotate thumbnail */
.swiper-slide-next .gallery__thumbnail {
  transform: rotate(15deg);
}

.swiper-slide-prev .gallery__thumbnail {
  transform: rotate(-15deg);
}

/* Sliding numbers */
.swiper-pagination-fraction {
  font-size: var(--small-font-size);
  letter-spacing: -1px;
  font-weight: 500;
  color: var(--first-color);
  bottom: 0;
}


.swiper-button-next,
.swiper-button-prev {
  font-size: 1.5rem;
  color: var(--text-color-black);
  top: 5.5rem;
}

.swiper-button-next {
  right: -1.5rem;
  transform: rotate(15deg);
}

.swiper-button-prev {
  left: -1.5rem;
  transform: rotate(-15deg);
}


.swiper-horizontal.swiper-css-mode > .swiper-wrapper {
  scroll-snap-type: initial;
}

/*=============== BREAKPOINTS ===============*/
/* For small devices */
@media screen and (max-width: 320px) {
  .swiper-button-next,
  .swiper-button-prev {
    display: none;
  }
}

/* For medium devices */
@media screen and (min-width: 1024px) {
  .gallery__card {
    width: 220px;
    height: 290px;
  }
  .gallery__thumbnail {
    width: 65px;
    height: 65px;
  }
  .gallery-cards,
  .gallery-thumbs {
    width: 280px;
  }
}
