/* ==========================================================================
   NC Solution — site stylesheet
   --------------------------------------------------------------------------
   Approach
   - Mobile-first: the base rules below describe the phone layout; each
     @media (min-width: …) block adds the changes for larger screens.
   - Sizes use rem (1rem = 16px at the browser default), so text and spacing
     scale with the visitor's font-size setting. px is kept only for fine
     details: borders, border-radius, shadows and small transforms.
   - Breakpoints (em, relative to the browser default font size):
       33.8125em = 541px   large phones / small tablets
       47.5625em = 761px   tablets
       56.3125em = 901px   small laptops
       61.3125em = 981px
       68.8125em = 1101px
       73.8125em = 1181px  full desktop navigation
   - Fonts (Inter, Tajawal) are loaded with <link> tags in each HTML page.

   Contents
     1. Design tokens
     2. Base & resets
     3. Shared components
     4. Header & navigation
     5. Homepage hero
     6. Homepage sections
     7. Service page template
     8. Contact page & form
     9. Footer
    10. Arabic (RTL) adjustments
    11. Larger screens (breakpoints)
    12. News & Insights pages
   ========================================================================== */


/* 1. Design tokens
   ========================================================================== */

:root {
  --navy: #071b35;
  --blue: #0759c7;
  --bright: #1677ff;
  --ink: #132238;
  --muted: #607087;
  --line: #dce5f0;
  --pale: #f5f8fc;
}


/* 2. Base & resets
   ========================================================================== */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.625rem;
}

body {
  margin: 0;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

bdi {
  unicode-bidi: isolate;
}

/* Elements hidden until content.js fills them (clients, projects, LinkedIn). */
[hidden] {
  display: none !important;
}


/* 3. Shared components
   ========================================================================== */

.container {
  width: min(73.75rem, 92%);
  margin: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.125rem;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 800;
}

/* Main call-to-action button (blue). */
.primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 8px 22px #0759c729;
}

/* White button used on dark panels. */
.btn-light {
  background: #fff;
  color: var(--navy);
}

/* Small uppercase labels above headings. */
.eyebrow,
.kicker {
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.125rem;
  text-transform: uppercase;
}

.eyebrow {
  color: #9ccaff;
}

.kicker {
  color: var(--blue);
}

/* Standard vertical rhythm for content sections. */
section.content {
  padding: 3.4375rem 0;
}

/* Light-grey section background. */
.soft {
  background: var(--pale);
}

/* Section heading block (label + title, with an optional intro paragraph). */
.head {
  display: block;
  margin-bottom: 1.875rem;
}

.head h2 {
  margin: 0.5625rem 0;
  color: var(--navy);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.04375rem;
}

.head p {
  max-width: 34.375rem;
  margin: 0.625rem 0 0;
  color: var(--muted);
}

/* Generic card grid (one column on phones). */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.0625rem;
}

/* Bullet list with tick icons. */
.checks {
  display: grid;
  gap: 0.8125rem;
  padding: 0;
  list-style: none;
}

.checks li {
  display: flex;
  gap: 0.6875rem;
  color: #53647a;
}

.tick {
  display: grid;
  flex: none;
  place-items: center;
  width: 1.5625rem;
  height: 1.5625rem;
  border-radius: 8px;
  background: #e5f1ff;
  color: var(--blue);
}

/* Closing call-to-action banner. */
.cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.375rem;
  padding: 2.25rem;
  border-radius: 20px;
  background: linear-gradient(110deg, #0759c7, #0b2b58);
  color: #fff;
}

.cta h2 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
}

.cta p {
  margin: 0;
  color: #d6e6fb;
}


/* 4. Header & navigation
   --------------------------------------------------------------------------
   Phones and tablets: the links live in a drop-down panel opened by the
   menu button. Full desktop (73.8125em+): links sit inline in the header.
   ========================================================================== */

header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: #fffffff2;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.625rem;
  min-height: 4.5rem;
}

.brand {
  min-width: 0;
}

.brand img {
  width: 10.9375rem;
  height: 3.375rem;
  object-fit: contain;
}

/* Drop-down panel (hidden until the menu button adds .open). */
.links {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  z-index: 30;
  display: none;
  flex: 1 1 auto;
  flex-direction: column;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  min-width: 0;
  padding: 0.875rem 4%;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 14px 25px #071b3515;
  color: #34445d;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: normal;
}

.links.open {
  display: flex;
}

.links a {
  display: block;
  flex: 0 0 auto;
  width: 100%;
  padding: 0.625rem 0;
  border-bottom: 1px solid #edf1f6;
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: normal;
}

.links a:last-child {
  border-bottom: 0;
}

.links a:hover {
  color: var(--blue);
}

[dir="ltr"] .links {
  direction: ltr;
  text-align: left;
}

[dir="rtl"] .links {
  direction: rtl;
  text-align: right;
}

/* Language switch and menu button. */
.actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.lang,
.menu {
  padding: 0.5rem 0.5625rem;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}

.menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}


/* 5. Homepage hero
   ========================================================================== */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 30rem;
  background-color: #102941;
  background-image: url("riyadh-hero.jpg");
  background-image: image-set(url("riyadh-hero.webp") type("image/webp"), url("riyadh-hero.jpg") type("image/jpeg"));
  background-position: 46% center;
  background-repeat: no-repeat;
  background-size: cover;
  color: #fff;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 30rem;
  padding: 2.75rem 0;
}

/* Text block inside the hero. */
.hero-inner > div:first-child {
  width: 100%;
  max-width: 100%;
  margin: 0;
  direction: ltr;
  text-align: left;
}

.hero .eyebrow {
  display: block;
  text-align: inherit;
}

.hero h1 {
  max-width: 40.625rem;
  margin: 0.9375rem 0 1.125rem;
  font-size: clamp(1.875rem, 7.2vw, 2.375rem);
  line-height: 1.13;
  letter-spacing: -0.0875rem;
  text-wrap: balance;
}

.hero p {
  max-width: 35rem;
  margin: 0 0 1.5rem;
  color: #d3dfef;
  font-size: 0.9375rem;
  font-weight: 700;
  line-height: 1.7;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6875rem;
}


/* 6. Homepage sections
   ========================================================================== */

/* 6a. Strip under the hero: capability pills, or partner logos once added. */
.trust {
  border-bottom: 1px solid var(--line);
}

.trust-in {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.25rem 0;
  color: #52647b;
  font-size: 0.75rem;
}

.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pills span {
  padding: 0.375rem 0.6875rem;
  border: 1px solid var(--line);
  border-radius: 99px;
}

.logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.875rem 1.875rem;
}

.logos img {
  width: auto;
  max-width: 8.75rem;
  height: 2rem;
  object-fit: contain;
  filter: grayscale(1);
  opacity: 0.7;
  transition: 0.2s;
}

.logos img:hover {
  filter: none;
  opacity: 1;
}

.logo-text {
  color: #52647b;
  font-size: 0.875rem;
  font-weight: 800;
}

/* Partner logos layout: label on top, logos centred (3 per row on phones). */
.trust.has-logos .trust-in {
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.625rem 0;
}

.trust.has-logos .logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.375rem 0.875rem;
  width: min(100%, 62.5rem);
}

.trust.has-logos .logos img {
  display: block;
  width: calc((100% - 2 * 0.875rem) / 3);
  max-width: 10.625rem;
  height: auto;
  max-height: none;
  filter: none;
  opacity: 0.9;
}

.trust.has-logos .logos img:hover {
  opacity: 1;
}

/* 6b. Service cards. */
.card {
  min-height: 14.375rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  transition: 0.2s;
}

.card:hover {
  border-color: #b4c9e5;
  box-shadow: 0 18px 48px #071b3514;
  transform: translateY(-4px);
}

.ico {
  display: grid;
  place-items: center;
  width: 2.875rem;
  height: 2.875rem;
  margin-bottom: 1rem;
  border-radius: 13px;
  background: #edf5ff;
  color: var(--blue);
}

.ico svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.card h3 {
  margin: 0 0 0.5rem;
  color: #142d51;
  font-size: 1.0625rem;
}

.card p {
  margin: 0 0 0.9375rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

.more {
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 800;
}

.grid.services-grid {
  grid-template-columns: 1fr;
  gap: 0.875rem;
}

.services-grid .card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1.25rem;
}

.services-grid .card h3 {
  font-size: 1rem;
  line-height: 1.35;
}

.services-grid .card p {
  flex: 1;
}

/* 6c. Clients wall (hidden until clients are added in content.js). */
.clients-sec {
  padding-top: 0 !important;
}

/* Flex (not grid) so an incomplete last row stays centred.
   --cols sets how many logos fit per row. */
.client-grid {
  --cols: 2;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.875rem;
}

.client {
  display: grid;
  place-items: center;
  width: calc((100% - (var(--cols) - 1) * 0.875rem) / var(--cols));
  height: 6rem;
  padding: 0.75rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: #52647b;
  font-size: 0.8125rem;
  font-weight: 700;
  text-align: center;
}

/* Logos are prepared on equal transparent canvases (assets/logos/client-*.webp),
   so filling the box gives every logo a similar visual weight. Shown in colour. */
.client img {
  display: block;
  width: 100%;
  height: 4.5rem; /* box height minus vertical padding */
  object-fit: contain;
}

/* 6d. Project cards (hidden until projects are added in content.js). */
.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.0625rem;
}

.project {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.project-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.project-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.375rem;
}

.tag {
  align-self: flex-start;
  padding: 0.25rem 0.625rem;
  border-radius: 99px;
  background: #edf5ff;
  color: var(--blue);
  font-size: 0.6875rem;
  font-weight: 800;
}

.project h3 {
  margin: 0.375rem 0 0.125rem;
  color: #142d51;
  font-size: 1.0625rem;
  line-height: 1.35;
}

/* Short one-paragraph description used by the brief project cards. */
.project-summary {
  flex: 1;
  margin: 0.375rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.65;
}

/* Cards with a project page: the title link covers the whole card. */
.project.has-link {
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.project.has-link:hover,
.project.has-link:focus-within {
  border-color: var(--blue);
  box-shadow: 0 8px 24px rgba(7, 27, 53, 0.08);
}

.project-link {
  color: inherit;
  text-decoration: none;
}

.project-link::after {
  position: absolute;
  inset: 0;
  content: "";
}

.project-more {
  margin-top: 0.75rem;
}

/* Project detail pages (/projects/). */
.project-note {
  margin-top: 1.25rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

.project-related {
  margin: 1.25rem 0 0.5rem;
  color: var(--navy);
  font-size: 0.9375rem;
}

.project-links {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.project-links .more {
  font-size: 0.875rem;
}

.project-client {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.project dl {
  flex: 1;
  margin: 0.375rem 0 0;
  font-size: 0.8125rem;
}

.project dt {
  margin-top: 0.625rem;
  color: #31435d;
  font-weight: 800;
}

.project dd {
  margin: 0.125rem 0 0;
  color: var(--muted);
}

.result {
  margin-top: 1rem;
  padding-top: 0.875rem;
  border-top: 1px solid var(--line);
  color: var(--navy);
  font-size: 0.875rem;
  font-weight: 800;
}

/* 6e. "Why NC Solution" section: text + dark panel. */
.split {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 2.8125rem;
}

.panel {
  position: relative;
  overflow: hidden;
  padding: 2rem;
  border-radius: 21px;
  background: linear-gradient(145deg, #071b35, #0b3c7a);
  color: #fff;
}

.panel h3 {
  font-size: 1.6875rem;
  line-height: 1.2;
}

.panel p {
  color: #cbd8e9;
}

/* 6f. "How we work" steps. */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.875rem;
}

.step {
  padding: 1.25rem;
  border-top: 3px solid #2d75d4;
  border-radius: 0 0 13px 13px;
  background: #fff;
}

.step b {
  color: var(--blue);
  font-size: 0.6875rem;
}

.step h3 {
  margin: 0.4375rem 0;
  font-size: 1rem;
}

.step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
}


/* 7. Service page template
   ========================================================================== */

.pagehero {
  padding: 3.125rem 0;
  background: linear-gradient(115deg, #071b35, #0d3b77);
  color: #fff;
}

.pagehero h1 {
  margin: 0.625rem 0;
  font-size: clamp(2.125rem, 4vw, 3rem);
  line-height: 1.1;
}

.pagehero p {
  max-width: 47.5rem;
  color: #d3e0f1;
}

.pagehero .btn {
  margin-top: 0.375rem;
}

/* Breadcrumb above the page title. */
.crumb {
  margin-bottom: 0.9375rem;
  color: #c4d8f2;
  font-size: 0.75rem;
}

/* "What you get" text + "How we work" box. */
.detail {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5625rem;
}

.box {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.box h2 {
  margin-top: 0;
  color: var(--navy);
}

.box li {
  margin: 0.5rem 0;
  color: var(--muted);
}

/* "Sound familiar?" situation cards. */
.situations {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.0625rem;
  margin-bottom: 1.75rem;
}

.situation {
  padding: 1.375rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
}

.situation h3 {
  margin: 0 0 0.375rem;
  color: #142d51;
  font-size: 1rem;
}

.situation p {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Free tool promo card (AI page → /ai-check). */
.toolcard {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-inline-start: 4px solid var(--blue);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px #0b2b5814;
}

.toolcard h2 {
  margin: 0.375rem 0 0.5rem;
  color: #142d51;
  font-size: 1.5rem;
}

.toolcard p {
  margin: 0;
  max-width: 40rem;
  color: var(--muted);
}

.toolcard .btn {
  flex-shrink: 0;
}

/* Highlighted note (used on the AI page). */
.notebox {
  margin-top: 1.25rem;
  padding: 0.875rem 1rem;
  border: 1px solid #f1dfae;
  border-radius: 12px;
  background: #fff8e6;
  color: #5d4a17;
  font-size: 0.8125rem;
}


/* 8. Contact page & form
   ========================================================================== */

.contact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5625rem;
}

.contact-info {
  padding: 1.625rem;
  border-radius: 17px;
  background: var(--navy);
  color: #fff;
}

.contact-info p {
  color: #c8d8ed;
}

.contact-lines {
  display: grid;
  gap: 0.625rem;
  margin: 1.125rem 0 0;
}

.contact-lines a {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: #fff;
  font-weight: 700;
}

.contact-lines svg {
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  opacity: 0.8;
}

.formbox {
  padding: 1.625rem;
  border: 1px solid var(--line);
  border-radius: 17px;
}

.formgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9375rem;
}

.field {
  display: grid;
  gap: 0.375rem;
  color: #31435d;
  font-size: 0.75rem;
  font-weight: 800;
}

/* Field that spans the full form width (on wider screens). */
.full {
  grid-column: auto;
}

input,
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #cad6e5;
  border-radius: 9px;
  background: #fff;
  font: inherit;
}

textarea {
  resize: vertical;
}

/* Confirmation message shown after the form is submitted. */
.msg {
  display: none;
  margin-top: 0.75rem;
  padding: 0.6875rem;
  border-radius: 9px;
  background: #edf8f0;
  color: #176b35;
}

.note {
  color: var(--muted);
  font-size: 0.75rem;
}


/* 9. Footer
   ========================================================================== */

footer {
  padding: 2.75rem 0 1.125rem;
  background: #06162b;
  color: #fff;
}

.footgrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.footbrand img {
  width: 13.125rem;
  height: 4rem;
  padding: 3px;
  border-radius: 8px;
  background: #fff;
  object-fit: contain;
}

.footgrid p,
.footgrid a {
  color: #b8c8dc;
  font-size: 0.75rem;
}

/* Footer column titles. */
.footgrid h2 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.footlinks {
  display: grid;
  gap: 0.4375rem;
}

.footcontact {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.625rem;
}

.footcontact a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footcontact svg {
  flex: none;
  width: 0.9375rem;
  height: 0.9375rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

/* Copyright line. */
.bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-top: 1.6875rem;
  padding-top: 0.9375rem;
  border-top: 1px solid #ffffff22;
  color: #90a5bf;
  font-size: 0.6875rem;
}


/* 10. Arabic (RTL) adjustments
   --------------------------------------------------------------------------
   Applied when site.js sets <html dir="rtl">. Tajawal is used for Arabic text,
   letter-spacing is removed and line-height increased for readability.
   ========================================================================== */

[dir="rtl"] body {
  font-family: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.8;
}

[dir="rtl"] .eyebrow,
[dir="rtl"] .kicker {
  font-size: 0.875rem;
  letter-spacing: 0;
}

[dir="rtl"] .head h2,
[dir="rtl"] .card h3,
[dir="rtl"] .pagehero h1,
[dir="rtl"] .box h2 {
  font-family: "Tajawal", sans-serif;
  line-height: 1.45;
  letter-spacing: 0;
}

[dir="rtl"] .card p,
[dir="rtl"] .pagehero p,
[dir="rtl"] .head p {
  line-height: 1.9;
}

[dir="rtl"] .hero-inner > div:first-child {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .hero h1 {
  width: 100%;
  margin: 1rem 0 1.25rem;
  font-family: "Tajawal", sans-serif;
  font-size: clamp(1.875rem, 7.5vw, 2.5rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

/* The shadow keeps the Arabic sub-line readable over the city lights. */
[dir="rtl"] .hero p {
  width: 100%;
  margin: 0 0 1.5625rem;
  color: #e1eaf5;
  font-family: "Tajawal", sans-serif;
  font-size: 0.9375rem;
  line-height: 1.8;
  text-align: right;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 0 10px rgba(0, 0, 0, 0.55);
}

[dir="rtl"] .hero .actions-row {
  width: 100%;
}

[dir="rtl"] .hero .actions-row .btn {
  white-space: normal;
}


/* 11. Larger screens
   ========================================================================== */

/* 541px+ : two-column grids, five partner logos per row. */
@media (min-width: 33.8125em) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid.services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-grid,
  .situations {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .formgrid {
    grid-template-columns: 1fr 1fr;
  }

  .full {
    grid-column: 1 / -1;
  }

  .footgrid {
    grid-template-columns: 1fr 1fr;
  }

  .trust.has-logos .logos {
    gap: 0.625rem 1.75rem;
  }

  .trust.has-logos .logos img {
    width: calc((100% - 4 * 1.75rem) / 5);
  }
}

/* 761px+ : tablet layout. */
@media (min-width: 47.5625em) {
  .client-grid {
    --cols: 5;
  }

  section.content {
    padding: 4.875rem 0;
  }

  .head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1.75rem;
  }

  .head p {
    margin: 0;
  }

  .split {
    grid-template-columns: 1fr 1fr;
  }

  .detail {
    grid-template-columns: 1.5fr 0.8fr;
  }

  .contact {
    grid-template-columns: 0.75fr 1.25fr;
  }

  .trust-in {
    flex-direction: row;
    align-items: center;
  }

  .cta,
  .toolcard {
    flex-direction: row;
    align-items: center;
  }

  /* Header */
  .brand {
    min-width: auto;
  }

  .brand img {
    height: 4rem;
  }

  .lang,
  .menu {
    padding: 0.5625rem 0.6875rem;
  }

  /* Hero: wider text area pushed toward the outer edge, smaller headline. */
  .hero {
    min-height: 32.5rem;
    background-position: center 40%;
  }

  .hero .container.hero-inner {
    width: min(85rem, 94%);
  }

  .hero-inner {
    min-height: 32.5rem;
    padding: 4rem 0;
  }

  .hero-inner > div:first-child {
    width: min(42.5rem, 58%);
    max-width: 42.5rem;
  }

  [dir="rtl"] .hero-inner > div:first-child {
    max-width: 40.625rem;
  }

  .hero h1 {
    font-size: clamp(1.875rem, 2.9vw, 2.75rem);
  }

  [dir="rtl"] .hero h1 {
    font-size: clamp(1.875rem, 3.1vw, 2.875rem);
  }

  .hero p {
    font-size: 1rem;
  }

  [dir="rtl"] .hero p {
    font-size: 0.9375rem;
  }
}

/* 901px+ : header height and drop-down panel inset from the edges. */
@media (min-width: 56.3125em) {
  .nav {
    min-height: 4.875rem;
  }

  .actions {
    margin-left: 0;
  }

  .links {
    right: 4%;
    left: 4%;
    justify-content: center;
    gap: 0.5625rem;
    padding: 0.875rem 1.125rem;
    box-shadow: 0 15px 35px #071b3520;
    white-space: nowrap;
  }

  .links a {
    padding: 0.625rem 0.5rem;
    border-bottom-color: #eef2f7;
  }
}

/* 981px+ : three- and four-column grids, four-column footer. */
@media (min-width: 61.3125em) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid.services-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* Project cards stay two per row on wide screens so an even number of
     projects (4, 6) forms neat rows without a lone card at the end. */
  .situations {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .steps {
    grid-template-columns: repeat(4, 1fr);
  }

  .footgrid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}

/* 1101px+ : five service cards per row. */
@media (min-width: 68.8125em) {
  .nav {
    gap: 0.875rem;
  }

  .links {
    gap: clamp(0.625rem, 1.15vw, 1.0625rem);
    font-size: 0.8125rem;
  }

  .grid.services-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .services-grid .card {
    min-height: 15.625rem;
  }

}

/* 1181px+ : full desktop — navigation links inline, menu button hidden. */
@media (min-width: 73.8125em) {
  .nav {
    gap: clamp(0.625rem, 1.5vw, 1.25rem);
  }

  .brand img {
    width: 13.125rem;
  }

  .menu {
    display: none;
  }

  .links {
    position: static;
    z-index: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
  }

  .links a {
    display: block;
    width: auto;
    padding: 0;
    border-bottom: 0;
    font-size: inherit;
    line-height: inherit;
    white-space: nowrap;
  }
}


/* 12. News & Insights (news.html and news/*.html)
   --------------------------------------------------------------------------
   Pages are generated by scripts/build-news.mjs from news/posts/*.json.
   ========================================================================== */

.news-schedule {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  max-width: 47.5rem;
  margin: 1.25rem 0 0;
  padding: 0.75rem 1rem;
  border: 1px solid #ffffff2e;
  border-radius: 12px;
  background: #ffffff12;
  color: #e6eefa;
  font-size: 0.875rem;
  font-weight: 600;
}

.news-dot {
  flex: 0 0 auto;
  width: 0.5rem;
  height: 0.5rem;
  margin-top: 0.5rem;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 4px #4ade8033;
}

.news-issue {
  margin: 2.25rem 0 1rem;
  padding-bottom: 0.625rem;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
  font-size: 1.125rem;
}

.news-list > .news-issue:first-child {
  margin-top: 0;
}

.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.news-card {
  display: flex;
  flex-direction: column;
  padding: 1.375rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  transition: 0.2s;
}

.news-card:hover {
  border-color: #b4c9e5;
  box-shadow: 0 18px 48px #071b3514;
}

.news-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.tag-region {
  background: #eef2f6;
  color: #34445d;
}

.pagehero .tag {
  background: #ffffff1f;
  color: #fff;
}

.news-card h3 {
  margin: 0.75rem 0 0.5rem;
  color: #142d51;
  font-size: 1.0625rem;
  line-height: 1.35;
}

.news-card h3 a:hover {
  color: var(--blue);
}

.news-card p {
  flex: 1;
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.news-card-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid #edf1f6;
}

.news-source {
  color: var(--muted);
  font-size: 0.75rem;
}

.news-empty {
  max-width: 40rem;
  padding: 2rem;
  border: 1px dashed #b4c9e5;
  border-radius: 16px;
  background: var(--pale);
}

.news-empty h2 {
  margin: 0 0 0.5rem;
  color: var(--navy);
  font-size: 1.25rem;
}

.news-empty p {
  margin: 0;
  color: var(--muted);
}

/* Article page. */
.news-title {
  max-width: 52rem;
  font-size: clamp(1.75rem, 3.4vw, 2.5rem) !important;
}

.news-meta {
  margin: 0;
  font-size: 0.875rem;
}

.news-meta a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.news-article {
  max-width: 47.5rem;
}

.news-body {
  color: #26364f;
  font-size: 1rem;
  line-height: 1.75;
  text-align: left;
}

.news-body h2 {
  margin: 2rem 0 0.5rem;
  color: var(--navy);
  font-size: 1.25rem;
}

.news-lead {
  margin-top: 0;
  color: var(--navy);
  font-size: 1.125rem;
  font-weight: 600;
}

.news-impact {
  margin: 2rem 0;
  padding: 1.5rem;
  border-left: 4px solid var(--blue);
  border-radius: 12px;
  background: #edf5ff;
}

.news-impact h2 {
  margin-top: 0;
}

.news-impact p {
  margin: 0 0 0.75rem;
}

/* Guides (/guides/): bilingual long-form articles built on the news article styles. */
[dir="rtl"] .guide-body {
  text-align: right;
}

.guide-list {
  padding-inline-start: 1.25rem;
}

.guide-list li {
  margin: 0.5rem 0;
}

.guide-terms div {
  margin: 1rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.guide-terms dt {
  color: var(--navy);
  font-weight: 800;
}

.guide-terms dd {
  margin: 0.25rem 0 0;
}

.guide-sources {
  margin: 0.25rem 0 0;
  padding-inline-start: 1.25rem;
}

.guide-sources a {
  overflow-wrap: anywhere;
}

.toolcard .guide-link {
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.875rem;
}

.guide-more {
  margin: 1.5rem 0 0;
  text-align: center;
}

.guide-more .more {
  font-size: 0.9375rem;
}

.news-sourcebox {
  padding: 1.125rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.875rem;
}

.news-sourcebox strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--navy);
}

.news-sourcebox a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.news-sourcebox p {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.8125rem;
}

.news-back {
  display: inline-block;
  margin-top: 1.5rem;
  color: var(--blue);
  font-weight: 800;
}

@media (min-width: 47.5625em) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 61.3125em) {
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}


/* 13. Free domain security check (domain-check.html)
   ==========================================================================
   Form in the dark page header, then a score and one card per check.
   ========================================================================== */

.dc-form {
  max-width: 40rem;
  margin-top: 1.5rem;
}

.dc-label {
  display: block;
  margin-bottom: 0.5rem;
  color: #d3e0f1;
  font-size: 0.8125rem;
  font-weight: 700;
}

.dc-row {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.dc-row input {
  flex: 1;
  min-width: 0;
  padding: 0.875rem 1rem;
  border: 1px solid #ffffff33;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
}

.dc-row input:focus {
  outline: 3px solid #9ccaff;
  outline-offset: 1px;
}

.dc-row .btn {
  margin-top: 0;
  padding: 0.875rem 1.5rem;
  font-size: 0.9375rem;
}

.dc-row .btn:disabled {
  opacity: 0.7;
  cursor: wait;
}

.pagehero .dc-error {
  margin: 0.75rem 0 0;
  padding: 0.625rem 0.875rem;
  border-radius: 10px;
  background: #ffe3e3;
  color: #8a1c1c;
  font-size: 0.875rem;
}

.pagehero .dc-privacy {
  margin: 0.75rem 0 0;
  color: #9fb6d6;
  font-size: 0.8125rem;
}

/* Score and verdict */
.dc-summary {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.dc-summary h2 {
  margin: 0.25rem 0;
  color: #142d51;
  font-size: 1.375rem;
  line-height: 1.3;
}

.dc-domain {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
}

.dc-score {
  display: flex;
  flex-shrink: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 6.5rem;
  height: 6.5rem;
  border: 6px solid var(--line);
  border-radius: 50%;
  color: #142d51;
}

.dc-score b {
  font-size: 2rem;
  line-height: 1;
}

.dc-score span {
  color: var(--muted);
  font-size: 0.75rem;
}

.dc-score.good { border-color: #1f9d55; }
.dc-score.mid { border-color: #e0a100; }
.dc-score.bad { border-color: #d64545; }

/* Check cards */
.dc-checks {
  display: grid;
  gap: 0.875rem;
  margin: 0 0 1.75rem;
  padding: 0;
  list-style: none;
}

.dc-check {
  display: flex;
  gap: 0.875rem;
  padding: 1.125rem;
  border: 1px solid var(--line);
  border-inline-start-width: 4px;
  border-radius: 14px;
  background: #fff;
}

.dc-check.pass { border-inline-start-color: #1f9d55; }
.dc-check.warn { border-inline-start-color: #e0a100; }
.dc-check.fail { border-inline-start-color: #d64545; }
.dc-check.unknown { border-inline-start-color: #8a9bb3; }

.dc-icon {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 800;
}

.pass .dc-icon { background: #1f9d55; }
.warn .dc-icon { background: #e0a100; }
.fail .dc-icon { background: #d64545; }
.unknown .dc-icon { background: #8a9bb3; }

.dc-body {
  min-width: 0;
}

.dc-top {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.dc-tag {
  color: var(--blue);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.0625rem;
}

.dc-status {
  color: var(--muted);
  font-size: 0.75rem;
}

.dc-body h3 {
  margin: 0.25rem 0 0.375rem;
  color: #142d51;
  font-size: 1rem;
}

.dc-body p {
  margin: 0 0 0.375rem;
  color: var(--muted);
  font-size: 0.875rem;
  overflow-wrap: anywhere;
}

.dc-body .dc-fix {
  color: var(--ink);
  font-weight: 600;
}

.dc-body code {
  display: block;
  margin-top: 0.375rem;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  background: #f1f5fa;
  color: #142d51;
  font-size: 0.8125rem;
  text-align: left;
  overflow-wrap: anywhere;
}

.dc-again {
  margin: 1.25rem 0 0;
  text-align: center;
}

.dc-link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

@media (min-width: 33.8125em) {
  .dc-row {
    flex-direction: row;
  }
}

@media (min-width: 47.5625em) {
  .dc-explain {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 61.3125em) {
  .dc-explain {
    grid-template-columns: repeat(4, 1fr);
  }
}
