/* Kimia main CSS (no inline styles) */
.site-header,
.site-footer {
  padding: 12px 16px;
}
.site-logo {
  text-decoration: none;
}
.site-content {
  padding: 16px;
}
/* Header + Primary Nav (minimal DOM) */
.site-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

.site-logo{
  font-weight:700;
  text-decoration:none;
  line-height:1.2;
}

.site-nav .nav-menu{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  align-items:center;
  gap:14px;
}

.site-nav .nav-menu a{
  text-decoration:none;
}
/* Language switcher (Polylang output) - minimal */
.lang-switch{
  display:flex;
  align-items:center;
}

.lang-switch ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  gap:10px;
}

.lang-switch li{
  margin:0;
  padding:0;
}

.lang-switch a{
  text-decoration:none;
  font-weight:600;
  line-height:1;
}

.lang-switch .current-lang a{
  opacity:.6;
  pointer-events:none;
}
/* Footer (minimal DOM) */
.site-footer{
  padding:16px;
  margin-top:24px;
}

.footer-nav .footer-menu{
  list-style:none;
  margin:0 0 10px 0;
  padding:0;
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

.footer-nav .footer-menu a{
  text-decoration:none;
}

.copyright{
  margin:0;
  font-size:14px;
  line-height:1.6;
}
/* Font: BYEKAN (woff2 local) */
@font-face{
  font-family: "BYEKAN";
  src: url("../fonts/BYEKAN.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Apply font: default FA (site default is Persian) */
html[lang^="fa"] body{
  font-family: "BYEKAN", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* EN: keep fast system stack (best for PageSpeed unless you provide an EN woff2) */
html[lang^="en"] body{
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
/* Direction by language (no extra DOM) */
html[lang^="fa"]{ direction: rtl; }
html[lang^="en"]{ direction: ltr; }

/* Minimal layout container */
.site-content{
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 16px;
}

/* Basic typography (lightweight) */
body{
  line-height: 1.8;
  text-rendering: optimizeLegibility;
}

.entry-title{
  margin: 0 0 10px 0;
  line-height: 1.25;
}

.entry-content{
  margin: 0 0 18px 0;
}

/* Links focus (a11y without extra markup) */
a:focus-visible{
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Nav spacing improvements */
.site-header{
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 16px;
}
/* =========================
   Kimia Ultra Header
   Brand: #03153e (navy) / #ffda44 (gold)
   No sticky. Desktop + Mobile.
========================= */

.k-header{
  background: #03153e;
  border-bottom: 1px solid rgba(255,218,68,.28);
}

.k-header__bar{
  max-width: 1200px;
  margin-inline: auto;
  padding: 14px 16px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
}

/* Brand */
.k-brand{
  justify-self: start;
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .2px;
  line-height: 1.1;
  font-size: 18px;
  position: relative;
}
html[lang^="fa"] .k-brand{ justify-self: end; } /* FA right */
html[lang^="en"] .k-brand{ justify-self: start; } /* EN left */

.k-brand::after{
  content:"";
  display:block;
  width: 38px;
  height: 2px;
  margin-top: 8px;
  background: #ffda44;
  border-radius: 999px;
  opacity: .95;
}

/* Center nav */
.k-nav{ justify-self: center; }
.k-menu{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 18px;
}
.k-menu > li{ position: relative; }
.k-menu a{
  color: rgba(255,255,255,.92);
  text-decoration: none;
  font-weight: 650;
  font-size: 14px;
  padding: 10px 4px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.k-menu a:hover,
.k-menu a:focus-visible{
  color: #ffda44;
  outline: none;
}
.k-menu > li > a::after{
  content:"";
  position:absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 2px;
  background: #ffda44;
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .18s ease;
  opacity: .95;
}
.k-menu > li:hover > a::after,
.k-menu > li > a:focus-visible::after{
  transform: scaleX(1);
}

/* Submenu (dropdown) */
.k-menu .sub-menu{
  list-style: none;
  margin: 0;
  padding: 10px;
  position: absolute;
  top: calc(100% + 10px);
  min-width: 220px;
  background: #03153e;
  border: 1px solid rgba(255,218,68,.22);
  box-shadow: 0 18px 45px rgba(0,0,0,.35);
  border-radius: 14px;
  display: none;
}
.k-menu li:hover > .sub-menu{ display: block; }
.k-menu .sub-menu a{
  width: 100%;
  padding: 10px 10px;
  border-radius: 10px;
}
.k-menu .sub-menu a:hover,
.k-menu .sub-menu a:focus-visible{
  background: rgba(255,218,68,.12);
}

/* Utilities */
.k-utils{
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}
html[lang^="fa"] .k-utils{ justify-self: start; } /* opposite side in FA */

.k-phone{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #03153e;
  background: #ffda44;
  padding: 10px 12px;
  border-radius: 14px;
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(0,0,0,.22);
}
.k-phone:hover,
.k-phone:focus-visible{
  outline: none;
  filter: brightness(1.03);
  transform: translateY(-1px);
}
.k-phone__ico{ font-size: 16px; line-height: 1; }
.k-phone__txt{ font-size: 14px; line-height: 1; }

/* Language switch (Polylang ul) -> flags */
.k-lang ul{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 10px;
  align-items: center;
}
.k-lang li{ margin:0; padding:0; }
.k-lang a{
  display: inline-flex;
  width: 34px;
  height: 24px;
  border-radius: 7px;
  border: 1px solid rgba(255,218,68,.35);
  box-shadow: 0 10px 24px rgba(0,0,0,.22);
  overflow: hidden;
  text-indent: -9999px; /* hide fa/en text */
  position: relative;
}
.k-lang a::before{
  content:"";
  position:absolute;
  inset:0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.k-lang li.lang-item-fa a::before{
  background-image: url("../img/flags/ir.svg");
}
.k-lang li.lang-item-en a::before{
  background-image: url("../img/flags/gb.svg");
}
.k-lang .current-lang a{
  opacity: .7;
  pointer-events: none;
}

/* Mobile menu toggle (CSS only) */
.k-nav__toggle{
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.k-nav__burger{
  display: none;
  justify-self: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,218,68,.26);
  background: rgba(255,255,255,.06);
  box-shadow: 0 12px 26px rgba(0,0,0,.22);
  cursor: pointer;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-direction: column;
}
.k-nav__burger span{
  display:block;
  width: 18px;
  height: 2px;
  background: #ffda44;
  border-radius: 999px;
}

/* Backdrop */
.k-nav__backdrop{
  display:none;
}

/* Responsive */
@media (max-width: 980px){
  .k-header__bar{
    grid-template-columns: auto 1fr auto;
  }

  /* Keep logo visible + utilities compact */
  .k-phone{
    padding: 10px 10px;
    border-radius: 12px;
  }
  .k-phone__txt{
    display:none; /* mobile: icon only for cleanliness */
  }

  .k-nav__burger{ display:flex; }

  .k-nav{
    position: fixed;
    inset: 0;
    background: rgba(3,21,62,.92);
    backdrop-filter: blur(10px);
    display: grid;
    place-items: center;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    padding: 80px 16px 24px;
  }

  .k-menu{
    flex-direction: column;
    gap: 8px;
    width: min(420px, 100%);
  }
  .k-menu a{
    width: 100%;
    justify-content: center;
    padding: 14px 12px;
    border-radius: 16px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,218,68,.18);
    box-shadow: 0 14px 34px rgba(0,0,0,.28);
  }
  .k-menu > li > a::after{ display:none; }

  .k-menu .sub-menu{
    position: static;
    display: block;
    min-width: auto;
    width: 100%;
    margin-top: 8px;
    border-radius: 16px;
    padding: 8px;
    box-shadow: none;
    background: rgba(255,255,255,.05);
  }

  /* Toggle open */
  .k-nav__toggle:checked ~ .k-nav{
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .k-nav__toggle:checked ~ .k-nav__backdrop{
    display:block;
    position: fixed;
    inset: 0;
  }
}
