/**
 * Responsive CSS — Granat88 Indonesia
 */

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

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

    /* Accordion hero: collapse to 2 columns on tablet */
    .hero-accordion {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .accordion-panel {
        flex: none !important;
        height: 200px;
        min-width: unset;
    }

    .accordion-panel:first-child {
        height: calc(100vh - 400px);
        min-height: 320px;
    }

    .accordion-panel-label { display: none; }

    .accordion-panel-content {
        opacity: 1 !important;
        transform: translateY(0) !important;
        pointer-events: auto !important;
    }

    .accordion-panel:first-child .accordion-panel-content {
        padding: calc(var(--header-height) + var(--space-xl)) var(--space-xl) var(--space-2xl);
    }

    .accordion-panel:not(:first-child) .accordion-panel-content {
        display: none;
    }

    /* Trust strip */
    .trust-strip-inner { gap: var(--space-md); }
    .trust-badge { padding: 8px 16px; min-width: 140px; }

    /* Stats */
    .stats-grid { gap: var(--space-lg); }

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

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

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

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

    .header-inner { padding: 0 var(--space-md); }
    .header-logo img { height: 32px; }
    .header-logo-text { font-size: var(--text-lg); }

    /* Accordion mobile: single panel */
    .accordion-panel:not(:first-child) { display: none; }

    .accordion-panel:first-child {
        height: 100vh;
        min-height: unset;
    }

    /* Trust strip: 2 col */
    .trust-strip-inner { flex-direction: column; gap: 0; }
    .trust-badge + .trust-badge::before { display: none; }

    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .stat-item + .stat-item::before { display: none; }

    .stat-item {
        padding: var(--space-lg) var(--space-xl);
        border-bottom: 1px solid rgba(139, 92, 246, 0.12);
    }

    /* Categories */
    .categories-grid { grid-template-columns: 1fr; }

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

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

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-links { align-items: center; }
    .footer-brand p { margin: var(--space-md) auto 0; }

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

    /* Article */
    .article-content h2 { font-size: var(--text-xl); }
    .article-content h3 { font-size: var(--text-lg); }
}

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

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

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

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

    .btn:not(.btn-sm):not(.nav-cta-btn) { width: 100%; }

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

    .cta-banner { padding: var(--space-2xl) 0; }

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

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

@media (max-width: 380px) {
    .header-logo-text { display: none; }
    .categories-grid { grid-template-columns: 1fr; }
    .casino-grid-new { grid-template-columns: 1fr; }
}

/* ==========================================================================
   HOVER-CAPABLE DEVICES ONLY
   ========================================================================== */

@media (hover: none) {
    .category-card:hover { transform: none; }
    .btn-primary:hover { transform: none; }
    .btn-gold:hover { transform: none; }
}

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

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    .reveal, .reveal-left, .reveal-scale {
        opacity: 1 !important;
        transform: none !important;
    }
}

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

@media print {
    .header, .footer, .mobile-nav, .mobile-overlay,
    .hero-accordion, .trust-strip, .cta-banner { display: none !important; }

    body { background: white; color: black; font-size: 12pt; }
    .article-content a::after { content: " (" attr(href) ")"; font-size: 0.8em; }
}
