@font-face {
  font-family: iranyekan;
  font-style: normal;
  font-weight: normal;
  src: url('../webfonts/iranyekanwebregular.eot');
  src: url('../webfonts/iranyekanwebregulard41d.eot?#iefix') format('embedded-opentype'),
    url('../webfonts/iranyekanwebregular.woff') format('woff'),
    url('../webfonts/iranyekanwebregular.ttf') format('truetype');
}

:root {
  --primary: #2c3e50;
  --secondary: #e74c3c;
  --accent: #3498db;
  --light: #ecf0f1;
  --dark: #2c3e50;
  --text: #34495e;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --gradient: linear-gradient(135deg, var(--primary) 0%, #394a55 100%);
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}


section {
  padding: 3rem 5%;
}


/* ----- Heading ----- */
.heading {
  text-align: center;
  font-size: 2.8rem;
  margin: 2rem 0;
  color: var(--primary);
  position: relative;
  padding-bottom: 1.2rem;
}

.heading::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 50%;
  transform: translateX(50%);
  width: 80px;
  height: 3px;
  background: var(--secondary);
  border-radius: 2px;
}

.heading span {
  color: var(--secondary);
}

/* ----- Main Container ----- */
.main-container {
  display: flex;
  gap: 2rem;
  max-width: 1400px;
  padding: 0 2rem;
}

/* ----- Gallery (8/12) ----- */
.gallery {
  flex: 10;
  padding: 2rem 0;
}

.gallery .box-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 1.5rem;
  justify-items: center;
}

.gallery .box-container .box {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  height: 230px;
  transition: var(--transition);
  transform: translateY(0);
  width: 80%;
}

.gallery .box-container .box:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.gallery .box-container .box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
  padding: 3px;
}

.gallery .box-container .box:hover img {
  transform: scale(1.08);
}

.gallery .box-container .box .content {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  background: rgba(255, 255, 255, 0.95);
  padding: 1.5rem;
  transform: translateY(100%);
  backdrop-filter: blur(8px);
  transition: var(--transition);
}

.gallery .box-container .box:hover .content {
  transform: translateY(0);
}

.gallery .box-container .box .content h3 {
  font-size: 1.7rem;
  color: var(--primary);
  margin-bottom: 0.8rem;
}

.gallery .box-container .box .content p {
  font-size: 1.3rem;
  color: #666;
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

/* ----- Sidebar (4/12) ----- */
.sidebar {
  flex: 4;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.news {
  padding: 1.5rem 2rem;
  background: linear-gradient(145deg, #ffffff, #f5f7fa);
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transition: all 0.3s ease-in-out;
}

.news:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

.news h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: #333;
  border-right: 4px solid #0077b6;
  padding-right: 10px;
  margin-bottom: 1.5rem;
}

.news ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.news ul li {
  margin-bottom: 0.8rem;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  background: rgba(0,119,182,0.05);
  transition: all 0.3s;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.news ul li:hover {
  background: rgba(0,119,182,0.12);
  transform: translateX(-4px);
}

.news ul li a {
  text-decoration: none;
  color: #0077b6;
  font-size: 12px;
  flex: 1;
}

.news ul li small {
  font-size: 0.8rem;
  color: #666;
  margin-left: 10px;
  white-space: nowrap;
}

/* ----- Footer ----- */
.footer {
  background: #c1ced7;
  padding: 2rem 0;
  text-align: center;
  position: absolute;
  bottom: 0;
  width: 100%;
}

.footer .credit {
  font-family: "iranyekan", sans-serif;
  color: var(--dark);
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}


/* ----- Animation ----- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gallery .box-container .box {
  animation: fadeIn 0.6s ease-out forwards;
  opacity: 0;
}

.gallery .box-container .box:nth-child(1) { animation-delay: 0.1s; }
.gallery .box-container .box:nth-child(2) { animation-delay: 0.2s; }
.gallery .box-container .box:nth-child(3) { animation-delay: 0.3s; }
.gallery .box-container .box:nth-child(4) { animation-delay: 0.4s; }
.gallery .box-container .box:nth-child(5) { animation-delay: 0.5s; }
.gallery .box-container .box:nth-child(6) { animation-delay: 0.6s; }
.gallery .box-container .box:nth-child(7) { animation-delay: 0.7s; }
.gallery .box-container .box:nth-child(8) { animation-delay: 0.8s; }
.gallery .box-container .box:nth-child(9) { animation-delay: 0.9s; }

/* استایل اسلایدر */
.slider {
  position: relative;
  width: 100%;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.slider h3 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
  text-align: center;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.8rem;
}

/* Slideshow container */
.slideshow-container {
  max-width: 1000px;
  position: relative;
  margin: auto;
}

/* Hide the images by default */
.mySlides {
  display: none;
}

/* Next & previous buttons */
.prev, .next {
  cursor: pointer;
  position: absolute;
  top: 50%;
  width: auto;
  margin-top: -22px;
  padding: 16px;
  color: white;
  font-weight: bold;
  font-size: 18px;
  transition: 0.6s ease;
  border-radius: 0 3px 3px 0;
  user-select: none;
}

/* Position the "next button" to the right */
.next {
  right: 0;
  border-radius: 3px 0 0 3px;
}

/* On hover, add a black background color with a little bit see-through */
.prev:hover, .next:hover {
  background-color: rgba(0,0,0,0.8);
}

/* Caption text */
.text {
  color: #f2f2f2;
  font-size: 15px;
  padding: 8px 12px;
  position: absolute;
  bottom: 8px;
  width: 100%;
  text-align: center;
}

/* Number text (1/3 etc) */
.numbertext {
  color: #f2f2f2;
  font-size: 12px;
  padding: 8px 12px;
  position: absolute;
  top: 0;
}

/* Fading animation */
.fade {
  animation-name: fade;
  animation-duration: 1.5s;
}

@keyframes fade {
  from {opacity: .4}
  to {opacity: 1}
}

/* ----- Media Queries ----- */
@media (max-width: 1200px) {
  section {
    padding: 3rem 4%;
  }
  
  .gallery .box-container {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 991px) {
  html {
    font-size: 58%;
  }
  
  header {
    padding: 1rem 3%;
  }
  
  header .heading {
    font-size: 1.9rem;
  }
  
  section {
    padding: 2.5rem;
  }
  
  .main-container {
    flex-direction: column;
  }
  
  .gallery .box-container {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.8rem;
  }
  
  .gallery .box-container .box {
    height: 250px;
  }
}

  
  .heading {
    font-size: 2.4rem;
  }
  
  .gallery .box-container {
    gap: 1.5rem;
  }
  
  .gallery .box-container .box {
    height: 220px;
  }
}

@media (max-width: 600px) {
  .gallery .box-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 450px) {
  html {
    font-size: 55%;
  }
  
  section {
    padding: 2rem;
  }
  
  .heading {
    font-size: 2.2rem;
  }
  
  .gallery .box-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .gallery .box-container .box {
    height: 200px;
    margin: 0.3rem;
  }
  
  .footer .credit {
    font-size: 1.4rem;
    padding: 0 1rem;
  }
}