/*=============== 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: 0.813rem;
  --smaller-font-size: 0.75rem;
}

/* Responsive typography */
@media screen and (min-width: 1024px) {
  :root {
    --h3-font-size: 1.125rem;
    --small-font-size: 0.875rem;
    --smaller-font-size: 0.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__card::after,
.gallery__data {
  position: absolute;
}
.gallery__img {
  inset: 0;
  margin: auto;
  transition: transform 0.3s;
}

.gallery__card::after {
  content: "";
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    hsla(0, 0%, 100%, 0) 32%,
    hsla(0, 0%, 0%, 0.3) 100%
  );
  top: 0;
  z-index: 1;
}

.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(--small-font-size);
}

.gallery__overflow{
  position: relative;
}

.gallery__tumbnail{
  position: relative;
  width: 60px;
  height: 60px;
  border-radius: 1.5rem;
  overflow: hidden;
  margin-left: auto;
  margin-right: auto;
  cursor: pointer;
  transition: transform .3s;
}

.gallery__tumbnail-img{
 position: absolute; 
 inset: 0;
 margin: auto;
}
/* Swiper class */
.gallery-cards,
.gallery-tumbs{
  width: 260px; 
}

.gallery-cards:hover .gallery__img{
  transform: scale(1.1);
}
.gallery .swiper-wrapper{
  padding: 2.5rem 0;
}

/* Active thumbnail */
.gallery-tumbs{
  height: 132px;
}
/* Rotate thumbnail */
.swiper-slide-active .gallery__tumbnail{
  transform: translateY(-1.25rem) scale(1.2);
}
.swiper-slide-next .gallery__tumbnail{
  transform: rotate(15deg);
}
.swiper-slide-prev .gallery__tumbnail{
  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;
}
/* Arrow buttons */
.swiper-button-prev::after,
.swiper-button-next::after{
  content: '' !important;
}
.swiper-button-prev i, 
.swiper-button-next i{
  font-size: 1.5rem;
  color: var(--text-color-black);
  top:5.5rem;
}

.swiper-button-next{
  right: -1.5rem !important;
  transform: rotate(15deg);
}

.swiper-button-prev{
  left: -1.5rem !important;
  transform: rotate(-15deg);
}
/* Other swiper settings */
.gallery-cards::after{
  content: '';
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left:0;
  z-index: 10;
}

.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 !important;
  }
}
/* For medium devices */
@media screen and (min-width: 1024px){
  .gallery__card{
    width: 220px;
    height: 290px;
  }
  .gallery__tumbnail{
    width: 65px;
    height: 65px;
  }
  .gallery-cards,
  .gallery-tumbs{
    width: 280px;
  }
}