/**
 * Responsive CSS — Forest Green Theme
 */

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

@media (max-width: 1024px) {
    /* Header */
    .site-nav {
        display: none;
    }

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

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

    /* Hero PIP */
    .hero-pip-layout {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        text-align: center;
    }

    .hero-pip-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-pip-actions {
        justify-content: center;
    }

    .hero-pip-image {
        max-width: 500px;
        margin: 0 auto;
    }

    .hero-pip-float {
        bottom: -20px;
        left: -20px;
    }

    /* Category Grid */
    .cat-icon-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

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

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

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

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

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

    .site-logo-text {
        font-size: var(--text-lg);
    }

    /* Hero */
    .hero-pip {
        padding: calc(var(--header-height) + 40px) 0 60px;
    }

    .hero-pip-title {
        font-size: var(--text-3xl);
    }

    .hero-pip-actions {
        flex-direction: column;
        align-items: center;
        gap: var(--space-sm);
    }

    .hero-pip-actions .btn {
        width: 100%;
        max-width: 280px;
    }

    .hero-pip-float {
        width: 40%;
        bottom: -15px;
        left: -10px;
    }

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

    .stats-ribbon-divider {
        width: 40px;
        height: 1px;
    }

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

    /* Cards */
    .card-body {
        padding: var(--space-md);
    }

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

    .sidebar {
        order: 2;
    }

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

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

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

    /* Tags */
    .tag-pills {
        gap: var(--space-xs);
    }

    .tag-pill {
        padding: 6px 14px;
        font-size: var(--text-xs);
    }

    /* Timeline */
    .timeline-vertical {
        padding-left: 40px;
    }

    .timeline-marker {
        left: -40px;
        width: 32px;
        height: 32px;
        font-size: var(--text-sm);
    }

    .timeline-vertical::before {
        left: 15px;
    }

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

    .section-title {
        font-size: var(--text-2xl);
    }

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

    .article-content h3 {
        font-size: var(--text-lg);
    }

    .article-content figure.image.left,
    .article-content figure.image.right {
        float: none;
        max-width: 100%;
        margin: var(--space-md) 0;
    }

    /* CTA Banner */
    .cta-banner {
        padding: var(--space-3xl) 0;
    }

    .cta-banner-content h2 {
        font-size: var(--text-2xl);
    }

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

    /* Modal-like components */
    .toast-notification {
        right: var(--space-md);
        left: var(--space-md);
        bottom: var(--space-md);
    }
}

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

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

    .hero-pip-title {
        font-size: var(--text-2xl);
    }

    .cat-icon-grid {
        grid-template-columns: 1fr;
    }

    .cat-icon-card {
        min-height: 180px;
    }

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

    .category-card {
        padding: var(--space-lg);
    }

    .category-card-icon {
        width: 50px;
        height: 50px;
    }

    .category-card-icon svg {
        width: 24px;
        height: 24px;
    }

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

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

    .btn {
        width: 100%;
    }

    .btn-sm {
        width: auto;
    }

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

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

@media (max-width: 380px) {
    .hero-pip-title {
        font-size: 1.5rem;
    }

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

    .site-logo-text {
        display: none;
    }
}

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

@media (hover: none) {
    .card:hover {
        transform: none;
    }

    .card:hover .card-image img {
        transform: none;
    }

    .category-card:hover,
    .cat-icon-card:hover {
        transform: none;
    }

    .btn-primary:hover,
    .btn-accent:hover {
        transform: none;
    }

    .card:focus-within {
        transform: translateY(-4px);
        box-shadow: var(--shadow-card-hover);
    }
}

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

    .anim-reveal {
        opacity: 1;
        transform: none;
    }
}

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

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

    .card,
    .category-card,
    .casino-card-new {
        border: 2px solid var(--color-text);
    }
}

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

@media print {
    .site-header,
    .site-footer,
    .sidebar,
    .mobile-nav,
    .mobile-overlay,
    .hero-pip,
    .stats-ribbon,
    .cta-banner,
    .btn,
    .pagination,
    .casino-grid-new {
        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) {
    .hero-pip {
        padding: calc(var(--header-height) + 20px) 0 40px;
    }

    .hero-pip-title {
        font-size: var(--text-2xl);
    }

    .toast-notification {
        max-height: 95vh;
    }
}

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

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