@font-face {
  font-family: "Alyamama Regular";
  src: url("../assets/fonts/alfont_com_Alyamama-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-navy: #0b1f3a;
  --color-navy-soft: #14345c;
  --color-white: #ffffff;
  --color-orange: #f97316;
  --color-text: #142033;
  --color-muted: #667085;
  --color-border: #d8e0ea;
  --shadow-soft: 0 18px 50px rgba(11, 31, 58, 0.14);
  --radius-lg: 18px;
  --radius-xl: 28px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  color: var(--color-text);
  background: var(--color-white);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

html[lang="ar"] body,
html[lang="ar"] button,
html[lang="ar"] input,
html[lang="ar"] select,
html[lang="ar"] textarea {
  font-family: "Alyamama Regular", "Segoe UI", Tahoma, Arial, sans-serif;
}

html[lang="ar"] body * {
  font-family: "Alyamama Regular", "Segoe UI", Tahoma, Arial, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

:focus-visible {
  outline: 3px solid rgba(249, 115, 22, 0.8);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 100;
  transform: translateY(-160%);
  padding: 0.7rem 0.9rem;
  border-radius: 999px;
  background: var(--color-navy);
  color: var(--color-white);
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}

.skip-link:focus {
  transform: translateY(0);
}

main section,
footer {
  scroll-margin-top: 88px;
}

body.nav-open {
  overflow: hidden;
}

.section-shell {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(216, 224, 234, 0.9);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px);
}

.site-nav {
  width: min(1240px, calc(100% - 2rem));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-mark {
  color: var(--color-navy);
  font-weight: 850;
  letter-spacing: 0.08em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.nav-links a:not(.button):hover,
.nav-links a:not(.button):focus-visible {
  color: var(--color-navy);
}

.language-toggle {
  display: inline-flex;
  padding: 0.2rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: #f7f9fc;
}

.language-toggle button,
.filter-row button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
}

.language-toggle button {
  padding: 0.32rem 0.55rem;
}

.language-toggle button.is-active,
.filter-row button.is-active {
  background: var(--color-navy);
  color: var(--color-white);
}

.nav-menu-button {
  display: none;
  width: 2.7rem;
  height: 2.7rem;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--color-white);
  color: var(--color-navy);
  place-items: center;
  padding: 0.65rem;
  cursor: pointer;
}

.nav-menu-button span {
  display: block;
  width: 1.1rem;
  height: 2px;
  margin: 0.12rem auto;
  border-radius: 99px;
  background: currentColor;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  padding: 0.76rem 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 750;
  cursor: pointer;
}

.button-primary {
  background: var(--color-orange);
  color: var(--color-white);
  box-shadow: 0 12px 26px rgba(249, 115, 22, 0.24);
}

.button-secondary {
  border-color: var(--color-border);
  background: var(--color-white);
  color: var(--color-navy);
}

.articles-hero {
  padding: clamp(5rem, 10vw, 8rem) 0 clamp(3rem, 6vw, 5rem);
  background:
    linear-gradient(135deg, rgba(11, 31, 58, 0.07), rgba(249, 115, 22, 0.09)),
    var(--color-white);
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--color-orange);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--color-navy);
  line-height: 1.06;
}

h1 {
  max-width: 12ch;
  font-size: clamp(3rem, 7vw, 5.5rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

h3 {
  font-size: 1.35rem;
}

.articles-hero p:not(.eyebrow) {
  max-width: 46rem;
  color: var(--color-muted);
  font-size: 1.12rem;
}

.articles-listing {
  padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.listing-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.4rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.35rem;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: #f7f9fc;
}

.filter-row button {
  padding: 0.62rem 0.85rem;
  font-weight: 800;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.article-card {
  display: grid;
  gap: 0.85rem;
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-white);
  box-shadow: 0 10px 28px rgba(11, 31, 58, 0.08);
}

.article-visual {
  min-height: 12rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(216, 224, 234, 0.9);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(11, 31, 58, 0.08), rgba(249, 115, 22, 0.1)),
    #f8fbff;
  color: var(--color-navy);
  font-weight: 850;
  text-align: center;
}

.article-meta,
.article-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.article-meta span {
  color: var(--color-orange);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.article-card p {
  margin: 0;
  color: var(--color-muted);
}

.article-card time {
  color: var(--color-muted);
}

.article-card a {
  color: var(--color-navy);
  font-weight: 850;
}

.articles-product-cta {
  display: grid;
  gap: 1rem;
  margin-top: clamp(2rem, 5vw, 3rem);
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-white);
  box-shadow: var(--shadow-soft);
}

.articles-product-cta h2,
.articles-product-cta p {
  margin: 0;
}

.articles-product-cta h2 {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.articles-product-cta p {
  color: var(--color-muted);
}

.articles-product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.site-footer {
  background: #07172b;
  color: rgba(255, 255, 255, 0.74);
  padding: 4rem 0 1.2rem;
}

.site-footer .brand-mark,
.site-footer h2 {
  color: var(--color-white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(2, 1fr);
  gap: 2rem;
}

.footer-grid h2 {
  margin: 0 0 0.8rem;
  font-size: 0.95rem;
}

.footer-grid a,
.footer-grid span {
  display: block;
  margin-top: 0.45rem;
}

.footer-bottom {
  width: min(1180px, calc(100% - 2rem));
  margin: 2.5rem auto 0;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

html[dir="rtl"] body {
  text-align: right;
}

html[dir="rtl"] .site-nav,
html[dir="rtl"] .nav-links,
html[dir="rtl"] .article-grid,
html[dir="rtl"] .listing-head,
html[dir="rtl"] .articles-product-actions,
html[dir="rtl"] .footer-grid,
html[dir="rtl"] .footer-bottom {
  direction: ltr;
}

html[dir="rtl"] .nav-links a:not(.button),
html[dir="rtl"] .articles-hero .section-shell,
html[dir="rtl"] .listing-head > *,
html[dir="rtl"] .article-card,
html[dir="rtl"] .articles-product-cta,
html[dir="rtl"] .articles-product-actions > *,
html[dir="rtl"] .footer-grid > *,
html[dir="rtl"] .footer-bottom > * {
  direction: rtl;
  text-align: right;
}

@media (max-width: 980px) {
  .nav-menu-button {
    display: grid;
  }

  .nav-links {
    position: fixed;
    inset: 64px 1rem auto;
    display: none;
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    background: var(--color-white);
    box-shadow: var(--shadow-soft);
  }

  .nav-links.is-open {
    display: grid;
  }

  .language-toggle,
  .nav-links .button {
    width: 100%;
  }

  .listing-head {
    display: grid;
    align-items: start;
  }

  .article-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  html {
    font-size: 90%;
  }

  .section-shell,
  .site-nav,
  .footer-bottom {
    width: min(100% - 1rem, 1180px);
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.43rem, 10.8vw, 4.05rem);
  }

  h2 {
    font-size: clamp(1.8rem, 3.6vw, 2.88rem);
  }

  h3 {
    font-size: 1.215rem;
  }

  .filter-row {
    border-radius: var(--radius-lg);
  }

  .filter-row button {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
