:root {
  --primary: #14212e;
  --secondary: #2772a5;
  --accent: #E74C3C;
  --gold: #F1C40F;
  --light: #ECF0F1;
  --dark: #2C3E50;
  --success: #27AE60;
  --gradient-bg: linear-gradient(135deg, #21F1FF 0%, #0D6EFD 100%);
  --gradient-card: linear-gradient(to bottom right, #ffffff, #f8f9fa);
  --gradient-dark: linear-gradient(135deg, #2C3E50 0%, #1a2530 100%);
}

* {
  font-family: 'Vazirmatn', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background: var(--light);
  overflow-x: hidden;
  width: 100%;
}

/* ناوبری مدرن */
.navbar {
  background: rgba(255, 255, 255, 1);
  backdrop-filter: blur(15px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
  padding: 0.6rem 0;
  /* border-bottom: 2px solid var(--gold); */
}

.navbar-brand {
  font-weight: 900;
  font-size: 1.5rem;
  background: var(--gradient-bg);
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 1rem;
}

.nav-link {
  color: var(--dark) !important;
  font-weight: 600;
  padding: 0.5rem 1.2rem !important;
  margin: 0 0.2rem;
  border-radius: 25px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: white !important;
  background: var(--gradient-bg);
  transform: translateY(-2px);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  right: 50%;
  transform: translateX(50%);
  width: 0;
  height: 3px;
  background: var(--gradient-bg);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav-link:hover::after {
  width: 70%;
}

/* سکشن Hero با تصویر پس‌زمینه */
.hero-section {
  min-height: 100vh;
  height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}

/* تصویر پس‌زمینه Hero */
.hero-bg-image {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
}

/* لایه overlay برای بهبود خوانایی متن روی تصویر */
.hero-bg-image::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  z-index: 2;
}

/* زمینه متحرک */
.animated-bg {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: rgba(33, 241, 255, 0.05);
  animation: float 20s ease-in-out infinite;
  z-index: 3;
}

@keyframes float {
  0%, 100% { 
      transform: translate(0, 0) rotate(0deg);
      opacity: 0.7;
  }
  33% { 
      transform: translate(-50px, 50px) rotate(120deg);
      opacity: 0.9;
  }
  66% { 
      transform: translate(50px, -50px) rotate(240deg);
      opacity: 0.7;
  }
}

.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  z-index: 4;
}

.shape {
  position: absolute;
  background: rgba(33, 241, 255, 0.05);
  border-radius: 50%;
  animation: move 25s infinite linear;
}

.shape:nth-child(1) {
  width: 100px;
  height: 100px;
  top: 10%;
  right: 5%;
  animation-delay: 0s;
}

.shape:nth-child(2) {
  width: 75px;
  height: 75px;
  bottom: 20%;
  left: 10%;
  animation-delay: -5s;
}

.shape:nth-child(3) {
  width: 50px;
  height: 50px;
  top: 40%;
  left: 20%;
  animation-delay: -10s;
}

.shape:nth-child(4) {
  width: 25px;
  height: 25px;
  top: 50%;
  left: 50%;
  animation-delay: -20s;
}

.shape:nth-child(5) {
  width: 50px;
  height: 50px;
  top: 70%;
  left: 70%;
  animation-delay: -25s;
}

.shape:nth-child(6) {
  width: 70px;
  height: 70px;
  top: 10%;
  left: 10%;
  animation-delay: -30s;
}

@keyframes move {
  0% {
      transform: translate(0, 0) rotate(0deg);
  }
  50% {
      transform: translate(100px, 100px) rotate(360deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

/* استایل‌های Hero برای دسکتاپ (لوگو سمت راست - محتوا سمت چپ) */
@media (min-width: 992px) {
  .hero-content {
    position: relative;
    z-index: 5;
    color: white;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 80vh;
  }

  .hero-logo-container {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50%;
    padding-left: 2rem; /* در RTL: padding-left یعنی فاصله از سمت راست */
  }

  .hero-logo {
    width: 512px;
    height: 512px;
    background: transparent;
    border-radius: 50%;
    padding: 20px;
    margin: 0;
    animation: pulse 3s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero-text-content {
    flex: 0 0 auto;
    width: 50%;
    text-align: right;
    padding-right: 2rem; /* در RTL: padding-right یعنی فاصله از سمت چپ */
    color: white;
  }

  .hero-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #C98126, #C98126, var(--gold), var(--gold));
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: right;
  }

  .hero-subtitle {
    font-size: 1.4rem;
    opacity: 0.9;
    margin: 1.5rem;
    line-height: 1.8;
    text-align: right;
    max-width: 100%;
  }

  .cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: flex-start; /* در RTL: flex-end یعنی سمت چپ */
    flex-wrap: wrap;
  }
}

/* حالت موبایل و تبلت (مرکزی مانند قبل) */
@media (max-width: 991.98px) {
  .hero-content {
    position: relative;
    z-index: 5;
    text-align: center;
    color: white;
    padding: 0rem;
    display: block;
  }

  .hero-logo-container {
    width: 100%;
    margin-bottom: 2rem;
  }

  .hero-logo {
    width: 350px;
    height: 350px;
    background: transparent;
    border-radius: 50%;
    padding: 20px;
    margin: 0 auto 2rem;
    animation: pulse 3s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .hero-text-content {
    width: 100%;
    text-align: center;
    padding: 0;
  }

  .hero-title {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #C98126, #C98126, var(--gold), var(--gold));
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
  }

  .hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 1.5rem;
    line-height: 1.8;
    text-align: center;
  }

  .cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

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

.btn-glow {
  background: var(--gradient-bg);
  color: white;
  border: none;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-glow:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
}

.btn-outline-glow {
  background: transparent;
  color: white;
  border: 2px solid white;
  padding: 1rem 2.5rem;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-outline-glow:hover {
  background: white;
  color: var(--primary);
  transform: translateY(-5px);
}

/* کارت‌های خدمات - طراحی جدید */
.services-section {
  padding: 6rem 0;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: 3rem;
  font-weight: 800;
  color: var(--dark);
  font-size: 2.5rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -15px;
  right: 0;
  width: 100px;
  height: 5px;
  background: var(--gradient-bg);
  border-radius: 3px;
}

.service-card {
  background: var(--gradient-card);
  border-radius: 25px;
  overflow: hidden;
  border: none;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  height: 100%;
  position: relative;
  z-index: 1;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-bg);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: -1;
  border-radius: 25px;
}

.service-card:hover {
  transform: translateY(-20px) scale(1.02);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.2);
}

.service-card:hover::before {
  opacity: 0.1;
}

.service-icon {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: #0D6EFD;
  position: relative;
  overflow: hidden;
}

.service-icon::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-bg);
  opacity: 0.1;
  transform: translateX(-100%);
  transition: transform 0.5s ease;
}

.service-card:hover .service-icon::after {
  transform: translateX(0);
}

/* کارت‌های محصولات - طراحی جدید */
.products-section {
  padding: 6rem 0;
  background: linear-gradient(0deg, #C3CFE2 0%, #ffffff 100%);
}

.product-card {
  background: linear-gradient(135deg, #C3CFE2 0%, #1a2530 100%);
  border: none;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  transition: all 0.3s;
}

.product-card:hover {
  transform: scale(1.03);
}

.product-img {
  aspect-ratio: 3/2;
  background-color: #1C1C1C;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--primary-color);
  overflow: hidden;
}

/* بخش دستگاه‌سازی */
.machinery-section {
  padding: 6rem 0;
  background: linear-gradient(135deg, #1c1c1c 0%, #2d2d2d 100%);
  color: white;
}

.machinery-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.machinery-card:hover {
  transform: translateY(-10px);
  border-color: var(--primary-color);
}

/* بخش ویدیو جذاب */
.video-section {
  padding: 6rem 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  position: relative;
  overflow: hidden;
}

.video-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.3) 1px, transparent 1px);
  background-size: 30px 30px;
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.video-container {
  position: relative;
  z-index: 2;
  border-radius: 30px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
  border: 5px solid white;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.video-container:hover {
  transform: rotateY(10deg) rotateX(5deg);
}

.video-container video {
  width: 100%;
  height: auto;
  display: block;
}

.play-btn {
  position: absolute;
  top: 50%;
  right: 50%;
  transform: translate(50%, -50%);
  width: 80px;
  height: 80px;
  background: rgba(231, 76, 60, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.play-btn:hover {
  background: var(--accent);
  transform: translate(50%, -50%) scale(1.1);
  box-shadow: 0 0 40px rgba(231, 76, 60, 0.6);
}

/* بخش تماس - طراحی جدید */
.contact-section {
  padding: 6rem 0;
  background: linear-gradient(135deg, #2C3E50 0%, #4A6491 100%);
  color: white;
}

.contact-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 25px;
  padding: 1rem;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
  color: var(--dark);
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 5px;
  background: var(--gradient-bg);
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1rem;
  border-radius: 15px;
  background: linear-gradient(to right, #f8f9fa, #e9ecef);
  transition: all 0.3s ease;
}

.contact-item:hover {
  transform: translateX(-10px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.contact-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-bg);
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 1rem;
  color: white;
  font-size: 1.5rem;
  flex-shrink: 0;
}

/* بخش لوکیشن - طراحی جدید */
.location-preview {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  height: 300px;
}

.location-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.9);
  transition: transform 0.5s ease;
}

.location-preview:hover img {
  transform: scale(1.05);
}

.location-overlay {
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(30, 30, 30, 0.4), rgba(30, 30, 30, 0.9));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.location-marker {
  width: 80px;
  height: 80px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  margin-bottom: 1rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.btn-location {
  background: var(--gradient-bg);
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 25px;
  font-weight: 600;
  margin-top: 1rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-location:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

/* فوتر */
footer {
  background: #212121;
  color: white;
  padding: 4rem 0 2rem;
}

.footer-logo {
  max-width: 150px;
  margin-bottom: 1.5rem;
}

.social-icons {
  display: flex;
  gap: 15px;
  margin-top: 2rem;
}

.social-icon {
  width: 36px;
  height: 36px;
  display: flex;
  transition: all 0.3s ease;
}

.social-icon:hover {
  transform: translateY(-3px);
}

.footer-links a {
  color: #ddd;
  text-decoration: none;
  display: block;
  margin-bottom: 0.8rem;
  transition: all 0.3s ease;
  position: relative;
  padding-right: 15px;
}

.footer-links a::before {
  content: '›';
  position: absolute;
  right: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.footer-links a:hover {
  color: var(--gold);
  padding-right: 20px;
}

.footer-links a:hover::before {
  opacity: 1;
}

/* استایل‌های ریسپانسیو اضافی برای Hero */
@media (max-width: 768px) {
  .hero-title {
      font-size: 2.5rem;
  }
  
  .hero-subtitle {
      font-size: 1rem;
  }
  
  .section-title {
      font-size: 2rem;
  }
  
  .cta-buttons {
      flex-direction: column;
      align-items: center;
  }
  
  .btn-glow, .btn-outline-glow {
      width: 100%;
      max-width: 300px;
  }
  
  .hero-logo {
      width: 350px;
      height: 350px;
  }
  
  /* افزایش کنتراست overlay در موبایل برای خوانایی بهتر */
  .hero-bg-image::after {
    background: rgba(0, 0, 0, 0.75);
  }
}

@media (max-width: 576px) {
  .hero-title {
      font-size: 2rem;
  }
  
  .hero-subtitle {
      font-size: 0.9rem;
  }
  
  .hero-logo {
      width: 350px;
      height: 350px;
  }
}

/* برای دستگاه‌های با صفحه نمایش بسیار بزرگ */
@media (min-width: 1600px) {
  .hero-section {
      min-height: 90vh;
  }
  
  .hero-logo {
      width: 600px;
      height: 600px;
  }
  
  .hero-title {
      font-size: 2.5rem;
  }
  
  .hero-subtitle {
      font-size: 1.6rem;
  }
}

/* استایل‌های fallback در صورت عدم لود شدن تصویر */
.no-js .hero-bg-image,
.hero-bg-image.fallback {
  background-image: none;
  background: linear-gradient(45deg, var(--primary), var(--secondary));
}

/* استایل‌های آیکون */
.service-icon i {
  font-size: 5rem;
}

.contact-icon i {
  font-size: 1.5rem;
}

.btn i {
  margin-left: 0.5rem;
}

.list-unstyled i {
  margin-left: 0.5rem;
}