/* ============================================
   ЦВЕТОВАЯ СИСТЕМА
   ============================================ */
:root {
  /* Основная палитра (из дизайна) */
  --bg-primary: #F8D7D7;
  --bg-secondary: #FFFFFF;
  --bg-dark: #E8C7C7;
  --bg-overlay: rgba(0, 0, 0, 0.5);
  
  /* Текст */
  --text-primary: #FFFFFF;
  --text-secondary: #2C2C2C;
  --text-accent: #8B4A6B;
  --text-muted: #666666;
  
  /* IQ/Игровая тематика */
  --iq-primary: #6B5B95;
  --iq-secondary: #9B8FB8;
  --iq-accent: #4A90A4;
  --iq-light: #B8A9D9;
  
  /* Игровые элементы */
  --game-unlocked: #5CB85C;
  --game-locked: #D3D3D3;
  --funny-score: #FFD700;
  --funny-score-dark: #FFA500;
  
  /* Рейтинг */
  --rank-bronze: #CD7F32;
  --rank-silver: #C0C0C0;
  --rank-gold: #FFD700;
  --rank-platinum: #E5E4E2;
  --rank-diamond: #B9F2FF;
  
  /* Интерактивные элементы */
  --button-primary: #FFFFFF;
  --button-hover: #F0F0F0;
  --button-text: #2C2C2C;
  --button-border: rgba(255, 255, 255, 0.3);
  
  /* Градиенты */
  --gradient-iq: linear-gradient(135deg, #6B5B95 0%, #9B8FB8 100%);
  --gradient-bg: linear-gradient(180deg, #F8D7D7 0%, #E8C7C7 100%);
  --gradient-game: linear-gradient(135deg, #4A90A4 0%, #6B5B95 100%);
  --gradient-hero: linear-gradient(135deg, #F8D7D7 0%, #E8C7C7 50%, #D8B7B7 100%);
  
  /* Тени */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.25);
}

/* ============================================
   БАЗОВЫЕ СТИЛИ
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* ============================================
   АНИМАЦИИ
   ============================================ */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out;
}

.slide-in-left {
  animation: slideInLeft 0.8s ease-out;
}

.slide-in-right {
  animation: slideInRight 0.8s ease-out;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
header {
  background: var(--bg-secondary);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--iq-primary);
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--iq-primary);
  transition: width 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--iq-primary);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.mobile-menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--iq-primary);
  transition: all 0.3s ease;
  border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-overlay);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-overlay.active {
  display: block;
  opacity: 1;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  background: var(--gradient-hero);
  background-image: url('../images/hero.jpg');
  background-size: 90% auto;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
  padding: 4rem 0;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(107, 91, 149, 0.7) 0%, rgba(139, 74, 107, 0.75) 50%, rgba(74, 90, 164, 0.7) 100%);
  z-index: 0;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
  animation: float 20s infinite ease-in-out;
  opacity: 0.3;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero h1 {
  font-size: 3.5rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.5), 0 0 20px rgba(0, 0, 0, 0.3);
  line-height: 1.2;
  font-weight: 700;
}

.hero .subtitle {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4), 0 0 15px rgba(0, 0, 0, 0.2);
  font-weight: 600;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-primary);
  margin-bottom: 2rem;
  line-height: 1.8;
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.4), 0 0 10px rgba(0, 0, 0, 0.2);
  font-weight: 500;
}

.hero-info {
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(15px);
  border-radius: 15px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  border: 2px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.hero-info h3 {
  color: var(--text-primary);
  margin-bottom: 1rem;
  font-size: 1.3rem;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
  font-weight: 700;
}

.hero-info ul {
  list-style: none;
  color: var(--text-primary);
}

.hero-info li {
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  font-weight: 500;
}

.hero-info li {
  margin-bottom: 0.5rem;
  padding-left: 1.5rem;
  position: relative;
}

.hero-info li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--funny-score);
  font-weight: bold;
}

.funny-score-badge {
  display: inline-block;
  background: var(--funny-score);
  color: var(--text-secondary);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-weight: bold;
  margin-left: 0.5rem;
  animation: pulse 2s infinite;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  padding: 1rem 2rem;
  border: 2px solid var(--button-border);
  background: var(--button-primary);
  color: var(--button-text);
  text-decoration: none;
  font-weight: 600;
  border-radius: 50px;
  transition: all 0.3s ease;
  display: inline-block;
  cursor: pointer;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: var(--iq-primary);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  z-index: 0;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn span {
  position: relative;
  z-index: 1;
}

.btn:hover {
  color: var(--text-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-primary {
  background: var(--iq-primary);
  color: var(--text-primary);
  border-color: var(--iq-primary);
}

.btn-primary:hover {
  background: var(--iq-secondary);
  border-color: var(--iq-secondary);
}

/* ============================================
   GAME SECTION (Игра на сообразительность)
   ============================================ */
.game-section {
  padding: 4rem 0;
  background: var(--bg-secondary);
}

.game-section.games-page {
  position: relative;
  overflow: hidden;
}

.game-section.games-page::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('../images/Oyunlarımız.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.15;
  z-index: 0;
}

.game-section.games-page > .container {
  position: relative;
  z-index: 1;
}

.game-section h2 {
  text-align: center;
  font-size: 2.5rem;
  color: var(--iq-primary);
  margin-bottom: 3rem;
}

.iq-game {
  max-width: 600px;
  margin: 0 auto;
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.game-question {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  text-align: center;
  font-weight: 600;
}

.game-options {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

.game-option {
  padding: 1.2rem;
  background: var(--bg-primary);
  border: 2px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1.1rem;
  color: var(--text-secondary);
  text-align: center;
}

.game-option:hover {
  border-color: var(--iq-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.game-option.correct {
  background: var(--game-unlocked);
  color: var(--text-primary);
  border-color: var(--game-unlocked);
}

.game-option.incorrect {
  background: #E74C3C;
  color: var(--text-primary);
  border-color: #E74C3C;
}

.game-result {
  text-align: center;
  font-size: 1.2rem;
  font-weight: bold;
  margin-top: 1rem;
  min-height: 30px;
}

.game-score {
  text-align: center;
  font-size: 1.1rem;
  color: var(--iq-primary);
  margin-top: 1rem;
}

.game-next-btn {
  display: block;
  margin: 1.5rem auto 0;
  padding: 0.8rem 2rem;
}

/* ============================================
   GAMES PAGE (Страница игр)
   ============================================ */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.game-card {
  background: var(--bg-secondary);
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s;
}

.game-card:hover::before {
  left: 100%;
}

.game-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

.game-card.locked {
  opacity: 0.6;
  cursor: not-allowed;
}

.game-card.locked::after {
  content: '🔒';
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
}

.game-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.game-card h3 {
  color: var(--iq-primary);
  font-size: 1.5rem;
}

.game-difficulty {
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 600;
}

.difficulty-easy {
  background: var(--game-unlocked);
  color: var(--text-primary);
}

.difficulty-medium {
  background: var(--iq-accent);
  color: var(--text-primary);
}

.difficulty-hard {
  background: #E74C3C;
  color: var(--text-primary);
}

.game-card p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.game-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.game-score-required {
  color: var(--funny-score-dark);
  font-weight: 600;
}

/* ============================================
   RANKING PAGE (Страница рейтинга)
   ============================================ */
.ranking-section {
  padding: 4rem 0;
}

.ranking-table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0;
}

.ranking-table-wrapper::-webkit-scrollbar {
  height: 8px;
}

.ranking-table-wrapper::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-radius: 10px;
}

.ranking-table-wrapper::-webkit-scrollbar-thumb {
  background: var(--iq-primary);
  border-radius: 10px;
}

.ranking-table {
  background: var(--bg-secondary);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  min-width: 600px;
}

.ranking-header {
  background: var(--gradient-iq);
  color: var(--text-primary);
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 60px 1fr 150px 150px;
  gap: 1rem;
  font-weight: 600;
}

.ranking-row {
  padding: 1.5rem;
  display: grid;
  grid-template-columns: 60px 1fr 150px 150px;
  gap: 1rem;
  align-items: center;
  border-bottom: 1px solid var(--bg-primary);
  transition: all 0.3s ease;
}

.ranking-row:hover {
  background: var(--bg-primary);
}

.ranking-row:last-child {
  border-bottom: none;
}

.rank-number {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--iq-primary);
}

.rank-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.rank-bronze {
  background: var(--rank-bronze);
  color: var(--text-primary);
}

.rank-silver {
  background: var(--rank-silver);
  color: var(--text-secondary);
}

.rank-gold {
  background: var(--rank-gold);
  color: var(--text-secondary);
}

.rank-platinum {
  background: var(--rank-platinum);
  color: var(--text-secondary);
}

.rank-diamond {
  background: var(--rank-diamond);
  color: var(--text-secondary);
}

/* ============================================
   SECTIONS
   ============================================ */
section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  color: var(--iq-primary);
  margin-bottom: 3rem;
}

/* ============================================
   MAP CONTAINER
   ============================================ */
.map-container {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin: 2rem 0;
}

.map-container iframe {
  width: 100%;
  height: 450px;
  border: 0;
  display: block;
}

@media (max-width: 768px) {
  .map-container iframe {
    height: 300px;
  }
}

/* ============================================
   FORMS
   ============================================ */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid var(--bg-dark);
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--iq-primary);
  box-shadow: 0 0 0 3px rgba(107, 91, 149, 0.1);
}

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

/* ============================================
   FOOTER
   ============================================ */
footer {
  background: var(--bg-dark);
  color: var(--text-secondary);
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: var(--iq-primary);
  margin-bottom: 1rem;
}

.footer-section a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--iq-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--bg-primary);
  color: var(--text-muted);
}

/* ============================================
   COOKIE BANNER
   ============================================ */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  box-shadow: var(--shadow-xl);
  padding: 1.5rem;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.cookie-text {
  flex: 1;
  min-width: 300px;
}

.cookie-text a {
  color: var(--iq-primary);
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 1rem;
}

.cookie-buttons .btn {
  padding: 0.8rem 1.5rem;
  font-size: 0.9rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
  .mobile-menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 80%;
    max-width: 300px;
    height: calc(100vh - 70px);
    background: var(--bg-secondary);
    flex-direction: column;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    transition: left 0.3s ease;
    z-index: 999;
  }

  .nav-menu.active {
    left: 0;
  }

  .hero {
    background-size: 150% auto;
    background-position: center top;
  }

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

  .hero .subtitle {
    font-size: 1.2rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .hero-buttons .btn {
    width: 100%;
    text-align: center;
  }

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

  .ranking-header,
  .ranking-row {
    grid-template-columns: 40px 1fr 100px 100px;
    font-size: 0.9rem;
    padding: 1rem;
  }

  .cookie-content {
    flex-direction: column;
    text-align: center;
  }

  .cookie-buttons {
    width: 100%;
    justify-content: center;
  }

  .cookie-buttons .btn {
    flex: 1;
  }

  .table-wrapper,
  .ranking-table-wrapper {
    margin: 0 -20px;
    padding: 0 20px;
  }

  /* Detaylı İstatistikler section - изображение и таблица */
  .stats-with-image {
    grid-template-columns: 1fr !important;
  }

  .stats-with-image > div:first-child {
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .data-table,
  .comparison-table {
    font-size: 0.85rem;
  }

  .data-table th,
  .data-table td,
  .comparison-table th,
  .comparison-table td {
    padding: 0.8rem 0.6rem;
    white-space: nowrap;
  }

  .data-table th:first-child,
  .data-table td:first-child,
  .comparison-table th:first-child,
  .comparison-table td:first-child {
    position: sticky;
    left: 0;
    background: inherit;
    z-index: 1;
  }

  .data-table thead th:first-child {
    background: var(--gradient-iq);
  }

  .comparison-table thead th:first-child {
    background: var(--iq-primary);
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  
  .articles-grid {
    grid-template-columns: 1fr !important;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    left: 0 !important;
    padding-left: 3rem !important;
    padding-right: 0 !important;
    text-align: left !important;
  }

  .timeline-item:nth-child(odd) .timeline-marker,
  .timeline-item:nth-child(even) .timeline-marker {
    left: 11px;
  }
}

@media (max-width: 480px) {
  .hero {
    background-size: 180% auto;
    background-position: center top;
  }

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

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

  .ranking-header,
  .ranking-row {
    grid-template-columns: 30px 1fr 80px 80px;
    font-size: 0.8rem;
    gap: 0.5rem;
  }

  .table-wrapper,
  .ranking-table-wrapper {
    margin: 0 -10px;
    padding: 0 10px;
  }

  .data-table,
  .comparison-table {
    font-size: 0.7rem;
    min-width: 500px;
  }

  .data-table th,
  .data-table td,
  .comparison-table th,
  .comparison-table td {
    padding: 0.5rem 0.4rem;
    white-space: nowrap;
  }

  .comparison-table .feature-name {
    min-width: 120px;
  }

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

  .stat-number {
    font-size: 2rem;
  }
}

/* ============================================
   ACCORDION
   ============================================ */
.accordion {
  background: var(--bg-secondary);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.accordion-item {
  border-bottom: 1px solid var(--bg-primary);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-header {
  padding: 1.5rem;
  background: var(--bg-primary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  user-select: none;
}

.accordion-header:hover {
  background: var(--bg-dark);
}

.accordion-header.active {
  background: var(--iq-primary);
  color: var(--text-primary);
}

.accordion-title {
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0;
}

.accordion-icon {
  transition: transform 0.3s ease;
  font-size: 1.2rem;
}

.accordion-header.active .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 1.5rem;
}

.accordion-content.active {
  max-height: 1000px;
  padding: 1.5rem;
}

.accordion-body {
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ============================================
   TABLES
   ============================================ */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0;
}

.table-wrapper::-webkit-scrollbar {
  height: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-radius: 10px;
}

.table-wrapper::-webkit-scrollbar-thumb {
  background: var(--iq-primary);
  border-radius: 10px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
  background: var(--iq-secondary);
}

.data-table {
  width: 100%;
  min-width: 600px;
  background: var(--bg-secondary);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border-collapse: collapse;
}

.data-table thead {
  background: var(--gradient-iq);
  color: var(--text-primary);
}

.data-table th {
  padding: 1.2rem;
  text-align: left;
  font-weight: 600;
  font-size: 1rem;
}

.data-table td {
  padding: 1.2rem;
  border-bottom: 1px solid var(--bg-primary);
  color: var(--text-secondary);
}

.data-table tbody tr {
  transition: all 0.3s ease;
}

.data-table tbody tr:hover {
  background: var(--bg-primary);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.comparison-table {
  width: 100%;
  min-width: 500px;
  background: var(--bg-secondary);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border-collapse: collapse;
}

.comparison-table th,
.comparison-table td {
  padding: 1.2rem;
  text-align: center;
  border: 1px solid var(--bg-primary);
}

.comparison-table thead th {
  background: var(--iq-primary);
  color: var(--text-primary);
  font-weight: 600;
}

.comparison-table tbody tr:nth-child(even) {
  background: var(--bg-primary);
}

.comparison-table .feature-name {
  text-align: left;
  font-weight: 600;
  background: var(--bg-dark);
}

.comparison-table .check {
  color: var(--game-unlocked);
  font-weight: bold;
  font-size: 1.2rem;
}

.comparison-table .cross {
  color: #E74C3C;
  font-weight: bold;
  font-size: 1.2rem;
}

/* ============================================
   TESTIMONIALS (Отзывы)
   ============================================ */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.testimonial-card {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  position: relative;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.testimonial-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.testimonial-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--gradient-iq);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  font-weight: bold;
  font-size: 1.5rem;
}

.testimonial-info h4 {
  color: var(--iq-primary);
  margin-bottom: 0.3rem;
  font-size: 1.1rem;
}

.testimonial-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.testimonial-rating {
  color: var(--funny-score);
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.testimonial-text {
  color: var(--text-secondary);
  line-height: 1.8;
  font-style: italic;
}

.testimonial-date {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 1rem;
  text-align: right;
}

/* ============================================
   ARTICLES / BLOG
   ============================================ */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.article-card {
  background: var(--bg-secondary);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.article-image {
  width: 100%;
  height: 280px;
  background: var(--gradient-iq);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: 15px 15px 0 0;
}

.article-content {
  padding: 1.5rem;
}

.article-meta {
  display: flex;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.article-tag {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: var(--iq-light);
  color: var(--iq-primary);
  border-radius: 15px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.article-card h3 {
  color: var(--iq-primary);
  margin-bottom: 0.8rem;
  font-size: 1.3rem;
}

.article-card p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.article-link {
  color: var(--iq-primary);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: gap 0.3s ease;
}

.article-link:hover {
  gap: 1rem;
}

/* ============================================
   STATISTICS
   ============================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.stat-card {
  background: var(--bg-secondary);
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stat-number {
  font-size: 3rem;
  font-weight: bold;
  color: var(--iq-primary);
  margin-bottom: 0.5rem;
  display: block;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-weight: 600;
}

.stat-description {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* ============================================
   TIMELINE
   ============================================ */
.timeline {
  position: relative;
  padding: 2rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--iq-light);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  width: 50%;
}

.timeline-item:nth-child(odd) {
  left: 0;
  padding-right: 3rem;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
  padding-left: 3rem;
}

.timeline-marker {
  position: absolute;
  width: 20px;
  height: 20px;
  background: var(--iq-primary);
  border-radius: 50%;
  border: 4px solid var(--bg-secondary);
  top: 0;
  z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-marker {
  right: -11px;
}

.timeline-item:nth-child(even) .timeline-marker {
  left: -11px;
}

.timeline-content {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
}

.timeline-date {
  color: var(--iq-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.timeline-title {
  color: var(--text-secondary);
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.timeline-text {
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================
   BADGES & TAGS
   ============================================ */
.badge {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-primary {
  background: var(--iq-primary);
  color: var(--text-primary);
}

.badge-success {
  background: var(--game-unlocked);
  color: var(--text-primary);
}

.badge-warning {
  background: var(--funny-score);
  color: var(--text-secondary);
}

.badge-info {
  background: var(--iq-accent);
  color: var(--text-primary);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
