/* 5856.tw - Taiwan Internet Trends Portal CSS */
/* Modern news portal with Taiwan red accent */

:root {
    --primary-red: #dc2626;
    --deep-slate: #0f172a;
    --accent-green: #22c55e;
    --warning-amber: #f59e0b;
    --bg-white: #ffffff;
    --text-dark: #0b1220;
    --text-gray: #64748b;
    --border-light: #e2e8f0;
    --hover-bg: #f8fafc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-white);
    font-size: 16px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Noto Sans TC', system-ui, sans-serif;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--deep-slate);
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    border-left: 5px solid var(--primary-red);
    padding-left: 1.25rem;
}

h2 {
    font-size: 1.875rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--deep-slate);
}

h3 {
    font-size: 1.5rem;
    margin-top: 2rem;
    color: var(--deep-slate);
}

p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
    color: var(--text-dark);
}

a {
    color: var(--primary-red);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #b91c1c;
    text-decoration: underline;
}

/* Sticky Header */
.site-header-tw {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--deep-slate);
    border-bottom: 3px solid var(--primary-red);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

.header-container-tw {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo-tw {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--bg-white);
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: transform 0.2s ease;
}

.site-logo-tw:hover {
    transform: translateY(-2px);
    text-decoration: none;
    color: var(--bg-white);
}

.site-logo-tw span {
    color: var(--primary-red);
}

.main-nav-tw {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.main-nav-tw a {
    color: var(--bg-white);
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.main-nav-tw a:hover {
    background-color: rgba(220, 38, 38, 0.1);
    color: var(--primary-red);
    text-decoration: none;
}

/* Breadcrumb */
.breadcrumb-nav-tw {
    background-color: var(--hover-bg);
    border-bottom: 1px solid var(--border-light);
    padding: 0.75rem 0;
}

.breadcrumb-nav-tw ol {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    list-style: none;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.875rem;
}

.breadcrumb-nav-tw li {
    display: inline-flex;
    align-items: center;
    color: var(--text-gray);
}

.breadcrumb-nav-tw a {
    color: var(--primary-red);
    transition: color 0.2s ease;
}

.breadcrumb-nav-tw a:hover {
    color: #b91c1c;
}

/* Main Content */
.main-content-tw {
    max-width: 1280px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
}

.article-wrapper-tw {
    max-width: 820px;
    margin: 0 auto;
}

.content-body-tw {
    background: var(--bg-white);
}

/* Hero Section (Homepage) */
.hero-section-tw {
    background: linear-gradient(135deg, var(--deep-slate) 0%, #1e293b 100%);
    color: var(--bg-white);
    padding: 4rem 1.5rem;
    margin-bottom: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.hero-section-tw h1 {
    color: var(--bg-white);
    border-left: 5px solid var(--primary-red);
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.hero-section-tw p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    max-width: 700px;
}

/* News Grid */
.news-grid-tw {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.news-card-tw {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.news-card-tw:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.15);
    border-color: var(--primary-red);
}

.news-card-tw h3 {
    margin-top: 0;
    color: var(--deep-slate);
}

.news-card-tw a {
    color: var(--deep-slate);
    font-weight: 600;
    font-size: 1.125rem;
}

.news-card-tw a:hover {
    color: var(--primary-red);
}

/* Lists */
ul, ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

ul li, ol li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
    color: var(--text-dark);
}

ul li strong, ol li strong {
    color: var(--deep-slate);
    font-weight: 600;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--bg-white);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

thead {
    background-color: var(--deep-slate);
    color: var(--bg-white);
}

th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9375rem;
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
}

tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background-color: var(--hover-bg);
}

/* Blockquotes */
blockquote {
    border-left: 4px solid var(--primary-red);
    padding: 1rem 1.5rem;
    margin: 2rem 0;
    background-color: var(--hover-bg);
    font-style: italic;
    color: var(--text-gray);
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

figure {
    margin: 2rem 0;
    text-align: center;
}

figcaption {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-gray);
    font-style: italic;
}

/* Category Tags */
.category-tag-tw {
    display: inline-block;
    background-color: var(--primary-red);
    color: var(--bg-white);
    padding: 0.375rem 0.875rem;
    border-radius: 20px;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    transition: background-color 0.2s ease;
}

.category-tag-tw:hover {
    background-color: #b91c1c;
    text-decoration: none;
}

.category-tag-tw.gaming {
    background-color: var(--accent-green);
}

.category-tag-tw.warning {
    background-color: var(--warning-amber);
}

/* Info Boxes */
.info-box-tw {
    background-color: var(--hover-bg);
    border-left: 4px solid var(--primary-red);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 4px;
}

.info-box-tw h3 {
    margin-top: 0;
    color: var(--primary-red);
}

.warning-box-tw {
    background-color: #fef3c7;
    border-left: 4px solid var(--warning-amber);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 4px;
}

.warning-box-tw h3 {
    margin-top: 0;
    color: var(--warning-amber);
}

/* Footer */
.site-footer-tw {
    background-color: var(--deep-slate);
    color: var(--bg-white);
    padding: 3rem 1.5rem 2rem;
    margin-top: 5rem;
    border-top: 3px solid var(--primary-red);
}

.footer-content-tw {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section-tw h3 {
    color: var(--bg-white);
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-section-tw ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section-tw li {
    margin-bottom: 0.5rem;
}

.footer-section-tw a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.2s ease;
}

.footer-section-tw a:hover {
    color: var(--primary-red);
}

.footer-bottom-tw {
    max-width: 1280px;
    margin: 2rem auto 0;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .header-container-tw {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .main-nav-tw {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }

    .main-nav-tw a {
        width: 100%;
        text-align: center;
    }

    .main-content-tw {
        padding: 2rem 1rem;
    }

    .news-grid-tw {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .hero-section-tw h1 {
        font-size: 2rem;
    }

    .hero-section-tw p {
        font-size: 1rem;
    }

    table {
        font-size: 0.875rem;
    }

    th, td {
        padding: 0.75rem 0.5rem;
    }
}

@media (max-width: 480px) {
    .site-logo-tw {
        font-size: 1.5rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    .main-content-tw {
        padding: 1.5rem 0.75rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus States for Accessibility */
a:focus, button:focus {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .site-header-tw,
    .breadcrumb-nav-tw,
    .site-footer-tw {
        display: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
    }

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