/**
 * Responsive CSS — 99Jitu Casino Emerald Theme
 */

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

    /* Hero cards */
    .hero-cards-stack { height: 420px; }
    .hcard-front { width: 480px; height: 360px; }
    .hcard-back2 { width: 440px; height: 320px; }
    .hcard-back3 { width: 400px; height: 300px; }
    .hcard-front .hcard-inner { padding: 28px 32px; }

    /* Features */
    .features-layout { grid-template-columns: 1fr; gap: 40px; }
    .features-image-col { order: 2; }
    .features-img { height: 280px; }

    /* Magazine */
    .mag-grid { grid-template-columns: repeat(2, 1fr); }
    .mag-card-featured { grid-column: span 2; }

    /* Articles magazine */
    .articles-mag-grid { grid-template-columns: 1fr; }
    .art-featured { max-width: 100%; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }

    /* Typo stats */
    .typo-stat { padding: 12px 16px; }
    .typo-stat-num { font-size: clamp(2rem, 4vw, 3.5rem); }

    /* Article grid */
    .articles-grid { grid-template-columns: repeat(2, 1fr); }
    .article-layout { grid-template-columns: 1fr; }
    .subcats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   MOBILE (max-width: 768px)
   ========================================================================== */
@media (max-width: 768px) {
    :root {
        --topbar-height: 40px;
        --header-height: 54px;
        --container-padding: 1rem;
    }

    /* Static spacer under fixed header on mobile */
    .main-content { padding-top: calc(var(--total-header-height) + 40px); }

    /* Topbar */
    .topbar-logo-text { font-size: 0.78rem; }

    /* Hero */
    .hero-cards { padding: 32px 0 60px; min-height: auto; }
    .hero-cards-stack { height: auto; position: static; display: flex; flex-direction: column; align-items: center; gap: 0; }
    .hcard { position: static; transform: none !important; width: 100% !important; max-width: 400px; height: auto !important; }
    .hcard-back3, .hcard-back2 { display: none; }
    .hcard-front .hcard-inner { padding: 28px 24px; }
    .hcard-title { font-size: 1.5rem; }
    .hero-float { display: none; }

    /* Typo stats */
    .typo-stats-row { flex-direction: column; }
    .typo-stat-divider { width: 80px; height: 1px; }
    .typo-stat { padding: 20px; }

    /* Features */
    .features-section { padding: 48px 0; }
    .features-layout { gap: 28px; }

    /* Magazine */
    .magazine-section { padding: 48px 0; }
    .mag-grid { grid-template-columns: 1fr; }
    .mag-card-featured { grid-column: span 1; }

    /* Articles */
    .articles-magazine { padding: 48px 0; }
    .articles-mag-grid { grid-template-columns: 1fr; }
    .art-smalls { grid-template-columns: 1fr; }

    /* Image banner */
    .img-banner { padding: 48px 0; }
    .img-banner-title { font-size: 1.6rem; }

    /* Tags */
    .tags-cloud-section { padding: 40px 0; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; }
    .footer-links { align-items: flex-start; }

    /* Article grid */
    .articles-grid { grid-template-columns: 1fr; }

    /* Subcats */
    .subcats-grid { grid-template-columns: 1fr 1fr; }

    /* Page hero */
    .page-hero { padding: 32px 0; }
    .page-hero-title { font-size: 1.5rem; }
}

/* ==========================================================================
   SMALL MOBILE (max-width: 480px)
   ========================================================================== */
@media (max-width: 480px) {
    .hcard-front { max-width: 340px; }
    .hcard-buttons { flex-direction: column; }
    .btn-hero-primary, .btn-hero-secondary { width: 100%; text-align: center; }
    .hcard-trust { flex-direction: column; gap: 8px; }
    .mag-grid { grid-template-columns: 1fr; }
    .subcats-grid { grid-template-columns: 1fr; }
    .typo-stat-num { font-size: 2rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .topbar-logo-text { display: none; }
}

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

/* ==========================================================================
   PRINT
   ========================================================================== */
@media print {
    .topbar, .header, .footer, .mobile-nav, .mobile-overlay { display: none !important; }
    body { background: white; color: black; }
}
