﻿/* Community Official Mobile Styles (< 768px) */

/* =========================================
   1. Hero & Headers (Synced with Tablet)
   ========================================= */
.official-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    padding: 80px 0 50px !important;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}

.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: 2.2rem;
    margin-bottom: 15px;
    color: #ffffff;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.official-hero p {
    font-size: 1rem;
    padding: 0 20px;
    opacity: 0.9;
    font-family: 'Noto Sans SC', sans-serif;
    color: #cbd5e1;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-family: 'Noto Serif SC', serif;
    font-size: 1.8rem;
    color: #0f172a;
    font-weight: 700;
}

.header-decoration {
    width: 50px;
    height: 3px;
    background: #cba174;
    margin: 12px auto 0;
    border-radius: 2px;
}

/* =========================================
   2. Layout & Sidebar (Drawer Logic)
   ========================================= */
.official-layout-wrapper {
    display: block;
    /* Stacked */
}

/* Sidebar Header (Mobile Only) - Hidden per user request */
.sidebar-header-mobile {
    display: none;
}

/* Floating Filter Trigger */
.filter-trigger {
    display: flex !important;
    position: fixed !important;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #1e293b;
    padding: 12px 24px;
    border-radius: 50px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.05);
    z-index: 2000;
    font-weight: 600;
    font-size: 0.95rem;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-trigger.hide-trigger {
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(20px);
}

.filter-trigger:hover {
    transform: translateX(-50%) translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(203, 161, 116, 0.25);
    color: #0f172a;
}

/* Drawer Sidebar */
.official-sidebar {
    display: block;
    position: fixed;
    top: 56px !important;
    /* Match tablet behavior (below header) */
    left: 0;
    bottom: 0;
    width: 65% !important;
    max-width: 250px !important;
    height: calc(100vh - 56px) !important;

    background: linear-gradient(160deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.95) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    z-index: 10000;
    padding: 25px !important;
    overflow-y: auto;

    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);

    box-shadow: 20px 0 50px rgba(15, 23, 42, 0.15);
    border-right: 1px solid rgba(255, 255, 255, 0.4);
}

.official-sidebar.active {
    transform: translateX(0);
}

/* Overlay */
.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.filter-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* =========================================
   3. Sidebar Content Styles
   ========================================= */
.filter-group {
    margin-bottom: 25px !important;
}

.filter-group h4 {
    font-size: 1.1rem !important;
    /* Sync with tablet */
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 15px !important;
    font-family: 'Noto Serif SC', serif;
    padding-left: 12px;
    border-left: 4px solid #cba174 !important;
    /* Sync with tablet */
}

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 4px !important;
    /* Slight increase comfortably */
}

.filter-btn {
    text-align: left;
    padding: 6px 14px !important;
    /* Slightly more comfortable */
    background: transparent;
    border: none !important;
    /* Remove border to match tablet */
    border-radius: 8px !important;
    /* Sync radius */
    color: #64748b;
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
    min-height: 0 !important;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: flex-start !important;
    text-align: left !important;
    width: 100%;
}

.filter-btn:hover {
    background: #f1f5f9 !important;
    /* Sync hover color */
    color: #cba174 !important;
    box-shadow: none !important;
    transform: none !important;
}

.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);
}

/* Fix for persistent background colors & sticky hover states */
.filter-btn:not(.active) {
    background: transparent !important;
    box-shadow: none !important;
    color: #64748b !important;
    transform: none !important;
}

/* Specific style for "All Platforms" / "All Types" if they need to stand out more */
.filter-btn[data-value="all"] {
    font-weight: 600;
}

.plat-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 12px;
    background: #cbd5e1;
}

/* =========================================
   4. Content Grid & Cards
   ========================================= */
.mixed-grid {
    grid-template-columns: 1fr;
    /* Single Column for Mobile */
    gap: 20px;
    min-height: auto;
}

.mixed-card {
    text-decoration: none;
    background: white !important;
    border-radius: 12px !important;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
    transition: transform 0.3s;
    height: auto;
    display: none;
    /* Hidden strictly handled by JS */
    flex-direction: column;
}

.official-main {
    min-height: 80vh !important;
    /* Push footer down */
    padding-bottom: 80px;
    /* Space for floating button */
}

.mixed-cover {
    height: 180px !important;
    background-size: cover !important;
    background-position: center !important;
    background-color: #f1f5f9 !important;
    position: relative;
}

.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;
}

.mixed-body {
    padding: 15px;
}

.mixed-body h4 {
    font-size: 1rem;
    color: #334155;
    line-height: 1.5;
    font-weight: 600;
    margin: 0;
}

/* =========================================
   5. Platform List & Footer
   ========================================= */
.platform-list-wrapper {
    margin-top: 20px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 40px;
    padding-bottom: 40px;
}

.platform-list-title {
    font-size: 1.1rem;
    color: #94a3b8;
    margin-bottom: 25px;
    font-weight: 500;
}

.platform-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 Columns for icons */
    gap: 15px;
}

.platform-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    gap: 8px;
}

.plat-logo {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.3rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.platform-item span {
    font-size: 0.8rem;
    color: #475569;
    font-weight: 600;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    margin-bottom: 30px;
}

.page-btn {
    width: 36px !important;
    height: 36px !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    background: white !important;
    color: #1e293b !important;
    font-size: 0.9rem !important;
}

.page-btn.active {
    background: #cba174 !important;
    color: white !important;
    border-color: #cba174 !important;
}

/* Modal Styling (Mobile) */
.active-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* ... logic handled by shared styles mostly, but ensure basics here */
    z-index: 100002;
}

.modal-overlay {
    align-items: center;
    justify-content: center;
    display: flex;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.6);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100001;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.qr-modal {
    background: white !important;
    width: 85% !important;
    max-width: 320px !important;
    padding: 25px !important;
    border-radius: 16px !important;
    text-align: center !important;
    position: relative !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25) !important;
    overflow: hidden !important;
    /* Ensure decorations stay inside */
}

/* Modal Decoration (Matches Desktop/Tablet) */
.qr-modal::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    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: -20px;
    left: -20px;
    width: 100px;
    height: 100px;
    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: 5px;
    background: linear-gradient(90deg, #1e3a8a, #cba174);
    z-index: 1;
}

.qr-modal h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    margin-top: 10px;
}

.btn-close-modal {
    margin-top: 15px;
    padding: 8px 25px !important;
    border-radius: 20px !important;
    border: 1px solid #ddd !important;
    background: white !important;
    font-size: 0.9rem !important;
}