/* ========================================
   PRAVODEX.RU — Единый файл стилей
   ======================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Montserrat:wght@700;800;900&display=swap');

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: #1a1a2e;
  background-color: #f4f5f7;
}

a {
  color: #2563eb;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #1d4ed8;
}

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

/* ========================================
   HEADER
   ======================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #e5e7eb;
  padding: 0 24px;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 1.6rem;
  color: #1a1a2e;
  letter-spacing: -0.5px;
}

.logo span {
  color: #2563eb;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 8px;
}

.nav-menu a {
  display: block;
  padding: 8px 18px;
  border-radius: 10px;
  color: #374151;
  font-weight: 500;
  font-size: 0.95rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  background: #eef2ff;
  color: #2563eb;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #1a1a2e;
  margin: 6px 0;
  border-radius: 2px;
  transition: transform 0.3s ease;
}

/* ========================================
   HERO
   ======================================== */
.hero {
  background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
  color: #fff;
  padding: 80px 24px;
  text-align: center;
}

.hero-inner {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 900;
  font-size: 2.8rem;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.hero p {
  font-size: 1.15rem;
  opacity: 0.9;
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto;
}

/* ========================================
   CONTAINER
   ======================================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================
   SECTION TITLES
   ======================================== */
.section-title {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 2rem;
  color: #1a1a2e;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.section-subtitle {
  color: #6b7280;
  font-size: 1.05rem;
  margin-bottom: 40px;
}

/* ========================================
   ABOUT SECTION
   ======================================== */
.about-section {
  padding: 60px 24px;
  text-align: center;
}

.about-section p {
  max-width: 750px;
  margin: 0 auto;
  color: #4b5563;
  font-size: 1.05rem;
}

/* ========================================
   ARTICLES GRID
   ======================================== */
.articles-section {
  padding: 20px 24px 80px;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.article-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(37,99,235,0.12);
}

.article-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.article-card-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-card-tag {
  display: inline-block;
  background: #eef2ff;
  color: #2563eb;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-card-body h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: #1a1a2e;
  margin-bottom: 10px;
  line-height: 1.35;
}

.article-card-body p {
  color: #6b7280;
  font-size: 0.92rem;
  line-height: 1.6;
  flex: 1;
}

.article-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #2563eb;
}

.article-card-link:hover {
  gap: 10px;
}

.article-card-link::after {
  content: '→';
  transition: transform 0.2s ease;
}

.article-card:hover .article-card-link::after {
  transform: translateX(4px);
}

/* ========================================
   ARTICLE PAGE LAYOUT
   ======================================== */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.article-main {
  min-width: 0;
}

.article-main h1 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 2.2rem;
  line-height: 1.2;
  color: #1a1a2e;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}

.article-main h2 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: #1a1a2e;
  margin-top: 36px;
  margin-bottom: 16px;
}

.article-main h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  color: #1a1a2e;
  margin-top: 28px;
  margin-bottom: 12px;
}

.article-main p {
  margin-bottom: 18px;
  color: #374151;
}

.article-main ul,
.article-main ol {
  margin-bottom: 18px;
  padding-left: 24px;
  color: #374151;
}

.article-main li {
  margin-bottom: 8px;
}

.article-main img {
  border-radius: 14px;
  margin: 28px 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.article-meta {
  display: flex;
  gap: 20px;
  color: #9ca3af;
  font-size: 0.88rem;
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.article-content blockquote {
  border-left: 4px solid #2563eb;
  background: #f0f4ff;
  padding: 20px 24px;
  border-radius: 0 12px 12px 0;
  margin: 24px 0;
  color: #1e3a5f;
  font-style: italic;
}

/* ========================================
   SIDEBAR
   ======================================== */
.sidebar {
  position: sticky;
  top: 92px;
  align-self: start;
}

.sidebar-block {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  margin-bottom: 24px;
}

.sidebar-block h3 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: #1a1a2e;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #eef2ff;
}

.sidebar-articles {
  list-style: none;
}

.sidebar-articles li {
  margin-bottom: 12px;
}

.sidebar-articles a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  color: #374151;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.4;
  transition: background 0.2s ease, color 0.2s ease;
}

.sidebar-articles a:hover,
.sidebar-articles a.current {
  background: #eef2ff;
  color: #2563eb;
}

/* ========================================
   AD BLOCKS
   ======================================== */
.ad-block {
  margin: 24px 0;
  text-align: center;
}

.ad-block-sidebar {
  margin-top: 0;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
  background: #1a1a2e;
  color: #d1d5db;
  padding: 60px 24px 32px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
}

.footer-brand .logo {
  color: #fff;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.92rem;
  line-height: 1.7;
  color: #9ca3af;
}

.footer-nav h4,
.footer-info h4 {
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
  font-size: 1rem;
}

.footer-nav ul {
  list-style: none;
}

.footer-nav li {
  margin-bottom: 10px;
}

.footer-nav a {
  color: #9ca3af;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.footer-nav a:hover {
  color: #fff;
}

.footer-info p {
  font-size: 0.88rem;
  color: #9ca3af;
  line-height: 1.7;
}

.footer-bottom {
  max-width: 1200px;
  margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid #2d2d44;
  text-align: center;
  font-size: 0.85rem;
  color: #6b7280;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .articles-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .footer-inner {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 1.9rem;
  }

  .hero {
    padding: 56px 20px;
  }

  .article-main h1 {
    font-size: 1.6rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .header-inner {
    position: relative;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }

  .nav-menu.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .section-title {
    font-size: 1.5rem;
  }
}
