/**
 * Responsive CSS — Coral Crest Theme
 */

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

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

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

    /* Hero split → stack */
    .cc-hero {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .cc-hero-image {
        min-height: 380px;
        height: 380px;
    }

    .cc-hero-text {
        padding: var(--space-2xl) var(--space-xl);
    }

    /* Gallery */
    .cc-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .cc-gallery-item:nth-child(4),
    .cc-gallery-item:nth-child(5) {
        display: none;
    }

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

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

    .cc-cat-card-featured {
        grid-column: 1 / 4;
        grid-row: 1;
    }

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

    /* About */
    .cc-about-grid {
        grid-template-columns: 1fr;
    }

    .cc-about-images {
        height: 320px;
    }

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

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

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

    .header-topbar {
        display: none;
    }

    .header-inner {
        padding: 0 var(--space-md);
    }

    .header-logo img {
        height: 32px;
    }

    .header-logo-text {
        font-size: 1rem;
    }

    /* Hero */
    .cc-hero-image {
        min-height: 260px;
        height: 260px;
    }

    .cc-hero-image-frame {
        display: none;
    }

    .cc-hero-text {
        padding: var(--space-xl) var(--space-md);
    }

    .cc-hero-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }

    .cc-hero-buttons {
        flex-direction: column;
    }

    .cc-hero-buttons .btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    /* Gallery */
    .cc-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cc-gallery-item:nth-child(3),
    .cc-gallery-item:nth-child(4),
    .cc-gallery-item:nth-child(5) {
        display: none;
    }

    .cc-gallery-item:nth-child(even) {
        transform: none;
    }

    /* Stats */
    .cc-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .cc-cat-card-featured {
        grid-column: 1 / 3;
        grid-row: 1;
    }

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

    /* Tags */
    .cc-tags-cloud {
        justify-content: flex-start;
    }

    /* About */
    .cc-about-images {
        height: 240px;
    }

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

    .footer-brand p {
        max-width: 100%;
    }

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

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

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

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

    /* Gallery */
    .cc-gallery-grid {
        grid-template-columns: 1fr;
    }

    .cc-gallery-item:nth-child(n) {
        display: block;
        transform: none;
    }

    .cc-gallery-item:nth-child(n+3) {
        display: none;
    }

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

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

    .cc-cat-card-featured {
        grid-column: 1;
        grid-row: 1;
    }

    /* CTA */
    .cc-cta-buttons {
        flex-direction: column;
        align-items: center;
    }

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

    .btn {
        width: 100%;
        justify-content: center;
    }

    .btn-sm {
        width: auto;
    }
}

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

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

    .cc-stats-grid {
        grid-template-columns: 1fr;
    }
}

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

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

/* ==========================================================================
   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;
    }

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