@font-face {
  font-family: semi;
  src: url("Yekan.ttf");
}

* {
  
  box-sizing: border-box;
}

body {
  font-family: semi;
  color: #001216;
  direction: rtl;
}

.slider img {
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.slider img.loaded,
.slide.active img {
  opacity: 1;
  transform: scale(1);
}

img.loaded,
.slide.active img {
  opacity: 1;
  transform: scale(1);
}

.gallery-page {
  width: 95%;
  max-width: 1400px;
  margin: 40px auto;
}

.page-intro {
  text-align: center;
  margin-bottom: 30px;
}

.page-intro h1 {
  background: #DD4103;
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
  display: inline-block;
  margin-bottom: 12px;
}

.page-intro p {
  background: #001216;
  color: #FFFFFF;
  width: fit-content;
  margin: 0 auto;
  padding: 10px 18px;
  border-radius: 10px;
  box-shadow: 0 0 3px #DD4105;
}

.codes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  gap: 24px;
  align-items: start;
}

.code-card {
  background: #DD4103;
  border-radius: 10px;
  padding: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: 0.3s ease;
}


.code-title {
  background: #001216;
  color: #FFFFFF;
  text-align: center;
  padding: 5px 5px;
  border-radius: 10px;
  margin-bottom: 14px;
  box-shadow: 0 0 3px #001216;
  font-size: 1rem;
  transition: ease-in 0.13s;
}

.code-title:hover{
  background-color: #DD4103;
  box-shadow: 1px 1px 1px #ffffff;
  color: #001216;
}

.slider {
  position: relative;
  width: 100%;
  height: 360px;
  overflow: hidden;
  border-radius: 10px;
  background: #f5f5f5;
}

.slides {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.slide.active {
  opacity: 1;
  pointer-events: auto;
}

.slide img {
  object-fit: cover;
  border-radius: 10px;
}

.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  border: none;
  background: rgba(0, 18, 22, 0.78);
  color: #FFFFFF;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  transition: 0.3s ease;
}

.nav:hover {
  background: #DD4103;
  color: #FFFFFF;
}
.code-title a{text-decoration: none;
color: #ffffff;
cursor: pointer;
text-shadow: #DD4105;
transition: ease-in 0.13s;}

.code-title a:hover{text-decoration: none;
color: #001216;
cursor: pointer;
text-shadow: 0px 0px 1px #FFFFFF;}

.prev {
  right: 12px;
}

.next {
  left: 12px;
}

.indicators {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 6;
  background: rgba(255,255,255,0.18);
  padding: 8px 10px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(5, 5, 5, 0.5);
  cursor: pointer;
  transition: 0.3s;
}

.dot.active {
  background: #001612;
  transform: scale(1.2);
}

@media screen and (max-width: 1024px) {
  .codes-grid {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 18px;
  }

  .slider {
    height: 320px;
  }
}

@media screen and (max-width: 768px) {
  .gallery-page {
    width: 94%;
    margin: 20px auto;
  }

  .codes-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .code-card {
    padding: 5px;
    border-radius: 12px;
    box-shadow: 0 1px 2px #001216;
  }

  .code-card:hover {
    transform: translateY(-2px);
  }

  .code-title {
    font-size: 2.6vw;
    padding: 5px 6px;
  }

  .page-intro h1 {
    font-size: 5vw;
  }

  .page-intro p {
    width: 95%;
    font-size: 14px;
    padding: 8px;
    text-align: center;
  }

  .slider {
    height: 260px;
  }

  .nav {
    width: 36px;
    height: 36px;
    font-size: 18px;
  }

  .dot {
    width: 5px;
    height: 5px;
  }
}

@media screen and (max-width: 480px) {
  .slider {
    height: 220px;
  }

  .page-intro h1 {
    font-size: 6vw;
  }

  .code-title {
    font-size: 18px;
  }

  .indicators {
    bottom: 10px;
    gap: 6px;
    padding: 6px 8px;
  }
}
