/* Адвокат Ангел Димитров – стилове на сайта. Цветовете и подредбата са тези на досегашния сайт.
   Линковете в текста не са подчертани и не се променят при посочване; бутоните си остават бутони.
   Движение: изход ease-out cubic-bezier(0.23, 1, 0.32, 1), натискане scale(0.97) за 160ms, hover само с мишка. */
:root {
  --primary-color: #7a0d0d;
  --primary-dark: #640a0a;
  --primary-darker: #520808;
  --primary-tint: #f6eeec;
  --primary-line: #e7d6d3;
  --text-dark: #1f1a19;
  --text-muted: #5c514f;
  --text-light: #ffffff;
  --on-primary-muted: #f1dcd9;
  /* Втори цвят – приглушено месингово, само за малки детайли (иконки, маркери, черти) */
  --brass: #9c7a45;
  --brass-light: #e2c99b;
  --bg-light: #faf8f6;
  --surface: #ffffff;
  --line: #ece5e3;
  --shadow: 0 1px 2px rgba(60, 20, 15, 0.06), 0 6px 18px rgba(60, 20, 15, 0.07);
  --shadow-hover: 0 2px 4px rgba(60, 20, 15, 0.07), 0 14px 30px rgba(60, 20, 15, 0.12);
  --radius: 12px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --font-body: "Source Sans 3", "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: "Source Serif 4", Georgia, "Times New Roman", serif;
  --header-h: 68px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Без българските ръкописни форми на кирилицата („д“, „т“, „л“) – обичайният за сайтовете вид */
  font-feature-settings: "locl" 0;
}

h1,
h2,
.brand,
.footer-title,
.section-title,
.card-title,
.contact-title,
.cta-title {
  font-family: var(--font-head);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

img {
  max-width: 100%;
}

/* Без една дума сама на последния ред */
p,
li,
summary {
  text-wrap: pretty;
}

/* Линкове: без подчертаване и без промяна при посочване */
a {
  color: var(--primary-color);
  text-decoration: none;
}

.article a,
.faq a,
.areas-line a,
.areas-served a {
  font-weight: 600;
}

::selection {
  background: var(--primary-color);
  color: #fff;
}

:focus-visible {
  outline: 3px solid #c2410c;
  outline-offset: 2px;
  border-radius: 4px;
}

.site-header :focus-visible,
.page-hero :focus-visible,
.hero :focus-visible,
.cta-band :focus-visible,
.footer-grid :focus-visible {
  outline-color: #ffd9a8;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 2000;
  background: #fff;
  color: var(--primary-color);
  padding: 0.6rem 1rem;
  border-radius: 8px;
  font-weight: 600;
}

.skip-link:focus {
  top: 0.75rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

mark.todo {
  background: #fff1b8;
  color: #4f3b00;
  padding: 0 0.25em;
  border-radius: 3px;
  font-weight: 600;
}

/* ---------- Анимации при зареждане и скрол (Motion) ----------
   Класът .motion се слага само ако JS работи и няма „намалено движение“. */
/* Само началният екран е скрит до анимацията; останалото е видимо по подразбиране и JS го анимира при скрол. */
.motion [data-hero] {
  opacity: 0;
}

/* ---------- Header ---------- */
.site-header {
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 0.75rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: var(--header-h);
  transition: box-shadow 0.25s ease;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(226, 201, 155, 0.35);
  pointer-events: none;
}

.site-header.scrolled {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.brand {
  font-size: 1.4rem;
  color: var(--text-light);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

.main-nav {
  display: flex;
  align-items: center;
}

.main-nav > a {
  color: var(--text-light);
  margin-left: 1.75rem;
  font-weight: 500;
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Само текущата страница е отбелязана – без ефект при посочване */
.main-nav > a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 2px;
  background: currentColor;
}

.main-nav a.nav-phone {
  gap: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  padding: 0 0.9rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    transform 0.16s var(--ease-out);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  width: 44px;
  height: 44px;
  font-size: 1.6rem;
}

/* ---------- Секции ---------- */
section {
  padding: 4.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

section.flush-top {
  padding-top: 0;
}

/* ---------- Hero (начална страница) ---------- */
.hero {
  position: relative;
  height: calc(100vh - var(--header-h));
  height: calc(100svh - var(--header-h));
  min-height: 520px;
  max-height: 900px;
  overflow: hidden;
  max-width: none;
  padding: 0;
  background: #2a1a18;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.slide.active {
  opacity: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  will-change: transform;
}

.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 8, 6, 0.35) 0%, rgba(20, 8, 6, 0.55) 55%, rgba(20, 8, 6, 0.72) 100%);
}

.content {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  padding: 2rem;
}

.content > div {
  max-width: 860px;
}

.content h1 {
  margin-bottom: 1rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.h1-name {
  display: block;
  font-size: 2.5rem;
  line-height: 1.08;
}

.h1-rest {
  display: block;
  margin-top: 0.6rem;
  font-family: var(--font-body);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0;
}

.hero-subtitle {
  font-size: 1.1rem;
  line-height: 1.5;
  margin: 0 auto 2rem;
  max-width: 46ch;
  color: #f3e7e4;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ---------- Бутони ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 48px;
  background-color: #ffffff;
  color: var(--text-dark);
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  border: 2px solid #ffffff;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  font-variant-numeric: tabular-nums;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.16s var(--ease-out);
}

.btn i {
  color: var(--primary-color);
}

.btn-outline {
  background: transparent;
  color: #ffffff;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
}

.btn-primary i {
  color: inherit;
}

.btn-quiet {
  background: var(--surface);
  color: var(--primary-color);
  border-color: var(--primary-line);
}

/* Натискане – кратко свиване за усещане за отговор */
.btn:active,
.service-btn:active,
.contact-form button:active,
.main-nav a.nav-phone:active,
.call-fab:active,
.chip:active {
  transform: scale(0.97);
}

/* Hover само за устройства с мишка */
@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    background-color: #f3eae8;
    border-color: #f3eae8;
  }

  .btn-outline:hover {
    background: rgba(255, 255, 255, 0.14);
    border-color: #ffffff;
  }

  .btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
  }

  .btn-quiet:hover {
    background: var(--primary-tint);
  }

  .main-nav a.nav-phone:hover {
    background: rgba(255, 255, 255, 0.12);
  }

  .service-btn:hover {
    background: var(--primary-dark);
  }

  .contact-form button:hover:not(:disabled) {
    background: var(--primary-dark);
  }

  .service:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
  }
}

/* Слайдер: пауза + точки (голяма зона за докосване, малка видима точка) */
.indicators {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0.15rem;
  z-index: 10;
}

.indicator,
.slider-pause {
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #fff;
}

.slider-pause {
  font-size: 0.8rem;
  opacity: 0.85;
}

.indicator::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.55);
  transition:
    background-color 0.3s ease,
    transform 0.3s var(--ease-out);
}

.indicator.active::before {
  background-color: #fff;
  transform: scale(1.35);
}

/* ---------- Общи ---------- */
.section-title {
  font-size: 2rem;
  line-height: 1.2;
}

.section-title.center::after {
  content: "";
  display: block;
  width: 44px;
  height: 2px;
  margin: 0.7rem auto 0;
  background: var(--brass);
  border-radius: 2px;
}

.center {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.section-intro,
.section-text {
  text-align: center;
  max-width: 62ch;
  margin: -0.75rem auto 2rem;
  color: var(--text-muted);
}

.muted {
  color: var(--text-muted);
}

.about-grid {
  display: flex;
  justify-content: center;
}

.about-grid > div {
  background-color: var(--surface);
  padding: 2.25rem 2.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 820px;
  border-top: 3px solid var(--primary-color);
}

.card-title {
  font-size: 1.3rem;
  margin-bottom: 0.9rem;
  color: var(--text-dark);
}

.about-grid > div p:not(.card-title) {
  max-width: 70ch;
}

.about-grid > div p + p {
  margin-top: 0.9rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  font-weight: 600;
  color: var(--primary-color);
}

.map-link {
  margin-top: 0.75rem;
}

/* ---------- Карти с правни области ---------- */
.services-band {
  background-color: var(--primary-tint);
}

.services {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.services-flush {
  margin-top: 0;
}

.services > * {
  min-width: 0;
}

.service {
  background-color: var(--surface);
  padding: 1.75rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-top: 3px solid var(--primary-color);
  transition:
    transform 0.3s var(--ease-out),
    box-shadow 0.3s var(--ease-out);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service h2,
.service > h3,
.service-name {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
}

.service h2 a,
.service > h3 a,
.service-name a {
  color: inherit;
}

.service-name a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.service h2 i,
.service > h3 i,
.service-name i {
  color: var(--brass);
  font-size: 1.1rem;
  flex: none;
}

.service > p {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.service-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}

/* В картите бутоните са долу – подравнени в целия ред */
.service > .service-buttons {
  margin-top: auto;
  padding-top: 1.25rem;
}

/* Бутоните са H3 (за търсачките), но изглеждат като досега */
.service-buttons h3 {
  display: flex;
  flex: 1 1 auto;
  font: inherit;
}

.service-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1 1 auto;
  min-height: 46px;
  padding: 0.65rem 1rem;
  background: var(--primary-color);
  color: #ffffff;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.97rem;
  line-height: 1.3;
  transition:
    background-color 0.2s ease,
    transform 0.16s var(--ease-out);
}

.service ul.sub-links {
  list-style: none;
  margin-top: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 0.5rem;
}

.service ul.sub-links h3 {
  font: inherit;
  font-size: 0.98rem;
}

.service ul.sub-links a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-dark);
}

.service ul.sub-links i {
  color: var(--primary-color);
  font-size: 0.7rem;
  margin-right: 0.6rem;
}

@media (min-width: 600px) {
  .services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .services {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* В статията на районите картите са в по-тясна колона */
.article .services {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
}

.article .service {
  box-shadow: none;
  border: 1px solid var(--line);
  border-top: 3px solid var(--primary-color);
  padding: 1.25rem;
}

.article .service > h3 {
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}

.article .service > h3 a {
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.article .service > p {
  margin: 0;
  font-size: 0.97rem;
}

/* ---------- Чипове ---------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--primary-line);
  color: var(--text-dark);
  font-size: 0.97rem;
  transition: transform 0.16s var(--ease-out);
}

.chip i {
  color: var(--brass);
}

/* ---------- FAQ ---------- */
.section-title + .faq {
  margin-top: 0;
}

.faq {
  max-width: 860px;
  margin: 0 auto;
  display: grid;
  gap: 0.75rem;
}

.faq details {
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  transition:
    border-color 0.2s ease,
    box-shadow 0.3s var(--ease-out);
}

.faq details[open] {
  border-color: var(--primary-line);
  box-shadow: var(--shadow);
}

.faq summary {
  cursor: pointer;
  min-height: 56px;
  padding: 1rem 1.35rem;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 0.85rem;
  color: var(--brass);
  transition: transform 0.25s var(--ease-out);
  flex: none;
}

.faq details[open] summary::after {
  transform: rotate(180deg);
}

.faq-body p {
  padding: 0 1.35rem 1.2rem;
  color: var(--text-muted);
  max-width: 72ch;
}

/* ---------- Контакт ---------- */
.contact-combined {
  max-width: 720px;
  margin: 2rem auto 0;
  background: var(--surface);
  padding: 2.25rem;
  border-radius: 16px;
  box-shadow: var(--shadow-hover);
  border-top: 4px solid var(--primary-color);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.contact-header {
  text-align: center;
}

.contact-header i {
  font-size: 2rem;
  color: var(--brass);
}

.contact-title {
  margin-top: 0.4rem;
  font-size: 1.6rem;
  color: var(--primary-color);
}

.contact-form {
  display: grid;
  gap: 1.1rem;
}

.field {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.field label {
  font-weight: 600;
  font-size: 0.97rem;
}

.field-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: -0.2rem;
}

.field-error {
  color: #b3261e;
  font-size: 0.92rem;
  font-weight: 600;
}

.field-error[hidden] {
  display: none;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.8rem 1rem;
  border: 1px solid #cfc4c1;
  border-radius: 8px;
  background: #fdfcfb;
  color: var(--text-dark);
  font: inherit;
  font-size: 1rem;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.contact-form textarea {
  resize: vertical;
  min-height: 140px;
}

.contact-form input:focus,
.contact-form textarea:focus {
  background: #fff;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(122, 13, 13, 0.14);
  outline: none;
}

.contact-form input[aria-invalid="true"],
.contact-form textarea[aria-invalid="true"] {
  border-color: #b3261e;
}

.contact-form button {
  min-height: 52px;
  padding: 0.9rem 1rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition:
    background-color 0.2s ease,
    transform 0.16s var(--ease-out);
}

.contact-form button:disabled {
  opacity: 0.75;
  cursor: wait;
}

.form-privacy {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
}

.contact-note {
  background: var(--primary-tint);
  padding: 1rem 1.2rem;
  border-radius: 10px;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  font-size: 0.97rem;
}

.contact-note i {
  color: var(--brass);
  font-size: 1.25rem;
  margin-top: 0.15rem;
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.nap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  max-width: 1000px;
  margin: 0 auto;
}

.nap-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem 1.25rem;
  text-align: center;
  border-top: 3px solid var(--primary-color);
}

.nap-card i {
  font-size: 1.5rem;
  color: var(--brass);
  margin-bottom: 0.5rem;
}

.nap-title {
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
}

.nap-card a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-dark);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.nap-hours {
  max-width: 1000px;
  margin: 1.5rem auto 0;
  text-align: center;
  color: var(--text-muted);
  line-height: 1.9;
}

.nap-hours i {
  color: var(--brass);
  margin-right: 0.35rem;
}

.map-embed {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--primary-tint);
}

.map-embed iframe {
  width: 100%;
  max-width: 100%;
  height: 380px;
  border: none;
  display: block;
}

/* ---------- Вътрешни страници ---------- */
.page-hero {
  position: relative;
  background: var(--primary-color);
  color: #fff;
  max-width: none;
  padding: 3.25rem 2rem 3rem;
}

.page-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.page-hero h1 {
  font-size: 2.4rem;
  line-height: 1.15;
  margin: 0.75rem 0 0.9rem;
  max-width: 920px;
}

.page-hero .lead {
  max-width: 68ch;
  font-size: 1.15rem;
  color: var(--on-primary-muted);
}

.page-hero .hero-actions {
  justify-content: flex-start;
  margin-top: 1.6rem;
}

.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.92rem;
  color: var(--on-primary-muted);
}

.breadcrumbs li + li::before {
  content: "›";
  margin-right: 0.35rem;
}

.breadcrumbs a {
  color: inherit;
}

.content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 2.5rem;
  align-items: start;
}

.content-layout > * {
  min-width: 0;
}

.article {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.75rem 3rem;
  font-size: 1.07rem;
}

.article > p,
.article > ul,
.article > ol,
.article > .callout {
  max-width: 72ch;
}

.article h2 {
  color: var(--primary-color);
  font-size: 1.55rem;
  line-height: 1.25;
  margin: 2.5rem 0 0.9rem;
}

.article h2:first-child {
  margin-top: 0;
}

.article > h3 {
  font-size: 1.2rem;
  margin: 1.6rem 0 0.5rem;
}

.article p {
  margin-bottom: 1rem;
}

.article > ul,
.article > ol {
  margin: 0 0 1.1rem 1.4rem;
}

.article li {
  margin-bottom: 0.45rem;
  padding-left: 0.2rem;
}

.article li::marker {
  color: var(--brass);
}

.article .callout {
  background: var(--primary-tint);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 1.4rem 0;
}

/* Таблици: на телефон всеки ред е блок с етикети, от 720px – обикновена таблица */
.table-wrap {
  margin: 1rem 0 1.5rem;
}

.article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.98rem;
}

.article thead {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.article tr {
  display: block;
  padding: 0.75rem 1rem;
  margin-bottom: 0.6rem;
  background: var(--primary-tint);
  border-radius: 10px;
}

.article td {
  display: block;
  padding: 0.15rem 0;
}

.article td::before {
  content: attr(data-label);
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.article td:first-child {
  font-weight: 700;
  color: var(--primary-color);
}

.article td:first-child::before {
  content: none;
}

@media (min-width: 720px) {
  .table-wrap {
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
  }

  .article thead {
    position: static;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }

  .article tr {
    display: table-row;
    padding: 0;
    margin: 0;
    background: none;
    border-radius: 0;
  }

  .article th,
  .article td {
    display: table-cell;
    border-bottom: 1px solid var(--line);
    padding: 0.7rem 0.9rem;
    text-align: left;
    vertical-align: top;
  }

  .article tr:last-child td {
    border-bottom: none;
  }

  .article th {
    background: var(--primary-tint);
    color: var(--primary-color);
    font-weight: 600;
  }

  .article td:first-child {
    color: var(--text-dark);
    font-weight: 600;
  }

  .article td::before {
    content: none;
  }
}

.areas-served {
  margin-top: 2rem !important;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
}

.areas-served i {
  color: var(--brass);
  margin-right: 0.3rem;
}

.sidebar {
  position: sticky;
  top: calc(var(--header-h) + 1.5rem);
  display: grid;
  gap: 1.5rem;
}

.side-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  border-top: 3px solid var(--primary-color);
}

.side-title {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}

.side-card p:not(.side-title) {
  font-size: 0.97rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.side-card .btn {
  width: 100%;
  margin-top: 0.6rem;
}

.side-card ul {
  list-style: none;
}

.side-card li {
  border-bottom: 1px solid var(--line);
}

.side-card li:last-child {
  border-bottom: none;
}

.side-card li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0.3rem 0;
  color: var(--text-dark);
  font-size: 0.97rem;
}

.side-card li a[aria-current="page"] {
  color: var(--primary-color);
  font-weight: 700;
}

.cta-band {
  background: var(--primary-color);
  color: #fff;
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cta-title {
  font-size: 1.5rem;
  margin-bottom: 0.35rem;
}

.cta-band p:not(.cta-title) {
  color: var(--on-primary-muted);
  max-width: 56ch;
}

.cta-band .hero-actions {
  justify-content: flex-start;
}

.related-block {
  margin-top: 2.75rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.related-block h2 {
  margin-top: 0;
  font-size: 1.35rem;
}

.related-title {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.related-block .service-buttons h3 {
  flex: 0 1 auto;
}

/* ---------- Райони ---------- */
.areas-bottom {
  padding-top: 0;
  padding-bottom: 2rem;
}

.areas-line {
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.75;
  max-width: 75ch;
  margin: 0 auto;
  color: var(--text-muted);
}

.areas-bulgaria {
  margin: 2rem auto 0;
  max-width: 820px;
  text-align: center;
  background: var(--primary-tint);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.areas-bulgaria i {
  color: var(--brass);
  margin-right: 0.4rem;
}

/* ---------- Благодарност / 404 ---------- */
.message-page {
  text-align: center;
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.message-page .fa-circle-check {
  font-size: 2.75rem;
  color: #2f7a3d;
}

.message-page h1 {
  font-size: 2.1rem;
  color: var(--primary-color);
  max-width: 24ch;
}

.message-page p {
  max-width: 60ch;
}

.message-page .hero-actions {
  margin-top: 0.75rem;
}

/* ---------- Footer ---------- */
.footer-grid {
  background-color: var(--primary-color);
  color: white;
  padding-top: 3.5rem;
  margin-top: 3rem;
}

.footer-top {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.4fr;
  gap: 2.5rem;
}

.footer-top > * {
  min-width: 0;
}

.footer-title {
  font-size: 1.35rem;
  margin-bottom: 0.9rem;
}

.footer-head {
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.footer-col p {
  margin-bottom: 0.6rem;
  color: var(--on-primary-muted);
}

.footer-col > a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--on-primary-muted);
}

.footer-col i {
  margin-right: 8px;
  color: var(--brass-light);
  width: 1.1em;
  text-align: center;
}

.footer-col address {
  font-style: normal;
}

.footer-col address a {
  display: inline-block;
  padding: 0.6rem 0;
  color: var(--on-primary-muted);
}

.footer-col address p {
  margin-bottom: 0.2rem;
}

.footer-bar {
  font-size: 0.92rem;
}

.footer-bar a {
  display: inline-block;
  padding: 0.5rem 0;
  color: #fff;
}

.footer-map {
  max-width: 1200px;
  margin: 0 auto 2.5rem;
  padding: 0 2rem;
}

.footer-map iframe {
  width: 100%;
  height: 320px;
  border: none;
  display: block;
  border-radius: var(--radius);
}

.footer-bottom {
  background-color: var(--primary-dark);
  color: var(--on-primary-muted);
  text-align: center;
  padding: 1.2rem 1rem;
  font-size: 0.95rem;
}

.call-fab {
  display: none;
}

.nav-backdrop {
  display: none;
}

/* Дълги думи („административнонаказателно“) се пренасят, вместо да разпъват страницата */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}

h1,
h2,
h3,
p,
li,
td,
th,
a,
summary,
.service-btn,
.chip {
  overflow-wrap: break-word;
  hyphens: auto;
}

/* ---------- Езици (флагчета) ---------- */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: 1.25rem;
}

.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-width: 44px;
  min-height: 44px;
  padding: 0 0.4rem;
  border-radius: 6px;
  color: #fff;
  font-size: 0.85rem;
  opacity: 0.7;
}

.lang-switch a.current {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
}

.flag {
  display: block;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.lang-code {
  display: none;
}

/* ---------- Responsive ---------- */
@media (min-width: 768px) {
  section {
    max-width: min(90%, 1200px);
  }

  .hero,
  .page-hero {
    max-width: none;
  }

  .h1-name {
    font-size: 4rem;
  }

  .h1-rest {
    font-size: 1.5rem;
  }
}

@media (max-width: 1180px) {
  .main-nav > a {
    margin-left: 1.25rem;
  }
}

/* Хамбургер меню под 1024px – панел, който се плъзга отдясно */
@media (max-width: 1023px) {
  .nav-backdrop {
    display: block;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
    position: relative;
    z-index: 1100;
  }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    right: 0;
    width: min(320px, 86vw);
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    padding: 0.5rem 0 calc(1.5rem + env(safe-area-inset-bottom));
    flex-direction: column;
    align-items: stretch;
    background-color: var(--primary-darker);
    box-shadow: -8px 0 24px rgba(0, 0, 0, 0.25);
    overscroll-behavior: contain;
    transform: translateX(100%);
    visibility: hidden;
    transition:
      transform 0.4s var(--ease-drawer),
      visibility 0.4s;
    z-index: 1000;
    overflow-y: auto;
  }

  .main-nav.open {
    transform: none;
    visibility: visible;
  }

  /* Затъмнение зад менюто – докосване върху него затваря менюто */
  .nav-backdrop {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: rgba(25, 8, 6, 0.5);
    opacity: 0;
    visibility: hidden;
    transition:
      opacity 0.3s ease,
      visibility 0.3s;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-open .nav-backdrop {
    opacity: 1;
    visibility: visible;
  }

  /* Страницата отдолу не се скролва, докато менюто е отворено */
  html.nav-open,
  html.nav-open body {
    overflow: hidden;
  }

  .nav-open .call-fab {
    opacity: 0;
    pointer-events: none;
  }

  .main-nav > a {
    margin: 0 1.25rem;
    min-height: 54px;
    font-size: 1.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .main-nav > a.active::after {
    content: none;
  }

  .main-nav > a.active {
    font-weight: 700;
  }

  .main-nav a.nav-phone {
    margin-top: 1rem;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.55);
  }

  .lang-switch {
    margin: 1.25rem 1.25rem 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    justify-content: space-between;
  }

  .lang-switch a {
    padding: 0 0.6rem;
    font-size: 1rem;
  }

  .lang-code {
    display: inline;
  }

  .content-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: static;
  }

  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  :root {
    --header-h: 60px;
  }

  body {
    font-size: 1rem;
  }

  .site-header {
    padding: 0.5rem 0.75rem 0.5rem 1rem;
  }

  .brand {
    font-size: 1.05rem;
  }

  section {
    padding: 3rem 1rem;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .h1-name {
    font-size: 2.4rem;
  }

  .h1-rest {
    font-size: 1.15rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .page-hero {
    padding: 2.25rem 1rem 2rem;
  }

  .page-hero h1 {
    font-size: 1.8rem;
  }

  .page-hero .lead {
    font-size: 1.05rem;
  }

  .article {
    padding: 1.5rem 1.15rem;
    font-size: 1.02rem;
  }

  .article h2 {
    font-size: 1.35rem;
  }

  .nap-grid,
  .field-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-grid > div {
    padding: 1.5rem 1.25rem;
  }

  .service h2,
  .service > h3,
  .service-name {
    font-size: 1.2rem;
    color: var(--primary-color);
  }

  .contact-combined {
    padding: 1.5rem 1.15rem;
  }

  .footer-top {
    grid-template-columns: minmax(0, 1fr);
    text-align: center;
    padding: 0 1rem 2.5rem;
  }

  .footer-col > a {
    justify-content: center;
  }

  .footer-map {
    padding: 0 1rem;
  }

  .footer-map iframe,
  .map-embed iframe {
    height: 280px;
  }

  /* Място за плаващия бутон да не закрива текста най-долу */
  .footer-bottom {
    padding-bottom: 5.5rem;
  }

  .call-fab {
    display: flex;
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--primary-color);
    color: #fff;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 900;
    border: 2px solid rgba(255, 255, 255, 0.85);
    transition: transform 0.16s var(--ease-out);
  }
}

@media (max-width: 480px) {
  .brand {
    font-size: 0.98rem;
    max-width: calc(100% - 52px);
  }

  .h1-name {
    font-size: 2.1rem;
  }

  .page-hero h1 {
    font-size: 1.55rem;
  }

  .page-hero .hero-actions,
  .cta-band .hero-actions,
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .article {
    padding: 1.25rem 1rem;
  }

  .article h2 {
    font-size: 1.25rem;
  }

  .article > ul,
  .article > ol {
    margin-left: 1.1rem;
  }

  .service {
    padding: 1.25rem;
  }

  .service h2,
  .service > h3,
  .service-name {
    font-size: 1.12rem;
  }

  .cta-band {
    padding: 1.5rem 1.15rem;
  }

  .contact-combined {
    padding: 1.25rem 1rem;
    margin-top: 1.5rem;
  }

  .faq summary {
    padding: 0.95rem 1rem;
  }

  .faq-body p {
    padding: 0 1rem 1rem;
  }
}

/* Намалено движение: остават смените на цвят и прозрачност, без движение и мащабиране */
@media (prefers-reduced-motion: reduce) {
  .btn:active,
  .service-btn:active,
  .contact-form button:active,
  .main-nav a.nav-phone:active,
  .call-fab:active,
  .chip:active {
    transform: none;
  }

  .service:hover {
    transform: none !important;
  }

  .main-nav {
    transition: visibility 0s;
  }
}

@media print {
  .site-header,
  .hero,
  .call-fab,
  .footer-map,
  .contact-combined,
  .cta-band,
  .sidebar {
    display: none !important;
  }

  body {
    background: #fff;
  }
}

/* ---------- Абонамент за фирми ---------- */
/* Съседните секции дават отстоянието; на началната страница картата идва след цветната лента */
.biz-section {
  padding-top: 0;
  padding-bottom: 0;
}

.services-band + .biz-section {
  padding-top: 3.5rem;
}

.biz-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.75rem;
  max-width: 980px;
  margin: 0 auto;
  padding: 2rem 2.25rem;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-darker));
  color: var(--text-light);
  border-radius: 16px;
  box-shadow: var(--shadow-hover);
}

.biz-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid var(--brass-light);
  color: var(--brass-light);
  font-size: 1.9rem;
  transition: transform 0.4s var(--ease-out);
}

.biz-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brass-light);
  margin-bottom: 0.3rem;
}

.biz-title {
  font-family: var(--font-head);
  font-size: 1.45rem;
  line-height: 1.25;
  color: #ffffff;
  margin-bottom: 0.4rem;
}

.biz-text {
  color: var(--on-primary-muted);
  margin: 0;
}

.biz-actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.6rem;
}

.biz-btn {
  gap: 0.55rem;
  background: #ffffff;
  color: var(--primary-color);
  white-space: nowrap;
}

.biz-btn i {
  transition: transform 0.25s var(--ease-out);
}

.biz-phone {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.biz-phone span {
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  text-underline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
  .biz-btn:hover {
    background: var(--primary-tint);
  }

  .biz-btn:hover i {
    transform: translateX(4px);
  }

  .biz-card:hover .biz-icon {
    transform: rotate(-8deg) scale(1.06);
  }

  .biz-phone:hover span {
    text-decoration-color: #ffffff;
  }
}

/* Светъл вариант за подстраниците, където отдолу следва червената лента „Нуждаете се от адвокат?“ */
.biz-light .biz-card {
  background: var(--surface);
  color: var(--text-dark);
  border: 1px solid var(--primary-line);
  border-left: 4px solid var(--primary-color);
  box-shadow: var(--shadow);
}

.biz-light .biz-icon {
  background: var(--primary-tint);
  border-color: var(--brass);
  color: var(--primary-color);
}

.biz-light .biz-eyebrow {
  color: var(--primary-color);
}

.biz-light .biz-title {
  color: var(--text-dark);
}

.biz-light .biz-text {
  color: var(--text-muted);
}

.biz-light .biz-btn {
  background: var(--primary-color);
  color: #ffffff;
}

.biz-light .biz-phone {
  color: var(--primary-color);
}

.biz-light .biz-phone span {
  text-decoration-color: rgba(122, 13, 13, 0.35);
}

@media (hover: hover) and (pointer: fine) {
  .biz-light .biz-btn:hover {
    background: var(--primary-dark);
  }

  .biz-light .biz-phone:hover span {
    text-decoration-color: var(--primary-color);
  }
}

@media (max-width: 760px) {
  .biz-light .biz-card {
    border-left: 1px solid var(--primary-line);
    border-top: 4px solid var(--primary-color);
  }

  .biz-card {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
    gap: 1.1rem;
    padding: 1.75rem 1.25rem;
  }

  .biz-actions {
    width: 100%;
  }

  .biz-btn {
    white-space: normal;
  }
}