/* =========================================
   Variables & Reset
   ========================================= */
:root {
  --bg-main: #121212;
  --bg-card: #242424;
  --bg-modal: #1a1a1a;
  --text-main: #ffffff;
  --text-muted: #a3a3a3;
  --accent: #bef264;
  --accent-hover: #a3e635;
  --border-color: rgba(255, 255, 255, 0.1);
  --border-radius-pill: 999px;
  --border-radius-card: 24px;
  --border-radius-sm: 16px;
  --transition: all 0.3s ease;
  --font-main: 'Manrope', system-ui, -apple-system, sans-serif;
}

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

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

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

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

ul {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

/* =========================================
   Layout & Typography
   ========================================= */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px;
}

.section {
  padding: 100px 0;
}

h1 { font-size: clamp(3rem, 5vw, 4.5rem); line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; margin-bottom: 24px; }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.1; letter-spacing: -0.02em; font-weight: 700; margin-bottom: 40px; }
h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 8px; }

.subtitle {
  color: var(--text-muted);
  font-size: 1.125rem;
  margin-bottom: 40px;
  max-width: 600px;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  color: var(--text-muted);
}

.section-label::before {
  content: '';
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--accent);
}

/* =========================================
   Components
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 16px 32px;
  border-radius: var(--border-radius-pill);
  font-size: 1rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--accent);
  color: #000;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  transform: translateY(-2px);
}

.btn-outline {
  border: 1px solid var(--border-color);
  color: var(--text-main);
  background: rgba(255,255,255,0.03);
}

.btn-outline:hover {
  border-color: var(--accent);
  background: rgba(190, 242, 100, 0.05);
}

.btn-outline-lime {
  border: 1px solid var(--accent);
  color: var(--accent);
  width: 100%;
}

.btn-outline-lime:hover {
  background-color: var(--accent);
  color: #000;
}

.icon-circle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background-color: var(--accent);
  color: #000;
  border-radius: 50%;
  font-size: 0.8rem;
}

/* =========================================
   Header
   ========================================= */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  background: rgba(18, 18, 18, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.5rem;
}

.logo img {
  height: 32px;
}

.header .logo {
  font-size: 2.5rem;
  gap: 16px;
}

.header .logo img {
  height: 90px;
}

.main-nav {
  display: flex;
  gap: 8px;
  background: rgba(255,255,255,0.03);
  padding: 6px;
  border-radius: var(--border-radius-pill);
  border: 1px solid var(--border-color);
}

.main-nav a {
  padding: 10px 24px;
  border-radius: var(--border-radius-pill);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}

.main-nav a:hover {
  color: var(--text-main);
}

.main-nav a.active {
  background-color: var(--accent);
  color: #000;
}

/* =========================================
   Hero Section
   ========================================= */
.hero {
  padding-top: 160px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-image-wrap {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--border-radius-card);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.hero-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-color);
}
.dot.active { background: var(--accent); }

/* =========================================
   Catalog Section
   ========================================= */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.product-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.product-card:hover {
  border-color: rgba(255,255,255,0.2);
  transform: translateY(-4px);
}

.product-img {
  aspect-ratio: 1;
  background: rgba(255,255,255,0.02);
  border-radius: var(--border-radius-sm);
  margin-bottom: 20px;
  overflow: hidden;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; }

.product-info { flex-grow: 1; margin-bottom: 24px; }
.product-price { color: var(--accent); font-weight: 700; font-size: 1.125rem; margin-bottom: 8px; }
.product-desc { color: var(--text-muted); font-size: 0.875rem; }

/* =========================================
   Comparison Section
   ========================================= */
.comparison-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.tabs {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.tab-item {
  font-size: 1.25rem;
  color: var(--text-muted);
  padding-left: 24px;
  border-left: 2px solid var(--border-color);
  cursor: pointer;
  transition: var(--transition);
}

.tab-item.active {
  color: var(--text-main);
  border-left-color: var(--accent);
  font-weight: 600;
}

.facts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 24px;
}

.fact-card {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 24px;
}

.fact-val { font-size: 2.5rem; font-weight: 700; color: var(--accent); margin-bottom: 8px; line-height: 1;}
.fact-text { color: var(--text-muted); font-size: 0.875rem; }

/* =========================================
   Blog Section
   ========================================= */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.blog-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-card);
  padding: 24px;
}

.blog-img {
  aspect-ratio: 16/9;
  border-radius: var(--border-radius-sm);
  background: rgba(255,255,255,0.02);
  margin-bottom: 20px;
  overflow: hidden;
}
.blog-img img { width: 100%; height: 100%; object-fit: cover; }
.blog-link { color: var(--accent); font-weight: 600; font-size: 0.875rem; display: inline-flex; align-items: center; gap: 4px; margin-top: 16px;}

/* =========================================
   Inner Page Layout (Blog Article)
   ========================================= */
.inner-page-layout {
  padding-top: 140px;
  padding-bottom: 100px;
  max-width: 800px; /* Узкая колонка для чтения */
}

.content-richtext h1 { margin-bottom: 24px; }
.content-richtext h2 { font-size: 2rem; margin: 40px 0 20px; }
.content-richtext p { color: var(--text-muted); margin-bottom: 24px; font-size: 1.125rem; }
.content-richtext img { border-radius: var(--border-radius-card); margin: 40px 0; }
.content-richtext ul { margin-bottom: 24px; padding-left: 20px; }
.content-richtext li { color: var(--text-muted); margin-bottom: 10px; list-style-type: disc; color: var(--accent); }
.content-richtext li span { color: var(--text-muted); }

/* =========================================
   Footer
   ========================================= */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 60px 0;
  margin-top: 60px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-left p { color: var(--text-muted); font-size: 0.875rem; margin-top: 16px; }
.footer-right { display: flex; gap: 32px; color: var(--text-muted); font-size: 0.875rem; }
.footer-right a:hover { color: var(--text-main); }
.footer-contacts { margin-top: 16px; color: var(--text-muted); font-size: 0.875rem; }
.footer-contacts span { display: block; margin-bottom: 4px;}

/* =========================================
   Modal Form
   ========================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background: var(--bg-modal);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-card);
  width: 100%;
  max-width: 500px;
  padding: 40px;
  position: relative;
  transform: translateY(20px);
  transition: var(--transition);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close {
  position: absolute;
  top: 24px;
  right: 24px;
  color: var(--text-muted);
  font-size: 1.5rem;
  line-height: 1;
}

.modal-close:hover { color: var(--text-main); }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.875rem; color: var(--text-muted); margin-bottom: 8px; }

.form-control {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 16px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 1rem;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
}

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

/* =========================================
   Responsive
   ========================================= */
@media (max-width: 1024px) {
  .hero-inner, .comparison-inner { grid-template-columns: 1fr; }
  .hero { padding-top: 120px; }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .container { padding: 0 20px; }
  .header-inner { flex-wrap: wrap; gap: 16px; justify-content: center;}
  .header .logo { font-size: 1.75rem; }
  .header .logo img { height: 60px; }
  .main-nav { order: 3; width: 100%; justify-content: center; }
  .header .btn { display: none; } /* Скрываем кнопку в шапке на мобилках для чистоты */
  .hero-inner { gap: 40px; }
  .catalog-grid, .blog-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 24px; text-align: center; }
  .footer-right { flex-direction: column; gap: 16px; }
  .modal-content { padding: 24px; }
}
/* --- Smart Hub Styles (Avant-Garde/Minimalism) --- */
.smart-hub {
    margin-top: 4rem;
    margin-bottom: 4rem;
}

.hub-controls {
    margin-bottom: 2rem;
}

.hub-search {
    position: relative;
    max-width: 400px;
}

.hub-search input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: #f9f9f9;
}

.hub-search input:focus {
    outline: none;
    border-color: #333;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.hub-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    justify-content: center;
}

.hub-card {
    background: transparent;
    border: 1px solid rgba(128, 128, 128, 0.3);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 400px;
}

.hub-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
}

.hub-card__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.hub-card__image-wrapper {
    height: 200px;
    overflow: hidden;
    position: relative;
    background: #f5f5f5;
}

.hub-card__image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hub-card:hover .hub-card__image-wrapper img {
    transform: scale(1.05);
}

/* Pattern Thumbnails */
.hub-card__image-wrapper.pattern-0 {
    background: linear-gradient(135deg, #FF9A9E 0%, #FECFEF 99%, #FECFEF 100%);
}

.hub-card__image-wrapper.pattern-1 {
    background: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);
}

.hub-card__image-wrapper.pattern-2 {
    background: linear-gradient(to top, #cfd9df 0%, #e2ebf0 100%);
}

.hub-card__image-wrapper.pattern-3 {
    background: linear-gradient(120deg, #d4fc79 0%, #96e6a1 100%);
}

.hub-card__image-wrapper.pattern-4 {
    background: linear-gradient(to right, #4facfe 0%, #00f2fe 100%);
}

.hub-card__image-wrapper.pattern-5 {
    background: linear-gradient(to right, #43e97b 0%, #38f9d7 100%);
}

.hub-card__image-wrapper.pattern-6 {
    background: linear-gradient(to top, #30cfd0 0%, #330867 100%);
}

.hub-card__image-wrapper.pattern-7 {
    background: linear-gradient(to right, #fa709a 0%, #fee140 100%);
}

.hub-card__image-wrapper.pattern-8 {
    background: linear-gradient(to top, #5ee7df 0%, #b490ca 100%);
}

.hub-card__image-wrapper.pattern-9 {
    background: linear-gradient(to right, #f78ca0 0%, #f9748f 19%, #fd868c 60%, #fe9a8b 100%);
}

.hub-card__content {
    padding: 1.5rem;
}

.hub-card__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: inherit;
    line-height: 1.4;
}

.hub-card__excerpt {
    font-size: 0.9rem;
    color: inherit;
    opacity: 0.8;
    line-height: 1.6;
}

.hub-footer {
    margin-top: 3rem;
    text-align: center;
}

/* Related Posts */
.related-posts {
    margin-top: 4rem;
    margin-bottom: 6rem;
    padding-top: 2rem;
    border-top: 1px solid #eaeaea;
}

.related-posts__heading {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.related-posts__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    justify-content: center;
}

.related-post-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: inherit;
    padding: 1rem;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.related-post-card:hover {
    background: rgba(128, 128, 128, 0.05);
}

.related-post-card__image {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #eee;
}

.related-post-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-post-card__title {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

/* Utilities */
.btn-clean {
    background: none;
    border: 1px solid #333;
    padding: 10px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-clean:hover {
    background: #333;
    color: #fff;
}