/**
 * Responsive CSS - Media Queries - Kasinoseta Style
 */

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

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

    /* Hero */
    .ks-hero-layout { grid-template-columns: 1fr; }
    .ks-hero-sidebar { display: none; }

    /* Page Layout */
    .ks-page-layout { grid-template-columns: 1fr; }
    .ks-sidebar { position: static; }

    /* Casino cards */
    .ks-casino-card-inner { grid-template-columns: 140px 1fr auto; }

    /* Steps */
    .ks-steps { grid-template-columns: repeat(2, 1fr); }

    /* Bonus grid */
    .ks-bonus-grid { grid-template-columns: 1fr; }

    /* License grid */
    .ks-license-grid { grid-template-columns: repeat(2, 1fr); }

    /* Provider grid */
    .ks-provider-grid { grid-template-columns: repeat(2, 1fr); }

    /* Feature list */
    .ks-feature-list { grid-template-columns: 1fr; }

    /* Tags Grid */
    .tags-grid { grid-template-columns: repeat(3, 1fr); }

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

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

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

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

@media (max-width: 768px) {
    :root {
        --header-height: 56px;
        --sidebar-width: 280px;
    }

    .header-inner { padding: 0 var(--space-md); }
    .header-logo-text { font-size: 1.2rem; }

    /* Hero */
    .ks-hero { padding-top: calc(var(--header-height) + 30px); padding-bottom: 40px; }
    .ks-hero-title { font-size: var(--text-2xl); }

    /* Casino cards */
    .ks-casino-card-inner { grid-template-columns: 1fr; text-align: center; }
    .ks-casino-logo { max-width: 160px; margin: 0 auto; }
    .ks-casino-actions { flex-direction: row; justify-content: center; min-width: auto; }
    .ks-casino-payments { justify-content: center; }

    /* Steps */
    .ks-steps { grid-template-columns: 1fr; }

    /* CTA Banner */
    .ks-cta-banner { flex-direction: column; text-align: center; padding: var(--space-lg); }

    /* Tags Grid */
    .tags-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }
    .tag-card { padding: var(--space-sm) var(--space-md); }

    /* Casino Grid */
    .casino-grid { grid-template-columns: repeat(2, 1fr); gap: var(--space-sm); }
    .casino-grid-new { grid-template-columns: 1fr; }
    .casino-card { padding: var(--space-sm); }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; text-align: center; }
    .footer-links { align-items: center; }
    .footer-social { justify-content: center; }
    .footer-payments { justify-content: center; }

    /* Stats */
    .stats-grid { grid-template-columns: 1fr; gap: var(--space-xl); }

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

    /* License/Provider grids */
    .ks-license-grid { grid-template-columns: 1fr; }
    .ks-provider-grid { grid-template-columns: 1fr; }

    /* Section */
    .section-header { margin-bottom: var(--space-xl); }

    /* Modal */
    .modal { width: 95%; max-height: 90vh; }
    .modal-header { padding: var(--space-md); }
    .modal-body { padding: var(--space-md); max-height: calc(90vh - 70px); }

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

    /* Ranking table */
    .ks-ranking-table { font-size: var(--text-xs); }
    .ks-ranking-table th, .ks-ranking-table td { padding: 0.5rem; }
}

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

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

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

    .kw-pill { padding: 0.375rem 1rem; font-size: var(--text-xs); }

    .pagination-list li a, .pagination-list li span { min-width: 36px; height: 36px; padding: 0 var(--space-sm); font-size: var(--text-xs); }

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

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

    .ks-bonus-grid { grid-template-columns: 1fr; }
    .ks-bonus-card { flex-direction: column; text-align: center; }
    .ks-bonus-card img { margin: 0 auto; }
}

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

@media (max-width: 380px) {
    .ks-hero-title { font-size: 1.4rem; }
    .header-logo-text { font-size: 1rem; }
}

/* ==========================================================================
   TOUCH DEVICE ADJUSTMENTS
   ========================================================================== */

@media (hover: none) {
    .card:hover, .category-card:hover { transform: none; }
    .card:hover .card-image img { transform: none; }
    .ks-casino-card:hover { box-shadow: 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; }
    html { scroll-behavior: auto; }
    .carousel-row { animation: none; }
}

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

@media print {
    .header, .footer, .sidebar, .ks-sidebar, .carousel-section, .mobile-nav, .mobile-overlay, .modal, .modal-overlay, .pagination, .ks-hero { display: none !important; }
    body { background: white; color: black; font-size: 12pt; }
    .main-content { padding: 0; }
    .article-content a { text-decoration: underline; }
    .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; }
}

/* ==========================================================================
   LANDSCAPE PHONE
   ========================================================================== */

@media (max-width: 768px) and (orientation: landscape) {
    .ks-hero { padding-top: calc(var(--header-height) + 20px); padding-bottom: 20px; }
    .modal { max-height: 95vh; }
}

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

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