/**
 * Responsive CSS - Media Queries
 * Ceri123 Casino - Deep Navy + Gold Theme
 */

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

@media (max-width: 1024px) {
    /* Header - hide desktop nav, show mobile toggle */
    .nav-main {
        display: none;
    }

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

    .header-cta-btn {
        display: none;
    }

    /* Bento grid - 2 columns */
    .bento-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
        min-height: auto;
    }

    .bento-main {
        grid-column: 1 / 3;
        grid-row: auto;
    }

    .bento-image {
        grid-column: 1 / 2;
        grid-row: auto;
        min-height: 250px;
    }

    .bento-stat-primary {
        grid-column: 2 / 3;
        grid-row: auto;
    }

    .bento-stat-gold {
        grid-column: 1 / 2;
        grid-row: auto;
    }

    .bento-stat-dark {
        grid-column: 2 / 3;
        grid-row: auto;
    }

    .bento-trust {
        grid-column: 1 / 3;
        grid-row: auto;
    }

    .bento-image2 {
        display: none;
    }

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

    /* Magazine grid */
    .mag-grid {
        grid-template-columns: 1fr 1fr;
    }

    .mag-card-featured {
        grid-column: 1 / 3;
        grid-row: auto;
    }

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

    /* CTA banner */
    .cta-banner-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-xl);
    }

    .cta-banner-text p {
        max-width: 100%;
    }

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

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

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

    .article-sidebar {
        order: -1;
    }
}

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

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

    .header-top {
        display: none;
    }

    .header-nav-bar {
        height: var(--header-height);
    }

    /* Bento single column */
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .bento-main {
        grid-column: 1 / 2;
    }

    .bento-image {
        grid-column: 1 / 2;
        min-height: 220px;
    }

    .bento-stat-primary,
    .bento-stat-gold,
    .bento-stat-dark {
        grid-column: 1 / 2;
    }

    .bento-trust {
        grid-column: 1 / 2;
    }

    .bento-trust-items {
        flex-direction: column;
        gap: var(--space-md);
        align-items: center;
    }

    /* Hero adjustments */
    .hero-bento {
        padding-bottom: var(--space-2xl);
        min-height: auto;
    }

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

    .btn-bento-primary,
    .btn-bento-outline {
        width: 100%;
        justify-content: center;
    }

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

    /* Magazine single column */
    .mag-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: 180px;
    }

    .mag-card-featured {
        grid-column: 1 / 2;
        grid-row: auto;
        grid-row-end: span 2;
    }

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

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

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

    .casino-card {
        padding: var(--space-sm);
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
        text-align: center;
    }

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

    .footer-brand p {
        max-width: 100%;
        margin: var(--space-md) auto 0;
    }

    /* Contact */
    .contact-grid {
        grid-template-columns: 1fr;
    }

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

    /* Section paddings */
    .features-section,
    .categories-magazine,
    .cta-banner,
    .tags-cloud-section,
    .articles-teaser {
        padding: var(--space-3xl) 0;
    }
}

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

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

    /* Header */
    .header-logo-text {
        font-size: var(--text-base);
    }

    /* Hero */
    .bento-headline {
        font-size: 1.75rem;
    }

    .bento-main {
        padding: var(--space-xl);
    }

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

    /* Not found */
    .not-found-code {
        font-size: 80px;
    }

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

    /* Article title */
    .article-title {
        font-size: var(--text-2xl);
    }

    /* Tags cloud */
    .tag-pill {
        font-size: var(--text-xs);
        padding: 6px 12px;
    }
}

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

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

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

    .bento-headline {
        font-size: 1.5rem;
    }
}

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

@media (hover: none) {
    .card:hover,
    .article-card:hover,
    .feature-block:hover,
    .mag-card:hover,
    .teaser-card:hover {
        transform: none;
    }

    .btn-bento-primary:hover,
    .btn-bento-outline:hover,
    .btn-cta-gold:hover {
        transform: 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 {
        opacity: 1;
        transform: none;
    }

    html {
        scroll-behavior: auto;
    }
}

/* ==========================================================================
   HIGH CONTRAST MODE
   ========================================================================== */

@media (prefers-contrast: high) {
    :root {
        --shadow-card: none;
        --shadow-card-hover: 0 0 0 2px var(--color-text);
    }

    .bento-cell {
        border: 2px solid rgba(255, 255, 255, 0.4);
    }
}

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

@media print {
    .header,
    .footer,
    .mobile-nav,
    .mobile-overlay,
    .cta-banner,
    .casino-grid,
    .casino-grid-new {
        display: none !important;
    }

    body {
        background: white;
        color: black;
        font-size: 12pt;
    }

    .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;
    }
}

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

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

    .casino-grid,
    .casino-grid-new {
        grid-template-columns: repeat(5, 1fr);
        gap: var(--space-lg);
    }
}
