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

:root {
  color-scheme: light;
  --white: #fff;
  --surface: #f5f7fb;
  --ink: #182238;
  --muted: #546176;
  --blue: #1c48b8;
  --blue-dark: #143589;
  --blue-pale: #eaf0ff;
  --border: #e1e6ef;
  --warm: #fff1e0;
  --radius: 16px;
  font-family: Dastkhat, Tahoma, system-ui, sans-serif;
  line-height: 1.65;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--white); }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
img { display: block; width: 100%; }
[id] { scroll-margin-block-start: 1rem; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
::selection { color: var(--blue-dark); background: var(--blue-pale); }

.wrap { width: min(74rem, calc(100% - 3rem)); margin-inline: auto; }
.skip {
  position: fixed;
  z-index: 20;
  inset-block-start: .5rem;
  inset-inline-start: .5rem;
  padding: .65rem 1rem;
  transform: translateY(-160%);
  color: white;
  background: var(--blue);
}
.skip:focus { transform: none; }
.site-header { border-block-end: 1px solid var(--border); }
.header-inner { min-height: 4.65rem; display: flex; align-items: center; gap: 2rem; }
.brand { display: inline-flex; min-height: 2.75rem; width: max-content; gap: .55rem; align-items: center; color: var(--blue-dark); font-size: 2rem; font-weight: 860; line-height: 1; }
.brand-mark { display: grid; place-content: center; width: 2.05rem; height: 2.05rem; gap: 3px; color: white; background: var(--blue); border-radius: 9px; }
.brand-mark i { width: .9rem; height: 2px; background: currentColor; transform: skewY(-21deg); border-radius: 1px; }
.brand-mark i:nth-child(2) { width: .7rem; }
.brand-mark i:nth-child(3) { width: .5rem; }
.desktop-nav { display: flex; align-items: center; gap: .5rem; }
.desktop-nav a, .header-contact {
  display: inline-flex;
  min-height: 2.75rem;
  gap: .55rem;
  align-items: center;
  font-weight: 720;
  border-radius: 10px;
  padding-inline: .8rem;
}
.desktop-nav a { color: var(--muted); }
.desktop-nav a[aria-current], .desktop-nav a:hover { color: var(--blue); background: var(--blue-pale); }
.desktop-nav .icon { display: none; }
.header-contact { margin-inline-start: auto; color: var(--blue-dark); border: 1px solid var(--border); white-space: nowrap; }
.header-contact:hover { background: var(--blue-pale); }
.bottom-nav { display: none; }

.icon { display: block; position: relative; width: 18px; height: 18px; flex: 0 0 18px; }
.icon::before, .icon::after { position: absolute; content: ""; }
.icon-home::before { width: 12px; height: 12px; border-top: 2px solid; border-left: 2px solid; transform: rotate(45deg); top: 3px; left: 3px; }
.icon-home::after { width: 13px; height: 10px; border: 2px solid; border-top: 0; border-radius: 0 0 2px 2px; bottom: 1px; left: 2.5px; }
.icon-catalog::before { inset: 1px; background: linear-gradient(currentColor 0 0) 0 0, linear-gradient(currentColor 0 0) 100% 0, linear-gradient(currentColor 0 0) 0 100%, linear-gradient(currentColor 0 0) 100% 100%; background-size: 6px 6px; background-repeat: no-repeat; }
.icon-services::before { inset: 2px 1px; border: 2px solid; border-radius: 3px; transform: skewY(-14deg); }
.icon-services::after { width: 8px; height: 2px; top: 8px; left: 5px; background: currentColor; transform: skewY(-14deg); }
.icon-contact::before { width: 13px; height: 15px; top: 1px; left: 2px; border: 2px solid; border-top-color: transparent; border-right-color: transparent; border-radius: 4px 4px 4px 7px; transform: rotate(-35deg); }
.icon-contact::after { width: 9px; height: 2px; right: 0; top: 4px; background: currentColor; transform: rotate(44deg); border-radius: 2px; }

.section { margin-block-start: clamp(1.7rem, 3.5vw, 3.4rem); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: .7rem; margin-block-end: .75rem; }
h1, h2 { line-height: 1.3; font-weight: 850; }
h1 { font-size: clamp(1.44rem, 3vw, 2.3rem); }
h2 { font-size: clamp(1.32rem, 2.5vw, 1.9rem); }
.text-link { display: inline-flex; gap: .42rem; align-items: center; min-height: 2.75rem; width: fit-content; color: var(--blue); font-size: .92rem; font-weight: 760; }
.text-link:hover { text-decoration: underline; text-underline-offset: .24em; }
.arrow { display: inline-grid; place-content: center; width: 1rem; height: 1rem; flex: 0 0 1rem; }
.arrow::before { content: ""; width: .43rem; height: .43rem; border-block-start: 1.5px solid currentColor; border-inline-end: 1.5px solid currentColor; transform: rotate(-45deg); }

.welcome { padding-block-start: 1.4rem; }
.category-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: .65rem; }
.category-card { display: flex; height: 100%; flex-direction: column; align-items: center; gap: .48rem; padding: .45rem .25rem .55rem; text-align: center; font-weight: 760; line-height: 1.4; border-radius: 12px; }
.category-card:hover { background-color: var(--surface); color: var(--blue); }
.category-image { display: block; width: min(100%, 94px); aspect-ratio: 1; overflow: hidden; border-radius: 23px; background: var(--blue-pale); }
.category-image img, .card-media img, .detail-media img, .service-media img { height: 100%; object-fit: cover; }
.category-image img, .card-media img { transition: transform .24s ease; }
@media (hover: hover) {
  .category-card:hover img, .subcategory-card:hover img { transform: scale(1.05); }
}

.hero { display: grid; grid-template-columns: 1fr 1.45fr; margin-block-start: 1.2rem; overflow: hidden; border-radius: 20px; background: #e5eeff; }
.hero-copy { align-self: center; padding: clamp(1rem, 4vw, 3.4rem); color: var(--blue-dark); min-width: 0; }
.hero-copy h2 { font-size: clamp(1.5rem, 4vw, 3.1rem); }
.hero-copy p { margin-block-start: .28rem; color: #354c7c; }
.hero-media { position: relative; min-height: 240px; overflow: hidden; background: #dce8f8; }
.hero-media picture, .hero-media img { position: absolute; inset: 0; height: 100%; object-fit: cover; }
.button { display: inline-flex; min-height: 2.75rem; padding: .5rem .85rem; align-items: center; justify-content: center; border-radius: 10px; font-size: .94rem; font-weight: 770; transition: background-color .18s ease; }
.button-primary, .button-dark { color: white; background: var(--blue); }
.button-primary:hover, .button-dark:hover { background: var(--blue-dark); }
.hero .button, .detail-hero .button, .service .button { margin-block-start: .75rem; }

.subcategory-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .85rem; }
.featured-grid { grid-template-columns: repeat(6,minmax(0,1fr)); }
.subcategory-card { display: grid; height: 100%; grid-template-rows: auto 1fr; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); }
.subcategory-card:hover { border-color: #9eb4ee; }
.card-media { aspect-ratio: 1.55; overflow: hidden; background: var(--surface); }
.card-copy { display: flex; flex-direction: column; align-items: flex-start; padding: .7rem; }
.card-group { font-size: .78rem; color: var(--muted); }
.card-title { font-weight: 780; font-size: 1rem; line-height: 1.42; margin-block: .2rem .55rem; }
.card-action { display: inline-flex; align-items: center; gap: .2rem; margin-block-start: auto; color: var(--blue); font-size: .82rem; }

.breadcrumb { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; color: var(--muted); font-size: .87rem; padding-block-start: .35rem; }
.breadcrumb > * { display: inline-flex; min-height: 2.75rem; gap: .4rem; align-items: center; }
.breadcrumb > :not(:first-child)::before { content: "/"; color: #62728f; }
.breadcrumb a:hover { color: var(--blue); }
.index-header { margin-block: .15rem 1rem; }
.index-header p { color: var(--muted); margin-block-start: .32rem; }
.index-groups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: start; gap: .7rem; }
.index-group { overflow: hidden; border: 1px solid var(--border); border-radius: 13px; }
.index-group summary { display: flex; gap: .75rem; align-items: center; min-height: 4.55rem; cursor: pointer; list-style: none; padding: .62rem .8rem; }
.index-group summary::-webkit-details-marker { display: none; }
.index-group summary:focus-visible { outline-offset: -3px; }
.index-group summary img { width: 3.15rem; height: 3.15rem; object-fit: cover; border-radius: 11px; }
.index-group summary strong, .index-group summary small { display: block; }
.index-group summary small { color: var(--muted); font-size: .82rem; }
.index-group summary .arrow { margin-inline-start: auto; color: var(--blue); transform: rotate(-90deg); }
.index-group[open] summary { background: var(--blue-pale); }
.index-group[open] summary .arrow { transform: rotate(90deg); }
.index-items { padding-inline: .85rem; }
.index-items li + li { border-block-start: 1px solid var(--border); }
.index-items li a { display: flex; align-items: center; min-height: 2.75rem; justify-content: space-between; gap: .5rem; }
.index-items li a:hover { color: var(--blue); }

.detail-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; padding: .8rem; border-radius: var(--radius); border: 1px solid var(--border); }
.detail-media { grid-row: 1; grid-column: 1; overflow: hidden; min-height: 240px; aspect-ratio: 2; border-radius: 11px; background: var(--surface); }
.detail-copy { grid-row: 1; grid-column: 2; align-self: center; padding: .7rem; }
.eyebrow { color: var(--blue); font-size: .84rem; font-weight: 760; }
.detail-copy > p:not(.eyebrow) { margin-block-start: .45rem; color: var(--muted); }
.detail-copy h1 { margin-block-start: .2rem; }
.item-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.info-panel { padding: .9rem; border: 1px solid var(--border); border-radius: var(--radius); }
.info-panel h2 { font-size: 1.2rem; margin-block-end: .5rem; }
.example-list li, .check-list li { border-block-start: 1px solid var(--border); padding-block: .45rem; }
.small { font-size: .86rem; color: var(--muted); margin-block-start: .4rem; }
.related { margin-block-start: 1.5rem; }
.related > div { display: flex; flex-wrap: wrap; gap: .2rem 1rem; }

.service { display: grid; grid-template-columns: 1fr 1fr; background: var(--warm); border-radius: var(--radius); overflow: hidden; }
.service-media { min-height: 9rem; overflow: hidden; }
.service-copy { align-self: center; padding: 1rem; }
.service-copy h2, .contact h2 { margin-block: .25rem .42rem; }
.service-copy p:not(.eyebrow), .contact p:not(.eyebrow), .about p { color: var(--muted); }
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.address h3 { font-size: 1.1rem; }
address { color: var(--muted); font-style: normal; }
.phones { display: flex; flex-wrap: wrap; gap: .4rem; margin-block-start: .5rem; }
.phone { display: inline-flex; gap: .35rem; min-height: 2.75rem; padding-inline: .62rem; align-items: center; color: var(--blue-dark); border: 1px solid #b7c8f2; border-radius: 10px; background: white; font-weight: 800; white-space: nowrap; }
.phone:hover { background: var(--blue-pale); }
.about { padding-block: 1.2rem; }
.about h2, .related h2 { font-size: 1.22rem; }
.site-footer { margin-block-start: 2rem; border-block-start: 1px solid var(--border); background: var(--surface); }
.footer-inner { display: flex; align-items: center; gap: .55rem 1rem; flex-wrap: wrap; padding-block: .8rem; }
.footer-inner p { margin-inline-end: auto; color: var(--muted); }
.footer-inner > a:not(.brand) { display: inline-flex; min-height: 2.75rem; align-items: center; color: var(--blue); }

@media (max-width: 850px) {
  .featured-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .wrap { width: calc(100% - 1.65rem); }
  .header-inner { min-height: 3.45rem; }
  .header-inner .brand { font-size: 1.78rem; }
  .header-inner .brand-mark { width: 1.75rem; height: 1.75rem; }
  .header-contact { font-size: .88rem; min-height: 2.75rem; padding-inline: .52rem; border-color: transparent; }
  .desktop-nav { display: none; }
  body { padding-block-end: calc(3.75rem + env(safe-area-inset-bottom)); }
  .bottom-nav { position: fixed; z-index: 5; inset-inline: 0; inset-block-end: 0; display: grid; grid-template-columns: repeat(4,1fr); background: white; border-block-start: 1px solid var(--border); padding: .3rem .6rem max(.3rem, env(safe-area-inset-bottom)); }
  .bottom-nav a { display: flex; min-height: 3rem; flex-direction: column; gap: .18rem; align-items: center; justify-content: center; border-radius: 10px; color: var(--muted); font-size: .8rem; font-weight: 750; line-height: 1.3; white-space: nowrap; }
  .bottom-nav a[aria-current] { color: var(--blue-dark); background: var(--blue-pale); }
  .welcome { padding-block-start: .7rem; }
  .section-head { margin-block-end: .45rem; }
  .section-head .text-link { font-size: .83rem; white-space: nowrap; }
  .category-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: .18rem .35rem; }
  .category-card { font-size: .84rem; gap: .33rem; }
  .category-image { width: min(100%, 68px); border-radius: 17px; }
  .hero { grid-template-columns: 1fr 1fr; margin-block-start: .65rem; border-radius: 14px; }
  .hero-copy { padding: .78rem; }
  .hero-copy h2 { font-size: clamp(1.25rem, 5.2vw, 1.65rem); }
  .hero-copy p { font-size: .84rem; line-height: 1.45; }
  .hero-copy .button { font-size: .83rem; margin-block-start: .53rem; }
  .hero-media { min-height: 136px; }
  .subcategory-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .55rem; }
  .index-groups, .contact, .item-grid { grid-template-columns: 1fr; }
  .detail-hero { grid-template-columns: 1fr; gap: .5rem; padding: .55rem; }
  .detail-media { grid-column: 1; grid-row: 1; aspect-ratio: 2.15; min-height: 0; }
  .detail-copy { grid-column: 1; grid-row: 2; padding: .45rem; }
  .service { grid-template-columns: .75fr 1fr; }
}
@media (max-width: 375px) {
  .wrap { width: calc(100% - 1.15rem); }
  .category-image { width: 61px; }
  .section-head .text-link { font-size: .78rem; }
  .section-head h1 { font-size: 1.27rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
