:root {
  --navy: #111827;
  --burgundy: #7F1D1D;
  --gold: #C9A24A;
  --cream: #F8F4EC;
  --gray: #F3F4F6;
  --white: #FFFFFF;
  --text: #1F2937;
  --muted: #6B7280;
  --line: rgba(17, 24, 39, 0.12);
  --shadow: 0 18px 50px rgba(17, 24, 39, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: currentColor;
  flex: 0 0 auto;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: minmax(250px, auto) minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  min-height: 78px;
  padding: 10px max(20px, calc((100vw - 1180px) / 2));
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(17, 24, 39, 0.94);
  color: var(--white);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 250px;
}

.brand span {
  min-width: 0;
}

.brand img {
  width: 44px;
  height: 44px;
}

.brand strong {
  display: block;
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.98rem;
  line-height: 1.1;
  overflow-wrap: break-word;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.76rem;
  line-height: 1.2;
}

.nav {
  display: flex;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}

.nav a {
  padding: 9px 8px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.88rem;
  border-radius: 6px;
  white-space: nowrap;
}

.nav a:hover,
.nav a.active {
  color: var(--white);
  background: rgba(201, 162, 74, 0.14);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.header-link,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 700;
  line-height: 1.15;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.header-link {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.16);
  font-size: 0.88rem;
  white-space: nowrap;
}

.header-link.accent {
  color: #102016;
  background: #d8f3dc;
}

.header-link:hover,
.btn:hover {
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  color: var(--white);
  background: transparent;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: min(760px, calc(100vh - 128px));
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--white);
}

.hero-bg,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-bg {
  background-image: url("assets/images/hero-hukuk.webp");
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.93) 0%, rgba(17, 24, 39, 0.78) 44%, rgba(127, 29, 29, 0.34) 100%),
    linear-gradient(0deg, rgba(17, 24, 39, 0.35), rgba(17, 24, 39, 0.1));
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 58px 0 78px;
}

.eyebrow,
.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  color: var(--gold);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  font-size: 0.78rem;
}

.hero h1 {
  max-width: min(920px, 100%);
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.45rem, 5vw, 5.2rem);
  line-height: 1.04;
  letter-spacing: 0;
  overflow-wrap: break-word;
}

.hero-lead {
  max-width: 780px;
  margin: 24px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-text {
  max-width: 720px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.72);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn.primary {
  color: var(--white);
  background: var(--burgundy);
}

.btn.whatsapp {
  color: #0f2818;
  background: #d8f3dc;
}

.whatsapp-icon {
  width: 1.15rem;
  height: 1.15rem;
  display: inline-block;
  flex: 0 0 auto;
}

.light-icon {
  filter: brightness(0) invert(1);
}

.float-icon {
  width: 1.65rem;
  height: 1.65rem;
}

.btn.ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.08);
}

.btn.light {
  color: var(--navy);
  border-color: var(--line);
  background: var(--white);
}

.trust-bar {
  position: relative;
  z-index: 2;
  margin-top: -46px;
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.trust-grid article {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 92px;
  padding: 18px;
  border: 1px solid rgba(201, 162, 74, 0.26);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
  font-weight: 800;
}

.trust-grid svg {
  color: var(--gold);
}

.section {
  padding: 96px 0;
}

.page-hero {
  padding: 92px 0 76px;
  color: var(--white);
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.94), rgba(127, 29, 29, 0.78)),
    url("assets/images/ofis.webp") center / cover;
}

.page-hero h1 {
  max-width: 760px;
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.4rem, 4vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: 0;
}

.page-hero p:not(.eyebrow) {
  max-width: 720px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
}

.section:nth-of-type(even) {
  background: var(--cream);
}

.section-head {
  max-width: 720px;
  margin: 0 auto 42px;
  text-align: center;
}

.section-head.align-left {
  margin-left: 0;
  text-align: left;
}

.section h2,
.footer h2 {
  margin: 0;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3vw, 3rem);
  line-height: 1.13;
  letter-spacing: 0;
}

.section-head p,
.section-subtitle {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.95fr);
  gap: 58px;
  align-items: center;
}

.split.reverse {
  grid-template-columns: minmax(340px, 0.95fr) minmax(0, 1.05fr);
}

.section-copy p {
  margin: 18px 0 0;
  color: #374151;
}

.profile-panel,
.contact-card,
.contact-form,
.service-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 14px 36px rgba(17, 24, 39, 0.08);
}

.profile-panel {
  overflow: hidden;
}

.profile-panel img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.profile-facts {
  display: grid;
  gap: 10px;
  padding: 22px;
}

.profile-facts span,
.check-list li {
  position: relative;
  padding-left: 26px;
}

.profile-facts span::before,
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.service-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 24px;
}

.service-icon {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border-radius: 8px;
  color: var(--gold);
  background: rgba(127, 29, 29, 0.08);
}

.service-card h3,
.process-steps h3,
.featured h3 {
  margin: 0;
  color: var(--navy);
  line-height: 1.25;
  letter-spacing: 0;
}

.service-card p {
  margin: 12px 0 0;
  color: #4B5563;
}

.service-card ul {
  margin: 16px 0 22px;
  padding: 0;
  list-style: none;
}

.service-card li {
  position: relative;
  margin-top: 8px;
  padding-left: 22px;
  color: #4B5563;
  font-size: 0.95rem;
}

.service-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 7px;
  height: 7px;
  background: var(--burgundy);
}

.service-card .btn {
  width: 100%;
  margin-top: auto;
}

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

.overview-grid article {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 14px 36px rgba(17, 24, 39, 0.08);
}

.overview-grid h3 {
  margin: 0;
  color: var(--navy);
}

.overview-grid p {
  color: #4B5563;
}

.overview-grid .btn {
  margin-top: auto;
}

.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px;
  border-radius: 8px;
  color: var(--white);
  background: linear-gradient(135deg, var(--navy), var(--burgundy));
}

.cta-band h2 {
  color: var(--white);
}

.cta-band p {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.article-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.article-toolbar h2 {
  margin: 0;
}

.article-count {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 8px 13px;
  border: 1px solid rgba(201, 162, 74, 0.35);
  border-radius: 6px;
  color: var(--navy);
  background: rgba(201, 162, 74, 0.12);
  font-weight: 800;
}

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

.article-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 14px 36px rgba(17, 24, 39, 0.08);
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.article-meta span {
  padding: 5px 8px;
  border-radius: 6px;
  background: var(--gray);
}

.article-card h3 {
  margin: 0;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.45rem;
  line-height: 1.22;
  letter-spacing: 0;
}

.article-card p {
  margin: 14px 0 18px;
  color: #4B5563;
}

.article-card details {
  margin-top: auto;
}

.article-card summary {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--navy);
  background: var(--white);
  font-weight: 800;
  cursor: pointer;
}

.article-body {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: #374151;
  white-space: pre-wrap;
}

.article-empty {
  grid-column: 1 / -1;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--muted);
}

.featured {
  background: var(--navy);
}

.featured h2,
.featured .section-head p {
  color: var(--white);
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.featured-grid article {
  position: relative;
  min-height: 255px;
  overflow: hidden;
  border-radius: 8px;
  background: #111;
}

.featured-grid img {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  object-fit: cover;
  opacity: 0.78;
  transition: transform 0.4s ease;
}

.featured-grid article:hover img {
  transform: scale(1.04);
}

.featured-grid h3 {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 18px;
  z-index: 1;
  color: var(--white);
  font-size: 1.35rem;
}

.featured-grid article::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(17, 24, 39, 0.8), rgba(17, 24, 39, 0.12));
}

.image-stack {
  display: grid;
  grid-template-columns: 1fr 0.78fr;
  gap: 14px;
  align-items: end;
}

.image-stack img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.image-stack img:nth-child(2) {
  height: 300px;
  margin-bottom: -30px;
}

.check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.why-grid article {
  min-height: 118px;
  padding: 22px;
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 10px 28px rgba(17, 24, 39, 0.07);
  color: var(--navy);
  font-weight: 800;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.process-steps article {
  position: relative;
  min-height: 190px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.process-steps span {
  display: block;
  color: rgba(127, 29, 29, 0.18);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 3rem;
  line-height: 1;
}

.process-steps svg {
  margin: 18px 0;
  color: var(--gold);
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: start;
}

.contact-card,
.contact-form {
  padding: 28px;
}

.contact-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.contact-row:first-child {
  padding-top: 0;
}

.contact-row strong {
  color: var(--navy);
}

.contact-row span,
.contact-row a {
  color: #4B5563;
  overflow-wrap: anywhere;
}

.contact-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 22px;
}

.contact-form {
  display: grid;
  gap: 15px;
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-weight: 800;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 13px;
  color: var(--text);
  background: var(--white);
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 74, 0.16);
}

.floating-actions {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: grid;
  gap: 10px;
}

.floating-actions a {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--white);
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.25);
}

.float-phone {
  background: var(--navy);
}

.float-whatsapp {
  background: #25D366;
}

.float-mail {
  background: var(--burgundy);
  color: var(--gold);
}

.footer {
  color: rgba(255, 255, 255, 0.76);
  background: linear-gradient(135deg, #111827 0%, #1d1520 52%, #7F1D1D 160%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 0.7fr;
  gap: 50px;
  padding: 58px 0;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-brand img {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
}

.footer h2,
.footer h3 {
  color: var(--white);
}

.footer h2 {
  font-size: clamp(1.35rem, 2vw, 2rem);
}

.footer h3 {
  margin: 0 0 14px;
}

.footer p {
  margin: 12px 0 0;
}

.footer-sub {
  color: var(--gold);
  font-weight: 800;
}

.footer a {
  display: block;
  margin-top: 8px;
}

.footer a:hover {
  color: var(--white);
}

.footer-bottom {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.footer-bottom span {
  color: var(--gold);
  font-weight: 700;
}

.narrow {
  max-width: 900px;
}

.article-detail h1 {
  margin: 0;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 4vw, 3.7rem);
  line-height: 1.08;
}

.article-date {
  color: var(--muted);
  font-weight: 800;
}

.article-cover,
.article-detail-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  margin: 0 0 18px;
}

.article-content,
.legal-content {
  color: #374151;
  font-size: 1.05rem;
}

.article-cta {
  margin-top: 34px;
  padding: 26px;
  border: 1px solid rgba(201, 162, 74, 0.28);
  border-radius: 8px;
  background: var(--cream);
}

.notice {
  margin-top: 24px;
  padding: 16px 18px;
  border-radius: 8px;
  font-weight: 800;
}

.notice.success {
  color: #14532d;
  background: #dcfce7;
}

.map-frame {
  margin-top: 24px;
  overflow: hidden;
  border-radius: 8px;
}

.map-frame iframe {
  width: 100%;
  min-height: 320px;
  border: 0;
}

.admin-body,
.login-body {
  min-height: 100vh;
  background: #f5f1e9;
}

.login-body {
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(420px, 100%);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.login-card img {
  width: 58px;
  height: 58px;
  margin-bottom: 16px;
}

.login-card h1 {
  margin: 0;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
}

.login-card label {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  font-weight: 800;
}

.login-card input,
.admin-field input,
.admin-field textarea,
.admin-form input[type="file"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  color: var(--text);
  background: var(--white);
}

.admin-body {
  display: grid;
  grid-template-columns: 280px 1fr;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px;
  color: rgba(255, 255, 255, 0.78);
  background: var(--navy);
}

.admin-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 24px;
  color: var(--white);
  font-weight: 800;
}

.admin-brand img {
  width: 44px;
  height: 44px;
}

.admin-brand small {
  display: block;
  color: var(--gold);
  font-size: 0.78rem;
}

.admin-sidebar nav {
  display: grid;
  gap: 6px;
}

.admin-sidebar nav a,
.admin-logout {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
}

.admin-sidebar nav a.active,
.admin-sidebar nav a:hover {
  color: var(--white);
  background: rgba(201, 162, 74, 0.14);
}

.admin-logout {
  margin-top: 22px;
  color: var(--gold);
}

.admin-main {
  padding: 26px;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}

.admin-topbar span {
  color: var(--gold);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.admin-topbar h1 {
  margin: 0;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
}

.admin-card,
.admin-grid article {
  margin-bottom: 20px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 12px 30px rgba(17, 24, 39, 0.08);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.admin-grid strong {
  display: block;
  color: var(--burgundy);
  font-size: 2rem;
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.admin-field {
  display: grid;
  gap: 7px;
  color: var(--navy);
  font-weight: 800;
}

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

.admin-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.admin-table {
  display: grid;
  gap: 10px;
}

.admin-table > div {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(120px, auto) auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.admin-table a {
  color: var(--burgundy);
  font-weight: 800;
}

.admin-alert {
  margin-bottom: 18px;
  padding: 13px 15px;
  border-radius: 8px;
  background: #dcfce7;
  color: #14532d;
  font-weight: 800;
}

.admin-alert.error {
  color: #7f1d1d;
  background: #fee2e2;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.media-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.media-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--gray);
}

.media-grid code,
.media-grid a {
  display: block;
  padding: 8px;
  overflow-wrap: anywhere;
}

.media-picker {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfaf7;
}

.media-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 78px;
  margin: 8px 0 12px;
  padding: 12px;
  border: 1px dashed rgba(17, 24, 39, 0.18);
  border-radius: 8px;
  color: var(--muted);
  background: var(--white);
}

.media-preview img {
  display: none;
  width: 88px;
  height: 64px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--gray);
}

.media-preview.has-image img {
  display: block;
}

.media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.media-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  padding: 22px;
  background: rgba(17, 24, 39, 0.62);
}

.media-modal.open {
  display: grid;
  place-items: center;
}

.media-modal-panel {
  width: min(980px, 100%);
  max-height: min(760px, 92vh);
  overflow: auto;
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.media-modal-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.media-modal-head span {
  color: var(--gold);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.media-modal-head h2 {
  margin: 0;
  color: var(--navy);
}

.media-close {
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  cursor: pointer;
  font-size: 1.5rem;
}

.media-modal-upload {
  padding: 16px 20px 0;
}

.media-modal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 20px;
}

.media-choice {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
  text-align: left;
}

.media-choice:hover {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201, 162, 74, 0.14);
}

.media-choice img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  background: var(--gray);
}

.media-choice span {
  font-weight: 800;
}

.media-name-form {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.media-name-form label {
  display: grid;
  gap: 5px;
  font-weight: 800;
}

.media-name-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px;
}

.media-name-form button {
  border: 0;
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--white);
  background: var(--burgundy);
  font-weight: 800;
  cursor: pointer;
}

.media-card-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 0 10px 10px;
}

.media-card-actions a {
  padding: 8px;
  border-radius: 6px;
  background: var(--gray);
  color: var(--navy);
  font-weight: 800;
  text-align: center;
}

@media (max-width: 1060px) {
  .site-header {
    grid-template-columns: auto 1fr auto;
  }

  .nav {
    position: fixed;
    top: 78px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(17, 24, 39, 0.98);
    box-shadow: var(--shadow);
  }

  .nav.open {
    display: flex;
  }

  .header-actions {
    justify-self: end;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .trust-grid,
  .service-grid,
  .overview-grid,
  .article-grid,
  .featured-grid,
  .admin-grid,
  .media-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-body {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
  }

  .process-steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 820px) {
  .site-header {
    grid-template-columns: 1fr auto;
    min-height: 72px;
    gap: 10px;
    padding: 10px 14px;
  }

  .brand {
    min-width: 0;
    max-width: calc(100vw - 96px);
  }

  .brand img {
    width: 40px;
    height: 40px;
  }

  .brand strong {
    overflow: hidden;
    font-size: 0.86rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand small {
    overflow: hidden;
    font-size: 0.66rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-actions {
    display: none;
  }

  .nav {
    top: 72px;
  }

  .hero {
    min-height: min(720px, calc(100vh - 118px));
  }

  .hero-content {
    padding: 72px 0 96px;
  }

  .hero h1 {
    max-width: calc(100vw - 28px);
    font-size: clamp(2rem, 10vw, 2.65rem);
    line-height: 1.08;
  }

  .hero-lead,
  .hero-text {
    width: 100%;
    max-width: calc(100vw - 28px);
    overflow-wrap: break-word;
  }

  .trust-bar {
    margin-top: -34px;
  }

  .trust-grid,
  .service-grid,
  .overview-grid,
  .article-grid,
  .featured-grid,
  .process-steps,
  .why-grid,
  .contact-layout,
  .split,
  .split.reverse,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .cta-band {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-form-grid,
  .admin-table > div,
  .media-grid,
  .media-modal-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 72px 0;
  }

  .page-hero {
    padding: 74px 0 58px;
  }

  .article-toolbar {
    align-items: start;
    flex-direction: column;
  }

  .image-stack {
    grid-template-columns: 1fr;
  }

  .image-stack img,
  .image-stack img:nth-child(2) {
    height: auto;
    aspect-ratio: 4 / 3;
    margin: 0;
  }

  .check-list,
  .contact-actions {
    grid-template-columns: 1fr;
  }

  .contact-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .floating-actions {
    right: 12px;
    bottom: 12px;
  }

  .floating-actions a {
    width: 44px;
    height: 44px;
  }

  .footer-bottom {
    padding: 20px 76px 20px 16px;
    text-align: center;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(100% - 28px, 1180px);
  }

  .hero h1,
  .hero-lead,
  .hero-text {
    max-width: min(100%, 330px);
  }

  .hero h1 {
    font-size: clamp(1.9rem, 9.3vw, 2.35rem);
  }

  .hero-buttons .btn,
  .contact-form .btn {
    width: 100%;
  }

  .trust-grid article {
    min-height: 74px;
  }

  .service-card,
  .contact-card,
  .contact-form {
    padding: 20px;
  }
}
