/**
 * Responsive CSS — Musang178
 */

/* ==========================================================================
   TABLET (max-width: 1024px)
   ========================================================================== */

@media (max-width: 1024px) {
    .nav-main { display: none; }
    .mobile-menu-toggle { display: flex; }

    /* Two-column layouts → single */
    .about-split { grid-template-columns: 1fr; }
    .ft-header { grid-template-columns: 1fr; gap: 40px; }
    .ft-image-col { height: 300px; }

    .topics-magazine {
        grid-template-columns: repeat(2, 1fr);
    }
    .topics-magazine .topic-tile:first-child {
        grid-column: 1 / 3;
    }

    .magazine-grid {
        grid-template-columns: 1fr;
    }
    .mag-card-featured { grid-row: auto; }

    .numbers-row { flex-wrap: wrap; justify-content: center; }
    .number-divider { display: none; }
    .number-block { min-width: 140px; }

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

    .casino-grid-new { grid-template-columns: repeat(3, 1fr); }
}

/* ==========================================================================
   TABLET PORTRAIT (max-width: 768px)
   ========================================================================== */

@media (max-width: 768px) {
    :root {
        --header-height: 60px;
        --topbar-height: 36px;
        --total-header-height: 96px;
    }

    .topbar-tagline { display: none; }

    .header-inner { padding: 0 var(--space-md); }
    .header-logo img { height: 36px; }
    .header-logo-sub { display: none; }

    .hero-decode-content { padding: 60px var(--space-md); }
    .hero-decode-actions { flex-direction: column; }
    .btn-decode-primary, .btn-decode-secondary { width: 100%; text-align: center; }
    .hero-decode-stats { gap: 16px; }
    .hds-divider { display: none; }

    .topics-magazine { grid-template-columns: 1fr; }
    .topics-magazine .topic-tile:first-child { grid-column: 1; }
    .topic-tile-featured .topic-tile-inner { flex-direction: column; padding: 28px; }

    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-links { align-items: center; }

    .layout-sidebar { grid-template-columns: 1fr; }
    .sidebar { order: 2; }

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

    .about-split-image { height: 300px; }
    .about-split-badge { bottom: 16px; right: 16px; }

    .breadcrumb { font-size: var(--text-xs); }

    .article-content h2 { font-size: var(--text-xl); }
    .article-content h3 { font-size: var(--text-lg); }
    .article-content figure.image.left,
    .article-content figure.image.right {
        float: none; max-width: 100%; margin: var(--space-md) 0;
    }
}

/* ==========================================================================
   MOBILE (max-width: 640px)
   ========================================================================== */

@media (max-width: 640px) {
    :root { --container-padding: 1rem; }

    .magazine-grid { grid-template-columns: 1fr; }
    .mag-card-featured { grid-row: auto; }

    .numbers-row { flex-direction: column; gap: var(--space-xl); }

    .casino-grid-new { grid-template-columns: 1fr; }

    .article-content table { display: block; overflow-x: auto; white-space: nowrap; }

    .btn { width: 100%; }
    .btn-sm { width: auto; }

    .form-control { font-size: 16px; }

    .about-split-image { height: 240px; }
    .ft-image-col { display: none; }

    .tags-cloud-grid { gap: 8px; }
}

/* ==========================================================================
   VERY SMALL (max-width: 380px)
   ========================================================================== */

@media (max-width: 380px) {
    .header-logo-name { font-size: 1rem; }
    .decode-line { font-size: 2rem; }
    .decode-line-accent { font-size: 1.4rem; }
    .casino-grid-new { grid-template-columns: 1fr; }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}

/* ==========================================================================
   LARGE SCREENS (min-width: 1400px)
   ========================================================================== */

@media (min-width: 1400px) {
    .container-wide { max-width: 1600px; }
}

/* ==========================================================================
   PRINT
   ========================================================================== */

@media print {
    .topbar, .header, footer, .footer, .mobile-nav, .mobile-overlay,
    .hero-decode-actions, .btn, .pagination, .casino-grid-new { display: none !important; }
    body { background: white; color: black; font-size: 12pt; }
    .article-content a::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #666; }
    h1, h2, h3, h4 { page-break-after: avoid; }
    img { max-width: 100% !important; page-break-inside: avoid; }
}
