/**
 * Responsive CSS — Jawabet88 Redesign
 */

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

@media (max-width: 1024px) {
    :root {
        --header-top-height: 50px;
        --header-nav-height: 58px;
        --header-height: 108px;
        --total-header-height: 108px;
    }

    /* Header nav hidden on tablet — show mobile toggle */
    .nav-main {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    /* Hero two-column → single column */
    .hero-testimonial-inner {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        padding-top: var(--space-xl);
        padding-bottom: 80px;
    }

    .hero-right {
        order: -1;
    }

    .testimonial-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-md);
    }

    /* Stats typography row */
    .stats-typography-row {
        flex-wrap: wrap;
    }

    .stat-type-item {
        flex: 0 0 50%;
    }

    .stat-type-divider {
        display: none;
    }

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

    /* Magazine layout */
    .magazine-layout {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .magazine-feature {
        aspect-ratio: 16/6;
    }

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

    /* Content with sidebar */
    .content-with-sidebar {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

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

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

@media (max-width: 768px) {
    :root {
        --header-top-height: 48px;
        --header-nav-height: 52px;
        --header-height: 100px;
        --total-header-height: 100px;
        --container-padding: 1rem;
    }

    /* Header brand text smaller */
    .header-logo-text {
        font-size: var(--text-base);
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .header-logo img,
    .header-logo amp-img {
        height: 30px;
        flex-shrink: 0;
    }

    .header-cta-btn {
        padding: 0.35rem 0.8rem;
        font-size: 0.78rem;
    }
    .header-brand-inner { padding: 0 0.75rem; gap: 0.5rem; }

    /* Hero testimonial */
    .testimonial-grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .testimonial-card:not(.tc-featured) {
        display: none;
    }

    .tc-featured {
        display: block;
    }

    .hero-mini-stats {
        gap: var(--space-md);
        padding: var(--space-sm) var(--space-md);
    }

    .hero-headline {
        font-size: clamp(1.8rem, 5vw, 2.5rem);
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn-primary-hero,
    .btn-ghost-hero {
        text-align: center;
    }

    .jackpot-box {
        display: block;
    }

    /* Stats */
    .stat-type-item {
        flex: 0 0 100%;
        padding: var(--space-md) var(--space-lg);
    }

    .stat-type-num {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }

    /* Features */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    .feature-icon-wrap {
        height: 120px;
    }

    /* Magazine small grid */
    .magazine-small-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-sm);
    }

    .magazine-tile {
        padding: var(--space-sm) var(--space-md);
    }

    /* Pills */
    .pills-strip {
        gap: var(--space-xs);
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links {
        align-items: center;
    }

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

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

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

    /* Page hero */
    .page-hero {
        padding: calc(var(--total-header-height) + var(--space-xl)) 0 var(--space-xl);
    }
}

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

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

    /* Features - single column */
    .features-grid {
        grid-template-columns: 1fr;
    }

    /* Magazine small grid single column */
    .magazine-small-grid {
        grid-template-columns: 1fr;
    }

    /* Stats */
    .stats-typography-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1px;
        background: rgba(192,38,211,0.15);
    }

    .stat-type-item {
        background: var(--color-bg);
        flex: none;
        padding: var(--space-lg) var(--space-md);
    }

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

    /* Hero mini stats */
    .hero-mini-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-sm);
    }

    .mini-stat-div {
        display: none;
    }

    /* Hero wave */
    .hero-wave svg {
        height: 40px;
    }

    /* Pills strip horizontal scroll */
    .pills-strip {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: var(--space-sm);
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .pills-strip::-webkit-scrollbar { display: none; }

    .pill-tag { flex-shrink: 0; }

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

    /* Forms */
    .form-input,
    .form-textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Error page */
    .error-code {
        font-size: clamp(4rem, 20vw, 8rem);
    }
}

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

@media (max-width: 380px) {
    .header-logo-text {
        display: none;
    }

    .header-cta-btn {
        padding: 0.3rem 0.65rem;
        font-size: 0.72rem;
    }

    .hero-headline {
        font-size: 1.7rem;
    }

    .hero-mini-stats {
        display: none;
    }
}

/* ==========================================================================
   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-section.revealed {
        animation: none;
    }

    .hero-orb-1, .hero-orb-2 {
        animation: none;
    }
}

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

@media print {
    .header, .footer, .mobile-nav, .mobile-overlay,
    .hero-testimonial, .cta-banner, .tags-strip-section,
    .btn, .pagination {
        display: none !important;
    }

    body { background: white; color: black; }
    .main-content { padding: 0; }
}

/* ==========================================================================
   TOUCH DEVICES
   ========================================================================== */

@media (hover: none) {
    .article-card:hover,
    .feature-card:hover,
    .magazine-tile:hover,
    .testimonial-card:hover {
        transform: none;
    }

    .magazine-feature:hover img,
    .feature-card:hover .feature-img {
        transform: none;
    }
}

/* ==========================================================================
   LARGE SCREENS
   ========================================================================== */

@media (min-width: 1400px) {
    .hero-testimonial-inner {
        gap: var(--space-4xl);
    }

    .stat-type-num {
        font-size: 5.5rem;
    }
}

/* Force 1-column for .magazine-small-grid on mobile (overrides inline style) */
@media (max-width: 768px) {
  .magazine-small-grid { grid-template-columns: 1fr !important; }
}
