/*
Theme Name: Мы Вместе (Стиль Близкие Люди)
Theme URI: https://my-vmeste-vl.ru/
Author: Antigravity Multi-page Design Team
Description: Премиальная многостраничная тема патронажной службы «Мы Вместе» в стилистике сети «Близкие люди». Фирменный оливково-зеленый цвет #4C721D, сочные оранжевые кнопки #FF5617, калькулятор, склад проката ТСР, Open Graph разметка, Schema.org микроразметка и 100% мобильная адаптивность.
Version: 2.2.2
*/

/* 1. Предотвращение переноса телефонных номеров */
a[href^="tel:"], .phone-link, .phone-nowrap, .city-phone {
  white-space: nowrap !important;
  word-break: keep-all !important;
  hyphens: none !important;
}

/* 2. Компактная верстка навигации в десктопной шапке */
.header-nav-list {
  display: flex !important;
  align-items: center !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  gap: 2px !important;
}

@media (min-width: 1280px) {
  .header-nav-list {
    gap: 6px !important;
  }
}

@media (min-width: 1440px) {
  .header-nav-list {
    gap: 12px !important;
  }
}

.nav-item-link {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

/* 3. UI/UX Pro Max: Base Accessibility, Ergonomics & Responsive Standards */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
  width: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Screen reader utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Touch Targets >= 44x44px for buttons, inputs and touch triggers */
button, 
.btn, 
a.px-6, 
a.px-8, 
a.px-10, 
.tab-vertical, 
#city-btn,
.touch-target {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: rgba(76, 114, 29, 0.15);
}

/* Accessible focus ring for keyboard navigation */
a:focus-visible, 
button:focus-visible, 
input:focus-visible, 
select:focus-visible, 
textarea:focus-visible {
  outline: 2px solid #FF5617 !important;
  outline-offset: 2px !important;
}

/* High-contrast text improvements (WCAG AA >= 4.5:1 on light backgrounds) */
.text-stone-600 {
  color: #44403c !important;
}

.text-stone-500 {
  color: #57534e !important;
}

/* Responsive tables & media containment to completely prevent horizontal scroll */
table {
  max-width: 100%;
  border-collapse: collapse;
}

.content-body table, 
article table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Smooth touch scrolling */
.overflow-y-auto, .overflow-x-auto {
  -webkit-overflow-scrolling: touch;
}

/* Safe area support for mobile floating elements (iPhone bar) */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .fixed.bottom-4 {
    bottom: max(1rem, env(safe-area-inset-bottom)) !important;
  }
}

/* Callout & Fact Cards */
.callout-fact {
  position: relative;
  border-radius: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.95) 0%, rgba(255, 237, 213, 0.5) 50%, rgba(250, 250, 249, 1) 100%);
  border: 2px solid rgba(251, 191, 36, 0.8);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

@media (min-width: 640px) {
  .callout-fact {
    padding: 2rem;
  }
}

/* Responsive figure and images */
.article-figure, figure {
  margin: 1.5rem 0;
  max-width: 100%;
}

.article-figure img, figure img, article img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 1rem;
}

figcaption {
  font-size: 0.8125rem;
  color: #57534e;
  margin-top: 0.5rem;
  text-align: center;
  font-style: italic;
}
