/* ============================================
   كريميديا — الأنماط الأساسية
   ============================================ */

:root {
  --color-bg: #0a0a0a;
  --color-bg-elevated: #121212;
  --color-bg-alt: #111111;
  --color-surface: #1a1a1a;
  --color-gold: #c59b27;
  --color-gold-soft: #d4b04a;
  --color-gold-dim: rgba(197, 155, 39, 0.18);
  --color-text: #f2f2f2;
  --color-text-muted: #b8b8b8;
  --color-border: rgba(197, 155, 39, 0.28);
  --font-main: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1.25rem;
  --space-lg: 2rem;
  --space-xl: 3.5rem;
  --space-2xl: 5.5rem;
  --radius: 0.35rem;
  --nav-height: 4.25rem;
  /* ارتفاع الشريط الثابت (min-height + حدود علوية/سفلية) */
  --public-nav-offset: calc(var(--nav-height) + 2px);
  --public-page-breadcrumb-gap: 1.375rem; /* 22px — مسافة أسفل الشريط قبل مسار التنقل */
  --max-width: 70rem;
  --transition: 0.25s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  scroll-padding-top: calc(var(--nav-height) + 0.75rem);
  max-width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-main);
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--color-text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(197, 155, 39, 0.12), transparent 55%),
    linear-gradient(180deg, #0d0d0d 0%, var(--color-bg) 40%, #080808 100%);
  background-attachment: fixed;
  min-height: 100vh;
  overflow-x: clip;
  max-width: 100%;
  width: 100%;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-gold);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-gold-soft);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3 {
  line-height: 1.3;
  font-weight: 700;
  margin: 0 0 var(--space-md);
  color: var(--color-text);
}

h1 {
  font-size: clamp(1.85rem, 4.5vw, 2.85rem);
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2rem);
  color: var(--color-gold);
}

h3 {
  font-size: 1.15rem;
  margin-bottom: var(--space-xs);
}

p {
  margin: 0 0 var(--space-md);
  color: var(--color-text-muted);
}

.container {
  width: min(100% - 2rem, var(--max-width));
  margin-inline: auto;
}

.narrow {
  max-width: 42rem;
}

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -100%;
  z-index: 1000;
  padding: 0.65rem 1rem;
  background: var(--color-gold);
  color: #111;
  font-weight: 700;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 0.75rem;
  color: #111;
}

/* ---------- Header ---------- */

.site-header {
  position: relative;
  z-index: 100;
}

.header-banner {
  width: min(100%, 1400px);
  margin-inline: auto;
  padding: 0;
  line-height: 0;
  background: #000;
}

.header-banner__img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
}

.nav-bar {
  --nav-navy-start: #071426;
  --nav-navy-end: #102b48;
  position: relative;
  top: auto;
  z-index: 1;
  width: min(100%, 1400px);
  margin-inline: auto;
  background: linear-gradient(
    105deg,
    var(--nav-navy-start) 0%,
    var(--nav-navy-end) 48%,
    var(--nav-navy-start) 100%
  );
  border-top: 1px solid var(--color-gold);
  border-bottom: 1px solid var(--color-gold);
  overflow: hidden;
}

.nav-bar::before,
.nav-bar::after {
  content: "";
  position: absolute;
  top: -20%;
  bottom: -20%;
  width: min(5.5rem, 18vw);
  pointer-events: none;
  z-index: 0;
  opacity: 0.28;
  background:
    repeating-linear-gradient(
      -38deg,
      transparent 0 11px,
      rgba(197, 155, 39, 0.55) 11px 12px,
      transparent 12px 22px
    ),
    linear-gradient(
      180deg,
      rgba(197, 155, 39, 0.12),
      transparent 40%,
      transparent 60%,
      rgba(197, 155, 39, 0.1)
    );
}

.nav-bar::before {
  inset-inline-start: 0;
  transform: skewX(-12deg);
  transform-origin: top start;
}

.nav-bar::after {
  inset-inline-end: 0;
  transform: skewX(-12deg);
  transform-origin: top end;
}

/* الرئيسية: الشريط يتحرك مع الصفحة (البانر لا يُثبَّت معه) */
.site-header--home .nav-bar {
  position: relative;
  top: auto;
}

.header-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--nav-height);
  gap: var(--space-md);
}

.nav-bar .header-inner {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  padding-inline: 24px;
  box-sizing: border-box;
}

/* الرئيسية: شعار+أزرار | روابط في المنتصف */
.nav-bar .header-inner--home {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(0.35rem, 1vw, var(--space-sm));
  row-gap: 0.35rem;
}

.header-home-lead {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem 0.65rem;
  min-width: 0;
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  max-width: 100%;
  flex-shrink: 1;
}

.header-inner--home .brand {
  flex: 0 1 auto;
  max-width: min(148px, 100%);
}

.header-home-ctas {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.header-home-ctas .btn--nav-cta {
  width: auto;
  min-height: 2.25rem;
  padding: 0.3rem 0.75rem;
  font-size: 0.86rem;
  line-height: 1.2;
  white-space: nowrap;
}

.header-inner--home .nav-toggle {
  display: none;
  grid-column: 1;
  grid-row: 1;
}

/* الرئيسية — عرض عريض: Flex (بدون display:contents لتفادي تمدد عرض المستند) */
@media (min-width: 1181px) {
  .nav-bar .header-inner--home {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(0.65rem, 1.15vw, 1.1rem);
  }

  .header-home-lead {
    flex: 0 0 auto;
    width: auto;
    max-width: min(168px, 20vw);
    grid-column: unset;
    grid-row: unset;
  }

  .header-inner--home .nav-toggle {
    display: none;
  }

  .header-inner--home .primary-nav {
    display: flex;
    flex: 1 1 auto;
    min-width: 0;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(0.25rem, 0.6vw, 0.55rem);
    overflow: visible;
  }

  .header-inner--home .primary-nav__list {
    grid-column: unset;
    flex: 0 1 auto;
    min-width: 0;
    width: auto;
    max-width: 100%;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0;
  }

  .header-inner--home .primary-nav__list li {
    flex: 0 0 auto;
  }

  .header-inner--home .primary-nav__list a {
    white-space: nowrap;
  }

  .header-inner--home .primary-nav__list > li {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
  }

  .header-inner--home .primary-nav__list > li:not(.primary-nav__item--mega):not(:last-child)::after,
  .header-inner--home .primary-nav__list > li.primary-nav__item--mega:not(:last-child) .primary-nav__mega-row::after {
    content: "|";
    color: rgba(197, 155, 39, 0.55);
    font-weight: 400;
    font-size: 0.95em;
    line-height: 1;
    pointer-events: none;
    user-select: none;
    padding-inline: clamp(0.4rem, 0.55vw, 0.72rem);
  }

  .header-inner--home .primary-nav__list > li.primary-nav__item--mega:not(:last-child) .primary-nav__mega-row {
    display: inline-flex;
    align-items: center;
  }

  .header-inner--home .nav-admin-link {
    grid-column: unset;
    flex: 0 0 auto;
    justify-self: auto;
    margin-inline-end: 0;
    white-space: nowrap;
  }
}

/* صفحات داخلية: Flex — لا شبكة الرئيسية ولا display:contents */
.header-inner--public {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.75rem;
  min-width: 0;
  max-width: 100%;
}

.header-inner--public .header-home-lead {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  grid-column: unset;
  grid-row: unset;
}

.header-inner--public .nav-toggle {
  flex: 0 0 auto;
  margin-inline-start: auto;
  display: inline-flex;
}

.header-inner--public .primary-nav {
  display: none;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  order: 2;
}

.header-inner--public .primary-nav.is-open {
  display: block;
}

.header-inner--public .primary-nav__list {
  grid-column: unset;
  justify-self: stretch;
  width: 100%;
  flex-wrap: wrap;
}

@media (min-width: 1181px) {
  /* صفحات داخلية عريضة: صف واحد مثل الرئيسية؛ صف ثانٍ فقط عند التكديس (.header-inner--nav-wrap) */
  .nav-bar .header-inner--public {
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(0.5rem, 1vw, 1.15rem);
  }

  .header-inner--public .header-home-lead {
    flex: 0 0 auto;
    max-width: min(168px, 20vw);
  }

  .site-header--public .header-inner--public .header-home-lead {
    flex: 0 0 auto;
    overflow: visible;
    max-width: min(168px, 20vw);
  }

  .header-inner--public .nav-toggle {
    display: none;
  }

  .header-inner--public .primary-nav,
  .header-inner--public .primary-nav.is-open {
    display: flex;
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
    order: unset;
    align-items: center;
    justify-content: flex-start;
    overflow: visible;
  }

  .header-inner--public .primary-nav__list {
    flex: 0 1 auto;
    min-width: 0;
    width: auto;
    max-width: 100%;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: clamp(0.35rem, 0.65vw, 1.25rem);
  }

  .header-inner--public .primary-nav__list > li {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
  }

  .header-inner--public .primary-nav__list > li:not(.primary-nav__item--mega):not(:last-child)::after,
  .header-inner--public .primary-nav__list > li.primary-nav__item--mega:not(:last-child) .primary-nav__mega-row::after {
    content: "|";
    color: rgba(197, 155, 39, 0.55);
    font-weight: 400;
    font-size: 0.95em;
    line-height: 1;
    pointer-events: none;
    user-select: none;
    padding-inline: clamp(0.4rem, 0.55vw, 0.72rem);
  }

  .header-inner--public .primary-nav__list > li.primary-nav__item--mega:not(:last-child) .primary-nav__mega-row {
    display: inline-flex;
    align-items: center;
  }

  .header-inner--public .primary-nav__list a,
  .header-inner--public .nav-admin-link {
    white-space: nowrap;
  }

  .site-header--compact.site-header--public .nav-bar {
    overflow-x: visible;
  }

  .header-inner--public.header-inner--nav-wrap {
    flex-wrap: wrap;
    row-gap: 0.35rem;
  }

  .header-inner--public.header-inner--nav-wrap .primary-nav {
    flex: 1 1 100%;
    width: 100%;
    justify-content: center;
  }

  .header-inner--public.header-inner--nav-wrap .primary-nav__list {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.2rem;
    width: 100%;
  }
}

@media (max-width: 1180px) {
  .header-inner--public .primary-nav__list > li::after,
  .header-inner--public .primary-nav__list > li .primary-nav__mega-row::after,
  .header-inner--home .primary-nav__list > li::after,
  .header-inner--home .primary-nav__list > li .primary-nav__mega-row::after {
    content: none !important;
    padding: 0 !important;
  }
}

/* الرئيسية: عند ضيق العرض — قائمة جوال بدل تكديس الروابط */
@media (max-width: 1180px) {
  .nav-bar .header-inner--home {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .header-home-lead {
    grid-column: 1;
    grid-row: 1;
  }

  .header-inner--home .nav-toggle {
    display: inline-flex;
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
  }

  .header-inner--home .primary-nav {
    display: none;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    position: static;
    inset: auto;
    margin: 0;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    border-top: 1px solid rgba(197, 155, 39, 0.35);
    padding: var(--space-sm) 0 var(--space-md);
    background: transparent;
  }

  .header-inner--home .primary-nav.is-open {
    display: block;
  }

  .header-inner--home .primary-nav__list {
    grid-column: auto;
    justify-self: stretch;
    flex-wrap: wrap;
    width: 100%;
  }

  .header-inner--home .nav-admin-link {
    grid-column: auto;
    justify-self: stretch;
    margin-inline-end: 0;
    margin-top: 0.35rem;
  }
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 1;
  min-width: 0;
  max-width: min(160px, 100%);
}

.brand__frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 6px;
  background: linear-gradient(135deg, #74a4c6, #aacbe0);
  border: 1px solid rgba(197, 155, 39, 0.6);
  border-radius: var(--radius);
}

.brand__logo {
  display: block;
  width: 160px;
  max-width: 100%;
  height: auto;
}

.brand:hover .brand__frame,
.brand:focus-visible .brand__frame {
  box-shadow: 0 0 0 1px var(--color-gold);
}

.primary-nav__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 1.5rem;
}

.primary-nav__link-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  vertical-align: middle;
}

.primary-nav__icon {
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: rgba(197, 155, 39, 0.88);
}

.primary-nav__link-text {
  line-height: 1.35;
}

.primary-nav__list a {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.primary-nav__mega-link {
  display: inline-flex;
  align-items: center;
}

.primary-nav__list a:hover .primary-nav__icon,
.primary-nav__list a:focus-visible .primary-nav__icon,
.primary-nav__list a.is-active .primary-nav__icon,
.primary-nav__list a[aria-current="page"] .primary-nav__icon {
  color: var(--color-gold);
}

.primary-nav__list a:hover,
.primary-nav__list a:focus-visible,
.primary-nav__list a.is-active,
.primary-nav__list a[aria-current="page"],
.primary-nav__list a[aria-current="true"] {
  color: var(--color-gold);
  border-bottom-color: var(--color-gold);
}

.nav-admin-link {
  display: inline-flex;
  align-items: center;
  color: #ff4545;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.98rem;
  line-height: 1.4;
  padding: 0.35rem 0;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  text-decoration: none;
  white-space: nowrap;
}

.nav-admin-link:hover,
.nav-admin-link:focus-visible {
  color: #ff6b6b;
  border-bottom-color: #ff6b6b;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 0.55rem;
  min-height: 2.75rem;
  padding: 0.45rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-gold-dim);
  color: var(--color-gold);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.nav-toggle__icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 1.15rem;
  flex-shrink: 0;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-gold);
  transition: transform var(--transition), opacity var(--transition);
}

.nav-toggle[aria-expanded="true"] {
  background: rgba(197, 155, 39, 0.28);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-toggle__label::before {
  content: "القائمة";
}

.nav-toggle[aria-expanded="true"] .nav-toggle__label::before {
  content: "إغلاق";
}

/* ---------- News ticker ---------- */

.news-ticker {
  margin-top: 12px;
  padding: 0;
}

.news-ticker + .section {
  padding-top: 32px;
}

.news-ticker[hidden] {
  display: none;
}

.news-ticker__frame {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #0d0d0d;
  overflow: hidden;
}

.news-ticker__label {
  margin: 0;
  padding: 0.2rem 0.55rem;
  border-inline-end: 1px solid var(--color-border);
  color: var(--color-gold);
  font-size: 0.92rem;
  font-weight: 700;
  white-space: nowrap;
}

.news-ticker__viewport {
  min-width: 0;
  overflow: hidden;
  /* عزل اتجاه المسار عن RTL الصفحة حتى يبدأ المحتوى من يسار النافذة */
  direction: ltr;
  text-align: left;
  mask-image: linear-gradient(
    to left,
    transparent 0,
    #000 1.25rem,
    #000 calc(100% - 1.25rem),
    transparent 100%
  );
}

.news-ticker__track {
  --news-ticker-distance: 0px;
  --news-ticker-duration: 20s;
  display: flex;
  width: max-content;
  align-items: center;
  gap: 0;
  /* LTR لترتيب النسخ؛ حركة الشاشة من اليسار إلى اليمين عبر translateX سالب → صفر */
  direction: ltr;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  animation: none;
}

.news-ticker__track.is-ready {
  animation: news-ticker-scroll var(--news-ticker-duration) linear infinite;
  animation-delay: 0s;
}

.news-ticker.is-paused .news-ticker__track {
  animation-play-state: paused;
}

.news-ticker__set {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  flex-shrink: 0;
  gap: 1.1rem;
  padding-inline: 1.1rem;
  box-sizing: border-box;
}

.news-ticker__item {
  display: inline-block;
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1.4;
}

.news-ticker__item--link {
  color: var(--color-gold-soft);
  text-decoration: none;
}

.news-ticker__item--link:hover,
.news-ticker__item--link:focus-visible {
  color: var(--color-gold);
  text-decoration: underline;
}

.news-ticker__separator {
  color: var(--color-gold);
  font-size: 0.7rem;
  line-height: 1;
  opacity: 0.9;
}

.news-ticker__toggle {
  min-width: 3.1rem;
  min-height: 2.15rem;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: rgba(197, 155, 39, 0.12);
  color: var(--color-gold);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.news-ticker__toggle:hover,
.news-ticker__toggle:focus-visible {
  background: var(--color-gold-dim);
  border-color: var(--color-gold);
}

.news-ticker.is-static .news-ticker__viewport {
  mask-image: none;
  overflow: visible;
}

.news-ticker.is-static .news-ticker__track {
  display: block;
  width: 100%;
  direction: rtl;
  animation: none;
  will-change: auto;
}

.news-ticker.is-static .news-ticker__set {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 0.55rem 1rem;
  padding-inline: 0;
}

.news-ticker.is-static .news-ticker__item {
  white-space: normal;
}

/* عرض دورة واحدة من JS؛ المسار يتحرك يمينًا (من -distance إلى 0) فيزيد موضع المحتوى أفقيًا */
@keyframes news-ticker-scroll {
  from {
    transform: translate3d(calc(-1 * var(--news-ticker-distance)), 0, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .news-ticker__track,
  .news-ticker__track.is-ready {
    animation: none;
    transform: none;
  }
}

@media (max-width: 768px) {
  .news-ticker + .section {
    padding-top: 24px;
  }

  .news-ticker__frame {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "label toggle"
      "viewport viewport";
    gap: 0.55rem 0.65rem;
    padding: 0.55rem 0.65rem;
  }

  .news-ticker__label {
    grid-area: label;
    border-inline-end: 0;
    padding: 0;
    font-size: 0.88rem;
  }

  .news-ticker__viewport {
    grid-area: viewport;
    mask-image: linear-gradient(
      to left,
      transparent 0,
      #000 0.75rem,
      #000 calc(100% - 0.75rem),
      transparent 100%
    );
  }

  .news-ticker__toggle {
    grid-area: toggle;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.btn--primary {
  background: var(--color-gold);
  color: #111;
}

.btn--primary:hover {
  background: var(--color-gold-soft);
  color: #111;
}

.btn--ghost {
  background: transparent;
  color: var(--color-gold);
  border-color: var(--color-gold);
}

.btn--ghost:hover {
  background: var(--color-gold-dim);
  color: var(--color-gold-soft);
}

.btn--whatsapp {
  gap: 0.55rem;
  background: var(--color-gold);
  color: #111;
}

.btn--whatsapp:hover {
  background: var(--color-gold-soft);
  color: #111;
}

.btn__icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

/* ---------- Sections ---------- */

.section {
  padding: var(--space-2xl) 0;
}

.section--alt {
  background: var(--color-bg-alt);
  border-block: 1px solid rgba(255, 255, 255, 0.04);
}

.section__header {
  margin-bottom: var(--space-xl);
}

.section__header p {
  margin: 0;
  max-width: 36rem;
}

/* ---------- Services ---------- */

.services-section {
  position: relative;
  overflow: hidden;
}

.services-layout {
  position: relative;
  display: flex;
  flex-direction: column;
}

.services-content__header {
  position: relative;
  z-index: 2;
  margin-bottom: var(--space-lg);
  max-width: min(100%, 42rem);
  background: transparent;
}

.services-body {
  position: relative;
  z-index: 2;
  display: block;
}

.services-content {
  position: relative;
  z-index: 2;
  width: min(100%, 66%);
  margin-left: auto;
  margin-right: 0;
  background: transparent;
}

/* Soft dark veil behind copy only — no hard edge, texts stay fully opaque */
.services-content::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: -0.75rem;
  right: -0.5rem;
  bottom: -0.75rem;
  left: -2.75rem;
  pointer-events: none;
  background: linear-gradient(
    to left,
    rgba(10, 10, 10, 0.82) 0%,
    rgba(10, 10, 10, 0.58) 32%,
    rgba(10, 10, 10, 0.28) 62%,
    rgba(10, 10, 10, 0.08) 82%,
    transparent 100%
  );
}

.services-list {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-lg) var(--space-xl);
  background: transparent;
}

.services-list li {
  position: relative;
  padding-top: var(--space-md);
  border-top: 0;
  background: transparent;
}

/* Gold rules shortened from the image (left) side so they clear the hologram */
.services-list li::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 18%;
  height: 2px;
  background: var(--color-gold);
  pointer-events: none;
}

.services-list li:nth-child(2n)::before {
  left: 42%;
}

.services-list li::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0.15rem;
  right: -0.55rem;
  bottom: 0.1rem;
  left: -0.85rem;
  pointer-events: none;
  background: radial-gradient(
    ellipse 115% 95% at 100% 40%,
    rgba(8, 8, 8, 0.55) 0%,
    rgba(8, 8, 8, 0.28) 48%,
    transparent 74%
  );
}

.services-list h3 a {
  color: inherit;
  text-decoration: none;
}

.services-list h3 a:hover,
.services-list h3 a:focus-visible {
  color: var(--color-gold-soft);
  text-decoration: underline;
}

.services-list h3 {
  position: relative;
  color: var(--color-text);
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.75),
    0 0 14px rgba(0, 0, 0, 0.45);
}

.services-list p {
  position: relative;
  margin: 0;
  font-size: 0.98rem;
  color: var(--color-text-muted);
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.7),
    0 0 12px rgba(0, 0, 0, 0.4);
}

.services-list__thumb {
  position: relative;
  display: block;
  width: min(100%, 11.5rem);
  margin: 0 0 0.55rem;
  border: 1px solid rgba(197, 155, 39, 0.35);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}

.services-list__thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

a.services-list__thumb:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
}

.services-list__actions {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  margin: 0.65rem 0 0;
}

.services-list__actions .btn {
  margin: 0;
}

.services-status {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(212, 175, 55, 0.35);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.35);
  color: var(--color-text);
}

.services-status__title {
  margin: 0 0 0.35rem;
  font-weight: 700;
  color: var(--color-gold);
}

.services-status p {
  margin: 0;
  color: var(--color-text-muted);
}

.services-status--error {
  border-color: rgba(220, 80, 80, 0.45);
}

.services-status--error .services-status__title {
  color: #f0a0a0;
}

.services-more {
  position: relative;
  z-index: 1;
  margin: var(--space-lg) 0 0;
}

.services-more .btn {
  width: auto;
}

.services-visual {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  width: auto;
  max-width: none;
  height: auto;
  margin: 0;
  pointer-events: none;
  background: transparent;
}

.services-visual__img {
  display: block;
  width: auto;
  max-width: none;
  height: 100%;
  border: 0;
  border-radius: 0;
  object-fit: contain;
  object-position: left top;
  /* Keep face / hands / AI solid; soft-fade only the right glow under copy */
  -webkit-mask-image:
    linear-gradient(
      to bottom,
      #000 0%,
      #000 88%,
      rgba(0, 0, 0, 0.55) 95%,
      transparent 100%
    ),
    linear-gradient(
      to right,
      #000 0%,
      #000 60%,
      rgba(0, 0, 0, 0.88) 72%,
      rgba(0, 0, 0, 0.45) 84%,
      rgba(0, 0, 0, 0.15) 93%,
      transparent 100%
    );
  mask-image:
    linear-gradient(
      to bottom,
      #000 0%,
      #000 88%,
      rgba(0, 0, 0, 0.55) 95%,
      transparent 100%
    ),
    linear-gradient(
      to right,
      #000 0%,
      #000 60%,
      rgba(0, 0, 0, 0.88) 72%,
      rgba(0, 0, 0, 0.45) 84%,
      rgba(0, 0, 0, 0.15) 93%,
      transparent 100%
    );
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* ---------- Work portfolio ---------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-lg);
}

.work-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100%;
}

.work-card__trigger {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  cursor: zoom-in;
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.work-card__trigger:hover,
.work-card__trigger:focus-visible {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 1px rgba(197, 155, 39, 0.35);
}

.work-card__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(197, 155, 39, 0.06), transparent 45%),
    #0f0f0f;
}

.work-card__media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  object-position: center;
}

.work-card__category {
  margin: var(--space-sm) 0 0;
  color: var(--color-gold);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: start;
}

.work-card__title {
  margin: var(--space-md) 0 var(--space-xs);
  color: var(--color-gold);
  font-size: 1.1rem;
  text-align: start;
}

.work-card__category + .work-card__title {
  margin-top: 0.35rem;
}

.work-card__desc {
  margin: 0;
  font-size: 0.98rem;
  color: var(--color-text-muted);
  text-align: start;
}

.work-more {
  display: flex;
  justify-content: center;
  margin: var(--space-xl) 0 0;
}

.work-more .btn {
  width: auto;
}

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
}

.lightbox__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(100%, 56rem);
  max-height: min(92vh, 56rem);
  padding: 0.75rem;
  background: #111;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.lightbox__close {
  align-self: flex-start;
  margin-bottom: 0.75rem;
  min-height: 2.5rem;
  padding: 0.45rem 1rem;
  border: 1px solid var(--color-gold);
  border-radius: var(--radius);
  background: var(--color-gold);
  color: #111;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
}

.lightbox__close:hover {
  background: var(--color-gold-soft);
}

.lightbox__img {
  display: block;
  width: 100%;
  max-height: calc(92vh - 5rem);
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  background: #0a0a0a;
}

body.lightbox-open {
  overflow: hidden;
}

/* ---------- Back to top ---------- */

.back-to-top {
  --back-to-top-size: 3rem;
  --back-to-top-screen-inset: 16px;
  --back-to-top-content-gap: 16px;
  position: fixed;
  left: var(--back-to-top-screen-inset);
  bottom: 24px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--back-to-top-size);
  height: var(--back-to-top-size);
  min-width: 48px;
  min-height: 48px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--color-gold);
  border-radius: var(--radius);
  background: rgba(10, 10, 10, 0.92);
  color: var(--color-gold);
  cursor: pointer;
  box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(0.5rem);
  transition:
    opacity var(--transition),
    visibility var(--transition),
    transform var(--transition),
    background var(--transition),
    color var(--transition),
    left var(--transition);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--color-gold);
  color: #111;
}

.back-to-top:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 3px;
}

.back-to-top__icon {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
}

body.lightbox-open .back-to-top {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ---------- Compact header (internal pages) ---------- */

.site-header--compact {
  position: relative;
  z-index: 100;
}

/* صفحات عامة داخلية: تثبيت الرأس (fixed لأن overflow-x على html/body يكسر sticky) */
.site-header--compact.site-header--public {
  position: fixed;
  inset-inline: 0;
  top: 0;
  width: 100vw;
  max-width: 100vw;
  z-index: 110;
  box-sizing: border-box;
}

body:has(> .site-header.site-header--public) {
  padding-top: var(--public-nav-offset);
}

.site-header--compact .header-banner {
  display: none;
}

.site-header--compact.site-header--public .nav-bar {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  box-sizing: border-box;
}

.site-header--compact.site-header--public .container {
  width: min(100% - 2rem, var(--max-width));
  max-width: 100%;
  box-sizing: border-box;
}

.site-header--compact.site-header--public .header-inner {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.site-header--public .header-inner--public .header-home-lead {
  min-width: 0;
  max-width: min(100%, calc(100vw - 3.25rem));
}

@media (min-width: 1181px) {
  .site-header--public .header-inner--public .header-home-lead {
    flex: 0 0 auto;
    overflow: visible;
    max-width: min(400px, 44vw);
  }
}

@media (max-width: 1180px) {
  .site-header--public .header-inner--public .header-home-lead {
    flex: 1 1 auto;
    overflow: hidden;
  }
}

.site-header--public .header-inner--public .brand.brand--home-gold {
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(148px, calc(100vw - 3.5rem));
  width: auto;
}

.site-header--public .header-inner--public .brand__logo--home-gold {
  width: min(148px, 100%);
  max-width: 100%;
  height: auto;
}

/* صفحات داخلية عامة: مسافة معتدلة بين الشريط الثابت ومسار التنقل (بدون تكرار تعويض الارتفاع) */
body:has(> .site-header.site-header--public) #main > .section,
body:has(> .site-header.site-header--public) #main.section.page-content {
  padding-top: var(--public-page-breadcrumb-gap);
}

/* ---------- Inner page content (template) ---------- */

.page-content .section__header h1 {
  color: var(--color-gold);
  margin-bottom: var(--space-sm);
}

.page-content__body {
  color: var(--color-text-muted);
}

.page-content__body > *:last-child {
  margin-bottom: 0;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- About & Contact ---------- */

.home-faq-accordion {
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.home-faq-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.home-faq-item__heading {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}

.home-faq-item__trigger {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  margin: 0;
  padding: 1rem 0.15rem;
  border: 0;
  background: transparent;
  color: var(--color-text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-align: start;
  cursor: pointer;
  transition: color var(--transition), background var(--transition);
}

.home-faq-item__trigger:hover {
  color: var(--color-gold-soft);
}

.home-faq-item__trigger:focus-visible {
  outline: 2px solid var(--color-gold);
  outline-offset: 2px;
  border-radius: var(--radius);
}

.home-faq-item__label {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.5;
}

.home-faq-item__icon {
  flex: 0 0 auto;
  color: var(--color-gold);
  font-size: 1.25rem;
  line-height: 1;
  font-weight: 700;
}

.home-faq-item__panel {
  padding: 0 0 1rem;
}

.home-faq-item__answer {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.7;
  white-space: pre-wrap;
}

@media (prefers-reduced-motion: reduce) {
  .home-faq-item__trigger {
    transition: none;
  }
}

.about-text {
  font-size: 1.1rem;
  margin: 0;
}

.contact-header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.contact-header p {
  margin-inline: auto;
}

.contact-lead-title {
  margin: 0 0 var(--space-sm);
  color: var(--color-text);
  font-size: clamp(1.2rem, 2.8vw, 1.55rem);
  font-weight: 700;
  line-height: 1.4;
}

.contact-header .contact-lead-title {
  color: var(--color-text);
}

.contact-actions {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-md);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.social-links__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.6rem;
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: rgba(197, 155, 39, 0.08);
  color: var(--color-text);
  font-weight: 700;
  font-size: 0.95rem;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.social-links__item:hover {
  background: var(--color-gold-dim);
  border-color: var(--color-gold);
  color: var(--color-gold-soft);
}

.social-links__icon {
  display: inline-flex;
  width: 1.2rem;
  height: 1.2rem;
  color: var(--color-gold);
}

.social-links__icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.social-links--footer {
  margin: 0 0 var(--space-lg);
}

/* ---------- Footer ---------- */

.site-footer {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--color-border);
  background: #050505;
  text-align: center;
}

.footer-brand {
  margin: 0 0 var(--space-xs);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-gold);
}

.footer-domain {
  margin: 0 0 var(--space-md);
  color: var(--color-text);
  font-weight: 600;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: var(--space-sm) 0;
  font-size: 0.9rem;
}

.footer-legal a {
  color: var(--color-gold-soft);
}

.footer-legal a:hover,
.footer-legal a:focus-visible {
  color: var(--color-gold);
}

.footer-copy {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* ---------- Mobile / tablet ---------- */

@media (max-width: 767px) {
  :root {
    /* الرأس المطوي: شعار + أزرار سريعة (أطول من صف الروابط فقط) */
    --public-nav-offset: 6rem;
  }
}

@media (max-width: 768px) {
  :root {
    --public-page-breadcrumb-gap: 0.875rem; /* 14px */
  }

  .site-header--public .header-home-ctas {
    display: none;
  }

  .header-inner--home .header-home-lead,
  .header-inner--public .header-home-lead {
    flex-wrap: nowrap;
    max-width: min(100%, calc(100vw - 3.5rem));
  }

  body {
    background-attachment: scroll;
  }

  body:has(> .site-header.site-header--public) #main > .section,
  body:has(> .site-header.site-header--public) #main.section.page-content {
    padding-top: var(--public-page-breadcrumb-gap);
  }

  .nav-bar .header-inner {
    padding-inline: 16px;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .nav-bar .header-inner:not(.header-inner--home):not(.header-inner--public) .brand {
    flex: 1 1 auto;
    min-width: 0;
    max-width: min(160px, calc(100vw - 7rem));
  }

  .site-header--public .header-inner--public .brand.brand--home-gold {
    max-width: min(148px, calc(100vw - 3.5rem));
  }

  .nav-bar .header-inner--home {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 0.75rem;
    row-gap: 0.55rem;
  }

  .header-home-lead {
    grid-column: 1;
    grid-row: 1;
    flex-wrap: wrap;
    max-width: 100%;
  }

  .header-inner--home .brand {
    max-width: min(132px, calc(100vw - 10rem));
  }

  .header-home-ctas {
    flex-wrap: wrap;
  }

  .header-home-ctas .btn--nav-cta {
    width: auto;
    max-width: 100%;
    min-height: 2.15rem;
    padding: 0.28rem 0.65rem;
    font-size: 0.82rem;
  }

  .header-inner--home .nav-toggle {
    display: inline-flex;
    flex-shrink: 0;
    justify-self: end;
    align-self: start;
    grid-column: 2;
    grid-row: 1;
  }

  .header-inner--home .primary-nav {
    display: none;
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    position: static;
    inset: auto;
    top: auto;
    z-index: 1;
    margin: 0;
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    border-top: 1px solid rgba(197, 155, 39, 0.35);
    padding: var(--space-sm) 0 var(--space-md);
    background: transparent;
  }

  .header-inner--home .primary-nav.is-open {
    display: block;
  }

  .header-inner--home .primary-nav__list {
    grid-column: auto;
    justify-self: stretch;
  }

  .header-inner--home .nav-admin-link {
    grid-column: auto;
    justify-self: stretch;
    margin-inline-end: 0;
    margin-top: 0.35rem;
  }

  .section {
    padding: var(--space-xl) 0;
  }

  .section__header {
    margin-bottom: var(--space-lg);
  }

  .nav-toggle {
    display: inline-flex;
    flex-shrink: 0;
  }

  .header-inner--public .primary-nav,
  .nav-bar .header-inner:not(.header-inner--home) .primary-nav {
    flex: 1 1 100%;
    order: 3;
    width: 100%;
  }

  .primary-nav {
    display: none;
    position: static;
    inset: auto;
    top: auto;
    z-index: 1;
    width: 100%;
    margin: 0;
    background: transparent;
    border-top: 1px solid rgba(197, 155, 39, 0.35);
    border-bottom: 0;
    padding: var(--space-sm) 0 var(--space-md);
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: none;
  }

  .primary-nav.is-open {
    display: block;
  }

  .primary-nav[hidden] {
    display: none !important;
  }

  .primary-nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .primary-nav__list a {
    display: block;
    padding: 0.9rem 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .nav-admin-link {
    display: block;
    width: fit-content;
    max-width: 100%;
    padding: 0.9rem 0.25rem;
    border-bottom: 1px solid rgba(255, 69, 69, 0.25);
  }

  .btn {
    width: 100%;
  }

  .header-home-ctas .btn,
  .header-home-ctas .btn--nav-cta {
    width: auto;
  }

  .services-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
  }

  .services-layout {
    display: flex;
    flex-direction: column;
  }

  .services-content__header {
    order: 0;
  }

  .services-visual {
    position: relative;
    top: auto;
    bottom: auto;
    left: auto;
    order: 1;
    width: min(100%, 26rem);
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    align-items: center;
    justify-content: center;
    overflow: visible;
  }

  .services-visual__img {
    width: 100%;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    object-position: center top;
    -webkit-mask-image: linear-gradient(
      to bottom,
      transparent 0%,
      rgba(0, 0, 0, 0.65) 7%,
      #000 14%,
      #000 82%,
      rgba(0, 0, 0, 0.6) 92%,
      transparent 100%
    );
    mask-image: linear-gradient(
      to bottom,
      transparent 0%,
      rgba(0, 0, 0, 0.65) 7%,
      #000 14%,
      #000 82%,
      rgba(0, 0, 0, 0.6) 92%,
      transparent 100%
    );
  }

  .services-body {
    order: 2;
  }

  .services-content {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .services-content::before {
    content: none;
  }

  .services-list {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .services-list li::before {
    left: 0;
    right: 0;
  }

  .services-list li:nth-child(2n)::before {
    left: 0;
  }

  .services-list li::after {
    content: none;
  }

  .services-list h3,
  .services-list p {
    text-shadow: none;
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .lightbox {
    padding: 0.75rem;
    align-items: flex-start;
    overflow-y: auto;
  }

  .lightbox__panel {
    width: 100%;
    max-height: none;
    margin-block: auto;
  }

  .lightbox__img {
    max-height: none;
  }

  .about-text {
    font-size: 1rem;
  }

  .contact-actions .btn {
    width: 100%;
  }

  .social-links {
    justify-content: center;
  }

  .social-links__item {
    flex: 1 1 calc(50% - 0.75rem);
    justify-content: center;
    min-width: 9.5rem;
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .work-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 390px) {
  .container {
    width: min(100% - 1.5rem, var(--max-width));
  }

  .nav-toggle {
    padding: 0.4rem 0.6rem;
    font-size: 0.85rem;
  }
}
