/* ==========================================================================
   MATRIX & CATALOG SEO PAGES STYLES - PIXEL-PERFECT GRID ALIGNMENT
   ========================================================================== */

/* Page Hero */
.page-hero {
  background: #EAF3FA;
  padding: 28px 0 20px;
  border-bottom: 1px solid var(--color-border);
  width: 100%;
}

.breadcrumbs {
  display: flex;
  gap: 6px;
  font-size: 13px;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.breadcrumbs a {
  color: var(--color-primary);
  font-weight: 600;
}

.breadcrumbs a:hover {
  text-decoration: underline;
}

.breadcrumbs span {
  color: var(--color-text-subtle);
}

.page-h1 {
  font-size: 26px;
  font-weight: 900;
  color: var(--color-text-main);
  margin-bottom: 8px;
  line-height: 1.3;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
  -webkit-hyphens: none;
}

/* 2-Column Page Layout */
.page-layout {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 28px;
  padding: 28px 0;
  width: 100%;
}

.content-box {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px 22px;
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
  width: 100%;
  box-sizing: border-box;
}

.content-box h2 {
  font-size: 19px;
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 14px;
  border-bottom: 1px solid var(--color-border-light);
  padding-bottom: 10px;
  line-height: 1.35;
  word-break: normal;
  overflow-wrap: break-word;
  hyphens: none;
  -webkit-hyphens: none;
}

.content-box p {
  font-size: 14.5px;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 14px;
}

/* Service Image Banner inside Content Box */
.service-image-container {
  width: 100%;
  background: #F8FAFC;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.service-image-container img {
  max-height: 180px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* SLEEK, COMPACT SPECIFICATIONS TABLE */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 22px;
  font-size: 13.5px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-sizing: border-box;
}

.spec-table tr {
  border-bottom: 1px solid var(--color-border-light);
}

.spec-table tr:last-child {
  border-bottom: none;
}

.spec-table td {
  padding: 10px 14px;
  vertical-align: middle;
  line-height: 1.45;
  box-sizing: border-box;
}

.spec-table td:first-child {
  font-weight: 600;
  color: var(--color-text-muted);
  width: 44%;
  background: #F8FAFC;
  border-right: 1px solid var(--color-border-light);
  font-size: 13px;
}

.spec-table td:last-child {
  font-weight: 700;
  color: var(--color-text-main);
  width: 56%;
  background: #ffffff;
}

/* Sticky Sidebar Card */
.sidebar-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 22px;
  box-shadow: var(--shadow-card);
  position: sticky;
  top: 85px;
  box-sizing: border-box;
  width: 100%;
}

/* Flagship Forms Highlight Grid */
.forms-highlight-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 30px;
  width: 100%;
}

.form-hub-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-card);
  transition: all 0.25s ease;
  box-sizing: border-box;
}

.form-hub-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.form-hub-107 {
  border: 2px solid var(--color-primary);
  background: linear-gradient(180deg, #ffffff 0%, #F0F6FC 100%);
}

.form-hub-148 {
  border: 2px solid var(--color-accent);
  background: linear-gradient(180deg, #ffffff 0%, #FDE8EC 100%);
}

/* Filter Bars & Chips */
.catalog-controls-panel,
.hub-filter-bar {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-sizing: border-box;
  width: 100%;
}

.hub-filter-bar {
  background: #F8FAFC;
}

.search-input-box {
  width: 100%;
  padding: 11px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s ease;
  box-sizing: border-box;
}

.search-input-box:focus {
  border-color: var(--color-primary);
}

.catalog-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip-btn,
.price-chip-btn {
  padding: 7px 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: var(--color-bg-body);
  color: var(--color-text-muted);
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.chip-btn.active,
.chip-btn:hover,
.price-chip-btn.active,
.price-chip-btn:hover {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

/* ==========================================================================
   TABLET & MOBILE ADAPTATION (PERFECT 16PX BASELINE GRID)
   ========================================================================== */
@media (max-width: 992px) {
  .page-layout {
    grid-template-columns: 1fr !important;
    gap: 18px;
    padding: 18px 0;
  }
  .sidebar-card {
    position: static;
  }
  .forms-highlight-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
}

@media (max-width: 576px) {
  .page-hero {
    padding: 16px 0 14px;
  }
  .page-h1 {
    font-size: 20px;
    line-height: 1.3;
  }
  .page-hero p {
    font-size: 13px !important;
  }

  /* Seamless Mobile Card Alignment */
  .content-box {
    padding: 16px 14px;
    border-radius: 10px;
    margin-bottom: 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  }
  .content-box h2 {
    font-size: 16px;
    margin-bottom: 10px;
    padding-bottom: 6px;
  }
  .content-box p {
    font-size: 13.5px;
    line-height: 1.55;
    margin-bottom: 12px;
  }

  /* Clean Key-Value Table */
  .spec-table {
    font-size: 12px;
    margin-bottom: 14px;
  }
  .spec-table td {
    padding: 7px 8px;
  }
  .spec-table td:first-child {
    width: 45%;
    font-size: 11.5px;
  }
  .spec-table td:last-child {
    width: 55%;
    font-size: 12px;
  }

  .service-image-container {
    padding: 8px;
    margin-bottom: 12px;
  }
  .service-image-container img {
    max-height: 130px;
  }

  .catalog-controls-panel,
  .hub-filter-bar {
    padding: 12px 10px;
    gap: 8px;
  }
  .search-input-box {
    padding: 8px 12px;
    font-size: 14.5px;
  }
  .chip-btn, .price-chip-btn {
    font-size: 11px;
    padding: 5px 9px;
  }
  .sidebar-card {
    padding: 16px 14px;
  }
}

/* ==========================================================================
   INSTANT HEADER SEARCH MODAL (SPOTLIGHT DESIGN)
   ========================================================================== */
.header-search-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--color-border);
  background: var(--color-bg-white);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.header-search-btn:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  transform: translateY(-2px);
}

.instant-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 31, 51, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99999;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 16px 20px;
}

.instant-search-overlay.open {
  display: flex;
}

.instant-search-modal {
  background: #ffffff;
  width: 100%;
  max-width: 640px;
  border-radius: 14px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  border: 1px solid var(--color-border);
  animation: searchModalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  max-height: 80vh;
}

@keyframes searchModalIn {
  from { opacity: 0; transform: translateY(-12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.search-modal-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--color-border-light);
  background: #ffffff;
}

.search-modal-header svg {
  color: var(--color-primary);
  flex-shrink: 0;
}

.search-modal-input {
  width: 100%;
  border: none;
  outline: none;
  font-size: 17px;
  font-weight: 600;
  color: var(--color-text-main);
  background: transparent;
  font-family: inherit;
}

.search-modal-input::placeholder {
  color: var(--color-text-subtle);
  font-weight: 400;
}

.search-modal-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.search-modal-close:hover {
  background: var(--color-border-light);
  color: var(--color-accent);
}

.search-modal-shortcuts {
  padding: 10px 20px;
  background: #F8FAFC;
  border-bottom: 1px solid var(--color-border-light);
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  white-space: nowrap;
}

.search-modal-shortcuts span {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.search-quick-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  color: var(--color-text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.search-quick-chip:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.search-modal-results {
  padding: 10px 12px;
  overflow-y: auto;
  flex: 1;
  max-height: 420px;
}

.search-result-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.15s ease;
  gap: 12px;
}

.search-result-item:hover, .search-result-item.selected {
  background: #F0F6FC;
}

.search-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.search-item-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: #EAF3FA;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.search-item-name {
  font-weight: 800;
  font-size: 14.5px;
  color: var(--color-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-inn {
  font-size: 12px;
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-item-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.search-item-price {
  font-weight: 800;
  font-size: 14px;
  color: var(--color-primary);
}

.search-empty-state {
  padding: 30px 20px;
  text-align: center;
  color: var(--color-text-muted);
}

.search-empty-state h4 {
  font-size: 16px;
  color: var(--color-text-main);
  margin-bottom: 6px;
}

@media (max-width: 640px) {
  .instant-search-overlay {
    padding: 14px 10px;
  }
  .search-modal-header {
    padding: 12px 14px;
  }
  .search-modal-input {
    font-size: 15px;
  }
  .header-search-btn {
    width: 36px;
    height: 36px;
  }
}

/* ==========================================================================
   TOPBAR CITY SELECTOR & MODAL
   ========================================================================== */
.topbar-city-selector {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.18);
  padding: 3px 12px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  flex-shrink: 0;
}

.topbar-city-selector:hover {
  background: rgba(255, 255, 255, 0.32);
  border-color: rgba(255, 255, 255, 0.5);
}

.city-result-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

@media (max-width: 640px) {
  .top-bar-inner {
    justify-content: space-between !important;
  }
  .live-support-indicator span:last-child {
    display: none;
  }
  .live-support-indicator::after {
    content: "24/7 Онлайн";
    font-weight: 700;
    font-size: 11px;
  }
  .city-result-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   SEO ENHANCEMENTS: GEO CROSSLINKS & A-Z ALPHABET RUBRICATOR
   ========================================================================== */
.geo-crosslink-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.geo-city-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #F8FAFC;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--color-text-main);
  text-decoration: none;
  transition: all 0.15s ease;
}

.geo-city-chip:hover {
  background: var(--color-primary-light);
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
}

.geo-popular-meds-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.geo-med-badge-card {
  background: #F8FAFC;
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-decoration: none;
  transition: all 0.2s ease;
}

.geo-med-badge-card:hover {
  background: #ffffff;
  border-color: var(--color-primary);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

.alphabet-nav-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.alphabet-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--color-border-light);
  background: #F8FAFC;
  color: var(--color-text-main);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.alphabet-btn:hover, .alphabet-btn.active {
  background: var(--color-primary);
  color: #ffffff;
  border-color: var(--color-primary);
}

.alphabet-btn.alphabet-all {
  width: auto;
  padding: 0 10px;
}

@media (max-width: 768px) {
  .geo-popular-meds-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .geo-popular-meds-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   SMART FAQ ACCORDION SECTION
   ========================================================================== */
.faq-section-card {
  margin-bottom: 24px;
}

.faq-accordion-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #ffffff;
  transition: all 0.2s ease;
  overflow: hidden;
}

.faq-item:hover {
  border-color: #B0C4DE;
}

.faq-item[open] {
  border-color: var(--color-primary);
  box-shadow: 0 2px 8px rgba(0, 101, 179, 0.08);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-main);
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: color 0.15s ease;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-item[open] .faq-question {
  color: var(--color-primary);
  background: #F4F8FC;
  border-bottom: 1px solid var(--color-border-light);
}

.faq-chevron {
  color: var(--color-text-muted);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  margin-left: 12px;
}

.faq-item[open] .faq-chevron {
  transform: rotate(180deg);
  color: var(--color-primary);
}

.faq-answer {
  padding: 16px;
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-text-muted);
  background: #ffffff;
}

.faq-answer p:last-child {
  margin-bottom: 0;
}
