/* ============================================================
   CLEARPLAY Theme - Responsive Stylesheet
   ============================================================ */

/* === Tablet: 1024px === */
@media (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    .content-area {
        flex-direction: column;
        gap: 20px;
    }

    .main-content {
        width: 100%;
    }

    /* Header */
    .header-top {
        padding: 10px 0;
    }

    .logo img {
        height: 40px;
    }

    .header-btn-group {
        gap: 8px;
    }

    .btn-login,
    .btn-register,
    .btn-demo {
        padding: 8px 16px;
        font-size: 12px;
    }

    /* Navigation */
    .nav-link {
        padding: 12px 14px;
        font-size: 13px;
    }

    /* Hero */
    .clearplay-hero {
        padding: 40px 25px;
        margin: 20px 0;
    }

    .hero-brand {
        font-size: 40px;
        letter-spacing: 2px;
    }

    .hero-tagline {
        font-size: 18px;
    }

    .hero-description {
        font-size: 15px;
    }

    .hero-stats-row {
        gap: 25px;
    }

    .hero-stat-number {
        font-size: 26px;
    }

    .hero-stat-label {
        font-size: 12px;
    }

    /* Game Cards */
    .clear-star-games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .clear-star-game-card {
        padding: 25px 20px;
    }

    .clear-star-game-icon {
        width: 60px;
        height: 60px;
        font-size: 26px;
    }

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

    .clear-grid-node {
        padding: 18px 12px;
    }

    .clear-node-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

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

    .clear-feature-card {
        padding: 28px 20px;
    }

    .clear-feature-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

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

    .stat-number {
        font-size: 30px;
    }

    .stat-label {
        font-size: 13px;
    }

    /* Promos */
    .clear-promos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .clear-promo-inner {
        padding: 25px 20px;
    }

    /* News */
    .home-news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .home-news-placeholder {
        grid-template-columns: repeat(2, 1fr);
    }

    .article-card-thumb {
        height: 170px;
    }

    /* Article Grid */
    .article-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

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

    .related-item-thumb {
        height: 100px;
    }

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

    .footer-brand-text {
        font-size: 13px;
    }

    /* Single */
    .single-article {
        padding: 30px 25px;
    }

    .article-title {
        font-size: 26px;
    }

    /* Floating Sidebar */
    .floating-sidebar {
        right: 10px;
    }

    .sidebar-btn {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .sidebar-label {
        right: 54px;
        font-size: 12px;
    }

    /* Footer CTA */
    .footer-cta-section {
        padding: 40px 25px;
    }

    .footer-cta-inner h2 {
        font-size: 26px;
    }

    .cta-features {
        gap: 20px;
    }

    /* Section Titles */
    .section-title {
        font-size: 24px;
    }

    .section-subtitle {
        font-size: 14px;
        margin-bottom: 30px;
    }
}

/* === Mobile Landscape: 768px === */
@media (max-width: 768px) {
    .container {
        padding: 0 12px;
    }

    /* Header */
    .header-top {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px 0;
    }

    .header-time {
        display: none;
    }

    .header-btn-group {
        gap: 6px;
    }

    .btn-login,
    .btn-register,
    .btn-demo {
        padding: 7px 12px;
        font-size: 11px;
    }

    /* Mobile Nav Toggle */
    .mobile-menu-toggle {
        display: block;
    }

    .main-navigation .container {
        position: relative;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--cp-blue);
        z-index: 998;
        box-shadow: var(--cp-shadow-lg);
    }

    .nav-menu.active {
        display: flex;
        animation: clearFade 0.3s ease;
    }

    .nav-link {
        padding: 14px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        font-size: 14px;
    }

    .nav-link:hover {
        background: rgba(255,255,255,0.1);
    }

    .has-dropdown .sub-menu {
        position: static;
        box-shadow: none;
        border-radius: 0;
        border-top: none;
        background: rgba(255,255,255,0.05);
    }

    .has-dropdown:hover .sub-menu {
        display: none;
    }

    .has-dropdown.open .sub-menu {
        display: block;
    }

    .sub-menu .nav-link {
        color: rgba(255,255,255,0.85) !important;
        padding-left: 40px;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }

    .sub-menu .nav-link:hover {
        background: rgba(255,255,255,0.1);
        color: var(--cp-white) !important;
    }

    /* Hero */
    .clearplay-hero {
        padding: 35px 20px;
        margin: 15px 0;
        border-radius: var(--cp-radius);
    }

    .hero-brand {
        font-size: 32px;
        letter-spacing: 1px;
    }

    .hero-tagline {
        font-size: 16px;
        letter-spacing: 1px;
    }

    .hero-divider-line {
        width: 60px;
        height: 3px;
        margin: 12px auto;
    }

    .hero-description {
        font-size: 14px;
        line-height: 1.7;
        margin-bottom: 25px;
    }

    .hero-stats-row {
        gap: 15px;
        flex-wrap: wrap;
    }

    .hero-stat {
        min-width: 80px;
    }

    .hero-stat-number {
        font-size: 22px;
    }

    .hero-stat-label {
        font-size: 11px;
    }

    .hero-cta-group {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .hero-cta-group .btn-blue-primary,
    .hero-cta-group .btn-outline-blue {
        width: 100%;
        max-width: 280px;
        text-align: center;
        padding: 12px 24px;
        font-size: 14px;
    }

    /* Game Cards */
    .clear-star-games-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .clear-star-game-card {
        padding: 25px 20px;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 15px;
        text-align: left;
    }

    .clear-star-game-icon {
        width: 50px;
        height: 50px;
        font-size: 22px;
        margin: 0;
        flex-shrink: 0;
    }

    .clear-star-game-card h3 {
        font-size: 18px;
        margin-bottom: 5px;
        flex: 1;
    }

    .clear-star-game-card p {
        font-size: 13px;
        width: 100%;
        margin-bottom: 8px;
    }

    .clear-star-game-rating {
        margin-bottom: 0;
        font-size: 12px;
    }

    .clear-star-game-players {
        font-size: 12px;
    }

    /* Grid */
    .clear-grid-section {
        padding: 35px 0;
        margin: 20px 0;
    }

    .clear-grid-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin-bottom: 12px;
    }

    .clear-grid-node {
        padding: 15px 10px;
    }

    .clear-node-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .clear-node-label {
        font-size: 12px;
    }

    /* Features */
    .clear-features-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .clear-feature-card {
        padding: 25px 20px;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 15px;
        text-align: left;
    }

    .clear-feature-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
        margin: 0;
        flex-shrink: 0;
    }

    .clear-feature-card h3 {
        font-size: 16px;
        margin-bottom: 0;
        flex: 1;
    }

    .clear-feature-card p {
        font-size: 13px;
        width: 100%;
    }

    /* Stats */
    .clear-stats {
        padding: 40px 0;
        margin: 20px 0;
    }

    .clear-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 0 10px;
    }

    .clear-stat-card {
        padding: 20px 15px;
    }

    .stat-number {
        font-size: 26px;
    }

    .stat-label {
        font-size: 11px;
    }

    .stat-icon-decoration {
        font-size: 18px;
    }

    /* Promos */
    .clear-promos-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .clear-promo-inner {
        padding: 20px;
    }

    .clear-promo-inner h3 {
        font-size: 16px;
    }

    .clear-promo-inner p {
        font-size: 13px;
    }

    .promo-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    /* News */
    .home-news-section {
        padding: 35px 0;
    }

    .home-news-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .home-news-placeholder {
        grid-template-columns: 1fr;
    }

    .article-card-thumb {
        height: 180px;
    }

    .article-card-title {
        padding: 12px 15px 6px;
        font-size: 15px;
    }

    .article-card-meta {
        padding: 0 15px;
    }

    .article-card-excerpt {
        padding: 8px 15px 15px;
        font-size: 13px;
    }

    .article-card-more {
        padding: 10px 15px;
        font-size: 12px;
    }

    .view-more-btn {
        padding: 10px 24px;
        font-size: 13px;
    }

    /* Article Grid */
    .article-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Category */
    .category-header {
        padding: 20px 0;
    }

    .category-title {
        font-size: 22px;
    }

    .category-desc {
        font-size: 13px;
    }

    .provider-tabs {
        gap: 8px;
        margin-bottom: 20px;
    }

    .provider-tab {
        padding: 6px 14px;
        font-size: 12px;
    }

    /* Single Article */
    .single-article {
        padding: 25px 18px;
    }

    .article-title {
        font-size: 22px;
    }

    .article-meta {
        gap: 12px;
        font-size: 13px;
    }

    .article-content {
        font-size: 15px;
    }

    .article-content h2 {
        font-size: 20px;
    }

    .article-content h3 {
        font-size: 18px;
    }

    .article-nav {
        flex-direction: column;
        gap: 15px;
    }

    .article-nav-next {
        text-align: left;
    }

    /* Related */
    .related-posts {
        padding: 20px 15px;
    }

    .related-posts-title {
        font-size: 18px;
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .related-item-thumb {
        height: 80px;
    }

    .related-item-title {
        padding: 10px 12px;
        font-size: 13px;
    }

    /* Page */
    .page-article {
        padding: 25px 18px;
    }

    .page-title {
        font-size: 24px;
    }

    .page-content {
        font-size: 15px;
    }

    /* Footer */
    .site-footer {
        padding: 35px 0 20px;
    }

    .footer-columns-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .footer-col h4 {
        font-size: 15px;
        margin-bottom: 15px;
    }

    .footer-col ul li {
        margin-bottom: 8px;
    }

    .footer-col ul li a {
        font-size: 13px;
    }

    .footer-brand-text {
        font-size: 13px;
    }

    .footer-license-bar {
        padding: 20px 0;
    }

    .license-icons {
        gap: 15px;
    }

    .license-item i {
        font-size: 20px;
    }

    .license-item span {
        font-size: 11px;
    }

    .footer-copyright {
        font-size: 13px;
    }

    /* Footer CTA */
    .footer-cta-section {
        padding: 35px 20px;
        margin: 25px 0;
    }

    .footer-cta-inner h2 {
        font-size: 22px;
    }

    .footer-cta-inner p {
        font-size: 14px;
    }

    .cta-features {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }

    .cta-feature {
        font-size: 13px;
    }

    .cta-main-btn {
        padding: 14px 36px !important;
        font-size: 16px !important;
    }

    /* Breadcrumb */
    .breadcrumb {
        font-size: 13px;
        padding: 12px 0;
    }

    /* Pagination */
    .pagination .page-numbers {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }

    /* Error Page */
    .error-page {
        padding: 50px 15px;
    }

    .error-code {
        font-size: 72px;
    }

    .error-title {
        font-size: 20px;
    }

    .error-desc {
        font-size: 14px;
    }

    /* Section Titles */
    .section-title {
        font-size: 20px;
    }

    .section-subtitle {
        font-size: 13px;
        margin-bottom: 25px;
    }

    /* Announcement Modal */
    .announcement-content {
        padding: 30px 20px;
        max-width: 95%;
    }

    .announcement-title {
        font-size: 18px;
    }

    .announcement-item {
        padding: 10px 12px;
        gap: 8px;
    }

    .announcement-text {
        font-size: 13px;
    }

    .announcement-cta {
        padding: 12px 30px;
        font-size: 14px;
    }

    /* Notification Bar */
    .notification-bar {
        height: 32px;
    }

    .notification-content {
        font-size: 12px;
        gap: 40px;
    }

    /* Floating Sidebar */
    .floating-sidebar {
        right: 8px;
        gap: 6px;
    }

    .sidebar-btn {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .sidebar-label {
        display: none !important;
    }

    /* Buttons */
    .btn-blue-primary {
        padding: 12px 28px;
        font-size: 14px;
    }

    .btn-outline-blue {
        padding: 12px 28px;
        font-size: 14px;
    }
}

/* === Mobile Portrait: 480px === */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    /* Header */
    .logo img {
        height: 35px;
    }

    .header-btn-group {
        gap: 4px;
    }

    .btn-login,
    .btn-register,
    .btn-demo {
        padding: 6px 10px;
        font-size: 10px;
        letter-spacing: 0;
    }

    .btn-demo {
        display: none;
    }

    /* Hero */
    .clearplay-hero {
        padding: 25px 15px;
    }

    .hero-brand {
        font-size: 26px;
    }

    .hero-tagline {
        font-size: 14px;
    }

    .hero-stats-row {
        gap: 10px;
    }

    .hero-stat {
        min-width: 70px;
    }

    .hero-stat-number {
        font-size: 20px;
    }

    .hero-stat-label {
        font-size: 10px;
    }

    /* Stats */
    .clear-stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .clear-stat-card {
        padding: 15px 10px;
    }

    .stat-number {
        font-size: 22px;
    }

    .stat-label {
        font-size: 10px;
    }

    /* Related */
    .related-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    /* Error Page */
    .error-code {
        font-size: 60px;
    }

    .error-title {
        font-size: 18px;
    }

    /* Section Titles */
    .section-title {
        font-size: 18px;
    }

    /* Footer CTA */
    .footer-cta-inner h2 {
        font-size: 20px;
    }

    .cta-main-btn {
        padding: 12px 28px !important;
        font-size: 14px !important;
    }

    /* Announcement */
    .announcement-content {
        padding: 25px 15px;
    }

    .announcement-header-icon i {
        font-size: 36px;
    }

    .announcement-title {
        font-size: 16px;
        margin-bottom: 20px;
    }

    .announcement-badge {
        font-size: 10px;
        padding: 2px 8px;
    }

    /* Grid */
    .clear-grid-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .clear-grid-node {
        padding: 12px 8px;
    }

    /* Floating Sidebar mobile */
    .floating-sidebar {
        position: fixed;
        bottom: 0;
        top: auto;
        right: 0;
        left: 0;
        transform: none;
        flex-direction: row;
        justify-content: center;
        background: var(--cp-white);
        padding: 8px 0;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
        border-top: 1px solid var(--cp-gray-200);
        gap: 0;
    }

    .sidebar-btn {
        width: 48px;
        height: 40px;
        border-radius: 0;
        font-size: 18px;
        background: transparent;
        color: var(--cp-blue);
        box-shadow: none;
    }

    .sidebar-btn:hover {
        background: var(--cp-gray-50);
        color: var(--cp-blue);
        transform: none;
    }

    .sidebar-btn-facebook {
        background: transparent;
        color: #1877F2;
    }

    .sidebar-btn-telegram {
        background: transparent;
        color: #0088CC;
    }

    body {
        padding-bottom: 56px;
    }
}

/* === Small Mobile: 360px === */
@media (max-width: 360px) {
    .hero-brand {
        font-size: 22px;
    }

    .hero-tagline {
        font-size: 12px;
    }

    .hero-stat-number {
        font-size: 18px;
    }

    .section-title {
        font-size: 16px;
    }

    .section-subtitle {
        font-size: 12px;
    }

    .clear-star-game-card h3 {
        font-size: 16px;
    }

    .footer-cta-inner h2 {
        font-size: 18px;
    }

    .article-title {
        font-size: 20px;
    }

    .page-title {
        font-size: 20px;
    }

    .error-code {
        font-size: 50px;
    }
}

/* === Landscape Mobile === */
@media (max-height: 500px) and (orientation: landscape) {
    .clearplay-hero {
        padding: 20px 20px;
    }

    .hero-brand {
        font-size: 28px;
    }

    .announcement-content {
        max-height: 90vh;
        overflow-y: auto;
    }

    .floating-sidebar {
        gap: 4px;
    }

    .sidebar-btn {
        width: 38px;
        height: 38px;
    }
}

/* === Print === */
@media print {
    .site-header,
    .main-navigation,
    .notification-bar,
    .floating-sidebar,
    .announcement-modal,
    .site-footer,
    .footer-cta-section,
    .sidebar-btn {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    .single-article {
        border: none;
        padding: 0;
    }

    .article-content a {
        color: #000;
        text-decoration: underline;
    }
}

/* === Accessibility: Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .notification-content {
        animation: none;
    }
}
