@font-face {
  font-family: "Mijad Handel";
  src: url("logo/Mijad/FONTS/ALFONT_COM_ITC-HANDEL-GOTHIC-ARABIC-HEAVY.TTF") format("truetype");
  font-display: swap;
}

:root {
  --ink: #20231f;
  --muted: #697168;
  --paper: #f7f4ee;
  --paper-strong: #efe8db;
  --surface: #ffffff;
  --line: #e3ddd2;
  --gold: #b68a42;
  --gold-dark: #8d682f;
  --green: #2f5c4d;
  --whatsapp: #1fae63;
  --blue: #20384c;
  --shadow: 0 24px 58px rgba(32, 35, 31, 0.13);
  --soft-shadow: 0 14px 34px rgba(32, 35, 31, 0.08);
  --brand-font: "Mijad Handel", Tahoma, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Tahoma, Arial, sans-serif;
  line-height: 1.8;
}

h1,
h2,
h3,
.main-nav,
.btn,
.section-kicker,
.brand-text,
.panel-stats strong,
.contact-item strong {
  font-family: var(--brand-font);
}

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

img {
  display: block;
  max-width: 100%;
}

.container {
  width: min(1200px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: fixed;
  inset: 16px 50% auto auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1200px, calc(100% - 32px));
  min-height: 104px;
  padding: 12px 22px;
  transform: translateX(50%);
  border: 1px solid rgba(182, 138, 66, 0.32);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 44px rgba(32, 35, 31, 0.12);
  backdrop-filter: blur(18px);
}

.site-header::after {
  content: "";
  position: absolute;
  inset: auto 22px 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: min(440px, 42vw);
  min-height: 78px;
  flex: 0 0 auto;
  padding: 8px 10px;
  border-radius: 8px;
}

.brand img {
  width: 92px;
  height: 78px;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(32, 35, 31, 0.08));
}

.brand-text {
  display: grid;
  gap: 2px;
  color: var(--green);
  line-height: 1.25;
}

.brand-text strong {
  color: var(--ink);
  font-size: clamp(1.1rem, 1.9vw, 1.55rem);
  font-weight: 900;
}

.brand-text small {
  color: var(--green);
  font-size: clamp(0.72rem, 1.1vw, 0.92rem);
  font-weight: 800;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #3d423d;
  font-size: 0.94rem;
  font-weight: 700;
}

.main-nav a {
  padding: 11px 14px;
  border-radius: 6px;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a[aria-current="page"] {
  color: var(--gold-dark);
  background: #f5efe4;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: 760px;
  padding: 172px 0 78px;
  overflow: hidden;
  background:
    linear-gradient(115deg, rgba(247, 244, 238, 0.98) 0%, rgba(247, 244, 238, 0.9) 48%, rgba(32, 56, 76, 0.22) 100%),
    linear-gradient(90deg, rgba(182, 138, 66, 0.12) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, rgba(182, 138, 66, 0.1) 0 1px, transparent 1px 100%);
  background-size: auto, 64px 64px, 64px 64px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-bg::before {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 44%;
  background: linear-gradient(180deg, transparent, rgba(47, 92, 77, 0.12));
}

.law-visual {
  position: absolute;
  left: max(32px, calc((100vw - 1140px) / 2));
  bottom: 54px;
  width: min(42vw, 440px);
  aspect-ratio: 1 / 1.08;
  opacity: 0.9;
}

.pillar {
  position: absolute;
  right: 42%;
  bottom: 11%;
  width: 34%;
  height: 70%;
  border-radius: 8px 8px 3px 3px;
  background:
    linear-gradient(90deg, transparent 0 20%, rgba(255, 255, 255, 0.22) 20% 28%, transparent 28% 72%, rgba(255, 255, 255, 0.2) 72% 80%, transparent 80%),
    linear-gradient(180deg, var(--blue), #162435);
  box-shadow: var(--shadow);
}

.pillar::before,
.pillar::after {
  content: "";
  position: absolute;
  right: -20%;
  width: 140%;
  height: 16%;
  border-radius: 7px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold), #d4b06a);
}

.pillar::before {
  top: -9%;
}

.pillar::after {
  bottom: -9%;
}

.balance {
  position: absolute;
  top: 12%;
  width: 30%;
  height: 25%;
  border-bottom: 7px solid rgba(32, 35, 31, 0.74);
  border-radius: 0 0 50% 50%;
}

.balance::before {
  content: "";
  position: absolute;
  top: -34%;
  width: 2px;
  height: 46%;
  background: rgba(32, 35, 31, 0.65);
}

.balance-one {
  right: 18%;
}

.balance-one::before {
  right: 50%;
}

.balance-two {
  left: 7%;
}

.balance-two::before {
  left: 50%;
}

.document-lines {
  position: absolute;
  left: 2%;
  bottom: 7%;
  display: grid;
  gap: 12px;
  width: 38%;
  padding: 24px;
  border: 1px solid rgba(182, 138, 66, 0.34);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow);
}

.document-lines span {
  height: 9px;
  border-radius: 999px;
  background: #c8bda8;
}

.document-lines span:nth-child(2) {
  width: 74%;
}

.document-lines span:nth-child(3) {
  width: 88%;
}

.document-lines span:nth-child(4) {
  width: 55%;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 64px;
  align-items: center;
}

.hero-copy {
  max-width: 680px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--gold-dark);
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 20px;
  font-size: clamp(2.35rem, 5vw, 4.65rem);
  line-height: 1.14;
}

h2 {
  margin-bottom: 16px;
  font-size: clamp(1.65rem, 3vw, 2.65rem);
  line-height: 1.25;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.12rem;
  line-height: 1.45;
}

.lead {
  max-width: 640px;
  color: #3f463f;
  font-size: 1.2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 11px 22px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-2px);
}

.btn.primary {
  color: #fff;
  background: var(--green);
  box-shadow: 0 14px 26px rgba(47, 92, 77, 0.2);
}

.btn.primary:hover,
.btn.primary:focus-visible {
  background: #23483c;
}

.btn.whatsapp-btn {
  gap: 9px;
  background: var(--whatsapp);
  box-shadow: 0 14px 28px rgba(31, 174, 99, 0.22);
}

.btn.whatsapp-btn:hover,
.btn.whatsapp-btn:focus-visible {
  background: #16894d;
}

.wa-icon {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: var(--whatsapp);
  background: #fff;
  font-size: 0.95rem;
  line-height: 1;
}

.wa-icon svg,
.whatsapp-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.btn.secondary {
  color: var(--ink);
  border-color: #cfc4b3;
  background: rgba(255, 255, 255, 0.72);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  padding: 34px;
  border: 1px solid rgba(227, 221, 210, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.hero-panel::before,
.consultation-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--green), var(--gold));
}

.hero-panel img {
  width: min(100%, 390px);
  margin: 0 auto 26px;
}

.panel-stats {
  display: grid;
  gap: 12px;
}

.panel-stats div {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfaf7;
}

.panel-stats strong {
  display: block;
  color: var(--blue);
  font-size: 1.05rem;
}

.panel-stats span {
  color: var(--muted);
  font-size: 0.92rem;
}

section {
  scroll-margin-top: 154px;
}

.intro,
.services,
.sectors,
.approach,
.contact {
  padding: 82px 0;
}

.intro {
  background: var(--surface);
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 42px;
  align-items: start;
}

.split > p,
.section-head p,
.sticky-copy > p,
.contact-copy > p {
  color: var(--muted);
}

.section-head {
  max-width: 680px;
  margin-bottom: 34px;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.service-card {
  position: relative;
  overflow: hidden;
  min-height: 240px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), rgba(47, 92, 77, 0.18));
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: #d2bd8c;
  box-shadow: 0 20px 42px rgba(32, 35, 31, 0.11);
}

.service-card p {
  color: var(--muted);
}

.icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 20px;
  border-radius: 6px;
  color: #fff;
  background: var(--blue);
  font-size: 1.4rem;
  font-weight: 800;
}

.sectors {
  color: #fff;
  background: linear-gradient(135deg, #1e332c, #20384c 72%);
}

.sectors .section-kicker {
  color: #d4b06a;
}

.sector-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.sector-strip span {
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #f5efe4;
  font-weight: 700;
}

.approach {
  background: #fbfaf7;
}

.approach-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: start;
}

.sticky-copy {
  position: sticky;
  top: 122px;
}

.steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 20px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.steps span {
  color: var(--gold-dark);
  font-size: 1.4rem;
  font-weight: 900;
}

.steps p {
  color: var(--muted);
}

.contact {
  background:
    linear-gradient(90deg, rgba(47, 92, 77, 0.08), transparent 48%),
    var(--surface);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 42px;
  align-items: start;
}

.contact-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.contact-method {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.85) inset;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.contact-method:hover,
.contact-method:focus-visible {
  transform: translateY(-3px);
  border-color: #c9ad73;
  box-shadow: var(--soft-shadow);
}

.contact-method strong,
.contact-method small {
  display: block;
}

.contact-method strong {
  color: var(--blue);
  font-size: 0.98rem;
}

.contact-method small {
  color: var(--muted);
  font-size: 0.9rem;
  direction: ltr;
  text-align: right;
}

.method-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-size: 1.1rem;
  font-weight: 900;
}

.whatsapp-method .method-icon {
  background: var(--whatsapp);
}

.social-box {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.social-box h3 {
  margin-bottom: 14px;
  color: var(--blue);
}

.social-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.social-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 10px 12px;
  border: 1px solid #ded6c8;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.social-links a:hover,
.social-links a:focus-visible {
  border-color: #c9ad73;
  box-shadow: 0 12px 22px rgba(32, 35, 31, 0.07);
}

.social-links span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  background: var(--blue);
  font-size: 0.85rem;
  font-weight: 900;
}

.consultation-card {
  position: relative;
  overflow: hidden;
  display: grid;
  justify-items: start;
  gap: 14px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
  box-shadow: var(--shadow);
}

.consultation-card img {
  width: min(100%, 360px);
  margin: 0 auto 12px;
}

.consultation-card p {
  color: var(--muted);
}

.consultation-card .btn {
  width: 100%;
}

.site-footer {
  padding: 32px 0;
  color: #e9e2d5;
  background: #20231f;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-inner img {
  width: 280px;
  border-radius: 8px;
}

.footer-copy {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.footer-inner p {
  margin: 0;
  color: #d5ccbd;
}

.footer-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  direction: ltr;
  color: #f1e7d8;
  font-weight: 800;
}

.footer-contact a:hover,
.footer-contact a:focus-visible {
  color: #d4b06a;
}

.footer-address {
  color: #cfc6b8;
  font-weight: 800;
}

.page-header {
  position: sticky;
  inset: auto;
  top: 16px;
  margin: 16px auto 0;
  transform: none;
}

.page-main {
  min-height: 68vh;
}

.blog-hero,
.admin-section {
  padding: 104px 0 82px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(247, 244, 238, 0.72)),
    linear-gradient(115deg, rgba(47, 92, 77, 0.1), rgba(182, 138, 66, 0.16)),
    var(--paper);
}

.blog-hero .container,
.admin-section .container {
  text-align: center;
}

.blog-hero .lead,
.admin-section .lead {
  margin-inline: auto;
}

.blog-section,
.admin-posts {
  padding: 82px 0 96px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6), rgba(239, 232, 219, 0.75)),
    var(--paper);
}

.blog-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 34px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(182, 138, 66, 0.24);
}

.blog-toolbar h2,
.blog-toolbar .section-kicker {
  margin-bottom: 0;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.blog-card {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid rgba(227, 221, 210, 0.95);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 20px 44px rgba(32, 35, 31, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.blog-card:hover {
  transform: translateY(-5px);
  border-color: rgba(182, 138, 66, 0.46);
  box-shadow: 0 26px 56px rgba(32, 35, 31, 0.13);
}

.blog-media {
  display: grid;
  overflow: hidden;
  height: 320px;
  background:
    linear-gradient(135deg, rgba(47, 92, 77, 0.14), rgba(182, 138, 66, 0.18)),
    #e9e2d5;
}

.blog-media-link {
  display: block;
  position: relative;
  height: 320px;
  overflow: hidden;
}

.blog-media-link::after {
  content: "قراءة الموضوع";
  position: absolute;
  inset: auto 16px 16px auto;
  padding: 7px 12px;
  border-radius: 6px;
  color: #fff;
  background: rgba(32, 56, 76, 0.88);
  font-family: var(--brand-font);
  font-size: 0.78rem;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.blog-card:hover .blog-media-link::after,
.blog-media-link:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

.blog-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 220ms ease;
}

.blog-card .blog-media img:not(:first-child) {
  display: none;
}

.blog-card:hover .blog-media img {
  transform: scale(1.025);
}

.blog-media.is-empty {
  place-items: center;
  color: rgba(47, 92, 77, 0.2);
  font-family: var(--brand-font);
  font-size: 2.4rem;
}

.blog-card-content {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  padding: 24px;
}

.blog-card time {
  display: block;
  width: fit-content;
  margin-bottom: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #f5efe4;
  color: var(--gold-dark);
  font-size: 0.9rem;
  font-weight: 800;
}

.blog-card p {
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  white-space: pre-line;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.blog-card h3 a {
  display: block;
  color: var(--blue);
  font-size: 1.22rem;
  line-height: 1.55;
}

.blog-card h3 a:hover,
.blog-card h3 a:focus-visible,
.back-link:hover,
.back-link:focus-visible {
  color: var(--gold-dark);
}

.blog-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.blog-card-actions .btn {
  flex: 1 1 170px;
  min-height: 46px;
  padding-inline: 16px;
}

.single-post {
  padding: 86px 0 104px;
  background:
    linear-gradient(180deg, rgba(247, 244, 238, 0.82), rgba(255, 255, 255, 0.94)),
    var(--surface);
}

.single-post-inner {
  max-width: 900px;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.single-post time,
.back-link {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--gold-dark);
  font-weight: 800;
}

.single-post h1 {
  margin-bottom: 26px;
  font-size: clamp(2rem, 4vw, 3.8rem);
}

.post-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.post-gallery img {
  width: 100%;
  height: 280px;
  border: 1px solid var(--line);
  border-radius: 8px;
  object-fit: cover;
}

.post-gallery img:first-child {
  grid-column: 1 / -1;
  height: min(56vw, 520px);
}

@media (max-width: 1080px) {
  .site-header {
    min-height: 100px;
    padding-inline: 16px;
  }

  .brand {
    width: 360px;
    min-height: 76px;
    gap: 10px;
  }

  .brand img {
    width: 84px;
    height: 74px;
  }

  .main-nav {
    gap: 2px;
    font-size: 0.86rem;
  }

  .main-nav a {
    padding-inline: 10px;
  }
}

.single-post-empty {
  margin-bottom: 28px;
  min-height: 320px;
}

.single-post-body {
  margin-bottom: 30px;
  color: #3f463f;
  font-size: 1.08rem;
  line-height: 2;
  white-space: pre-line;
}

.post-whatsapp {
  min-width: 260px;
}

.empty-state {
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.empty-state.compact {
  padding: 22px;
}

.empty-state p {
  color: var(--muted);
}

.admin-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 42px;
  align-items: start;
}

.admin-form {
  display: grid;
  gap: 18px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
}

.admin-form label,
.admin-form label span {
  display: grid;
  gap: 8px;
}

.admin-form label span {
  color: var(--blue);
  font-family: var(--brand-font);
  font-weight: 800;
}

.admin-form input,
.admin-form textarea {
  width: 100%;
  border: 1px solid #d6cebf;
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.admin-form input {
  min-height: 48px;
  padding: 10px 14px;
}

.admin-form textarea {
  min-height: 180px;
  padding: 14px;
  resize: vertical;
}

.admin-form input:focus,
.admin-form textarea:focus {
  border-color: var(--gold-dark);
  outline: 3px solid rgba(182, 138, 66, 0.18);
}

.image-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.image-preview img {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 7px;
  object-fit: cover;
}

.form-status {
  min-height: 28px;
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.form-status[data-type="success"] {
  color: var(--green);
}

.form-status[data-type="error"] {
  color: #a43d2b;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.admin-list {
  display: grid;
  gap: 12px;
}

.admin-post-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.admin-post-item h3,
.admin-post-item p {
  margin: 0;
}

.admin-post-item p {
  color: var(--muted);
}

@media (max-width: 900px) {
  .site-header {
    position: fixed;
    min-height: 118px;
    justify-content: center;
  }

  .page-header {
    position: static;
    inset: auto;
    margin: 10px auto 0;
    transform: none;
  }

  .brand {
    width: min(410px, calc(100% - 80px));
    min-height: 92px;
    justify-content: center;
  }

  .brand img {
    width: 104px;
    height: 90px;
  }

  .nav-toggle {
    display: block;
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
  }

  .main-nav {
    position: absolute;
    inset: calc(100% + 10px) 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    padding: 12px 14px;
  }

  .hero {
    min-height: auto;
    padding-top: 168px;
  }

  .hero-grid,
  .split,
  .approach-grid,
  .contact-grid,
  .admin-grid {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    max-width: 560px;
  }

  .law-visual {
    left: 14px;
    bottom: 24px;
    width: 56vw;
    opacity: 0.32;
  }

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

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

  .blog-card {
    max-width: 720px;
    margin-inline: auto;
  }

  .single-post-inner {
    padding: 28px;
  }

  .sticky-copy {
    position: static;
  }
}

@media (max-width: 620px) {
  .container {
    width: min(100% - 24px, 1200px);
  }

  .site-header {
    inset-block-start: 10px;
    min-height: 124px;
    width: calc(100% - 24px);
    padding-inline: 10px;
  }

  .page-header {
    position: static;
    inset: auto;
    margin: 10px auto 0;
    transform: none;
  }

  .brand {
    width: min(360px, calc(100vw - 82px));
    min-height: 104px;
    gap: 8px;
    padding-inline: 4px;
  }

  .brand img {
    width: 116px;
    height: 100px;
  }

  .brand-text strong {
    font-size: clamp(1.18rem, 5vw, 1.5rem);
  }

  .brand-text small {
    max-width: 190px;
    white-space: normal;
    font-size: 0.78rem;
    line-height: 1.45;
  }

  .nav-toggle {
    left: 10px;
    width: 40px;
    height: 40px;
  }

  .page-main {
    overflow: hidden;
    padding-top: 18px;
  }

  .blog-hero,
  .admin-section {
    padding: 34px 0 38px;
    border-top: 1px solid rgba(182, 138, 66, 0.16);
  }

  .blog-hero h1,
  .admin-section h1 {
    margin-bottom: 14px;
    font-size: clamp(1.85rem, 9vw, 2.55rem);
    line-height: 1.25;
  }

  .blog-hero .lead,
  .admin-section .lead {
    max-width: 34rem;
    font-size: 1rem;
    line-height: 1.85;
  }

  .blog-section,
  .admin-posts {
    padding: 42px 0 58px;
  }

  .blog-toolbar {
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 14px;
  }

  .blog-toolbar h2 {
    font-size: 1.55rem;
  }

  .hero {
    padding-top: 174px;
    padding-bottom: 54px;
  }

  .hero-actions,
  .footer-inner,
  .blog-toolbar,
  .admin-post-item {
    align-items: stretch;
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

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

  .blog-grid,
  .image-preview,
  .post-gallery {
    grid-template-columns: 1fr;
  }

  .blog-grid {
    gap: 18px;
  }

  .blog-card {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 14px 32px rgba(32, 35, 31, 0.08);
  }

  .blog-card:hover {
    transform: none;
  }

  .blog-media {
    height: 260px;
  }

  .blog-media-link {
    height: 260px;
  }

  .blog-media-link::after {
    display: none;
  }

  .blog-card:hover .blog-media img {
    transform: none;
  }

  .blog-card-content {
    padding: 18px;
  }

  .blog-card time {
    margin-bottom: 10px;
    font-size: 0.82rem;
  }

  .blog-card h3 {
    margin-bottom: 10px;
  }

  .blog-card h3 a {
    font-size: 1.08rem;
    line-height: 1.65;
  }

  .blog-card p {
    margin-bottom: 0;
    font-size: 0.96rem;
    line-height: 1.85;
    -webkit-line-clamp: 3;
  }

  .blog-card-actions {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 16px;
  }

  .single-post {
    padding: 36px 0 58px;
  }

  .single-post-inner {
    width: min(100% - 24px, 900px);
    padding: 20px;
    box-shadow: 0 14px 34px rgba(32, 35, 31, 0.08);
  }

  .single-post time,
  .back-link {
    margin-bottom: 10px;
    font-size: 0.88rem;
  }

  .single-post h1 {
    margin-bottom: 20px;
    font-size: clamp(1.65rem, 8vw, 2.35rem);
    line-height: 1.35;
  }

  .post-gallery img,
  .post-gallery img:first-child {
    grid-column: auto;
    height: 240px;
    max-height: none;
  }

  .post-gallery {
    gap: 10px;
    margin-bottom: 20px;
  }

  .single-post-body {
    margin-bottom: 22px;
    font-size: 1rem;
    line-height: 2;
  }

  .post-whatsapp {
    width: 100%;
  }

  .service-card {
    min-height: auto;
  }

  .steps li {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .consultation-card,
  .hero-panel {
    padding: 20px;
  }

  .contact-links {
    grid-template-columns: 1fr;
  }

  .social-links {
    grid-template-columns: 1fr;
  }

  .hero-panel img {
    width: min(100%, 280px);
  }

  .footer-inner {
    text-align: center;
  }

  .footer-copy {
    justify-items: center;
  }

  .footer-contact {
    justify-content: center;
  }

  .footer-inner img {
    width: min(100%, 260px);
    margin-inline: auto;
  }

  .sector-strip span {
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 430px) {
  .container {
    width: min(100% - 18px, 1200px);
  }

  .site-header {
    width: calc(100% - 18px);
    min-height: 116px;
    padding-inline: 8px;
  }

  .brand {
    width: min(300px, calc(100vw - 74px));
    min-height: 94px;
  }

  .brand img {
    width: 96px;
    height: 86px;
  }

  .brand-text strong {
    font-size: 1.12rem;
  }

  .brand-text small {
    max-width: 160px;
    font-size: 0.7rem;
  }

  .main-nav {
    inset-inline: 0;
  }

  .blog-hero,
  .admin-section {
    padding-top: 42px;
  }

  .blog-card-content,
  .single-post-inner,
  .admin-form {
    padding: 16px;
  }

  .blog-media,
  .blog-media-link {
    height: 220px;
  }

  .post-gallery img,
  .post-gallery img:first-child {
    height: 220px;
  }

  .blog-card h3 a {
    font-size: 1rem;
  }

  .blog-card-actions .btn {
    min-height: 44px;
    padding-inline: 12px;
  }
}
