/* INFOBEARING — Technical Minimalism + Glass (iOS-style) */
/* Палитра: глубокий синий #1e3a8a, стальной серый #334155 */
/* Шрифт Inter подключается в layout.php */

:root {
  --color-deep-blue: #1e3a8a;
  --color-steel: #334155;
  --color-steel-light: #475569;
  --glass-bg: rgba(255, 255, 255, 0.72);
  --glass-border: rgba(255, 255, 255, 0.25);
  --glass-shadow: 0 8px 32px rgba(30, 58, 138, 0.08);
  --font-sans: 'Inter', 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Мобильное меню: блокировка прокрутки тела при открытой панели */
body.mobile-menu-open {
  overflow: hidden;
  touch-action: none;
}

/* Удобные зоны нажатия на мобильных (минимум ~44px) */
#mobile-menu-toggle {
  min-width: 44px;
  min-height: 44px;
}
.mobile-menu-link {
  min-height: 44px;
  display: flex;
  align-items: center;
}

/* Нижнее меню (мобильное приложение) */
.bottom-nav {
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav-link {
  -webkit-tap-highlight-color: transparent;
  min-height: 44px;
}
.bottom-nav-link:active {
  opacity: 0.8;
}

/* Стеклянные поверхности (glassmorphism) */
.glass {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.glass-dark {
  background: rgba(30, 58, 138, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.glass-card {
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 24px rgba(30, 58, 138, 0.06);
}

/* Чёткая типографика для быстрого чтения */
.prose-infobearing h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; color: var(--color-steel); }
.prose-infobearing h2 { font-size: 1.35rem; font-weight: 600; color: var(--color-steel); }
.prose-infobearing p { line-height: 1.6; color: var(--color-steel-light); }
.prose-infobearing a { color: var(--color-deep-blue); font-weight: 500; }

/* Акцентные кнопки/ссылки (нейтральные) */
.link-brand { color: #334155; font-weight: 500; }
.link-brand:hover { color: #0f172a; }

/* Админ-панель: шапка — как на сайте (site-header) */
.admin-header {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.05);
}

/* Админ: боковое меню — в стиле сайта */
.admin-sidebar {
  background: #fff;
  border-right: 1px solid #e2e8f0;
  box-shadow: 1px 0 3px 0 rgb(0 0 0 / 0.04);
}
.admin-sidebar .nav-group-title {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
  padding: 0.5rem 1rem 0.35rem;
  margin-top: 0.5rem;
}
.admin-sidebar .nav-group-title:first-child { margin-top: 0; padding-top: 0; }

/* Админ: контентная область — как bg сайта */
.admin-main {
  background: #f1f5f9;
  min-height: calc(100vh - 4rem);
}

/* Админ: тёмная тема — глобальные переопределения при .dark на html */
html.dark .admin-header { background: #1e293b; border-color: #334155; }
html.dark .admin-sidebar { background: #1e293b; border-color: #334155; }
html.dark .admin-main { background: #0f172a; }
html.dark .glass-card { background: rgba(30, 41, 59, 0.9); border-color: #334155; }
html.dark .admin-sidebar .nav-group-title { color: #94a3b8; }
/* Карточки и блоки с белым фоном в админке */
html.dark main .rounded-2xl.border.bg-white { background: #1e293b !important; border-color: #334155 !important; }
html.dark main .bg-white { background: #1e293b !important; }
html.dark main .bg-slate-50 { background: #334155 !important; }
html.dark main .border-slate-200 { border-color: #475569 !important; }
html.dark main .text-slate-800 { color: #f1f5f9 !important; }
html.dark main .text-slate-700 { color: #e2e8f0 !important; }
html.dark main .text-slate-600 { color: #cbd5e1 !important; }
html.dark main .text-slate-500 { color: #94a3b8 !important; }
html.dark main table thead { background: #334155 !important; }
html.dark main table tbody tr:hover { background: rgba(51, 65, 85, 0.5) !important; }
html.dark main input:not([type="checkbox"]):not([type="radio"]),
html.dark main select,
html.dark main textarea {
  background: #334155 !important; border-color: #475569 !important; color: #f1f5f9 !important;
}
html.dark main input::placeholder,
html.dark main textarea::placeholder { color: #94a3b8 !important; }

/* Админ: поля ввода */
.admin-input:hover { border-color: #64748b; }
.admin-input:focus { box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.2); }

/* Главная: герой и парадные блоки */
.home-hero {
  background-color: #1e3a8a;
  background-image: linear-gradient(135deg, #1e3a8a 0%, #1e40af 40%, #1d4ed8 75%, #2563eb 100%);
  background-attachment: scroll;
}
@media (min-width: 768px) {
  .home-hero {
    background-attachment: fixed;
  }
}
.home-hero-pattern {
  background-image: radial-gradient(circle at 20% 80%, rgba(255,255,255,0.08) 0%, transparent 50%),
                    radial-gradient(circle at 80% 20%, rgba(255,255,255,0.06) 0%, transparent 45%);
}
.home-hero-image {
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.15));
}
.home-card-hover {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.home-card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(30, 58, 138, 0.12), 0 4px 12px rgba(0,0,0,0.06);
}
.home-section-icon {
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.12) 0%, rgba(59, 130, 246, 0.08) 100%);
  color: #1e3a8a;
}
.home-cta-block {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #334155 100%);
}

/* Карточка позиции справочника (REF-xxxxxx) */
.reference-single-hero {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 45%, #1d4ed8 85%, #2563eb 100%);
  box-shadow: 0 8px 32px rgba(30, 58, 138, 0.25), 0 2px 8px rgba(0, 0, 0, 0.08);
}
.reference-single-hero-inner {
  background-image: radial-gradient(circle at 15% 85%, rgba(255, 255, 255, 0.08) 0%, transparent 45%),
                    radial-gradient(circle at 85% 15%, rgba(255, 255, 255, 0.06) 0%, transparent 40%);
}
.ref-spec-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #64748b;
  margin-bottom: 0.25rem;
}
.ref-spec-value {
  font-size: 1rem;
  font-weight: 500;
  color: #1e293b;
  margin: 0;
}
.reference-single-page .ref-media-link:focus {
  outline: 2px solid #1e3a8a;
  outline-offset: 2px;
}
