

:root {
  --primary: #6128ff;
  --primary-dark: #531ce9;
  --secondary: #00c3ff;
  --dark-bg: #0a0e17;
  --light-bg: #f8f9fa;
  --text-dark: #1a1a1a;
  --text-light: #ffffff;
  --border-color: rgba(114, 118, 139, 0.16);
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Vazirmatn', Tahoma, Arial, system-ui, -apple-system, sans-serif;
  direction: rtl;
  background-color: #fff;
  color: var(--text-dark);
  line-height: 1.6;
}

.hero h1,
.hero h2,
.hero p,
.text-overlay h1,
.text-overlay p {
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
}


/* ===== HEADER ===== */
header {
  background-color: var(--dark-bg);
  color: var(--text-light);
  padding: 1rem 0;
  border-bottom: 2px solid var(--secondary);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

header .logo h1,
header .logo h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

header .logo svg {
  color: var(--secondary);
  font-size: 1.8rem;
}

header nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  flex-wrap: wrap;
}

header nav a {
  color: var(--text-light) !important;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.3s;
}

header nav a:hover {
  color: var(--secondary) !important;
}

/* ===== HERO SECTION ===== */
.hero {
  background: linear-gradient(rgba(10, 14, 23, 0.85), rgba(10, 14, 23, 0.9)),
              url('https://via.placeholder.com/1920x600?text=هیرو') center/cover no-repeat;
  height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  padding: 0 1rem;
}

.hero h1,
.hero h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 1.5rem;
}

.hero .btn {
  background-color: var(--primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: background 0.3s;
  margin-top: 1rem;
}

.hero .btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
}


/* حرکت متن به سمت بالا در اسلایدر */
.text-overlay {
    position: absolute;
    top: 50%; /* مقدار را بسته به نیاز تنظیم کنید - کوچکتر = بالاتر */
    transform: translateX(-50%);
    z-index: 3;
}

/* برای ویدیو اسلایدر */
.hero-video-slide .text-overlay {
    top: 2%; /* بالاتر از اسلایدر عکس */
}

/* برای عکس اسلایدر */
.hero-slide .text-overlay {
    top: 25%;
}

/* ریسپانسیو - تنظیم مجدد برای موبایل */
@media (max-width: 768px) {
    .text-overlay {
        top: 35%; /* در موبایل کمی پایین‌تر برای بهتر دیده شدن */
        padding: 1rem !important;
    }

    .hero-video-slide .text-overlay,
    .hero-slide .text-overlay {
        top: 30%;
    }
}


/* ===== SECTIONS & CARDS ===== */
.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin: 2.5rem 0 2rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--primary);
}

.card,
.service-card,
.project-card,
.news-card {
  background: white;
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: transform 0.3s, box-shadow 0.3s;
  border: none;
}

.card:hover,
.service-card:hover,
.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.card h3,
.card h4,
.service-card h5,
.project-card h4,
.news-card h6 {
  color: var(--primary);
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.service-title {
  font-size: 1.1rem;
  line-height: 1.4;
  min-height: 2.8rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-wrap: break-word;
  text-align: center;
}

/* ===== BUTTONS ===== */
.btn-primary {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
}

.btn-primary:hover {
  background-color: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
}

.btn-outline-primary {
  color: var(--primary) !important;
  border-color: var(--primary) !important;
}

.btn-outline-primary:hover {
  background-color: var(--primary) !important;
  color: white !important;
}

.text-primary {
  color: #5a24e0 !important;
}

/* ===== CONTACT & CONSULTATION ===== */
.contact-section,
#contact {
  background-color: var(--dark-bg);
  color: var(--text-light);
  padding: 3rem 0;
}

.contact-section h2,
#contact h2 {
  color: white;
  text-align: center;
}

.consultation-box {
  border-radius: 24px !important;
}

.consultation-box input {
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  background: rgba(255, 255, 255, 0.1);
}

.consultation-box input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

/* ===== FOOTER ===== */
footer {
  background-color: #000 !important;
  color: var(--text-light);
  text-align: center;
  padding: 1.5rem 0;
  margin-top: 3rem;
}

/* ===== BREADCRUMB BUTTONS (OPTIMIZED) ===== */
.breadcrumb-btn,
.breadcrumb-btn-1,
.breadcrumb-btn-2,
.breadcrumb-btn-3,
.breadcrumb-btn-4,
.breadcrumb-btn-5,
.breadcrumb-btn-6 {
  position: fixed;
  right: 20px;
  background-color: rgba(97, 40, 255, 0.2);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  opacity: 0.3;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  font-size: 20px;
  animation: subtle-bounce 2s ease-in-out infinite;
}

/* Position offsets */
.breadcrumb-btn   { bottom: 20px;  }
.breadcrumb-btn-1 { bottom: 80px;  }
.breadcrumb-btn-2 { bottom: 140px; }
.breadcrumb-btn-3 { bottom: 200px; }
.breadcrumb-btn-4 { bottom: 260px; }
.breadcrumb-btn-5 { bottom: 320px; }
.breadcrumb-btn-6 { bottom: 380px; }

.breadcrumb-btn:hover,
.breadcrumb-btn-1:hover,
.breadcrumb-btn-2:hover,
.breadcrumb-btn-3:hover,
.breadcrumb-btn-4:hover,
.breadcrumb-btn-5:hover,
.breadcrumb-btn-6:hover {
  opacity: 1;
  background-color: #6128ff;
  transform: scale(1.1);
}

@keyframes subtle-bounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-3px) scale(1.05); }
}

/* ===== FEATURE CARDS & HALO ===== */
.feature-card {
  color: white !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.3);
}

.halo-circle {
  box-shadow:
    0 0 20px 10px rgba(255, 255, 255, 1),
    0 0 40px 30px rgba(173, 216, 230, 0.95),
    0 0 100px 60px rgba(0, 180, 255, 0.8);
}

/* ===== TIMELINE ===== */
.vertical-skew-timeline {
  position: relative;
  max-width: 850px;
  margin: 0 auto;
  padding: 40px 0;
}

.content h2 {
  position: absolute;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  font-size: 5.5em;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.15);
  transition: transform 0.8s ease, color 0.8s ease, font-size 0.8s ease;
  z-index: 2;
  pointer-events: none;
}

.timeline-skew-item {
  position: relative;
  margin-bottom: -20px;
  display: flex;
  justify-content: flex-end;
  z-index: 0;
}

.timeline-skew-item.timeline-right {
  justify-content: flex-start;
}

/* ===== CAROUSEL & SWIPER ===== */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  filter: invert(1);
}

.text-overlay h1,
.text-overlay p {
  text-shadow:
    0 0 5px rgba(0, 255, 100, 0.5),
    0 0 10px rgba(0, 255, 100, 0.3),
    0 0 15px rgba(0, 200, 80, 0.25),
    0 0 20px rgba(0, 150, 60, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.7);
  color: white;
}

.animated-text {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  animation: slideInLeft 1s ease forwards;
}

.carousel-item-next.active .animated-text,
.carousel-item-prev.active .animated-text {
  animation: slideInRight 1s ease forwards;
}

.animated-button {
  animation: fadeInScale 1s ease forwards;
  animation-delay: 0.5s;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.animated-button:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

.projects-swiper {
  padding: 20px 0;
}

.projects-button-prev,
.projects-button-next {
  background: white;
  border: 1px solid #6128ff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.projects-button-prev:hover,
.projects-button-next:hover {
  background: #6128ff;
  color: white;
  border-color: #6128ff;
  transform: scale(1.1);
}

/* ===== ANIMATIONS ===== */
@keyframes slideInLeft {
  0%   { opacity: 0; transform: translateX(-50px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  0%   { opacity: 0; transform: translateX(50px); }
  100% { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInScale {
  0%   { opacity: 0; transform: scale(0.8); }
  100% { opacity: 1; transform: scale(1); }
}

/* ===== UTILITIES ===== */
.h-item,
.position-absolute {
  overflow: visible !important;
}

.h-grid-container {
  margin-top: 170px;
}

.container_moshavere {
  margin-top: 150px;
}

.section-title_t {
  margin-top: -50px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero {
    height: 50vh;
  }

  .hero h1,
  .hero h2 {
    font-size: 2rem;
  }

  header nav ul {
    gap: 1rem;
    flex-direction: column;
    align-items: center;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .swiper-slide {
    width: 160px;
    margin-right: 10px;
  }

  /* Stack breadcrumb buttons on mobile */
  .breadcrumb-btn,
  .breadcrumb-btn-1,
  .breadcrumb-btn-2,
  .breadcrumb-btn-3,
  .breadcrumb-btn-4,
  .breadcrumb-btn-5,
  .breadcrumb-btn-6 {
    right: 15px;
    width: 42px;
    height: 42px;
    font-size: 18px;
  }

  .breadcrumb-btn   { bottom: 15px;  }
  .breadcrumb-btn-1 { bottom: 65px;  }
  .breadcrumb-btn-2 { bottom: 115px; }
  .breadcrumb-btn-3 { bottom: 165px; }
  .breadcrumb-btn-4 { bottom: 215px; }
  .breadcrumb-btn-5 { bottom: 265px; }
  .breadcrumb-btn-6 { bottom: 315px; }
}

.feature-card:hover {
            transform: scale(1.05);
            box-shadow: 0 8px 30px rgba(255, 255, 255, 0.8), 0 8px 20px rgba(0, 123, 255, 0.2);
        }
/* استایل عنوان لوگو */
.logo-title {
    font-size: 1.4rem;
    line-height: 1.2;
    font-weight: 700; /* اگر fw-bold کافی نیست */
    margin: 0;        /* m-0 برای اطمینان */
}
/* کانتینر ویدئو در اسلایدر */
.hero-video-slide {
    height: 70vh; /* ارتفاع هیرو */
    position: relative;
    overflow: hidden;
}

/* ویدئو */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}
/* کانتینر ویدئو در اسلایدر */
.hero-video-slide {
    height: 70vh; /* ارتفاع هیرو */
    position: relative;
    overflow: hidden;
}

/* ویدئو */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}
/* مرکز کردن محتوا در هیرو / اسلایدر */
.hero-center {
    height: 100%;
    z-index: 2;
    position: relative; /* چون z-index فقط روی عناصر position دار کار می‌کند */
}
.hero-slide {
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    position: relative; /* اگر لازم بود z-index روی متن */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}


/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    /* هیرو - ارتفاع مناسب‌تر */
    .hero {
        height: 60vh;
        padding: 2rem 1rem;
    }

    .hero h1,
    .hero h2 {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }

    .hero p {
        font-size: 1rem;
        max-width: 100%;
        margin: 0 auto 1.2rem;
    }

    .hero .btn {
        padding: 0.65rem 1.3rem;
        font-size: 0.95rem;
    }

    /* هدر - منوی ریسپانسیو */
    header .container {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    header nav ul {
        gap: 0.8rem;
        flex-direction: column;
        width: 100%;
        padding: 0.5rem 0;
    }

    header nav a {
        font-size: 1rem;
        padding: 0.4rem 0;
        display: block;
    }

    /* عنوان سکشن‌ها */
    .section-title {
        font-size: 1.6rem;
        margin: 2rem 0 1.5rem;
    }

    .section-title::after {
        width: 45px;
        height: 2.5px;
    }

    /* کارت‌ها - ستونی و پر عرض */
    .card,
    .service-card,
    .project-card,
    .news-card {
        padding: 1.2rem;
        margin-bottom: 1.2rem;
    }

    .service-card h5,
    .project-card h4,
    .news-card h6 {
        font-size: 1.1rem;
    }

    .service-title {
        font-size: 1rem;
        min-height: 2.4rem;
    }

    /* دکمه‌ها */
    .btn {
        width: 100%;
        padding: 0.7rem;
        font-size: 0.95rem;
    }

    /* مشاوره - فرم */
    .consultation-box {
        border-radius: 16px !important;
    }

    .consultation-box input,
    .consultation-box textarea {
        padding: 0.75rem;
        font-size: 0.95rem;
    }

    /* فوتر */
    footer {
        padding: 1.2rem 0;
        font-size: 0.9rem;
    }

    /* دکمه‌های breadcrumb - کوچک‌تر و فشرده‌تر */
    .breadcrumb-btn,
    .breadcrumb-btn-1,
    .breadcrumb-btn-2,
    .breadcrumb-btn-3,
    .breadcrumb-btn-4,
    .breadcrumb-btn-5,
    .breadcrumb-btn-6 {
        right: 12px;
        width: 38px;
        height: 38px;
        font-size: 16px;
        opacity: 0.25;
    }

    .breadcrumb-btn   { bottom: 10px;  }
    .breadcrumb-btn-1 { bottom: 55px;  }
    .breadcrumb-btn-2 { bottom: 100px; }
    .breadcrumb-btn-3 { bottom: 145px; }
    .breadcrumb-btn-4 { bottom: 190px; }
    .breadcrumb-btn-5 { bottom: 235px; }
    .breadcrumb-btn-6 { bottom: 280px; }

    /* تایم‌لاین */
    .vertical-skew-timeline {
        padding: 20px 0;
    }

    .content h2 {
        font-size: 3.5em;
        left: 10px;
    }

    /* اسلایدر پروژه‌ها */
    .swiper-slide {
        width: 140px;
        margin-right: 8px;
    }

    /* فیچر کارت‌ها */
    .feature-card {
        padding: 1rem;
    }

    /* حاشیه‌ها و فاصله‌ها */
    .container,
    .container_moshavere,
    .h-grid-container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .section-title_t {
        margin-top: -30px;
    }

    /* لوگو */
    .logo-title {
        font-size: 1.2rem;
    }
    /* 1. رفع هم‌پوشانی بخش "چرا ما بهترین هستیم" */
    .why-best-section {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 1.2rem;
        padding: 0 1rem;
        margin-top: 1rem;
    }

    .why-best-item {
        border-radius: 50%;
        width: 100%;
        aspect-ratio: 1/1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 1rem;
        background: linear-gradient(135deg, #6128ff, #4a1de0);
        box-shadow: 0 5px 15px rgba(97, 40, 255, 0.3);
    }

    .why-best-item h3 {
        font-size: 0.95rem;
        text-align: center;
        max-width: 90%;
        line-height: 1.3;
        color: white !important;
        text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    }

    /* 2. رفع کشیدگی بخش پروژه‌ها */
    .projects-container .swiper-wrapper {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1.5rem !important;
        padding: 0 1rem !important;
    }

    .swiper-slide {
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        border-radius: 12px;
        overflow: hidden;
    }

    .project-card img {
        width: 100%;
        height: 160px;
        object-fit: cover;
    }

    /* 3. 2 تا در هر سطر برای بخش آموزش‌ها (news) */
    .news-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.3rem;
        padding: 0 1rem;
    }

    .news-card {
        border-radius: 12px;
        overflow: hidden;
        height: auto;
    }

    .news-card img {
        width: 100%;
        height: 140px;
        object-fit: cover;
    }

    /* 4. بهینه‌سازی فونت‌ها برای موبایل */
    .section-title {
        font-size: 1.6rem;
        margin: 2rem 0 1.5rem;
    }

    .service-title {
        font-size: 1rem;
        min-height: 2.2rem;
    }

    /* 5. رفع مشکل فاصله‌بندی در بخش‌های مختلف */
    .container.section-title_t {
        padding: 0 1rem;
    }

    .h-grid-container {
        margin-top: 120px;
    }
}

/* برای موبایل‌های خیلی کوچک */
@media (max-width: 480px) {
    .hero {
        height: 55vh;
    }

    .hero h1,
    .hero h2 {
        font-size: 1.6rem;
    }

    .hero p {
        font-size: 0.95rem;
    }

    .section-title {
        font-size: 1.4rem;
    }

    .card,
    .service-card,
    .project-card {
        padding: 1rem;
    }

    /* دکمه‌های breadcrumb - فقط 3 تا نمایش داده شود */
    .breadcrumb-btn-4,
    .breadcrumb-btn-5,
    .breadcrumb-btn-6 {
        display: none;
    }

    .breadcrumb-btn   { bottom: 8px;  }
    .breadcrumb-btn-1 { bottom: 50px;  }
    .breadcrumb-btn-2 { bottom: 92px; }
    .breadcrumb-btn-3 { bottom: 134px; }
}