﻿/* Community Official Desktop Styles (>=1200px) */
body {
    background-color: #f8f9fa;
}

.official-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 120px 0 80px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.official-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../../images/pattern.png');
    opacity: 0.05;
}

.official-hero h1 {
    font-family: 'Noto Serif SC', serif;
    font-size: 3.5rem;
    margin-bottom: 20px;
    color: #ffffff;
    font-weight: 700;
}

.official-hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    font-family: 'Noto Sans SC', sans-serif;
    color: #cbd5e1;
}

/* Sections */
.official-content-wrapper {
    padding-bottom: 60px;
}

.official-section {
    padding: 80px 0;
}

.official-section.alt-bg {
    background-color: white;
    width: 100%;
    margin-top: 40px;
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.03);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
}

.section-header h2 {
    font-family: 'Noto Serif SC', serif;
    font-size: 2.5rem;
    color: #0f172a;
    font-weight: 700;
    position: relative;
    display: inline-block;
    z-index: 1;
}

.header-decoration {
    width: 60px;
    height: 4px;
    background: #cba174;
    margin: 20px auto 0;
    border-radius: 2px;
}

/* Content Blocks */
.content-block {
    margin-bottom: 60px;
}

.block-title {
    font-size: 1.5rem;
    color: #334155;
    margin-bottom: 30px;
    padding-left: 15px;
    border-left: 4px solid #cba174;
    font-weight: 600;
}

/* Media Grid */
.media-grid {
    display: grid;
    gap: 30px;
}

.articles-grid {
    grid-template-columns: repeat(3, 1fr);
}

.videos-grid {
    grid-template-columns: repeat(3, 1fr);
}

.mixed-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* Article Card */
.article-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card-cover {
    height: 200px;
    background-size: cover;
    background-position: center;
    background-color: #cbd5e1;
}

.card-body {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-date {
    font-size: 0.85rem;
    color: #94a3b8;
    margin-bottom: 10px;
    display: block;
}

.card-title {
    font-size: 1.2rem;
    color: #0f172a;
    margin-bottom: 12px;
    font-weight: 700;
    line-height: 1.4;
}

.card-desc {
    font-size: 0.95rem;
    color: #64748b;
    margin-bottom: 20px;
    line-height: 1.6;
    flex: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.read-more {
    font-size: 0.9rem;
    color: #cba174;
    font-weight: 600;
    transition: color 0.2s;
}

.article-card:hover .read-more {
    color: #b48a5f;
}

/* Video Card */
.video-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.3s;
}

.video-card:hover {
    transform: scale(1.02);
}

.video-cover {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #cba174;
    font-size: 20px;
    padding-left: 4px;
    /* Optical adjustment */
    transition: transform 0.3s, background 0.3s;
}

.video-card:hover .play-btn {
    transform: scale(1.1);
    background: white;
}

.video-duration {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.video-info {
    padding: 15px;
}

.video-info h4 {
    font-size: 1rem;
    color: #0f172a;
    margin-bottom: 5px;
    font-weight: 600;
    line-height: 1.4;
}

.video-info span {
    font-size: 0.85rem;
    color: #94a3b8;
}

/* Layout Wrapper */
.official-layout-wrapper {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 60px;
    align-items: start;
    padding-top: 60px;
}

/* Sidebar */
.official-sidebar {
    position: sticky;
    top: 100px;
}

.filter-group {
    margin-bottom: 40px;
}

.filter-group h4 {
    font-size: 1.1rem;
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 20px;
    font-family: 'Noto Serif SC', serif;
    padding-left: 12px;
    border-left: 4px solid #cba174;
}

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-btn {
    text-align: left;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #64748b;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    width: 100%;
    outline: none;
}

.filter-btn:hover {
    background: #f1f5f9;
    color: #cba174;
}

.filter-btn.active {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%) !important;
    color: #1e3a8a !important;
    font-weight: 700 !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.04) !important;
}

.filter-btn.active .plat-dot {
    transform: scale(1.2);
}

/* Hide mobile/tablet filter trigger on desktop */
.filter-trigger {
    display: none !important;
}

.plat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 12px;
    background: #cbd5e1;
    /* Default/All */
}

/* Main Content */
.official-main {
    min-height: 500px;
}

.mixed-grid {
    grid-template-columns: repeat(4, 1fr);
    /* 3 rows * ~300px card height + 2 * 30px gap = ~960px */
    min-height: 950px;
    align-content: start;
    /* Prevent items from stretching if few */
}

/* Platform List (Bottom) */
.platform-list-wrapper {
    margin-top: 20px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 60px;
    padding-bottom: 60px;
}

.platform-list-title {
    font-size: 1.2rem;
    color: #94a3b8;
    margin-bottom: 30px;
    font-weight: 500;
}

.platform-list {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.platform-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    gap: 10px;
    transition: transform 0.3s;
}

.platform-item:hover {
    transform: translateY(-5px);
}

.plat-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.platform-item span {
    font-size: 0.9rem;
    color: #475569;
    font-weight: 600;
}

/* Mixed Card */
.mixed-card {
    text-decoration: none;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
    height: 100%;
    display: none;
    /* Hidden by default to prevent FOUC */
    flex-direction: column;
}

.mixed-card:hover {
    transform: translateY(-5px);
}

.mixed-cover {
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: #f1f5f9;
    position: relative;
}

.twitter-bg {
    background: #000;
    display: flex;
    flex-direction: column;
    padding: 40px 20px 20px;
    justify-content: center;
}

.twitter-text {
    color: white;
    font-size: 0.9rem;
    line-height: 1.4;
}

.plat-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
}

.plat-tag.youtube {
    background: #ff0000;
}

.plat-tag.twitter {
    background: #000000;
}

.plat-tag.bilibili {
    background: #fb7299;
}

.plat-tag.linkedin {
    background: #0077b5;
}

.mixed-body {
    padding: 15px;
    flex: 1;
}

.mixed-body h4 {
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.5;
    font-weight: 600;
    margin: 0;
}

/* Modal - Glassmorphism Premium Style */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    /* Darker overlay */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 100001;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.qr-modal {
    background: #ffffff;
    padding: 60px 40px 40px;
    border-radius: 24px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Modal Decoration */
.qr-modal::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(193, 161, 116, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

.qr-modal::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(30, 58, 138, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    z-index: 0;
}

/* Header Line */
.qr-modal-header-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #1e3a8a, #cba174);
    z-index: 1;
}

.modal-overlay.active .qr-modal {
    transform: scale(1) translateY(0);
}

.qr-modal h3 {
    margin-top: 10px;
    margin-bottom: 8px;
    color: #1e293b;
    font-size: 1.6rem;
    font-family: 'Noto Serif SC', serif;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.qr-modal p {
    color: #64748b;
    margin-bottom: 30px;
    font-size: 1rem;
    position: relative;
    z-index: 1;
}

.qr-image-wrapper {
    position: relative;
    z-index: 1;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    /* Shadow for QR */
    border: 1px solid #f1f5f9;
}

.btn-close-modal {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 10px 36px;
    border-radius: 30px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 10px;
    display: inline-block;
    position: relative;
    z-index: 1;
}

.btn-close-modal:hover {
    background: #1e3a8a;
    color: white;
    border-color: #1e3a8a;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
}

.btn-close-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid #f1f5f9;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    z-index: 10;
}

.btn-close-icon:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
    transform: rotate(90deg);
}

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 20px;
}

.page-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    color: #1e293b;
    font-weight: 500;
    font-size: 0.95rem;
}

.page-btn.active {
    background: #cba174;
    color: white;
    border-color: #cba174;
}

.page-btn:hover:not(.active):not(:disabled) {
    background: #f8f9fa;
    border-color: #cba174;
    color: #cba174;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f1f5f9;
    color: #cbd5e1;
    border-color: #e2e8f0;
}