* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Vazirmatn", Tahoma, sans-serif;
  line-height: 1.7;
  color: #333;
  background-color: #f8f9fa;
  direction: rtl;
  padding-top: 60px;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background: linear-gradient(135deg, #1e3a8a, #1e40af);
  color: white;
  padding: 15px 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 60px;
}
.logo h1 {
  font-size: 24px;
  font-weight: 700;
}

nav {
  transition: all 0.3 ease-in-out;
}

nav ul {
  display: flex;
  list-style: none;
}

.nav ul li {
  margin-left: 25px;
}

.nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.nav ul li a:hover,
.nav ul li a:active {
  color: #fbbf24;
}

.hamburger {
  display: none;
  cursor: pointer;
}

.bar {
  height: 2px;
  width: 27px;
  background: #fff;
  margin: 5px 0;
  opacity: 0.8;
  transition: all 0.3 ease-in-out;
}

.nav--open {
  transform: translate(0) !important;
}

.hamburger--open .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger--open .bar:nth-child(2) {
  opacity: 0;
}
.hamburger--open .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* hero Section */
.hero {
  display: flex;
  align-items: center;
  min-height: 50vh;
  background: linear-gradient(rgba(30, 58, 138, 0.8), rgba(30, 58, 138, 0.9)),
    url("../images/hero-bg.jpg") center/cover no-repeat;
  color: white;
  padding: 50px 0;
}

.hero-content {
  flex: 1;
  text-align: center;
}

.hero content h1 {
  font-size: 42px;
  margin-bottom: 20px;
  animation: fadeInDown 1s;
}

.hero-content p {
  font-size: 18px;
  margin-bottom: 30px;
  animation: fadeInUp 1s 0.3s backwards;
}

.btn-primary {
  background: #fbbf24;
  color: #1e3a8a;
  padding: 12px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(251, 191, 36, 0.4);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.6);
}

.hero-image {
  flex: 1;
  padding-left: 150px;
}

.placeholder {
  background: #e5e7eb;
  height: 300px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-style: italic;
  border: 2px solid #9ca3af;
}

/* Sections */
.section-title {
  text-align: center;
  font-size: 32px;
  margin-bottom: 50px;
  position: relative;
}

.section-title::after {
  content: "";
  width: 80px;
  height: 4px;
  background: #1e40af;
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}

/* Services Section */
.services {
  padding: 80px 0;
  background: white;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
}

.service-item {
  background: #fff;
  padding: 30px;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.8);
}

.service-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service-item .icon {
  font-size: 40px;
  margin-bottom: 20px;
  color: #1e40af;
}

.service-item h3 {
  margin-bottom: 15px;
  color: #1e3a8a;
}

/* About us Section */
.about {
  padding: 80px 0;
  background: #f1f5f9;
}

.about-content {
  display: flex;
  align-items: center;
  gap: 50px;
}

.about-text ul {
  list-style: none;
}

.about-text ul li {
  padding: 10px 0;
  position: relative;
  padding-right: 25px;
}

.about-text ul li::before {
  content: "✓";
  position: absolute;
  right: 0;
  color: #10b981;
  font-weight: bold;
}

/* Gallery Section */
.gallery {
  padding: 80px 0;
  background: white;
}

.carousel {
  width: 86%;
  overflow-x: auto;
  display: flex;
  margin: 3em auto;
  gap: 1em;
  scroll-behavior: smooth;
  anchor-name: --carousel;
  scroll-snap-type: x mandatory;
  scroll-marker-group: after;
}

.carousel::scroll-marker-group {
  display: flex;
  justify-content: center;
  gap: 0.5em;
}

.card::scroll-marker {
  content: "";
  height: 1em;
  width: 1em;
  background-color: #757985;
  border-radius: 50%;
}

.card::scroll-marker:target-current {
  background-color: #4b6ed0;
}

.carousel::-webkit-scrollbar {
  display: none;
}

.carousel::scroll-button(right),
.carousel::scroll-button(left) {
  content: "<";
  border: none;
  background-color: rgba(30, 58, 138, 0.8);
  font-family: Consolas;
  font-size: 3rem;
  color: white;
  height: 60px;
  width: 60px;
  border-radius: 50%;
  padding-bottom: 0.1em;
  cursor: pointer;
  position: fixed;
  position-anchor: --carousel;
  position-area: right center;
  translate: -50%;
}

.carousel::scroll-button(left) {
  content: ">";
  position-area: left center;
  translate: 50%;
}

.carousel::scroll-button(right):disabled,
.carousel::scroll-button(left):disabled {
  opacity: 0.5;
  cursor: auto;
}

.card {
  scroll-snap-align: start;
  flex: 0 0 20em;
  aspect-ratio: 5 / 3;
  background-color: #e5e7eb;
  padding: 1em;
  border-radius: 0.5em;
  text-align: center;
  align-content: center;
}

/* Contact */
.contact {
  padding: 80px 0;
  background: #f8f9fa;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: flex-start;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-family: inherit;
  box-sizing: border-box;
}

input[type="tel"] {
  direction: rtl;
  text-align: right;
}

.btn-primary {
  background: #f4b400;
  color: #000;
  padding: 15px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
  font-family: inherit;
}

.btn-primary:hover {
  background: #e0a200;
}

.contact-info {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.info-item {
  margin-bottom: 20px;
  font-size: 16px;
}

/* Footer */
.footer {
  background: #1e3a8a;
  color: white;
  text-align: center;
  padding: 15px 0;
  font-size: 14px;
}

/* Animations */
@keyframes fadeINDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* products hero */
.products-hero {
  background: linear-gradient(rgba(30, 58, 138, 0.92), rgba(30, 58, 138, 0.95)),
    url("images/products-bg.jpg") center/cover no-repeat;
  color: white;
  text-align: center;
  padding: 160px;
  min-height: 50vh;
  z-index: 1;
  position: relative;
  overflow: visible;
}
.products-hero h1 {
  font-size: 42px;
  margin-bottom: 10px;
}
.products-hero p {
  font-size: 20px;
  opacity: 0.9;
}

/* products section */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
  gap: 28px;
}

.product-card {
  background: white;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
  transition: 0.3;
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
  margin-top: 20%;
  margin-bottom: 20%;
}

.product-card:hover {
  transform: translateY(-6px);
  z-index: 50;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
}

.product-image {
  width: 100%;
  height: 280px;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-size: 18px;
  color: #64748b;
  font-weight: 500;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-info {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  justify-content: space-between;
}

.product-info h3 {
  color: #1e3a8a;
  margin-bottom: 15px;
  font-size: 19px;
  line-height: 1.5;
}

.features {
  list-style: none;
  margin: 0 0 20px 0;
  padding: 0;
  flex-grow: 1;
}

.features li {
  padding-right: 22px;
  padding: 6px 0;
  position: relative;
  color: #444;
  font-size: 15px;
}

.price-contact {
  display: block;
  background: #fffbeb;
  color: #d97706;
  padding: 10px 15px;
  text-align: center;
  border-radius: 12px;
  font-weight: bold;
  font-size: 16px;
  border: 2px solid #fbbf24;
  margin-bottom: 15px;
}

.btn-green {
  display: block;
  background: #10b981;
  color: white;
  text-align: center;
  padding: 12px;
  border-radius: 50px;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s;
  margin-top: auto;
}

.btn-green:hover {
  background: #059669;
  transform: scale(1.05);
}

/* Responsive */
@media (max-width: 650px) {
  /* HERO */
  .hero {
    flex-direction: column;
    text-align: center;
  }
  .hero-content {
    padding-right: 0;
    margin-bottom: 30px;
  }
  .hero-content h1 {
    font-size: 32px;
  }

  /* ABOUT */
  .about-content {
    flex-direction: column;
  }

  .card {
    flex: 0 0 100%;
  }

  /* GRID */
  .content-grid {
    grid-template-columns: 1fr;
  }

  /* products*/
  .products-hero {
    padding: 80px 15px;
    min-height: 32vh;
  }
  .products-grid {
    grid-template-columns: (2, 1fr);
    gap: 30px;
  }
  .product-card {
    margin: 0;
  }
  /* NAV */
  .nav {
    position: fixed;
    top: 60px;
    right: 0;
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
    width: 100%;
    padding: 10px 0 25px;
    transform: translateX(-100%);
  }
  .nav ul {
    flex-direction: column;
    align-items: center;
    background: rgba(0, 0, 0, 0.1);
    padding: 10px;
    row-gap: 10px;
    border-radius: 10px;
  }
  .nav ul li {
    margin: 10px 0;
    font-size: 14px;
  }
  .hamburger {
    display: block;
  }
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .contact-info {
    text-align: center;
  }

  .contact-form input,
  .contact-form textarea {
    font-size: 16px;
  }

  .contact-form button {
    font-size: 16px;
    padding: 12px;
  }
}

@media (max-width: 727px) {
  .product-card {
    grid-template-columns: 1fr;
    gap: 25px;
    max-width: 400px;
    margin: 0 auto;
  }

  .product-card {
    max-width: 80%;
  }
}
