/**
 * Responsive CSS — Pusat4D Indonesia
 */

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

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

    /* Hero layout — stack */
    .hero-layout {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-text-side {
        order: 1;
    }

    .hero-mockup-side {
        order: 2;
    }

    .hero-subtitle { max-width: 100%; }
    .hero-buttons { justify-content: center; }
    .hero-features { align-items: center; }

    .device-screen-wrap { width: 360px; }

    /* Trust grid */
    .trust-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .trust-content { text-align: center; }
    .trust-list-item { text-align: left; }

    /* Category grid */
    .cat-grid { grid-template-columns: repeat(2, 1fr); }

    /* Image cards */
    .img-cards-grid { grid-template-columns: repeat(2, 1fr); }

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

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

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

    /* Promo banners */
    .promo-banner { min-height: 240px; }

    /* Stats */
    .stats-grid { gap: 0; }
}

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

@media (max-width: 768px) {
    :root {
        --header-height: 62px;
        --total-header-height: 62px;
    }

    /* Hero */
    .hero {
        padding: calc(var(--total-header-height) + 40px) 0 60px;
    }

    .hero-title { font-size: clamp(1.6rem, 5vw, 2.4rem); }
    .hero-buttons { flex-direction: column; align-items: center; }
    .hero-buttons .btn { width: 100%; max-width: 300px; }

    .device-float-card { display: none; }
    .device-screen-wrap { width: 300px; }

    /* Category grid */
    .cat-grid { grid-template-columns: 1fr; }
    .category-card { padding: var(--space-lg); }

    /* Trust section */
    .trust-grid { grid-template-columns: 1fr; gap: 32px; }
    .trust-image-wrap { max-height: 280px; }

    /* Promo banners */
    div[style*="grid-template-columns:1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    .promo-banner-content { max-width: 85%; padding: var(--space-xl) var(--space-xl); }

    /* Image cards */
    .img-cards-grid { grid-template-columns: 1fr; }

    /* Tags */
    .tags-flow { gap: 8px; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; }
    .footer-desc { max-width: 100%; }

    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .stat-item { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); }
    .stat-item:last-child { border-bottom: none; }
    .stat-number { font-size: clamp(2rem, 8vw, 3.5rem); }

    /* Section */
    .section-header { margin-bottom: var(--space-xl); }
    .section-title { font-size: var(--text-2xl); }

    /* Article */
    .article-title { font-size: var(--text-3xl); }
    .article-layout { grid-template-columns: 1fr; }
    .article-body { padding: var(--space-lg); }

    /* Page hero */
    .page-hero { padding: calc(var(--total-header-height) + 32px) 0 40px; }
    .page-hero-title { font-size: var(--text-3xl); }

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

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

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

    .hero { padding: calc(var(--total-header-height) + 30px) 0 50px; }
    .hero-title { font-size: 1.75rem; }

    .device-screen-wrap { width: 260px; }

    .btn { padding: 12px 22px; }
    .btn-primary, .btn-accent { font-size: 0.875rem; }

    .form-input, .form-textarea, .form-select { font-size: 16px; }

    .article-body { padding: var(--space-md); }

    .cat-grid { gap: var(--space-md); }

    /* Error page */
    .error-code { font-size: 5rem; }
}

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

@media (max-width: 380px) {
    .hero-title { font-size: 1.5rem; }
    .header-logo-text { display: none; }
    .device-screen-wrap { width: 220px; }
    .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;
    }
    .reveal { opacity: 1; transform: none; }
}

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

@media print {
    .header, .footer, .mobile-nav, .mobile-overlay,
    .hero-buttons, .nav-cta-btn, .casino-grid-new { display: none !important; }
    body { background: #fff; color: #000; }
}
