/* ================================================================
   ThanhLong Theme - Responsive Breakpoints
   3-column layout + navbar + slideshow + faction responsive
   ================================================================ */

/* Large Tablet / Small Desktop (1024px) */
@@media (max-width: 1024px) {
    .tl-three-col {
        grid-template-columns: 250px 1fr 250px;
        gap: var(--space-md);
    }

    .tl-hero-title {
        font-size: 1.8rem;
    }

    /* Faction: smaller character area */
    .tl-faction-character {
        width: 220px;
        height: 280px;
    }

    .tl-faction-content {
        padding: var(--space-xl);
        gap: var(--space-xl);
        min-height: 300px;
    }

    .tl-faction-panel {
        min-height: 300px;
    }
}

/* Tablet (768px) - Stack to single column */
@@media (max-width: 768px) {
    .tl-three-col {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    /* Reorder: Center content first, then sidebars */
    .tl-col-center {
        order: -1;
    }

    .tl-col-left {
        order: 0;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-md);
    }

    .tl-col-right {
        order: 1;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-md);
    }

    .tl-hero-title {
        font-size: 1.6rem;
    }

    .tl-hero-content {
        padding: var(--space-2xl) var(--space-md);
    }

    .tl-tabs {
        justify-content: center;
    }

    .tl-tab {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.75rem;
    }

    /* === Navbar Responsive === */
    .tl-navbar-menu,
    .tl-navbar-auth {
        display: none;
    }

    .tl-navbar-toggle {
        display: flex;
    }

    /* === Faction Responsive === */
    .tl-faction-title {
        font-size: 1.4rem;
    }

    .tl-faction-content {
        flex-direction: column;
        padding: var(--space-lg);
        gap: var(--space-lg);
        min-height: auto;
    }

    .tl-faction-panel {
        min-height: auto;
    }

    .tl-faction-character {
        width: 200px;
        height: 250px;
    }

    .tl-faction-text {
        text-align: center;
    }

    .tl-faction-tab {
        padding: var(--space-xs) var(--space-md);
        font-size: 0.75rem;
    }

    /* Slideshow: slightly shorter */
    .tl-slides {
        aspect-ratio: 16 / 8;
    }
}

/* Mobile (576px) */
@@media (max-width: 576px) {
    .container-wide {
        padding: 0 var(--space-sm);
    }

    .tl-three-col {
        gap: var(--space-sm);
        padding: var(--space-md) 0;
    }

    /* Stack sidebars back to single column */
    .tl-col-left,
    .tl-col-right {
        grid-template-columns: 1fr;
    }

    .tl-hero-title {
        font-size: 1.3rem;
        letter-spacing: 0.05em;
    }

    .tl-hero-content {
        padding: var(--space-xl) var(--space-sm);
    }

    .tl-hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .tl-btn {
        width: 100%;
        max-width: 250px;
    }

    /* Make sidebar tables scroll if too wide */
    .tl-table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tl-sidebar-table {
        min-width: 300px;
    }

    .tl-download-links {
        flex-direction: column;
        align-items: center;
    }

    .tl-download-btn {
        width: 100%;
        max-width: 280px;
    }

    .tl-news-item {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .tl-news-thumb {
        width: 100%;
        height: 120px;
    }

    .tl-activity-details {
        flex-direction: column;
        gap: var(--space-xs);
    }

    .tl-footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .tl-footer-links {
        flex-direction: column;
        gap: var(--space-sm);
    }

    /* === Navbar Mobile === */
    .tl-navbar-logo-text {
        font-size: 0.75rem;
    }

    .tl-navbar-logo-img {
        height: 26px;
    }

    .tl-navbar-mobile-auth {
        flex-direction: column;
    }

    .tl-navbar-mobile-auth .tl-btn {
        text-align: center;
    }

    /* === Faction Mobile === */
    .tl-faction-section {
        padding: var(--space-xl) 0;
    }

    .tl-faction-title {
        font-size: 1.2rem;
        margin-bottom: var(--space-md);
    }

    .tl-faction-content {
        padding: var(--space-md);
        gap: var(--space-md);
    }

    .tl-faction-character {
        width: 160px;
        height: 200px;
    }

    .tl-faction-text {
        font-size: 0.85rem;
    }

    /* Disable hover scale on mobile */
    .tl-faction-content:hover .tl-faction-text {
        font-size: 0.85rem;
    }

    .tl-faction-content:hover .tl-faction-character {
        transform: none;
    }

    .tl-faction-tabs {
        gap: var(--space-xs);
        padding: var(--space-sm);
    }

    .tl-faction-tab {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.7rem;
    }

    /* Slideshow: taller on mobile */
    .tl-slides {
        aspect-ratio: 16 / 10;
    }

    .tl-slide-btn {
        padding: var(--space-xs) var(--space-sm);
        font-size: 1rem;
    }

    .tl-slide-dot {
        width: 8px;
        height: 8px;
    }

    /* YouTube: ensure full width */
    .tl-youtube-wrapper {
        border-radius: 0;
    }

    /* Fanpage: ensure it doesn't overflow */
    .tl-fanpage-wrapper {
        padding: var(--space-xs);
    }

    .tl-fanpage-wrapper iframe {
        width: 100% !important;
    }

    /* === Boss Spawn Timer Mobile === */
    .tl-boss-card {
        flex-direction: column;
        gap: var(--space-sm);
        align-items: flex-start;
    }

    .tl-boss-thumb {
        width: 48px;
        height: 48px;
    }

    .tl-boss-spawn-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .tl-boss-countdown-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .tl-tabs-scrollable .tl-tab {
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.7rem;
    }
}

/* ================================================================
   NEWS PAGE — Responsive
   ================================================================ */

/* Tablet (768px) */
@@media (max-width: 768px) {
    .tl-news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-md);
    }

    .tl-page-title {
        font-size: 1.5rem;
    }

    .tl-news-tabs {
        gap: 4px;
    }

    .tl-news-tab {
        padding: var(--space-xs) var(--space-md);
        font-size: 0.8rem;
    }

    .tl-article {
        padding: var(--space-lg);
    }

    .tl-article-title {
        font-size: 1.4rem;
    }
}

/* Mobile (576px) */
@@media (max-width: 576px) {
    .tl-news-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .tl-page-header {
        padding: var(--space-xl) 0 var(--space-lg);
        margin-bottom: var(--space-lg);
    }

    .tl-page-header-sm {
        padding: var(--space-md) 0;
        margin-bottom: var(--space-lg);
    }

    .tl-page-title {
        font-size: 1.3rem;
    }

    .tl-news-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .tl-news-tab {
        white-space: nowrap;
        padding: var(--space-xs) var(--space-sm);
        font-size: 0.78rem;
    }

    .tl-article {
        padding: var(--space-md);
        border-radius: 8px;
    }

    .tl-article-title {
        font-size: 1.2rem;
    }

    .tl-article-meta {
        gap: var(--space-sm);
    }

    .tl-article-content {
        font-size: 0.95rem;
    }

    .tl-pagination-btn {
        min-width: 36px;
        height: 36px;
        font-size: 0.82rem;
    }
}
