/**
 * OMSK360.RU — Portal Responsive Layout & Spatial Bento System
 * Brand Identity: Option 2 «Омский Импульс / Арена» (Omsk Pulse)
 *
 * Uses strictly variables from /assets/css/tokens.css.
 * Responsive Architecture:
 * - Mobile (320px–767px): Single column, 16px padding, fixed 5-tab bottom glass navbar (64px), scroll-snap district/date strips, >=44x44px touch targets.
 * - Tablet (768px–1023px): 2-column grid, 24px padding.
 * - Desktop (1024px–1440px+): 1360px max-width 12-column Bento grid (8-col main + 4-col sticky right rail).
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 0 calc(var(--mobile-nav-height) + 24px) 0;
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: 1.55;
  color: var(--text-primary);
  background-color: var(--bg-canvas);
  background-image: var(--bg-hero-mesh);
  background-attachment: fixed;
  overflow-x: hidden;
}

@media (min-width: 1024px) {
  body {
    padding-bottom: 0;
  }
}

a {
  color: var(--brand-signal-blue);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover,
a:focus-visible {
  color: var(--brand-arena-orange);
}

h1, h2, h3, h4 {
  margin: 0 0 0.65rem 0;
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.015em;
}

h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); font-weight: 700; }

p {
  margin: 0 0 0.85rem 0;
  color: var(--text-secondary);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .container {
    padding: 0 24px;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 32px;
  }
}

/* ==========================================================================
   1. LIVE OMSK PULSE TOP BAR & STICKY GLASS HEADER
   ========================================================================== */

.pulse-topbar {
  background-color: var(--bg-surface-elevated);
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  padding: 0.45rem 0;
}

.pulse-topbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.pulse-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-pill);
  background-color: var(--brand-arena-orange);
  box-shadow: 0 0 0 3px var(--badge-ad-promoted-glow);
}

.pulse-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 90;
  padding: 0.65rem 0;
  box-shadow: var(--shadow-float-sm);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: var(--touch-target-min);
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-logo:hover {
  color: var(--brand-signal-blue);
}

.brand-logo__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand-irtysh-cobalt) 0%, var(--brand-arena-orange) 100%);
  color: var(--text-on-brand);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
}

.brand-logo__sub {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0;
}

.desktop-nav {
  display: none;
  align-items: center;
  gap: 0.35rem;
}

@media (min-width: 1024px) {
  .desktop-nav {
    display: flex;
  }
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: var(--touch-target-min);
  padding: 0 0.85rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.nav-link:hover,
.nav-link--active {
  background-color: var(--bg-subtle-tint);
  color: var(--text-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ==========================================================================
   2. BUTTONS, PILLS & TOUCH TARGETS (>= 44x44px)
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: var(--touch-target-min);
  min-width: var(--touch-target-min);
  padding: 0.55rem 1.05rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: transform 0.2s var(--ease-antigravity), background-color 0.18s ease, border-color 0.18s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background-color: var(--brand-irtysh-cobalt);
  color: var(--text-on-brand);
}

.btn--primary:hover {
  background-color: var(--brand-signal-blue);
  color: var(--text-on-brand);
}

.btn--accent {
  background-color: var(--brand-arena-orange);
  color: var(--text-on-accent);
}

.btn--accent:hover {
  background-color: var(--brand-arena-amber);
  color: var(--text-on-accent);
}

.btn--emerald {
  background-color: var(--brand-cyber-emerald);
  color: var(--text-on-brand);
}

.btn--outline {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn--outline:hover {
  border-color: var(--brand-signal-blue);
  color: var(--brand-signal-blue);
}

.btn--ghost {
  background-color: var(--bg-subtle-tint);
  color: var(--text-primary);
}

/* ==========================================================================
   3. OMSK 5-DISTRICT FILTER SPINE & HORIZONTAL SCROLL-SNAP STRIPS
   ========================================================================== */

.district-spine {
  margin: 1rem 0 1.25rem 0;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
}

.district-spine__header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.district-spine__label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.pill-strip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 0.25rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.pill {
  scroll-snap-align: start;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: var(--touch-target-min);
  padding: 0.45rem 0.95rem;
  border-radius: var(--radius-pill);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.pill:hover {
  border-color: var(--brand-signal-blue);
  color: var(--text-primary);
}

.pill--active {
  background-color: var(--brand-irtysh-cobalt);
  border-color: var(--brand-irtysh-cobalt);
  color: var(--text-on-brand);
}

.pill--active:hover {
  color: var(--text-on-brand);
}

.pill--events.pill--active {
  background-color: var(--brand-arena-orange);
  border-color: var(--brand-arena-orange);
}

.pill--directory.pill--active {
  background-color: var(--brand-cyber-emerald);
  border-color: var(--brand-cyber-emerald);
}

/* ==========================================================================
   4. HERO & KINETIC 12-COLUMN BENTO GRID
   ========================================================================== */

.hero-bento {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 1024px) {
  .hero-bento {
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
  }
  .hero-bento__main {
    grid-column: span 8;
  }
  .hero-bento__side {
    grid-column: span 4;
  }
}

.hero-card {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

@media (min-width: 768px) {
  .hero-card {
    padding: 2rem;
  }
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  align-self: flex-start;
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius-pill);
  background-color: var(--pillar-news-bg);
  border: 1px solid var(--pillar-news-border);
  color: var(--pillar-news-accent);
  font-size: var(--text-xs);
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

.search-bar__input {
  flex: 1 1 220px;
  min-height: var(--touch-target-min);
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-body);
}

.search-bar__input:focus {
  outline: 2px solid var(--border-focus);
  border-color: transparent;
}

/* Main 12-Column Portal Grid (8-col Main + 4-col Sticky Right Rail) */
.portal-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

@media (min-width: 1024px) {
  .portal-layout {
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
    align-items: start;
  }
  .portal-layout__main {
    grid-column: span 8;
  }
  .portal-layout__rail {
    grid-column: span 4;
    position: sticky;
    top: 86px;
  }
}

.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .cards-grid--2col {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.15rem;
  }
  .cards-grid--3col {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.15rem;
  }
}

@media (min-width: 1024px) {
  .cards-grid--3col {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 1.75rem 0 1rem 0;
}

.section-header--first {
  margin-top: 0;
}

.pillar-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: 600;
}

.pillar-tag--directory {
  background-color: var(--pillar-directory-bg);
  color: var(--pillar-directory-accent);
  border: 1px solid var(--pillar-directory-border);
}

.pillar-tag--news {
  background-color: var(--pillar-news-bg);
  color: var(--pillar-news-accent);
  border: 1px solid var(--pillar-news-border);
}

.pillar-tag--events {
  background-color: var(--pillar-events-bg);
  color: var(--pillar-events-accent);
  border: 1px solid var(--pillar-events-border);
}

/* ==========================================================================
   5. DIRECTORY LISTING, NEWS & EVENT CARDS
   ========================================================================== */

.card-body {
  padding: 1.15rem 1.25rem;
}

.card-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-xs);
  background-color: var(--pillar-directory-bg);
  color: var(--pillar-directory-accent);
  font-weight: 600;
  font-size: var(--text-xs);
}

.price-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--text-primary);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-xs);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
}

.contact-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-subtle);
}

.contact-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-target-min);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  font-size: var(--text-xs);
  font-weight: 600;
}

.contact-chip:hover {
  border-color: var(--brand-signal-blue);
  color: var(--brand-signal-blue);
}

.contact-chip--phone {
  font-family: var(--font-mono);
  background-color: var(--brand-irtysh-cobalt);
  color: var(--text-on-brand);
  border-color: var(--brand-irtysh-cobalt);
}

.contact-chip--phone:hover {
  background-color: var(--brand-signal-blue);
  color: var(--text-on-brand);
}

/* ==========================================================================
   6. INVESTOR & ADVERTISER ROI SHOWCASE («Витрина инвестора и партнёра»)
   ========================================================================== */

.investor-bento {
  margin: 2rem 0;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background-color: var(--bg-surface);
  border: 2px solid var(--brand-irtysh-cobalt);
  box-shadow: var(--shadow-float-lg);
}

@media (min-width: 768px) {
  .investor-bento {
    padding: 2.25rem;
  }
}

.metrics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin: 1.25rem 0;
}

@media (min-width: 768px) {
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .metrics-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.metric-box {
  padding: 1.1rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
}

.metric-box__value {
  font-family: var(--font-mono);
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--brand-irtysh-cobalt);
  margin-bottom: 0.25rem;
}

.metric-box__label {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.metric-box__detail {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin: 0;
}

/* ==========================================================================
   7. FORMS, VENDOR CABINET & ALERTS
   ========================================================================== */

.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .form-grid--2col {
    grid-template-columns: repeat(2, 1fr);
  }
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.form-field label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  min-height: var(--touch-target-min);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--text-body);
}

.form-input--mono {
  font-family: var(--font-mono);
}

.form-textarea {
  min-height: 100px;
  resize: vertical;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: 2px solid var(--border-focus);
  border-color: transparent;
}

.alert-box {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  font-size: var(--text-sm);
  font-weight: 500;
}

.alert-box--error {
  background-color: var(--badge-age-adult-bg);
  color: var(--badge-age-adult-text);
  border: 1px solid var(--badge-age-adult-border);
}

.alert-box--success {
  background-color: var(--pillar-directory-bg);
  color: var(--pillar-directory-accent);
  border: 1px solid var(--pillar-directory-border);
}

/* ==========================================================================
   8. SUPPORT BOT WIDGETS (PUBLIC VISITOR BOT & GATED VENDOR TECH SUPPORT BOT)
   ========================================================================== */

.bot-launcher-btn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 95;
  display: none;
  align-items: center;
  gap: 0.6rem;
  min-height: 52px;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-pill);
  background-color: var(--bot-visitor-accent);
  color: var(--text-on-brand);
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-float-lg);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
}

@media (min-width: 1024px) {
  .bot-launcher-btn {
    display: inline-flex;
  }
}

.bot-window {
  position: fixed;
  right: 16px;
  bottom: calc(var(--mobile-nav-height) + 12px);
  z-index: 100;
  width: calc(100vw - 32px);
  max-width: 390px;
  max-height: 75vh;
  display: none;
  flex-direction: column;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-bot-window);
  overflow: hidden;
}

@media (min-width: 1024px) {
  .bot-window {
    right: 24px;
    bottom: 84px;
    width: 385px;
    height: 540px;
  }
}

.bot-window--open {
  display: flex;
}

.bot-window__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.9rem 1.1rem;
  background-color: var(--bot-visitor-accent);
  color: var(--text-on-brand);
}

.bot-window--vendor .bot-window__header {
  background-color: var(--bot-vendor-accent);
}

.bot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background-color: var(--bg-surface);
}

.bot-bubble {
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  line-height: 1.45;
  white-space: pre-line;
}

.bot-bubble--bot {
  background-color: var(--bg-surface-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
  align-self: flex-start;
  max-width: 92%;
}

.bot-bubble--user {
  background-color: var(--bot-visitor-bubble-user);
  color: var(--text-on-brand);
  align-self: flex-end;
  max-width: 85%;
}

.bot-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background-color: var(--bg-surface-elevated);
  border-top: 1px solid var(--border-subtle);
}

.bot-chip-btn {
  min-height: 36px;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-surface);
  color: var(--text-primary);
  font-size: var(--text-xs);
  font-weight: 600;
  cursor: pointer;
}

.bot-chip-btn:hover {
  border-color: var(--brand-signal-blue);
  color: var(--brand-signal-blue);
}

.bot-input-row {
  display: flex;
  gap: 0.45rem;
  padding: 0.75rem;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
}

/* ==========================================================================
   9. MOBILE FIXED 5-TAB BOTTOM GLASS NAVIGATION BAR (320px–767px)
   ========================================================================== */

.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 95;
  height: var(--mobile-nav-height);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  box-shadow: var(--shadow-float-lg);
}

@media (min-width: 1024px) {
  .mobile-bottom-nav {
    display: none;
  }
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  min-height: var(--touch-target-min);
  height: 100%;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.mobile-nav-item--active,
.mobile-nav-item:hover {
  color: var(--brand-signal-blue);
}

.mobile-nav-item__icon {
  font-size: 1.1rem;
  line-height: 1;
}

/* ==========================================================================
   10. FZ-152 COOKIE BANNER & RF LEGAL FOOTER
   ========================================================================== */

.cookie-banner {
  position: fixed;
  left: 16px;
  bottom: calc(var(--mobile-nav-height) + 12px);
  z-index: 92;
  max-width: 520px;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-float-lg);
  display: none;
}

@media (min-width: 1024px) {
  .cookie-banner {
    bottom: 20px;
  }
}

.cookie-banner--visible {
  display: block;
}

.site-footer {
  margin-top: 3rem;
  padding: 2.5rem 0 2rem 0;
  background-color: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  font-size: var(--text-sm);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
  }
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.footer-legal-bar {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: var(--text-xs);
  color: var(--text-muted);
}
