@import url('https://fonts.googleapis.com/css2?family=Vazirmatn&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css');

/******************** Global Pattern Backgrounds ********************/
body {
  margin: 0;
  font-family: 'Vazirmatn', sans-serif;
  background-color: #f5f5f5;
  background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23000000' fill-opacity='0.02'%3E%3Ccircle cx='20' cy='20' r='2'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  color: #2C2C2C;
  direction: rtl;
}

#header, #footer {
  background-image: url('bp.jpg');
  background-repeat: repeat;
}

.company-intro-box {
  background: linear-gradient(to left, #1a1a1a, #2b2b2b);
  padding: 30px 40px;
  border-radius: 16px;
  text-align: center;
  color: white;
  max-width: 700px;
  margin: 40px auto 0 auto;
  position: relative;
  overflow: hidden;
  display: flex;
  animation: fadeInUp 1s ease forwards;
}

/* افکت درخشش فلزی */
.company-intro-box::after {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    120deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.3) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
  animation: metallicShine 4s infinite;
  pointer-events: none;
  z-index: 1;
}

/* انیمیشن حرکت نور */
@keyframes metallicShine {
  0% {
    left: -75%;
  }
  100% {
    left: 125%;
  }
}

/* انیمیشن ورود */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* انیمیشن درخشش دور باکس */
@keyframes glowBox {
  0% {
    box-shadow: 0 0 4px rgba(255, 111, 0, 0.1), 0 0 8px rgba(255, 111, 0, 0.1);
  }
  50% {
    box-shadow: 0 0 16px rgba(255, 111, 0, 0.35), 0 0 30px rgba(255, 111, 0, 0.2);
  }
  100% {
    box-shadow: 0 0 6px rgba(255, 111, 0, 0.2), 0 0 12px rgba(255, 111, 0, 0.1);
  }
}

@keyframes shineLight {
  0% { right: -100%; }
  60% { right: 100%; }
  100% { right: 100%; }
}

.company-intro-box h1 {
  font-size: 32px;
  font-weight: 800;
  color: #FF6F00;
  position: relative;
  animation: flickerGlow 3s infinite ease-in-out;
  text-shadow:
    0 0 0px #FF6F00,
    0 0 10px rgba(255, 111, 0, 0.6),
    0 0 20px rgba(255, 111, 0, 0.4);
}

@keyframes flickerGlow {
  0% {
    text-shadow:
      0 0 2px #FF6F00,
      0 0 6px rgba(255, 111, 0, 0.3),
      0 0 12px rgba(255, 111, 0, 0.2);
  }
  50% {
    text-shadow:
      0 0 4px #FF6F00,
      0 0 18px rgba(255, 111, 0, 0.8),
      0 0 36px rgba(255, 111, 0, 0.5);
  }
  100% {
    text-shadow:
      0 0 3px #FF6F00,
      0 0 12px rgba(255, 111, 0, 0.4),
      0 0 24px rgba(255, 111, 0, 0.3);
  }
}

.company-intro-box h1::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #FF6F00, #FFA040);
  margin: 10px auto 0;
  border-radius: 2px;
  animation: slideLine 2s infinite alternate;
}

@keyframes slideLine {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(20px); opacity: 0.6; }
}

.company-intro-box h3 {
  font-size: 18px;
  font-weight: 400;
  color: #ccc;
  line-height: 1.7;
  margin: 0 auto;
  max-width: 600px;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.company-intro-box img.hover-rotate {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 50%;
  background-color: #FF6F00;
  padding: 8px;
  transition: transform 0.4s ease, filter 0.4s ease;
  position: absolute;
  z-index: 1001;
  top: 10px;
  left: 50px;
}

.company-intro-box img.hover-rotate:hover {
  transform: rotate(360deg) scale(1.5);
  filter: brightness(1.2);
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
  justify-content: center;
}

.logo-container h1 {
  margin: 0;
  font-size: 24px;
  color: #fff;
}

.logo-container h3 {
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 400;
  color: #ccc;
  max-width: 500px;
}

.text-align-center {
  text-align: center;
}

.pulse-image {
  animation: pulse 1.5s infinite;
  transition: transform 0.3s ease;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

ul {
  list-style: none;
}

/******************** Header and Navigation ********************/
header {
  background: rgba(20, 20, 20, 0.75);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  background-color: transparent;
  backdrop-filter: blur(6px);
  margin-top: 50px;
  position: relative;
}

nav::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(6px);
  z-index: -1;
  border-radius: inherit;
}

.main-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 16px;
}

.main-menu > li {
  position: relative;
  padding-bottom: 5px; /* افزایش محدوده هاور برای جلوگیری از بسته شدن زیرمنو */
}

.main-menu > li > a {
  padding: 10px 20px;
  color: white;
  font-size: 16px;
  border-radius: 8px;
  transition: all 0.3s ease;
  text-decoration: none;
  background-color: #2B2B2C;
  position: relative;
  z-index: 1;
}

.main-menu > li > a:hover {
  background-color: #FF6F00;
  color: #fff;
  box-shadow: 0 2px 10px rgba(255, 111, 0, 0.4);
}

.sub-menu, .sub-menu-2 {
  display: none;
  position: absolute;
  background-color: #2C2C2C;
  padding: 10px;
  border-radius: 6px;
  min-width: 220px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  z-index: 1000;
  top: 100%;
  left: calc(100% - 15px);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease; /* انیمیشن نرم برای زیرمنو */
}

.sub-menu.active, .sub-menu-2.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.sub-menu-2, .sub-menu .sub-menu {
  top: 0;
}

.main-menu li:hover > .sub-menu,
.sub-menu li:hover > .sub-menu,
.sub-menu li:hover > .sub-menu-2 {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.sub-menu a, .sub-menu-2 a {
  display: block;
  padding: 8px 12px;
  color: #eee;
  text-decoration: none;
  font-size: 14px;
  border-radius: 4px;
  transition: background-color 0.2s;
  text-align:end;
}

.sub-menu a:hover, .sub-menu-2 a:hover {
  background-color: #FF6F00;
  color: white;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: white;
  cursor: pointer;
  top: 20px;
  right: 20px;
}

@media (max-width: 768px) {
  header {
    background: none;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
  }
  header {
    position: fixed;
    top: 10px;
    margin-top: 0;
  }
  .menu-toggle {
    display: block;
  }

  .main-menu {
    flex-direction: column;
    width: max-content;
    position: fixed;
    top: 60px;
    right: -250px;
    background-color: #2C2C2C;
    padding: 10px;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 1100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s ease;
  }

  .main-menu.active {
    right: 0;
    opacity: 1;
    visibility: visible;
    display: flex;
  }

  .main-menu > li {
    min-height: 40px;
    display: flex;
    align-items: center;
    padding-bottom: 0; /* حذف padding-bottom در حالت موبایل */
  }

  .main-menu > li > a {
    padding: 12px 24px;
    font-size: 16px;
    background-color: transparent;
    border-bottom: 1px solid #444;
    width: 100%;
    box-sizing: border-box;
    border-radius: 0;
  }

  .sub-menu, .sub-menu-2 {
    display: none;
    position: static;
    width: 100%;
    background-color: #333;
    box-shadow: none;
    border-radius: 0;
    padding-right: 20px;
  }

  .sub-menu.active, .sub-menu-2.active {
    display: block;
  }

  .has-submenu-d, .has-submenu-r {
    position: relative;
  }

  nav {
    width: max-content;
    margin-right: 10px;
    margin-top: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 4px;
    background-color: transparent;
    backdrop-filter: blur(6px);
    margin-top: 50px;
    position: relative;
    border-radius: 1000px;
  }
}

/******************** Slider ********************/
.slider-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.slides-container {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

.slides {
  display: flex;
  transition: transform 0.8s ease-in-out;
}

.slide {
  position: relative;
  min-width: 100%;
  height: 100vh;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overlay-content {
  position: absolute;
  bottom: 50px;
  left: 50px;
  color: white;
  background: rgba(0, 0, 0, 0.5);
  padding: 20px;
  border-radius: 5px;
  max-width: 500px;
}

.overlay-content h2 {
  margin: 0 0 10px;
  font-size: 2rem;
}

.overlay-content p {
  margin: 0 0 10px;
}

.dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.dot {
  width: 12px;
  height: 12px;
  background-color: rgba(255,255,255,0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: 0.3s;
}

.dot.active, .dot:hover {
  background-color: #FF6F00;
}

/******************** About Section ********************/
.about-section-container {
  background-color: #ffffff;
  background-image:
    linear-gradient(to bottom, rgba(170,170,170,0.5), rgba(0,0,0,0)),
    url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23000000' fill-opacity='0.015'%3E%3Ccircle cx='40' cy='40' r='1'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat;
  background-attachment: fixed;
  padding: 80px 20px;
  position: relative;
  overflow: hidden;
}

.about-section-container::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,111,0,0.02) 0%, transparent 70%);
  animation: pulseBg 10s infinite;
  z-index: 0;
}

@keyframes pulseBg {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.5; }
}

.about-section-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.1);
  position: relative;
  z-index: 1;
  animation: fadeInUp 1.2s ease both;
}

.about-section-inner p {
  font-size: 17px;
  line-height: 1.9;
  text-align: justify;
  margin-bottom: 24px;
  color: #333;
  position: relative;
  z-index: 1;
}

.about-section-inner strong {
  color: #FF6F00;
  font-weight: 600;
  position: relative;
}

.about-section-inner strong::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: #FF6F00;
  opacity: 0.2;
}

.about-section-inner h2, .about-section-inner h3, .about-section-inner p strong {
  color: #212121;
  margin-top: 30px;
  margin-bottom: 10px;
  position: relative;
  padding-right: 28px;
  font-weight: 700;
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.about-section-inner h2::before, .about-section-inner h3::before, .about-section-inner p strong::before {
  content: '\f0a1';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  right: 0;
  color: #FF6F00;
  font-size: 16px;
}

.about-section-inner img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-section-inner img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

.about-section-inner p:first-of-type span {
  font-family: 'Vazirmatn', sans-serif !important;
  font-size: 28px !important;
  color: #FF6F00;
  display: inline-block;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #FF6F00, #FFA040);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shineText 3s infinite linear;
}

@keyframes shineText {
  0% { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/******************** Footer ********************/
footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background-color: rgba(0, 0, 0, 0.7);
  padding: 1rem;
  border-radius: 0.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: auto auto;
}

.footer-section h3 {
  color: #FFA040;
  margin-bottom: 10px;
  font-size: 18px;
  border-bottom: 1px solid #444;
  padding-bottom: 4px;
}

.footer-section p, .footer-section a {
  color: #ccc;
  text-decoration: none;
  line-height: 1.8;
  font-size: 14px;
}

.footer-section a:hover {
  color: #FF6F00;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-logo-container img.hover-grow {
  width: 300px;
  height: 300px;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.footer-logo-container img.hover-grow:hover {
  transform: scale(1.1);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid #333;
  padding-top: 20px;
  font-size: 13px;
  color: #888;
}

@media (max-width: 768px) {
  .footer-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 100%;
    margin: 0 auto;
  }
}