/* ============================================================
   LOTTO88 Theme - Responsive Stylesheet
   ============================================================ */

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

    .content-area {
        flex-direction: column;
    }

    .floating-sidebar {
        position: fixed;
        bottom: 0;
        top: auto;
        left: 0;
        right: 0;
        transform: none;
        flex-direction: row;
        justify-content: center;
        background: var(--purple-dark);
        padding: 8px;
        border-top: 2px solid var(--gold);
        gap: 10px;
    }

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

    .sidebar-label {
        display: none;
    }

    /* Hero */
    .lotto-hero {
        padding: 50px 25px;
    }

    .hero-brand {
        font-size: 48px;
        letter-spacing: 4px;
    }

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

    .jackpot-number {
        font-size: 32px;
    }

    /* Floating balls */
    .floating-ball {
        width: 45px;
        height: 45px;
    }

    .floating-ball span {
        font-size: 16px;
    }

    /* Lotto types */
    .lotto-types-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

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

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

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

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

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

    /* Footer CTA */
    .cta-features {
        gap: 15px;
    }

    /* Draw results */
    .draw-numbers-row {
        gap: 10px;
    }

    .lotto-ball {
        width: 50px;
        height: 50px;
    }

    .lotto-ball span {
        font-size: 18px;
    }
}

/* === Tablet Portrait (max-width: 768px) === */
@media (max-width: 768px) {
    /* Header */
    .header-top {
        flex-wrap: wrap;
        gap: 10px;
    }

    .header-time {
        display: none;
    }

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

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

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

    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        padding: 10px 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-link {
        padding: 10px 15px;
        border-bottom: 1px solid rgba(255,215,0,0.1);
    }

    .nav-item.has-dropdown .sub-menu {
        position: static;
        border: none;
        background: rgba(0,0,0,0.3);
    }

    /* Hero */
    .lotto-hero {
        padding: 40px 20px;
    }

    .hero-brand {
        font-size: 36px;
        letter-spacing: 3px;
    }

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

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

    .jackpot-number {
        font-size: 28px;
    }

    .hero-jackpot-display {
        padding: 15px;
    }

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

    .btn-gold-primary,
    .btn-outline-gold {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    /* Floating balls - hide some */
    .fb-5, .fb-6, .fb-7, .fb-8 {
        display: none;
    }

    /* Draw results */
    .draw-panel-header {
        flex-direction: column;
        gap: 8px;
    }

    .draw-numbers-row {
        gap: 8px;
    }

    .lotto-ball {
        width: 45px;
        height: 45px;
    }

    .lotto-ball span {
        font-size: 16px;
    }

    .draw-jackpot-value {
        font-size: 22px;
    }

    .draw-result-stats {
        flex-direction: column;
        gap: 8px;
        align-items: center;
    }

    /* History */
    .history-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .history-prize {
        text-align: left;
    }

    /* Lotto types */
    .lotto-types-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .lotto-type-card {
        padding: 20px 15px;
    }

    .lotto-type-card h3 {
        font-size: 17px;
    }

    /* Generator */
    .gen-ball {
        width: 55px;
        height: 55px;
    }

    .gen-ball span {
        font-size: 22px;
    }

    /* Section titles */
    .section-title {
        font-size: 28px;
    }

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

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

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

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

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

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

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

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

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

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

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

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

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    /* Category */
    .category-title {
        font-size: 26px;
    }

    .provider-tabs {
        padding: 10px;
    }

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

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

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

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

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

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

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

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

    /* Header */
    .logo img {
        max-height: 40px;
    }

    .btn-login {
        display: none;
    }

    .btn-demo {
        display: none;
    }

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

    /* Hero */
    .lotto-hero {
        padding: 30px 15px;
        border-radius: 8px;
        min-height: 380px;
    }

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

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

    .hero-divider {
        width: 80px;
    }

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

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

    /* Floating balls */
    .floating-ball {
        width: 35px;
        height: 35px;
    }

    .floating-ball span {
        font-size: 12px;
    }

    /* Draw Results */
    .draw-panel-body {
        padding: 20px 15px;
    }

    .draw-numbers-row {
        gap: 6px;
    }

    .lotto-ball {
        width: 40px;
        height: 40px;
    }

    .lotto-ball span {
        font-size: 14px;
    }

    .draw-jackpot-value {
        font-size: 18px;
    }

    /* History */
    .history-date {
        font-size: 12px;
        min-width: auto;
    }

    .lotto-ball-sm {
        width: 30px;
        height: 30px;
    }

    .lotto-ball-sm span {
        font-size: 11px;
    }

    .history-balls {
        gap: 5px;
    }

    .history-prize {
        font-size: 13px;
    }

    /* Lotto types */
    .lotto-types-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .lotto-type-card {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .lotto-type-icon {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }

    /* Generator */
    .generator-display {
        gap: 8px;
    }

    .gen-ball {
        width: 45px;
        height: 45px;
    }

    .gen-ball span {
        font-size: 18px;
    }

    .btn-generate {
        padding: 12px 25px;
        font-size: 14px;
    }

    .generator-panel {
        padding: 25px 15px;
    }

    /* Section titles */
    .section-title {
        font-size: 22px;
    }

    .section-title i {
        font-size: 20px;
    }

    /* News */
    .home-news-grid {
        grid-template-columns: 1fr;
    }

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

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

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

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

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

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

    .footer-col h4 {
        font-size: 16px;
    }

    .license-icons {
        gap: 15px;
    }

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

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

    .cta-ball {
        display: none;
    }

    .cta-main-btn {
        font-size: 15px;
        padding: 14px 30px;
    }

    /* Promos */
    .promo-inner {
        padding: 20px 15px;
    }

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

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

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

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

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

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

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

    /* Pagination */
    .pagination .page-numbers {
        width: 35px;
        height: 35px;
        font-size: 12px;
    }

    /* Page */
    .page-title {
        font-size: 22px;
    }

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

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

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

    /* View More */
    .view-more-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

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

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

    .jackpot-number {
        font-size: 18px;
    }

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

    .gen-ball {
        width: 40px;
        height: 40px;
    }

    .gen-ball span {
        font-size: 15px;
    }

    .lotto-ball {
        width: 35px;
        height: 35px;
    }

    .lotto-ball span {
        font-size: 13px;
    }

    .lotto-ball-sm {
        width: 26px;
        height: 26px;
    }

    .lotto-ball-sm span {
        font-size: 10px;
    }
}

/* === Extra adjustments for sidebar on mobile === */
@media (max-width: 1024px) {
    body {
        padding-bottom: 60px;
    }
}

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

    body {
        background: white;
        color: black;
    }

    .article-content {
        color: black;
    }
}

/* === Mobile Optimization Additions === */
@media (max-width: 768px) {
  .nav-link, .btn-login, .btn-register, .btn-demo,
  a, button, .sidebar-btn {
    min-height: 44px;
    min-width: 44px;
  }
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
  }
  body {
    font-size: 16px;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
  }
  img {
    max-width: 100%;
    height: auto;
  }
  .site-footer {
    padding-bottom: env(safe-area-inset-bottom, 20px);
  }
  .site-header {
    padding-top: env(safe-area-inset-top, 0px);
  }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
    }
  }
  .article-card {
    margin-bottom: 20px;
  }
  .content-area {
    padding: 10px;
  }
}
@media (max-width: 360px) {
  .container {
    padding: 0 10px;
  }
  h1, .hero-title {
    font-size: 24px !important;
  }
  h2 {
    font-size: 20px !important;
  }
}
