/* ============================================================
   casino-mark.ru — Mobile & Responsive Styles
   Breakpoints: 1024px (tablet), 768px (mobile-lg), 480px (mobile)
   ============================================================ */

/* === TABLET (≤ 1024px) === */
@media (max-width: 1024px) {
  .casino-card {
    grid-template-columns: 48px 140px 1fr auto;
    grid-template-rows: auto auto;
    gap: 16px;
  }
  .casino-cta {
    grid-column: 4;
    grid-row: 1 / 3;
  }
  .casino-meta {
    grid-column: 2 / 4;
    grid-row: 2;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
  }
  .casino-pros-cons {
    grid-column: 1 / 5;
    margin-top: 4px;
  }

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

  .related-pages {
    grid-template-columns: 1fr 1fr;
  }

  .review-pros-cons {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    gap: 32px;
  }
}

/* === MOBILE-LARGE (≤ 768px) === */
@media (max-width: 768px) {
  /* Prevent horizontal overflow on all mobile sizes */
  html, body { overflow-x: hidden; max-width: 100vw; }
  .site-header, .hero, .section, .container,
  .casino-card, .content-block, .footer { max-width: 100%; box-sizing: border-box; }

  /* Header */
  .header-main { padding: 12px 16px; }
  .header-top { padding: 8px 16px; }

  .hamburger { display: flex; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(7, 8, 15, 0.98);
    border-bottom: 1px solid var(--border-gold);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    z-index: 200;
  }
  .main-nav.open { display: flex; }
  .nav-link {
    padding: 14px 24px;
    border-radius: 0;
    width: 100%;
    font-size: 0.85rem;
  }
  .nav-link::after { display: none; }
  .nav-link:hover, .nav-link.active {
    background: var(--gold-dim);
  }

  /* Hero */
  .hero { padding: 48px 16px 40px; }
  .hero h1 { font-size: 1.75rem; }
  .hero-sub { font-size: 1rem; }
  .hero-stats { gap: 20px; flex-wrap: wrap; justify-content: center; }
  .hero-stat-num { font-size: 1.5rem; }

  /* Casino cards */
  .casino-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
  }
  .casino-card-top {
    display: flex;
    align-items: center;
    gap: 12px;
  }
  .casino-rank { font-size: 1.5rem; min-width: 32px; }
  .casino-logo { width: 120px; height: 48px; }
  .casino-meta {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
  }
  .casino-cta {
    flex-direction: row;
    width: 100%;
  }
  .casino-cta .btn { flex: 1; justify-content: center; }
  .casino-pros-cons { display: none; } /* hidden on mobile for cleanliness */

  /* Sections */
  .section { padding: 40px 0; }
  .container { padding: 0 16px; }

  /* Section titles */
  .section-title { font-size: 1.4rem; }

  /* Table — card stacked layout on mobile */
  .table-wrapper {
    border: none;
    background: transparent;
    overflow-x: hidden;
  }
  .comparison-table,
  .comparison-table thead,
  .comparison-table tbody,
  .comparison-table th,
  .comparison-table td,
  .comparison-table tr { display: block; width: 100%; }

  .comparison-table thead tr { display: none; }

  .comparison-table tbody tr {
    border: 1px solid var(--border-gold);
    border-radius: var(--radius);
    margin-bottom: 12px;
    background: var(--bg-card);
    display: block;
  }
  .comparison-table tbody tr:hover { background: var(--bg-card-hover); }

  .comparison-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    text-align: right;
    font-size: 0.88rem;
    word-break: normal;
  }
  .comparison-table tbody td:last-child { border-bottom: none; }

  .comparison-table tbody td::before {
    content: attr(data-label);
    font-family: var(--font-display);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gold);
    text-align: left;
    margin-right: 10px;
    flex-shrink: 0;
    max-width: 48%;
    line-height: 1.3;
  }

  /* Casino name row — full-width header for each card */
  .comparison-table tbody td:first-child {
    background: var(--bg-secondary);
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--gold-light);
    padding: 12px 14px;
    justify-content: center;
    text-align: center;
    border-bottom: 1px solid var(--border-gold);
    white-space: nowrap;
  }
  .comparison-table tbody td:first-child::before { display: none; }

  /* FAQ */
  .faq-question { padding: 14px 16px; font-size: 0.9rem; }
  .faq-answer { }
  .faq-item.open .faq-answer { padding: 0 16px 14px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-brand p { max-width: 100%; }

  /* Related pages */
  .related-pages { grid-template-columns: 1fr; }

  /* Method grid */
  .method-grid { grid-template-columns: repeat(2, 1fr); }
  .payment-grid { grid-template-columns: repeat(2, 1fr); }

  /* Steps */
  .step-item { padding: 16px; gap: 14px; }

  /* RG block */
  .rg-block { padding: 24px 16px; }
  .rg-links { gap: 12px; }

  /* Deco divider */
  .deco-divider { margin: 32px 0; }

  /* Review */
  .casino-review-block { padding: 20px 16px; }
  .review-header { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* Scroll to top */
  .scroll-to-top { bottom: 20px; right: 16px; }

  /* Hero badge */
  .hero-badge { font-size: 0.65rem; letter-spacing: 2px; }
}

/* === MOBILE-SMALL (≤ 480px) === */
@media (max-width: 480px) {
  :root { font-size: 15px; }

  .hero h1 { font-size: 1.5rem; }
  .hero-stats { gap: 16px; }
  .hero-stat-num { font-size: 1.3rem; }

  .casino-logo { width: 100px; height: 40px; font-size: 0.8rem; }
  .casino-name { font-size: 1.1rem; }

  .btn { padding: 10px 20px; font-size: 0.72rem; }

  .logo-text { font-size: 1rem; }
  .logo-icon { width: 30px; height: 30px; font-size: 0.85rem; }
  .logo-img { height: 36px; max-width: 160px; }

  .method-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .payment-grid { grid-template-columns: 1fr 1fr; gap: 10px; }

  .content-block h2 { font-size: 1.35rem; margin: 36px 0 12px; }
  .content-block h3 { font-size: 1.1rem; }

  .deco-corner { width: 28px; height: 28px; }

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

  .top5-header { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* === LANDSCAPE MOBILE (≤ 768px height) === */
@media (max-height: 600px) and (orientation: landscape) {
  .hero { padding: 32px 16px; }
  .hero h1 { font-size: 1.5rem; }
  .hero-stats { display: none; }
}

/* === PRINT === */
@media print {
  .site-header, .scroll-to-top, .lang-switcher, .hamburger { display: none; }
  body { background: white; color: black; }
  .casino-card { border: 1px solid #ccc; }
  a { color: black; }
  .btn--primary { background: #333; color: white; }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .fade-up { opacity: 1; transform: none; }
}
