/*
Theme Name: Pristavy Theme
Theme URI: https://vse-pristavy.ru
Author: Dmitry Chebanko
Description: Справочник «Все судебные приставы России»
Version: 2.0.0
Text Domain: pristavy
*/

/* =========================================================
   LOCAL SELF-HOSTED FONT: Golos Text (WOFF2)
   ========================================================= */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('fonts/golos-text-cyrillic-ext.woff2') format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('fonts/golos-text-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('fonts/golos-text-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('fonts/golos-text-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* =========================================================
   DESIGN SYSTEM TOKENS & VARIABLES
   ========================================================= */
:root {
  /* Colors */
  --primary: #1a6fd4;
  --primary-hover: #1259b5;
  --primary-soft: #e8f0fd;
  --primary-soft-hover: #d2e3fc;
  --secondary: #0d5bb8;
  --accent: #e11d48;

  /* Surfaces & Backgrounds */
  --bg: #f8f9fa;
  --card-bg: #ffffff;
  --surface-alt: #f2f3f5;

  /* Typography Colors */
  --text-main: #0f1117;
  --text-muted: #4b5563;
  --text-light: #9ca3af;

  /* Lines & Borders */
  --border: #e8e9ec;
  --border-light: #f2f3f5;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);

  /* Border Radii */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Animation */
  --transition: 0.18s ease;

  /* Typography */
  --font-family: 'Golos Text', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* =========================================================
   BASE STYLES & RESET
   ========================================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.2rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition);
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  border: 1px solid transparent;
}

.btn-primary:hover {
  background: var(--primary-hover);
  color: #ffffff;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* =========================================================
   HEADER & NAVIGATION
   ========================================================= */
.site-header {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

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

.header-main-row {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.logo-title {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  flex-shrink: 0;
}

.logo-img {
  display: block;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: var(--radius);
  transition: opacity var(--transition);
}

.logo-title:hover .logo-img {
  opacity: 0.9;
}

.logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--primary-soft);
  color: var(--primary);
  flex-shrink: 0;
  transition: background var(--transition);
}

.logo-title:hover .logo-icon {
  background: var(--primary-soft-hover);
}

.logo-icon .feather {
  width: 22px;
  height: 22px;
}

.logo-text-group {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.logo-brand-short {
  display: none;
}

.logo-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 400;
  white-space: nowrap;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.95rem;
  font-weight: 500;
  flex-shrink: 0;
}

.header-nav a {
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}

.header-nav a:hover {
  background: var(--surface-alt);
  color: var(--primary);
  text-decoration: none;
}

/* Geo Selector Trigger Button (Pill button) & Confirmation Popup */
.geo-selector-wrapper {
  position: relative;
  display: inline-flex;
  min-width: 0;
}

.geo-selector-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 7px 16px;
  border-radius: var(--radius-xl);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition);
  max-width: 100%;
}

#geoBtnCurrent {
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 180px;
}

.geo-selector-btn:hover {
  background: var(--primary-soft);
  border-color: #cbd5e1;
  color: var(--primary);
}

.geo-selector-btn .feather {
  color: var(--primary);
  flex-shrink: 0;
}

/* Confirmation Popup under Geo Selector */
.city-confirm-popup {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  width: 290px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15);
  padding: 18px 20px;
  z-index: 1050;
  text-align: left;
  animation: popupSlideDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popupSlideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.city-confirm-popup__arrow {
  position: absolute;
  top: -7px;
  left: 30px;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: rotate(45deg);
}

.city-confirm-popup__close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 20px;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition);
}

.city-confirm-popup__close:hover {
  color: var(--text-main);
}

.city-confirm-popup__text {
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--text-main);
  margin-bottom: 14px;
  padding-right: 14px;
}

.city-confirm-popup__text strong {
  color: var(--primary);
  font-weight: 600;
}

.city-confirm-popup__actions {
  display: flex;
  gap: 10px;
}

.city-confirm-popup__btn {
  flex: 1;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.city-confirm-popup__btn--yes {
  background: var(--primary);
  color: #ffffff;
}

.city-confirm-popup__btn--yes:hover {
  background: var(--primary-hover);
}

.city-confirm-popup__btn--no {
  background: var(--surface-alt);
  border-color: var(--border);
  color: var(--text-main);
}

.city-confirm-popup__btn--no:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

/* Header Responsive Layout */
@media (max-width: 860px) {
  .site-header {
    padding: 10px 0;
  }

  .header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .header-main-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 10px;
  }

  .logo-title {
    gap: 8px;
    min-width: 0;
    flex-shrink: 0;
  }

  .logo-img {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
  }

  .logo-brand {
    font-size: 1.05rem;
  }

  .logo-brand-full {
    display: none;
  }

  .logo-brand-short {
    display: inline;
  }

  .logo-sub {
    font-size: 0.72rem;
  }

  .geo-selector-wrapper {
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    justify-content: flex-end;
  }

  .geo-selector-btn {
    padding: 6px 10px;
    font-size: 0.85rem;
    gap: 6px;
    width: auto;
    max-width: 100%;
    min-width: 0;
  }

  #geoBtnCurrent {
    max-width: none;
    flex: 1;
    min-width: 0;
  }

  .city-confirm-popup {
    left: auto;
    right: 0;
    width: 280px;
  }

  .header-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
  }

  .header-nav a.header-nav-link {
    flex: 1;
    text-align: center;
    padding: 8px 10px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.86rem;
    font-weight: 500;
  }

  .header-nav a.header-nav-link:hover {
    background: var(--primary-soft);
    border-color: #cbd5e1;
  }

  .header-search-wrap {
    flex-shrink: 0;
  }

  /* Popup stays strictly aligned to the right inside viewport */
  .city-confirm-popup {
    left: auto;
    right: 0;
    width: 280px;
    max-width: calc(100vw - 32px);
  }

  .city-confirm-popup__arrow {
    left: auto;
    right: 28px;
  }
}

@media (max-width: 480px) {
  .logo-brand {
    font-size: 0.95rem;
  }

  .logo-sub {
    display: none;
  }

  #geoBtnCurrent {
    max-width: none;
  }

  .header-nav a.header-nav-link {
    font-size: 0.82rem;
    padding: 7px 6px;
  }
}


/* Header Search */
.header-search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.header-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-main);
  cursor: pointer;
  transition: all var(--transition);
}

.header-search-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: #c7d9f9;
}

.header-search-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 10px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 10px;
  min-width: 300px;
  z-index: 1000;
  animation: fadeIn 0.15s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.header-search-form {
  display: flex;
  gap: 8px;
}

.header-search-input {
  flex: 1;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}

.header-search-input:focus {
  border-color: var(--primary);
}

.header-search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}

.header-search-submit:hover {
  background: var(--primary-hover);
}

/* =========================================================
   BREADCRUMBS
   ========================================================= */
.breadcrumbs-bar {
  padding: 14px 0 6px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.breadcrumbs-bar .container {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}

.breadcrumbs-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  text-align: left;
}

.breadcrumbs-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumbs-nav a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.breadcrumbs-nav span.sep {
  color: var(--text-light);
  font-size: 0.8rem;
  user-select: none;
  margin: 0 1px;
}

.breadcrumbs-nav span.current {
  color: var(--text-main);
  font-weight: 500;
}

/* =========================================================
    QUICK JUMP PILLS (.tb-i-container)
   ========================================================= */
.tb-i-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 24px;
  padding-bottom: 6px;
}

.tb-i-block a, .tb-i-block span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  background: var(--surface-alt);
  color: var(--secondary);
  border-radius: var(--radius-xl);
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none !important;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.tb-i-block a:hover {
  background: var(--primary-soft);
  color: var(--primary-hover);
  border-color: #d0e1fd;
}

.tb-i-block strong {
  font-weight: 700;
  font-size: 0.82rem;
  background: rgba(26, 111, 212, 0.12);
  color: var(--primary);
  padding: 1px 7px;
  border-radius: 10px;
}

/* =========================================================
   HERO SEARCH BOX (Homepage)
   ========================================================= */
.search-box-wrapper {
  background: linear-gradient(135deg, #1259b5 0%, #1a6fd4 100%);
  color: white;
  padding: 46px 0;
  border-radius: 0;
  margin: 0 0 32px;
  box-shadow: 0 8px 24px rgba(26, 111, 212, 0.18);
}

.search-box-wrapper .container {
  background-image: url('assets/img/hero-home.png');
  background-repeat: no-repeat;
  background-position: right center;
  background-size: contain;
  position: relative;
}

.search-box-wrapper .container > * {
  position: relative;
  z-index: 1;
}

.search-box-wrapper h1 {
  font-size: 2.1rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: #ffffff;
}

.search-box-wrapper p {
  opacity: 0.92;
  font-size: 1.05rem;
  margin-bottom: 24px;
  max-width: 780px;
  line-height: 1.6;
}

.search-form-flex {
  display: flex;
  max-width: 760px;
  gap: 10px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 280px;
  padding: 14px 20px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  font-size: 1rem;
  font-family: inherit;
  background: #ffffff;
  color: var(--text-main);
  outline: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transition: all var(--transition);
}

.search-input:focus {
  border-color: #ffffff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
}

.search-submit {
  background: #0f1117;
  color: #ffffff;
  font-weight: 600;
  font-family: inherit;
  border: none;
  padding: 14px 28px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all var(--transition);
}

.search-submit:hover {
  background: #1f2937;
}

/* =========================================================
   CARDS & LAYOUT
   ========================================================= */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}

.card-header-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.grid-cols-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

@media (max-width: 850px) {
  .grid-cols-2 {
    grid-template-columns: 1fr;
  }
}

/* Catalog Grids */
.grid-regions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.region-card-item {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none !important;
  color: var(--text-main);
  transition: all var(--transition);
}

.region-card-item:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
  background: #fbfdff;
}

.region-card-item:hover span {
  color: var(--primary);
}

.region-code-badge {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  flex-shrink: 0;
}

/* =========================================================
   DATA SPECIFICATIONS & INFO ROWS
   ========================================================= */
.info-row {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
  gap: 16px;
  font-size: 0.95rem;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  font-weight: 500;
  min-width: 170px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.info-val {
  flex: 1;
  color: var(--text-main);
  font-weight: 500;
  word-break: break-word;
}

.schedule-box {
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-line;
  color: var(--text-main);
}

/* =========================================================
   TABLES & STAFF DIRECTORY
   ========================================================= */
.data-table, .staff-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 12px;
  background: #ffffff;
}

.data-table th, .staff-table th {
  background: #f9fafb;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.data-table td, .staff-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.95rem;
  color: var(--text-main);
}

.data-table tr:last-child td, .staff-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td, .staff-table tr:hover td {
  background-color: #fbfcfe;
}

/* Chief row subtle highlight */
.staff-row-chief td {
  background-color: #fafcff;
}

/* Telephone numbers in tables: ensure 1 single line */
.data-table td a[href^="tel:"],
.staff-table td a[href^="tel:"] {
  white-space: nowrap;
  display: inline-block;
}

/* Badges & Tags */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none !important;
}

.badge-oupds {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

/* =========================================================
   GEO SELECTOR MODAL 
   ========================================================= */
.geo-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.geo-modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(3px);
}

.geo-modal-container {
  position: relative;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 860px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 1;
}

.geo-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
}

.geo-modal-title {
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
}

.geo-modal-title .feather {
  color: var(--primary);
}

.geo-modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  transition: all var(--transition);
}

.geo-modal-close:hover {
  background: var(--surface-alt);
  color: var(--text-main);
}

.geo-modal-search {
  position: relative;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border-light);
  background: #fafbfc;
}

.geo-search-icon {
  position: absolute;
  left: 38px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  pointer-events: none;
}

.geo-search-input {
  width: 100%;
  padding: 10px 16px 10px 42px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  background: #ffffff;
  transition: all var(--transition);
}

.geo-search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 111, 212, 0.12);
}

.geo-modal-columns {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 380px;
}

.geo-col-regions {
  width: 40%;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.geo-col-cities {
  width: 60%;
  display: flex;
  flex-direction: column;
  background: #fafbfc;
}

.geo-col-header {
  padding: 10px 18px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: #f8fafc;
  border-bottom: 1px solid var(--border-light);
}

.geo-regions-list {
  list-style: none;
  overflow-y: auto;
  flex: 1;
  max-height: 400px;
}

.geo-region-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 18px;
  cursor: pointer;
  font-size: 0.92rem;
  border-bottom: 1px solid #f8fafc;
  transition: background var(--transition);
}

.geo-region-item:hover, .geo-region-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.geo-region-arrow {
  color: var(--text-light);
  font-size: 1.1rem;
}

.geo-region-all-link-wrap {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-light);
  background: #ffffff;
}

.geo-all-depts-link {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--primary);
  display: inline-block;
}

.geo-all-depts-link:hover {
  text-decoration: underline;
}

.geo-cities-scroll {
  overflow-y: auto;
  flex: 1;
  padding: 14px 18px;
  max-height: 360px;
}

.geo-cities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 12px;
}

.geo-city-item {
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-main);
  transition: all var(--transition);
}

.geo-city-item:hover {
  background: var(--primary-soft);
  color: var(--primary);
  text-decoration: none;
}

.geo-search-results {
  flex: 1;
  overflow-y: auto;
  padding: 18px 24px;
  max-height: 440px;
}

.geo-search-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.geo-search-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
}

.geo-search-result-item {
  display: flex;
  flex-direction: column;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  color: var(--text-main);
  transition: all var(--transition);
}

.geo-search-result-item:hover {
  border-color: #cbd5e1;
  background: var(--primary-soft);
  text-decoration: none;
}

.geo-result-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--surface-alt);
  color: var(--text-muted);
  margin-left: 6px;
}

.geo-result-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* =========================================================
   COOKIE BANNER
   ========================================================= */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99990;
  background: #0f1117;
  color: #f8fafc;
  box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
  border-top: 1px solid #1f2937;
  padding: 16px 0;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

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

.cookie-banner-text {
  flex: 1;
  min-width: 280px;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #d1d5db;
}

.cookie-banner-text a {
  color: #60a5fa;
  text-decoration: underline;
  transition: color var(--transition);
}

.cookie-banner-text a:hover {
  color: #93c5fd;
}

.cookie-banner-actions {
  flex-shrink: 0;
}

.cookie-accept-btn {
  background: var(--primary);
  color: #ffffff;
  border: none;
  padding: 9px 24px;
  border-radius: var(--radius);
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition);
}

.cookie-accept-btn:hover {
  background: var(--primary-hover);
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
  background: #0f1117;
  color: #9ca3af;
  padding: 48px 0 24px;
  margin-top: 60px;
  font-size: 0.88rem;
  border-top: 1px solid #1f2937;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  border-bottom: 1px solid #1f2937;
  padding-bottom: 24px;
  margin-bottom: 24px;
}

.footer-inner a {
  color: #d1d5db;
  text-decoration: none;
}

.footer-inner a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-legal-link {
  color: #9ca3af;
  transition: color var(--transition);
}

.footer-legal-link:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Footer Official Logos */
.footer-logos {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

.footer-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  transition: all var(--transition);
  text-decoration: none !important;
}

.footer-logo-link:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.footer-logo-link img {
  display: block;
  width: auto;
  height: 42px;
  object-fit: contain;
}

.footer-bottom {
  text-align: center;
  color: #64748b;
  font-size: 0.82rem;
  padding-top: 4px;
}

/* Feather Icons helper */
.feather {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* =========================================================
   DIRECTORY HUBS & SITEMAP
   ========================================================= */
.hub-search-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.hub-search-input {
  width: 100%;
  padding: 12px 18px 12px 46px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.98rem;
  font-family: inherit;
  outline: none;
  background: #ffffff;
  transition: all var(--transition);
}

.hub-search-input:focus {
  border-color: #cbd5e1;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.05);
}

.hub-search-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}

.hub-search-btn:hover {
  background: var(--primary-hover);
}

.hub-stats-row {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

.hub-stat-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.hub-stat-num {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
}

.hub-stat-label {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.sitemap-link {
  display: flex;
  flex-direction: column;
  padding: 12px 16px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none !important;
  color: var(--text-main);
  transition: all var(--transition);
}

.sitemap-link strong {
  font-size: 0.95rem;
  color: var(--primary);
  margin-bottom: 2px;
}

.sitemap-link span {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.sitemap-link:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow);
  background: #ffffff;
}

.sitemap-region-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none !important;
  color: var(--text-main);
  transition: all var(--transition);
}

.sitemap-region-item:hover {
  background: var(--surface-alt);
  border-color: #cbd5e1;
}

.sitemap-reg-name {
  font-size: 0.9rem;
  font-weight: 500;
}

.sitemap-reg-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Sitemap Alphabet & City Grid */
.sitemap-alphabet-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 24px;
  padding: 12px 14px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.sitemap-alpha-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 6px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-decoration: none !important;
  transition: all var(--transition);
}

.sitemap-alpha-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.sitemap-letter-group {
  margin-bottom: 28px;
}

.sitemap-letter-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 12px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--primary-soft);
}

.sitemap-letter-badge {
  font-size: 0.78rem;
  font-weight: 500;
  background: var(--surface-alt);
  color: var(--text-muted);
  padding: 2px 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.sitemap-city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
}

.sitemap-city-item {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  line-height: 1.35;
  color: var(--text-main);
  text-decoration: none !important;
  transition: all var(--transition);
  word-break: break-word;
}

.sitemap-city-item:hover {
  background: var(--primary-soft);
  border-color: #cbd5e1;
  color: var(--primary);
}


/* =========================================================
   TEXT PAGES & LEGAL TYPOGRAPHY (.entry-content)
   ========================================================= */
.entry-content {
  color: var(--text-main);
  line-height: 1.75;
}

.entry-content p {
  margin-bottom: 1.15em;
}

.entry-content h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 2em;
  margin-bottom: 0.75em;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 6px;
}

.entry-content h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 1.5em;
  margin-bottom: 0.6em;
  color: var(--text-main);
}

.entry-content ul, .entry-content ol {
  margin-bottom: 1.25em;
  padding-left: 24px;
}

.entry-content li {
  margin-bottom: 0.5em;
}

.entry-content strong {
  font-weight: 600;
  color: var(--text-main);
}

.entry-content a {
  color: var(--primary);
  text-decoration: underline;
}

.entry-content a:hover {
  color: var(--primary-hover);
}

.entry-content blockquote {
  margin: 1.5em 0;
  padding: 12px 18px;
  background: var(--surface-alt);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Hide Leaflet map attribution */
.leaflet-control-attribution.leaflet-control,
.leaflet-control-attribution {
  display: none !important;
}

/* =========================================================
   PAGE HERO FULL-WIDTH (Region, City, Department)
   ========================================================= */
.page-hero-full {
  width: 100%;
  background: linear-gradient(135deg, #D2E3FC 0%, #E8F0FD 100%);
  border-radius: 0;
  border-bottom: 1px solid #c7daf7;
  padding: 38px 0;
  margin: 0 0 28px;
}

.page-hero-container {
  position: relative;
  min-height: 140px;
  display: flex;
  align-items: center;
  background-repeat: no-repeat;
  background-position: right center;
  background-size: contain;
}

.page-hero-content {
  max-width: 50%;
  width: 50%;
  position: relative;
  z-index: 1;
}

.page-hero-content h1 {
  font-size: 2rem;
  line-height: 1.25;
  margin-bottom: 10px;
  color: var(--text-main);
}

.page-hero-content p {
  color: var(--text-muted);
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.5;
}

.page-hero-content .tb-i-container {
  margin: 0;
}

.page-hero-region {
  background-image: url('assets/img/hero-region.png');
}

.page-hero-city {
  background-image: url('assets/img/hero-city.png');
}

.page-hero-dept {
  background-image: url('assets/img/hero-dept.png');
}

.page-hero-dept .page-hero-content {
  max-width: 100%;
  width: 100%;
}

.page-hero-dept .page-hero-content h1 {
  max-width: 50%;
}

.page-hero-dept .tb-i-container {
  max-width: 100%;
  width: 100%;
}

@media (max-width: 860px) {
  /* Hide hero illustrations on mobile devices, show only on desktop */
  .search-box-wrapper .container {
    background-image: none !important;
  }

  .page-hero-container {
    background-image: none !important;
    min-height: auto;
  }

  .page-hero-full {
    padding: 24px 0;
    margin-bottom: 20px;
  }

  .page-hero-content,
  .page-hero-dept .page-hero-content h1 {
    max-width: 100%;
    width: 100%;
  }

  .page-hero-content h1 {
    font-size: 1.5rem;
  }

  /* Info rows in 1 column on mobile */
  .info-row {
    flex-direction: column;
    gap: 4px;
    padding: 10px 0;
  }

  .info-label {
    min-width: auto;
    font-size: 0.88rem;
    color: var(--text-muted);
  }

  .info-val {
    font-size: 0.98rem;
  }
}

/* Compact stacked info item */
.info-stacked {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.info-stacked-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.info-stacked-val {
  color: var(--text-main);
  font-size: 0.95rem;
  line-height: 1.45;
}

/* Stat Cards on Homepage with 3D illustrations */
.stat-card {
  position: relative;
  overflow: hidden;
  min-height: 110px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-repeat: no-repeat;
  background-position: right center;
  background-size: contain;
}

.stat-card > * {
  position: relative;
  z-index: 1;
}

.stat-card-regions {
  background-image: url('assets/img/stat-regions.png');
}

.stat-card-depts {
  background-image: url('assets/img/stat-depts.png');
}

.stat-card-staff {
  background-image: url('assets/img/stat-staff.png');
}

/* =========================================================
   SCROLL TO TOP BUTTON
   ========================================================= */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(26, 111, 212, 0.35);
  cursor: pointer;
  z-index: 990;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease, background 0.18s ease;
}

.scroll-top-btn.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top-btn:hover {
  background: var(--primary-hover);
  box-shadow: 0 6px 20px rgba(18, 89, 181, 0.45);
  transform: translateY(-2px);
}

.scroll-top-btn .feather {
  width: 22px;
  height: 22px;
  stroke-width: 2.5;
}

@media (max-width: 768px) {
  .scroll-top-btn {
    bottom: 18px;
    right: 18px;
    width: 40px;
    height: 40px;
  }

  .scroll-top-btn .feather {
    width: 20px;
    height: 20px;
  }
}
