.page-wrapper {
  padding-left: 20px;
  padding-right: 20px;
}

@media (min-width: 769px) {
  .page-wrapper {
    padding-left: 153px;
    padding-right: 153px;
  }
}

[id] {
  scroll-margin-top: 100px;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html[lang="en"] {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
}

body {
  background: #212122;
  color: #fff;
  overflow-x: hidden;
}

/* ────────────────────────────────────────────── */
/*               FONT DEFINITIONS – Iran Yekan    */
/* ────────────────────────────────────────────── */

/* Regular */
@font-face {
  font-family: "IranYekan";
  src: url("./fonts/IranYekan-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Bold */
@font-face {
  font-family: "IranYekan";
  src: url("./fonts/IranYekan-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* Light / Thin (if you have it) */
@font-face {
  font-family: "IranYekan";
  src: url("./fonts/IranYekan-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* Medium (if you have it) */
@font-face {
  font-family: "IranYekan";
  src: url("./fonts/IranYekan-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Apply IranYekan to the entire document in Farsi mode */
html[lang="fa"],
html[lang="fa"] * {
  font-family: "IranYekan", system-ui, -apple-system, sans-serif !important;
}

/* Strong override for form elements, buttons, etc. */
html[lang="fa"] input,
html[lang="fa"] textarea,
html[lang="fa"] button,
html[lang="fa"] select,
html[lang="fa"] .submit-btn,
html[lang="fa"] .hero-button,
html[lang="fa"] .lang-btn {
  font-family: "IranYekan", system-ui, -apple-system, sans-serif !important;
}

/* Numbers and counters – cleaner fallback */
html[lang="fa"] .char-counter {
  font-family: "IranYekan", monospace, sans-serif;
}

/* Optional: Set preferred weights for different elements */
html[lang="fa"] h1,
html[lang="fa"] h2,
html[lang="fa"] h3,
html[lang="fa"] .title {
  font-weight: 700;
}

html[lang="fa"] p,
html[lang="fa"] li,
html[lang="fa"] .footer-logo-desc p {
  font-weight: 400;
}

/* ────────────────────────────────────────────── */
/*                   NAVBAR                       */
/* ────────────────────────────────────────────── */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 84px;
  background: #151912;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 1000;

  box-sizing: border-box;
}

@media (min-width: 769px) {
  .navbar {
    padding: 0 153px;
  }
}

.logo {
  display: flex;
  align-items: center;
  gap: .5rem;
}

.logo img {
  height: 48px;
  width: auto;
}

.logo h1 {
  font-size: clamp(1.2rem, 4vw, 2rem);
  font-weight: 600;
}

.lang-btn {
  background: #fbc02d;
  color: #000;
  padding: .1rem .75rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: .95rem;
  display: flex;
  align-items: center;
  gap: .4rem;
  white-space: nowrap;
  cursor: pointer;
  transition: background .3s;
}

.lang-btn:hover {
  background: #e0a91f;
}

.lang-btn i {
  font-size: 1.2rem;
}



/* ────────────────────────────────────────────── */
/*                    HERO                        */
/* ────────────────────────────────────────────── */

.hero {
  padding-top: 150px;
  padding-left: 20px;
  padding-right: 20px;
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  max-width: 1600px;
  margin: 0 auto;
}

@media (min-width: 769px) {
  .hero {
    padding-left: 153px;
    padding-right: 153px;
  }
}

.hero-content {
  flex: 1;
  min-width: 0;
  z-index: 3;
  padding-right: 20px;
  max-width: 50%;
}

.hero-content h1 {
  font-size: 64px;
  margin: 0;
  color: #FFAB19;
  font-weight: 400;
  line-height: 1.1;
  font-family: 'Bungee Inline', cursive;
  white-space: nowrap;           /* ← this is the key line */
  overflow: visible;             /* allow text to go outside the container */
  text-overflow: clip;
  margin-bottom: 10px;
}

.hero-content h2 {
  font-size: 45px;
  margin-bottom: 15px;
  color: #FFAB19;
  font-weight: 400;
  line-height: 1.1;
}

.hero-divider {
  border: none;
  height: 3px;
  background: #FFAB19;
  width: 340px;
  margin: 20px 0;
  border-radius: 2px;
}

.hero-content p {
  font-size: 20px;
  margin-bottom: 20px;
  color: #FFAB19;
  font-weight: 400;
  line-height: 1.1;
  white-space: nowrap;           /* ← this is the key line */
  overflow: visible;             /* allow text to go outside the container */
  text-overflow: clip;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
  padding: 20px 29px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
  background: #FFAB19;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.hero-button:hover {
  transform: translateY(-1.5px);
  background: #ffb733;
}

.hero-visual {
  position: relative;
  width: 780px;
  height: 430px;
  flex-shrink: 0;
}

.hero-shape {
  position: absolute;
  top: 0;
  width: 720px;
  height: 430px;
  background: #FFAB19;
  transition: all 0.4s ease;
  margin-right: -160px;
}

/* English / LTR */
.hero-shape {
  right: 0;
  border-radius: 230px 0 0 230px;
}

/* Persian / RTL */
html[dir="rtl"] .hero-shape,
body.fa .hero-shape {
  left: 0;
  right: auto;
  border-radius: 0 230px 230px 0;
  margin-left: -160px;
  margin-right: 0;
}

.hero-img {
  position: absolute;
  top: 0;
  width: 850px;
  height: auto;
  z-index: 2;
}

/* English / LTR */
.hero-img {
  right: 0;
  transform: translateX(15%);
}

/* Persian / RTL */
html[dir="rtl"] .hero-img,
body.fa .hero-img {
  left: 0;
  right: auto;
  transform: scaleX(-1) translateX(15%);
}

/* ────────────────────────────────────────────── */
/*               REMAINING STYLES                 */
/* ────────────────────────────────────────────── */

.text {
  font-size: 42px;
  color: #FFAB19;
  margin: 100px 30px 0 20px;
  text-align: center;
}

.title {
  font-size: 24px;
  font-weight: 600;
  text-align: left;
  margin: 60px 0 .5rem;
}

html[dir="rtl"] .title {
  text-align: right;
}

.underline {
  width: 240px;
  height: 3px;
  background: #f0a500;
  border-radius: 5px;
}

/* Carousel styles */
.carousel-section {
  width: 100%;
}

.carousel-container {
  position: relative;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 5%;
  overflow: visible;
}

.carousel-track {
  display: flex;
  gap: 32px;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  align-items: center;
  padding: 40px 0;
}


.carousel-item {
  background: linear-gradient(135deg, rgba(113,113,113,0.1), rgba(215,215,215,0.1));
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid #f5f7fa85;
  transition: all 0.45s ease;
  opacity: 0.65;
  transform: scale(0.85);
  cursor: pointer;
}

.carousel-item-motor {
  flex: 0 0 300px;
  height: 380px;
}

.carousel-item-machines {
  flex: 0 0 500px;
  height: 300px;
}

.carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 24px;
}

.carousel-item.active {
  transform: scale(1.08);
  opacity: 1;
  border: 5px solid #FFAB19;
  z-index: 2;
}

.carousel-item-motor.active {
  flex: 0 0 320px;
}

.carousel-item-machines.active {
  flex: 0 0 600px;
}

.carousel-item.active img {
  padding: 20px;
  transform: scale(1.1);
}

.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  background: rgba(30,30,30,0.75);
  color: #FBC02D;
  border: 2px solid #FBC02D;
  border-radius: 50%;
  font-size: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.3s ease;
  backdrop-filter: blur(6px);
}

.nav-btn:hover {
  background: #FBC02D;
  color: #000;
  transform: translateY(-50%) scale(1.15);
}

.nav-btn.prev { left: 20px; }
.nav-btn.next { right: 20px; }

.image-text {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  width: 100%;
  min-height: 70vh;
}

.text-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  padding: 30px;
}

.text-overlay h1 {
  font-size: 120px;
  font-family: "Cinzel", serif;
  color: #FFAB19;
}

.text-overlay p {
  font-size: 40px;
  color: #b39b5c;
}

/* Contact Form */
.contact-form-section {
  max-width: 800px;
  margin: 50px 0;
  padding: 0 20px;
}

.custom-form {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.input-group {
  position: relative;
  width: 100%;
}

.input-group p {
  font-size: 16px;
  font-weight: 200;
  margin-bottom: 10px;
}

.custom-form input,
.custom-form textarea {
  width: 100%;
  background-color: #333333;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 18px 20px;
  color: #ffffff;
  font-size: 16px;
  outline: none;
  transition: border-color 0.3s ease;
}

.custom-form input::placeholder,
.custom-form textarea::placeholder {
  color: #999999;
  font-size: 14px;
}

.custom-form input:focus,
.custom-form textarea:focus {
  border-color: #FFAB19;
}

.textarea-group {
  position: relative;
}

.custom-form textarea {
  min-height: 200px;
  resize: vertical;
}

.char-counter {
  position: absolute;
  bottom: 15px;
  right: 20px;
  font-size: 12px;
  color: #999999;
}

.submit-btn {
  width: fit-content;
  background-color: #F9A825;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 12px 40px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  align-self: flex-start;
}

.submit-btn:hover {
  background-color: #FFAB19;
  transform: translateY(-2px);
}

html[dir="rtl"] .submit-btn {
  align-self: flex-end;
}

html[dir="rtl"] .char-counter {
  right: auto;
  left: 20px;
}

/* Footer */
.footer {
  background: #FFAB19;
  color: #000;
  padding: 3rem 1.5rem;
  margin-top: 6rem;
  width: 100%;
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1.2fr 1fr .6fr 1fr;
  gap: 2rem;
  align-items: start;
}

.footer-logo-desc {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.footer-logo img {
  height: 48px;
  width: auto;
}

.footer-logo h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
}

.footer-logo-desc p {
  font-size: .95rem;
  line-height: 1.6;
  color: #000000;
  max-width: 380px;
}

.footer-contact h4,
.footer-services h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #000;
}

.footer-contact ul,
.footer-services ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  font-size: .95rem;
}

.footer-contact ul li,
.footer-services ul li {
  display: flex;
  align-items: center;
  gap: .5rem;
  color: #000;
}

.footer-social {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: center;
  justify-content: flex-start;
}

.social-icon {
  width: 40px;
  height: 40px;
  background: #FFAB19;
  color: #3a3014;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all .3s;
}

.social-icon:hover {
  background: #fbc02d;
  transform: translateY(-3px);
}

/* Responsive footer */
@media (max-width: 1024px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }

  .footer-social {
    flex-direction: row;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .footer {
    padding: 2.5rem 1rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-logo {
    justify-content: center;
  }

  .footer-logo-desc p {
    max-width: 100%;
  }

  .footer-contact ul,
  .footer-services ul {
    align-items: center;
  }

  .footer-social {
    justify-content: center;
  }
}


@media (min-width: 769px) {
  .page-wrapper {
      padding-left: 153px;
      padding-right: 153px;
  }
}

@media (min-width:769px) {
  .navbar {
      padding: 0 153px;
  }
}

@media (min-width:769px) {
  .desktop-nav {
      display: flex;
  }

  .desktop-lang {
      display: flex;
  }
}



@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    padding-top: 120px;
    gap: 30px;
  }

  .hero-content {
    max-width: 100%;
    padding-right: 0;
    text-align: center;
  }

  .hero-content h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    white-space: normal;
  }

  .hero-content h2 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
  }

  .hero-content p {
    font-size: clamp(1rem, 3.5vw, 1.5rem);
    white-space: normal;
  }

  .hero-divider {
    width: 60%;
    margin: 20px auto;
  }

  .hero-visual {
    width: 100%;
    height: auto;
    max-width: 600px;
    margin: 0 auto;
  }

  .hero-img {
    position: relative;
    width: 100%;
    max-width: 400px;
    transform: none !important;
  }

  .hero-shape {
    display: none; 
  }
}


@media (max-width: 1024px) {
  .carousel-item-motor,
  .carousel-item-machines {
    flex: 0 0 70%;
  }
}

@media (max-width: 768px) {
  .carousel-item-motor,
  .carousel-item-machines {
    flex: 0 0 90%;
  }

  .carousel-track {
    padding: 20px 0;
  }
}


@media (max-width: 1024px) {
  .text-overlay h1 {
    font-size: clamp(2rem, 6vw, 4rem);
  }

  .text-overlay p {
    font-size: clamp(1rem, 4vw, 1.5rem);
  }
}


@media (max-width: 768px) {
  .contact-form-section {
    padding: 0 10px;
  }

  .custom-form input,
  .custom-form textarea {
    padding: 14px 16px;
    font-size: 14px;
  }

  .submit-btn {
    width: 100%;
    text-align: center;
  }
}


@media (max-width: 768px) {
  .carousel-container {
    padding: 0 10px; 
  }

  .carousel-track {
    justify-content: center; 
    gap: 16px; 
    padding: 20px 0;
  }

  .carousel-item-motor,
  .carousel-item-machines {
    flex: 0 0 80%; 
    max-width: 300px; 
  }

  .carousel-item-motor.active,
  .carousel-item-machines.active {
    flex: 0 0 85%; 
  }

  .carousel-item img {
    padding: 12px; 
  }
}


@media (max-width: 768px) {

  .text {
    font-size: clamp(22px, 6vw, 30px);
    margin-top: 60px;
  }

  .underline {
    margin-bottom: 40px;
  }

}


@media (max-width: 768px) {

  .hero {
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .hero-content {
    max-width: 100%;
    width: 100%;
  }

  .hero-divider,
  .hero-button {
    display: none !important;
  }

  .hero {
    min-height: auto;
    height: auto;
    padding-top: 120px;
  }

}