/* Responsive and browser compatibility fixes for Saman Mohammadi static site. */
html {
  -webkit-text-size-adjust: 100%;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

body > .row,
section > .row,
header .row,
#slider .row,
#customer .row {
  margin-left: 0;
  margin-right: 0;
}

.wrapper {
  width: min(960px, calc(100% - 32px));
  max-width: 960px;
}

#header,
#slider,
#aboutme,
#worckflow,
#portfolio,
#contactus,
#footer {
  width: 100%;
  max-width: 100%;
}

#imageme {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

#aboutme,
#worckflow,
#portfolio,
#contactus {
  height: auto;
}

#aboutme {
  min-height: 500px;
  padding-bottom: 40px;
}

#txtjam {
  width: 100%;
  max-width: 680px;
  line-height: 2;
}

#worckflow {
  display: block;
  min-height: 0;
}

.up-bg img,
.down-bg img {
  display: block;
  width: 100%;
}

#portfolio {
  min-height: 0;
  padding-bottom: 42px;
}

#portfolio .animatedParent img {
  display: inline-block;
  width: 23%;
  max-width: 240px;
  margin: 10px 0.75%;
  vertical-align: middle;
}

 .gallery_product {
  float: left;
  width: 33.333333%;
  padding-left: 12px;
  padding-right: 12px;
}

.gallery_product img {
  display: block;
  width: 100%;
  max-width: 100%;
}

.contact .network {
  max-width: 902px;
  background-size: contain;
}

.contact form {
  width: min(570px, calc(100vw - 40px));
  max-width: 570px;
}

.contact form textarea {
  max-width: 100%;
}

#footer p {
  max-width: 960px;
}

@media (max-width: 991px) {
  #logo {
    width: 135px;
  }

  .menu ul {
    padding: 0;
  }

  .menu ul li {
    width: auto;
    min-width: 92px;
  }

  .menu ul li a:hover {
    width: auto;
    min-width: 92px;
  }

  #process {
    width: 100%;
  }
}

@media (max-width: 767px) {
  .wrapper {
    width: calc(100% - 24px);
  }

  header .wrapper {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 12px;
    padding: 8px 0 10px;
  }

  header [class*="span"] {
    float: none;
    width: auto;
    margin-left: 0;
  }

  #logo {
    order: 1;
    width: 96px;
    text-align: center;
  }

  header .span8 {
    order: 3;
    flex: 0 0 100%;
  }

  header .span1[style] {
    order: 2;
    margin: 0 !important;
    width: 80px;
    text-align: center;
  }

  header .span1[style] img {
    width: 34px !important;
  }

  .menu {
    line-height: 1.4;
  }

  .menu ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin: 0 auto;
  }

  .menu ul li {
    height: auto;
    min-width: 0;
    width: auto;
  }

  .menu ul li a {
    display: block;
    height: auto;
    line-height: 1.6;
    padding: 7px 9px;
    font-size: 13px;
    color: #666;
    border: 1px solid #ededed;
    background: #fff;
  }

  .menu ul li a:hover {
    width: auto;
    height: auto;
    color: #000;
    background: #f3f3f3;
    background-image: none;
  }

  #slider {
    padding-top: 0;
  }

  .scrioll-push {
    display: none !important;
  }

  #aboutme h1,
  #worckflow h1,
  #portfolio h1,
  #customer h1,
  #contactus h1 {
    margin-top: 0;
    padding: 24px 0 18px;
    font-size: 28px;
    line-height: 1.4;
  }

  #aboutme {
    min-height: 0;
    padding: 10px 0 36px;
  }

  #txtjam {
    font-size: 13px;
    line-height: 2;
    padding: 0 4px;
  }

  .btn-center a {
    display: inline-block;
    width: auto;
    min-width: 170px;
    height: auto;
    padding: 9px 14px;
  }

  #process {
    padding-bottom: 36px;
  }
  .container,
  #process .container,
  #process .container .row,
  .process-flow,
  .process-flow > li,
  .section-title,
  .section-title > div {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: auto !important;
    right: auto !important;
    float: none !important;
  }

  .process-flow > li {
    max-width: 100%;
    margin-bottom: 28px;
  }

  .process-flow > li .line {
    display: none;
  }

  .specialty-txt {
    text-align: center;
    padding: 0 12px;
    font-size: 14px;
  }

  .flat-butt {
    margin: 4px 2px;
    padding: 9px 12px;
    font-size: 13px;
  }

  .gallery_product {
    margin-bottom: 18px;
    padding-left: 8px;
    padding-right: 8px;
  }

  #portfolio .animatedParent {
    text-align: center;
  }

  #portfolio .animatedParent img {
    width: 46%;
    max-width: 180px;
    margin: 8px 1.5%;
  }

  #contactus h4 {
    width: 100%;
    padding: 0 8px;
    font-size: 15px;
    line-height: 1.9;
  }

  .contact {
    padding: 30px 0 48px;
  }

  .contact .network {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    padding-top: 0;
    background: none;
  }

  .contact .network > a,
  .contact .network > a.sk,
  .contact .network > a.in,
  .contact .network > a.em,
  .contact .network > a.fb,
  .contact .network > a.cv {
    position: static;
    width: 56px;
    height: 56px;
    border-radius: 56px;
    text-indent: 0;
  }

  .contact .network > a i {
    width: 56px;
    height: 56px;
    line-height: 56px;
    font-size: 1.6em;
  }

  .contact .network > a.sk img {
    max-width: 22px;
  }

  .contact form {
    flex: 0 0 100%;
    order: 10;
    width: 100%;
    height: auto;
    min-height: 0;
    margin-top: 18px;
    border-radius: 18px;
    padding: 24px 0 26px;
  }

  .contact form h3 {
    margin: 0 0 22px;
    font-size: 22px;
  }

  .contact form .form {
    width: calc(100% - 32px);
  }

  .contact form .ln {
    padding-bottom: 14px;
  }

  .contact form textarea {
    height: 120px;
  }

  .contact form input[type="submit"] {
    width: 62px;
    height: 62px;
    margin-top: 6px;
  }

  #footer {
    height: 190px;
  }

  #footer p {
    top: 132px;
    margin: 0 auto;
    padding: 0 14px;
    text-align: center;
    font-size: 12px;
    line-height: 1.6;
  }
}

@media (max-width: 767px) {
  .gallery_product {
    width: 50%;
  }
}

@media (max-width: 360px) {
  .menu ul li a {
    padding: 6px 7px;
    font-size: 12px;
  }

  .gallery_product.col-xs-6 {
    width: 100%;
  }

  #portfolio .animatedParent img {
    width: 92%;
  }
}
@media (max-width: 991px) {
  .container,
  #process .container,
  #process .container .row,
  .process-flow,
  .process-flow > li,
  .section-title,
  .section-title > div {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: auto !important;
    right: auto !important;
    float: none !important;
  }

  .process-flow > li .line {
    display: none;
  }

  .contact .network {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 0;
    padding-top: 0;
    background: none;
  }

  .contact .network > a,
  .contact .network > a.sk,
  .contact .network > a.in,
  .contact .network > a.em,
  .contact .network > a.fb,
  .contact .network > a.cv {
    position: static;
    width: 64px;
    height: 64px;
    border-radius: 64px;
  }

  .contact .network > a i {
    width: 64px;
    height: 64px;
    line-height: 64px;
    font-size: 1.8em;
  }

  .contact form {
    flex: 0 0 100%;
    order: 10;
    margin-top: 22px;
  }
}
/* Mobile/tablet workflow alignment: keep the desktop progress effect, but center it safely. */
@media (max-width: 991px) {
  #process {
    overflow: hidden;
    padding-bottom: 30px;
  }

  #process .container,
  #process .container .row,
  #process .section-title,
  #process .section-title > div,
  #process .process-flow,
  #process .process-flow > li {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    left: auto !important;
    right: auto !important;
    float: none !important;
    clear: both !important;
  }

  #process .process-flow {
    position: relative;
    max-width: 380px !important;
    padding: 0 10px !important;
    list-style: none !important;
    text-align: center;
  }

  #process .process-flow > li {
    position: relative;
    height: auto !important;
    max-width: 340px !important;
    margin-bottom: 34px !important;
    text-align: center;
  }

  #process .process-node {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px !important;
  }

  #process .process-node img {
    display: block;
    margin: 0 !important;
  }

  #process .process-flow h4,
  #process .specialty-txt {
    width: 100%;
    text-align: center !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  #process .process-flow > li .line,
  #process .process-flow > li:nth-child(2n) .line {
    display: block !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    width: 4px !important;
    height: 54px !important;
    margin: 18px auto 0 !important;
    transform: none !important;
    background: rgba(187, 189, 190, 0.35);
  }

  #process .process-flow > li:last-child .line {
    display: none !important;
  }

  #process .process-flow > li .line .progress {
    width: 100%;
    height: 0;
    background: #BBBDBE;
    transition: height 1.2s ease-out 0s;
  }

  #process .process-flow > li .line.active .progress,
  #process .process-flow > li.active .line .progress {
    height: 54px !important;
  }
}

/* Final Persian typography: local project font first, Vazirmatn fallback second. */
@font-face {
  font-family: "SamanPrimary";
  src: url("font/YekanWeb.woff") format("woff"),
       url("font/Yekan.woff") format("woff"),
       local("B Yekan"),
       local("Yekan");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "SamanPrimary";
  src: url("font/YekanWeb2.woff") format("woff"),
       url("font/YekanWeb.woff") format("woff"),
       url("font/Yekan.woff") format("woff"),
       local("B Yekan"),
       local("Yekan");
  font-weight: 600 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("font/Vazirmatn.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

html[lang="fa"],
body,
.menu,
.menu a,
#txtjam,
.specialty-txt,
.btn-center a,
.contact form h3,
.contact form label,
.contact form input,
.contact form textarea,
.flat-butt,
#footer p {
  font-family: "SamanPrimary", "B Yekan", "Yekan", "Vazirmatn", Tahoma, Arial, sans-serif !important;
  font-feature-settings: normal;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
#aboutme h1,
#worckflow h1,
#portfolio h1,
#customer h1,
#contactus h1 {
  font-family: "SamanPrimary", "B Yekan", "Yekan", "Vazirmatn", Tahoma, Arial, sans-serif !important;
  font-weight: 700;
  letter-spacing: 0;
}

.menu ul li a {
  font-weight: 600;
}

.menu ul li a:hover,
.menu ul li a:focus {
  font-weight: 700;
}

#txtjam {
  font-weight: 400;
}

.specialty-txt {
  font-weight: 600;
}

.btn-center a,
.flat-butt,
.contact form input[type="submit"] {
  font-weight: 700;
}
/* Mobile section separators: crop the original wave art cleanly in FA/EN. */
@media (max-width: 991px) {
  #portf > .row,
  #customers > .row {
    overflow: hidden;
  }

  .up-bg {
    height: clamp(64px, 16vw, 104px);
    overflow: hidden;
    background: #fff;
    margin-bottom: -1px;
  }

  .up-bg img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center bottom;
  }

  #worckflow,
  #portfolio {
    margin-top: 0 !important;
  }

  #worckflow h1,
  #portfolio h1 {
    padding-top: 18px !important;
    padding-bottom: 24px !important;
  }

  .down-bg {
    height: clamp(54px, 13vw, 88px);
    overflow: hidden;
    background: #fff;
    margin-top: -1px;
  }

  .down-bg img {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center top;
  }
}

@media (max-width: 480px) {
  .up-bg {
    height: 78px;
  }

  .down-bg {
    height: 62px;
  }

  #worckflow h1,
  #portfolio h1 {
    font-size: 30px !important;
    line-height: 1.25 !important;
  }
}