/* ================================
   RESET & BASE
   ================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #222;
  background-color: #f9f9f9;
}

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

a {
  color: #0066cc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ================================
   CONTAINER
   ================================ */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ================================
   HEADER
   ================================ */

.site-header {
  background-color: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(10px);
  background-color: rgba(255, 255, 255, 0.98);
}

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

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.logo-icon {
  width: 90px;
  height: auto;
  flex-shrink: 0;
  display: block;
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.site-logo {
  padding: 5px;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.site-logo:hover {
  text-decoration: none;
  transform: translateY(-2px) scale(1.05);
  background: linear-gradient(135deg, rgba(26,26,26,0.05) 0%, rgba(0,102,204,0.05) 100%);
}

.site-logo:hover .logo-icon {
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
}

.menu-icon {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
  position: relative;
}

.menu-icon span {
  width: 25px;
  height: 3px;
  background-color: #333;
  margin: 3px 0;
  transition: all 0.3s ease;
  border-radius: 3px;
}

.menu-icon:hover span {
  background-color: #0066cc;
}

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.site-nav li {
  position: relative;
}

.site-nav a {
  color: #333;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.6rem 1rem;
  display: block;
  border-radius: 6px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.site-nav a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #0066cc, #0099ff);
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.site-nav a:hover {
  color: #0066cc;
  text-decoration: none;
  background-color: rgba(0, 102, 204, 0.08);
  transform: translateY(-1px);
}

.site-nav a:hover::before {
  width: 80%;
}

.site-nav a:active {
  transform: translateY(0);
}

/* ================================
   HERO SECTION
   ================================ */

.hero-section {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  padding: 3rem 0;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 102, 204, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.hero-text {
  max-width: 640px;
}

.hero-text h1 {
  font-size: 2.25rem;
  line-height: 1.2;
  margin-bottom: 1.25rem;
  color: #1a1a1a;
}

.hero-text p {
  margin-bottom: 1rem;
  font-size: 1.05rem;
  color: #444;
}

.hero-actions {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.8rem 1.6rem;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #0066cc 0%, #0099ff 100%);
  color: #fff;
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 6px 16px rgba(0, 102, 204, 0.35);
  transition: all 0.25s ease;
}

.btn-primary:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 102, 204, 0.45);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.35);
}

.btn-primary span {
  margin-left: 0.5rem;
  font-size: 1.1rem;
}

.hero-note {
  font-size: 0.9rem;
  color: #777;
}

.hero-aside {
  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 1.8rem;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.08);
  position: relative;
  overflow: hidden;
}

.hero-aside::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #0066cc, #0099ff);
}

.hero-aside h2 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: #1a1a1a;
}

.hero-aside ul {
  list-style: none;
  padding-left: 0;
}

.hero-aside li {
  padding: 0.6rem 0;
  padding-left: 1.8rem;
  position: relative;
  transition: all 0.3s ease;
}

.hero-aside li:hover {
  padding-left: 2rem;
  color: #0066cc;
}

.hero-aside li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #0066cc;
  font-weight: bold;
  font-size: 1.1rem;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 102, 204, 0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.hero-aside li:hover::before {
  background: rgba(0, 102, 204, 0.2);
  transform: scale(1.1);
}

.hero-aside img {
  margin-top: 1rem;
  border-radius: 6px;
}

/* ================================
   MAIN LAYOUT (TWO COLUMNS)
   ================================ */

.main-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  margin-bottom: 3rem;
}

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

.sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
}

/* ================================
   SECTIONS
   ================================ */

.content-section {
  background-color: #fff;
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 10px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.3s ease;
}

.content-section:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.content-section h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: #1a1a1a;
  padding-bottom: 0.75rem;
  position: relative;
  display: inline-block;
}

.content-section h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #0066cc 0%, #0099ff 70%, transparent 100%);
  border-radius: 2px;
}

/* ================================
   ARTICLE CARDS
   ================================ */

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

.article-card {
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  background-color: #fafafa;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.article-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #0066cc, #0099ff);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.article-card:hover {
  background-color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 102, 204, 0.12);
  border-color: rgba(0, 102, 204, 0.2);
}

.article-card:hover::before {
  transform: scaleX(1);
}

.article-card img {
  width: 100%;
  height: 180px;
  margin-bottom: 1rem;
  object-fit: cover;
  border-radius: 8px;
  opacity: 1;
}

.article-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.article-card h3 a {
  color: #1a1a1a;
}

.article-card h3 a:hover {
  color: #0066cc;
  text-decoration: none;
}

.article-excerpt {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.article-meta {
  font-size: 0.85rem;
  color: #777;
  font-style: italic;
}

/* ================================
   SIDEBAR BOXES
   ================================ */

.sidebar-box {
  background-color: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.sidebar-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, #0066cc, #0099ff);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.sidebar-box:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 102, 204, 0.2);
}

.sidebar-box:hover::before {
  transform: scaleY(1);
}

.sidebar-box h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: #1a1a1a;
}

.sidebar-box p {
  font-size: 0.95rem;
  color: #444;
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.sidebar-box ul {
  list-style: none;
  padding: 0;
}

.sidebar-box li {
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f0f0;
}

.sidebar-box li:last-child {
  border-bottom: none;
}

.sidebar-box a {
  color: #333;
  display: block;
  transition: color 0.2s, padding-left 0.2s;
}

.sidebar-box a:hover {
  color: #0066cc;
  padding-left: 5px;
  text-decoration: none;
}

.responsible-gaming {
  background-color: #fff3cd;
  border-color: #ffc107;
}

.responsible-gaming h3 {
  color: #856404;
}

/* ================================
   FOOTER
   ================================ */

.site-footer {
  background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
  color: #ccc;
  padding: 2.5rem 0;
  margin-top: 3rem;
  border-top: 3px solid #0066cc;
}

.footer-content {
  text-align: center;
}

.footer-nav {
  margin-bottom: 1.5rem;
}

.footer-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.footer-nav a {
  color: #ccc;
  transition: all 0.3s ease;
  position: relative;
  padding-bottom: 2px;
}

.footer-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #0066cc, #0099ff);
  transition: width 0.3s ease;
}

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

.footer-nav a:hover::after {
  width: 100%;
}

.footer-text {
  font-size: 0.9rem;
  color: #999;
}

/* ================================
   ARTICLE PAGE LAYOUT
   ================================ */

.article-page {
  background-color: #fff;
  max-width: 800px;
  margin: 2rem auto;
  padding: 3rem;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.article-page h1 {
  font-size: 2rem;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  color: #1a1a1a;
}

.article-hero {
  margin-bottom: 2rem;
  border-radius: 16px;
  overflow: hidden;
  border: none;
  box-shadow:
    0 10px 40px rgba(0, 0, 0, 0.12),
    0 4px 16px rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  background: linear-gradient(135deg, #ffffff 0%, #f0f4f8 50%, #e8f0f5 100%);
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.article-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, #0066cc, #0099ff, #00ccff, #0066cc);
  z-index: 1;
}

.article-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(0, 102, 204, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0, 153, 255, 0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}


.article-hero img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), filter 0.4s ease;
  position: relative;
  z-index: 1;
}

.article-hero:hover {
  transform: translateY(-4px);
  box-shadow:
    0 20px 60px rgba(0, 102, 204, 0.2),
    0 8px 24px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(0, 102, 204, 0.1) inset;
}

.article-hero:hover img {
  transform: scale(1.02);
  filter: brightness(1.05);
}

/* Стили для изображений статей (JPEG) */
.article-hero img {
  width: 100% !important;
  height: 280px !important;
  max-height: 280px !important;
  object-fit: cover !important;
  border-radius: 12px;
  position: relative;
  z-index: 1;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
  .article-hero {
    margin-bottom: 1.5rem;
    border-radius: 14px;
    box-shadow:
      0 8px 30px rgba(0, 0, 0, 0.1),
      0 3px 12px rgba(0, 0, 0, 0.06);
  }

  .article-hero img {
    height: 220px !important;
    max-height: 220px !important;
  }

  .article-hero::before {
    height: 4px;
  }
}

@media (max-width: 480px) {
  .article-hero {
    margin-bottom: 1.25rem;
    border-radius: 12px;
    box-shadow:
      0 6px 24px rgba(0, 0, 0, 0.08),
      0 2px 8px rgba(0, 0, 0, 0.04);
  }

  .article-hero img {
    height: 180px !important;
    max-height: 180px !important;
  }

  .article-hero::before {
    height: 3px;
  }
}

/* Lazy-loaded images - без анимации для предотвращения мигания */
.article-hero img[loading="lazy"] {
  opacity: 1;
}

/* JPEG изображения не требуют специальных фоновых градиентов */

.article-page h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #1a1a1a;
  border-left: 4px solid #0066cc;
  padding-left: 1rem;
}

.article-page h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #333;
}

.article-page p {
  margin-bottom: 1.25rem;
  line-height: 1.7;
  color: #333;
}

.article-page ul, .article-page ol {
  margin-bottom: 1.25rem;
  margin-left: 2rem;
  line-height: 1.7;
}

.article-page li {
  margin-bottom: 0.5rem;
}

.article-navigation {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid #e0e0e0;
}

.article-navigation h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: #555;
}

.related-links {
  list-style: none;
  margin-left: 0;
}

.related-links li {
  margin-bottom: 0.75rem;
}

.back-home {
  display: inline-block;
  margin-bottom: 1.5rem;
  padding: 0.7rem 1.5rem;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8ecf1 100%);
  border-radius: 6px;
  color: #0066cc;
  font-weight: 500;
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.back-home::before {
  content: '←';
  margin-right: 0.5rem;
  transition: transform 0.3s ease;
  display: inline-block;
}

.back-home:hover {
  background: linear-gradient(135deg, #0066cc 0%, #0099ff 100%);
  color: #fff;
  text-decoration: none;
  transform: translateX(-3px);
  border-color: #0066cc;
  box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}

.back-home:hover::before {
  transform: translateX(-3px);
}

/* ================================
   RESPONSIVE (MOBILE)
   ================================ */

@media (max-width: 768px) {
  /* Mobile menu */
  .menu-icon {
    display: flex;
  }

  .site-nav {
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background-color: #fff;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 0;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
  }

  .site-nav li {
    border-bottom: 1px solid #f0f0f0;
    animation: fadeInDown 0.3s ease-out;
  }

  .site-nav li:last-child {
    border-bottom: none;
  }

  .site-nav a {
    display: block;
    padding: 1rem;
    position: relative;
    transition: all 0.3s;
    border-radius: 0;
  }

  .site-nav a:hover {
    background: linear-gradient(90deg, rgba(0, 102, 204, 0.08) 0%, rgba(0, 102, 204, 0.02) 100%);
    padding-left: 1.8rem;
    border-left: 3px solid #0066cc;
  }

  .site-nav a::before {
    content: "›";
    position: absolute;
    left: 0.8rem;
    opacity: 0;
    transition: all 0.3s;
    color: #0066cc;
    font-weight: bold;
    font-size: 1.2rem;
  }

  .site-nav a:hover::before {
    opacity: 1;
    left: 1rem;
  }

  .site-nav a::after {
    display: none;
  }

  /* Show menu when checkbox is checked */
  .menu-toggle:checked ~ .site-nav {
    max-height: 600px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  }

  /* Animate burger icon to X */
  .menu-toggle:checked ~ .menu-icon span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
    background-color: #0066cc;
  }

  .menu-toggle:checked ~ .menu-icon span:nth-child(2) {
    opacity: 0;
  }

  .menu-toggle:checked ~ .menu-icon span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
    background-color: #0066cc;
  }

  /* Fade in animation for menu items */
  @keyframes fadeInDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .hero-content {
    grid-template-columns: 1fr;
  }

  .hero-text {
    max-width: 100%;
  }

  .hero-text h1 {
    font-size: 1.75rem;
  }

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

  .sidebar {
    position: static;
  }

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

  .content-section {
    padding: 1.5rem;
  }

  .article-page {
    padding: 2rem 1.5rem;
    margin: 1rem;
  }

  .article-page h1 {
    font-size: 1.5rem;
  }

  .article-page h2 {
    font-size: 1.25rem;
  }
}

@media (min-width: 600px) and (max-width: 768px) {
  /* Small tablets - show burger but with more space */
  .menu-icon {
    display: flex;
  }

  .site-nav {
    flex-basis: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    margin-top: 1rem;
  }

  .site-nav a {
    display: block;
    padding: 1.2rem;
  }

  .menu-toggle:checked ~ .site-nav {
    max-height: 600px;
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  /* Regular tablets - normal horizontal menu with smaller gaps */
  .site-nav ul {
    gap: 0.3rem;
  }
  
  .site-nav a {
    padding: 0.5rem 0.7rem;
    font-size: 0.88rem;
  }
}

@media (min-width: 769px) and (max-width: 900px) {
  /* Small tablets - even more compact */
  .site-nav a {
    padding: 0.5rem 0.6rem;
    font-size: 0.85rem;
  }
  
  .site-nav ul {
    gap: 0.2rem;
  }
}

@media (min-width: 1025px) {
  /* Desktop - ensure menu icon is hidden */
  .menu-icon {
    display: none !important;
  }
}


