:root {
  --n2n-ink: #121820;
  --n2n-muted: #5b6775;
  --n2n-hero: #1c2733;
  --n2n-hero-2: #243447;
  --n2n-accent: #00a8d5;
  --n2n-accent-hover: #0090b8;
  --n2n-surface: #f5f7f9;
  --n2n-white: #ffffff;
  --n2n-line: #dbe3ea;
  --n2n-radius: 4px;
  --n2n-max: 1120px;
  --n2n-font: "Outfit", "Vazirmatn", system-ui, sans-serif;
  --n2n-font-fa: "Vazirmatn", "Outfit", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  color: var(--n2n-ink);
  background: var(--n2n-white);
  font-family: var(--n2n-font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

body.rtl,
html[lang^="fa"] body {
  font-family: var(--n2n-font-fa);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--n2n-accent);
  text-decoration: none;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}

a:hover {
  color: var(--n2n-accent-hover);
}

.site-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

.container {
  width: min(100% - 2.5rem, var(--n2n-max));
  margin-inline: auto;
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 1.5rem, var(--n2n-max));
  }
}

/* Header / Hero shell */
.site-header {
  background: linear-gradient(160deg, var(--n2n-hero) 0%, var(--n2n-hero-2) 55%, #1a2a3a 100%);
  color: var(--n2n-white);
  position: relative;
  z-index: 100;
  overflow: visible;
}

.site-header .container {
  position: relative;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 15% 20%, rgba(0, 168, 213, .18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 80%, rgba(255, 255, 255, .04), transparent 50%),
    repeating-linear-gradient(
      -12deg,
      transparent,
      transparent 28px,
      rgba(255, 255, 255, .015) 28px,
      rgba(255, 255, 255, .015) 29px
    );
  pointer-events: none;
}

.site-header > * {
  position: relative;
  z-index: 1;
}

.header-bar,
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.15rem 0;
}

.header-bar {
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--n2n-white);
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.brand:hover {
  color: var(--n2n-white);
  opacity: .9;
}

.brand span {
  color: var(--n2n-accent);
}

.brand__mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  background: rgba(255, 255, 255, .08);
  box-shadow: 0 0 0 1px rgba(0, 168, 213, .35), 0 0 18px rgba(0, 168, 213, .18);
  padding: 3px;
  object-fit: contain;
}

.brand__text {
  line-height: 1;
}

.custom-logo-link {
  display: inline-flex;
  align-items: center;
}

.custom-logo {
  max-height: 44px;
  width: auto;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: .85rem;
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 0;
  color: var(--n2n-white);
  cursor: pointer;
  width: 44px;
  height: 44px;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
  position: relative;
  z-index: 3;
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  margin: 3px 0;
  pointer-events: none;
}

.primary-nav {
  margin-inline-start: auto;
  margin-inline-end: .35rem;
}

.primary-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.primary-nav a {
  color: rgba(255, 255, 255, .88);
  font-weight: 500;
  font-size: .95rem;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a {
  color: var(--n2n-white);
}

.lang-switch {
  display: inline-flex;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: var(--n2n-radius);
  overflow: hidden;
}

.lang-switch__item {
  color: rgba(255, 255, 255, .75);
  padding: .35rem .65rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.lang-switch__item.is-active {
  background: var(--n2n-accent);
  color: var(--n2n-white);
}

.lang-switch__item:hover {
  color: var(--n2n-white);
}

/* Hero */
.hero {
  position: relative;
  padding: 5rem 0 5.75rem;
  text-align: center;
  color: var(--n2n-white);
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(18, 24, 32, .78) 0%, rgba(28, 39, 51, .62) 45%, rgba(18, 24, 32, .8) 100%),
    url("../images/hero-bg.jpg") center / cover no-repeat;
}

.hero__title {
  margin: 0 0 1rem;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--n2n-white);
  animation: n2n-fade-up .7s ease both;
}

.hero__lead {
  margin: 0 auto 2rem;
  max-width: 40rem;
  color: rgba(255, 255, 255, .82);
  font-size: 1.1rem;
  animation: n2n-fade-up .7s .12s ease both;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  justify-content: center;
  animation: n2n-fade-up .7s .22s ease both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: .7rem 1.35rem;
  border-radius: var(--n2n-radius);
  font-weight: 600;
  font-size: .95rem;
  border: 2px solid transparent;
  cursor: pointer;
}

.btn--primary {
  background: var(--n2n-accent);
  color: var(--n2n-white);
}

.btn--primary:hover {
  background: var(--n2n-accent-hover);
  color: var(--n2n-white);
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  color: var(--n2n-white);
  border-color: rgba(255, 255, 255, .45);
}

.btn--ghost:hover {
  border-color: var(--n2n-white);
  color: var(--n2n-white);
}

.btn--outline {
  background: transparent;
  color: var(--n2n-ink);
  border-color: var(--n2n-line);
}

.btn--outline:hover {
  border-color: var(--n2n-accent);
  color: var(--n2n-accent);
}

/* Sections */
.section {
  padding: 4.5rem 0;
}

.section--muted {
  background: var(--n2n-surface);
}

.section__title {
  margin: 0 0 .5rem;
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 750;
}

.section__lead {
  margin: 0 auto 2.5rem;
  text-align: center;
  max-width: 36rem;
  color: var(--n2n-muted);
}

.topics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.topic-card {
  background: var(--n2n-white);
  border: 1px solid var(--n2n-line);
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}

.topic-card:hover {
  border-color: var(--n2n-line);
  transform: none;
  box-shadow: none;
}

@media (hover: hover) and (pointer: fine) {
  .topic-card:hover {
    border-color: var(--n2n-accent);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(18, 24, 32, .06);
  }
}

.topic-card__media {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #1c2733;
}

.topic-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topic-card__body {
  padding: 1.35rem 1.35rem 1.5rem;
}

.topic-card__icon {
  width: 42px;
  height: 42px;
  margin-bottom: 1rem;
  color: var(--n2n-accent);
}

.topic-card__title {
  margin: 0 0 .55rem;
  font-size: 1.05rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: var(--n2n-ink);
}

.topic-card__desc {
  margin: 0 0 1.25rem;
  color: var(--n2n-muted);
  font-size: .95rem;
}

/* Posts grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--n2n-white);
  border: 1px solid var(--n2n-line);
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease;
}

.post-card:hover {
  transform: none;
  box-shadow: none;
}

@media (hover: hover) and (pointer: fine) {
  .post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(18, 24, 32, .08);
  }

  .post-card:hover .post-card__media img {
    transform: scale(1.04);
  }
}

.post-card__media {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #243447, #1c2733);
  overflow: hidden;
}

.post-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card__body {
  padding: 1.15rem 1.2rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  flex: 1;
}

.post-card__meta {
  font-size: .8rem;
  color: var(--n2n-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

.post-card__title {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.35;
  font-weight: 700;
}

.post-card__title a {
  color: var(--n2n-ink);
}

.post-card__title a:hover {
  color: var(--n2n-accent);
}

.post-card__excerpt {
  margin: 0;
  color: var(--n2n-muted);
  font-size: .92rem;
  flex: 1;
}

.section__more {
  margin-top: 2rem;
  text-align: center;
}

/* Page / single */
.page-hero {
  background: var(--n2n-hero);
  color: var(--n2n-white);
  padding: 2.5rem 0;
}

.page-hero h1 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.content-wrap {
  padding: 3rem 0 4.5rem;
}

.entry-content {
  max-width: 720px;
  margin-inline: auto;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content h2,
.entry-content h3 {
  margin-top: 2rem;
  line-height: 1.3;
}

.entry-meta {
  color: var(--n2n-muted);
  font-size: .9rem;
  margin-bottom: 1.5rem;
}

.featured-image {
  margin: 0 0 2rem;
  border-radius: var(--n2n-radius);
  overflow: hidden;
}

.entry-content p {
  margin: 0 0 1.1rem;
}

.entry-content ul {
  margin: 0 0 1.25rem;
  padding-inline-start: 1.25rem;
}

.entry-content li {
  margin: 0 0 .45rem;
}

.entry-content code {
  font-size: .88em;
  background: var(--n2n-surface);
  padding: .12em .38em;
  border-radius: 3px;
}

.entry-content .n2n-table-wrap {
  overflow-x: auto;
  margin: 1.15rem 0 1.75rem;
}

.entry-content table {
  width: 100%;
  min-width: 34rem;
  border-collapse: collapse;
  font-size: .95rem;
}

.entry-content th,
.entry-content td {
  border-bottom: 1px solid var(--n2n-line);
  padding: 1rem .75rem;
  vertical-align: top;
  text-align: start;
}

.entry-content thead th {
  font-weight: 500;
  color: var(--n2n-muted);
  background: transparent;
}

.entry-content tbody th {
  font-weight: 600;
  color: var(--n2n-ink);
}

.entry-content td {
  color: var(--n2n-muted);
  font-weight: 400;
}

.entry-content table[dir="ltr"] th,
.entry-content table[dir="ltr"] td {
  text-align: center;
}

.entry-content tbody tr:last-child th,
.entry-content tbody tr:last-child td {
  border-bottom: 1px solid var(--n2n-line);
}

.n2n-ig-follow {
  margin: 2.35rem 0 0;
  padding-top: 1.4rem;
  border-top: 1px solid var(--n2n-line);
}

.n2n-ig-follow__link {
  display: flex;
  align-items: center;
  gap: .9rem;
  color: var(--n2n-ink);
  max-width: 32rem;
}

.n2n-ig-follow__link:hover {
  color: var(--n2n-ink);
}

.n2n-ig-follow__logo {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f58529 0%, #dd2a7b 45%, #8134af 75%, #515bd4 100%);
  color: #fff;
}

.n2n-ig-follow__logo .n2n-icon {
  width: 24px;
  height: 24px;
}

.n2n-ig-follow__text {
  display: flex;
  flex-direction: column;
  gap: .12rem;
  min-width: 0;
}

.n2n-ig-follow__text strong {
  font-size: 1.05rem;
  direction: ltr;
  unicode-bidi: plaintext;
}

.n2n-ig-follow__text span {
  color: var(--n2n-muted);
  font-size: .92rem;
}

/* Newsletter strip */
.newsletter {
  background: linear-gradient(135deg, #1c2733, #243447);
  color: var(--n2n-white);
  padding: 3.5rem 0;
  text-align: center;
}

.newsletter h2 {
  margin: 0 0 .75rem;
  font-size: 1.6rem;
}

.newsletter p {
  margin: 0 auto;
  max-width: 34rem;
  color: rgba(255, 255, 255, .75);
}

/* Footer */
.site-footer {
  background: #10161e;
  color: rgba(255, 255, 255, .72);
  padding: 3rem 0 1.75rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1.15fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.brand--footer {
  font-size: 1.2rem;
  margin-bottom: .85rem;
}

.brand--footer .brand__mark {
  width: 30px;
  height: 30px;
}

.footer-slogan {
  margin: 0 0 .35rem;
  color: var(--n2n-white);
  font-weight: 600;
}

.footer-tagline {
  margin: 0;
  color: rgba(255, 255, 255, .62);
  font-size: .95rem;
}

.site-footer a {
  color: rgba(255, 255, 255, .72);
}

.site-footer a:hover {
  color: var(--n2n-white);
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .45rem;
}

.footer-title {
  color: var(--n2n-white);
  font-size: .95rem;
  margin: 0 0 .85rem;
  font-weight: 700;
}

.footer-contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .85rem;
}

.footer-contact__label {
  display: block;
  color: rgba(255, 255, 255, .45);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .2rem;
}

.footer-instagram {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  color: var(--n2n-white);
  font-weight: 650;
  direction: ltr;
  unicode-bidi: plaintext;
}

.footer-instagram:hover {
  color: #f7a8d0;
}

.footer-instagram__icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f58529 0%, #dd2a7b 45%, #8134af 75%, #515bd4 100%);
  color: #fff;
}

.footer-instagram__icon .n2n-icon {
  width: 15px;
  height: 15px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .88rem;
}

/* Contact page */
.page-hero__lead {
  margin: .75rem 0 0;
  max-width: 36rem;
  color: rgba(255, 255, 255, .78);
}

.contact-section {
  padding: 3rem 0 4rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.contact-card {
  border: 1px solid var(--n2n-line);
  background: var(--n2n-white);
  padding: 1.4rem 1.35rem;
}

.contact-card__label {
  margin: 0 0 .55rem;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--n2n-muted);
  font-weight: 650;
}

.contact-card__value {
  margin: 0;
  color: var(--n2n-ink);
  font-size: 1.05rem;
  font-weight: 650;
  word-break: break-word;
}

.contact-card__value--text {
  font-weight: 500;
  line-height: 1.7;
}

.contact-card__social {
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  color: var(--n2n-ink);
  text-decoration: none;
}

.contact-card__social:hover {
  color: var(--n2n-accent);
}

.contact-card__social-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f58529 0%, #dd2a7b 45%, #8134af 75%, #515bd4 100%);
  color: #fff;
  flex-shrink: 0;
}

.contact-card__social-icon .n2n-icon {
  width: 22px;
  height: 22px;
}

.contact-card__social-text {
  display: grid;
  gap: .15rem;
}

.contact-card__social-handle {
  font-size: 1.05rem;
  font-weight: 700;
  direction: ltr;
  unicode-bidi: plaintext;
}

.contact-card__social-hint {
  font-size: .86rem;
  color: var(--n2n-muted);
  font-weight: 500;
}

.contact-card__phones {
  display: grid;
  gap: .7rem;
}

.phone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}

.phone-row__number {
  color: var(--n2n-ink);
  font-weight: 650;
  font-size: 1.02rem;
  direction: ltr;
  unicode-bidi: plaintext;
}

.phone-row__actions {
  display: inline-flex;
  gap: .4rem;
}

.phone-row__btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--n2n-white);
}

.phone-row__btn--call {
  background: #1c2733;
}

.phone-row__btn--wa {
  background: #25d366;
}

.phone-row__btn:hover {
  color: var(--n2n-white);
  opacity: .92;
  transform: translateY(-1px);
}

.n2n-icon {
  width: 18px;
  height: 18px;
  display: block;
}

.site-footer .phone-row__number {
  color: rgba(255, 255, 255, .9);
  font-size: .92rem;
  font-weight: 500;
}

.site-footer .phone-row {
  margin-top: .35rem;
}

.address-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .45rem;
}

.address-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.address-row__text {
  color: var(--n2n-ink);
  font-weight: 650;
}

.address-row__btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(18, 24, 32, .12);
  flex-shrink: 0;
}

.address-row__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 0 1px rgba(66, 133, 244, .35);
}

.n2n-icon--maps {
  width: 20px;
  height: 20px;
}

.site-footer .address-row__text {
  color: rgba(255, 255, 255, .86);
  font-weight: 500;
}

.site-footer .address-row__btn {
  background: rgba(255, 255, 255, .96);
}

.contact-extra {
  margin-top: 1rem;
}

/* Forms */
.search-form {
  display: flex;
  gap: .5rem;
  max-width: 420px;
  margin: 1.5rem auto 0;
}

.search-form input[type="search"] {
  flex: 1;
  border: 1px solid var(--n2n-line);
  border-radius: var(--n2n-radius);
  padding: .7rem .9rem;
  font: inherit;
}

/* Animations */
@keyframes n2n-fade-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .55s ease, transform .55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Responsive */
@media (min-width: 1101px) {
  .topics {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .posts-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 900px) {
  .topics,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .menu-toggle {
    display: inline-flex;
  }

  .primary-nav {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: calc(100% - .35rem);
    margin: 0;
    background: #16202b;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: var(--n2n-radius);
    padding: .65rem .35rem;
    z-index: 120;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .28);
  }

  .primary-nav.is-open {
    display: block;
  }

  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .primary-nav a {
    display: block;
    padding: .85rem 1rem;
    min-height: 44px;
  }

  .posts-grid,
  .footer-grid,
  .topics {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 2.75rem 0 3.25rem;
    background-image:
      linear-gradient(160deg, rgba(18, 24, 32, .78) 0%, rgba(28, 39, 51, .62) 45%, rgba(18, 24, 32, .8) 100%),
      url("../images/hero-bg-sm.jpg");
  }

  .hero__title {
    font-size: clamp(1.85rem, 8vw, 2.5rem);
  }

  .lang-switch__item {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }

  .brand__text {
    font-size: 1.05rem;
  }

  .page-hero h1 {
    font-size: clamp(1.6rem, 7vw, 2.1rem);
  }
}

@media (min-width: 1400px) {
  :root {
    --n2n-max: 1200px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
