/* ============================================
   Invadigm - Global Trading Platform
   Shared Stylesheet
   ============================================ */

/* ===== Reset & Base ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary: #C41E3A;
    --primary-dark: #9B1A2E;
    --primary-light: #E82547;
    --bg-dark: #0a0e1a;
    --bg-dark-2: #111728;
    --bg-dark-3: #1a2138;
    --bg-card: #161c2e;
    --text-white: #ffffff;
    --text-gray: #a0a8b8;
    --text-muted: #6b7388;
    --gold: #d4a843;
    --border: #252d44;
    --radius: 8px;
    --radius-lg: 16px;
    --shadow: 0 4px 24px rgba(0,0,0,0.3);
    --transition: all 0.3s ease;
    --header-h: 70px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-light); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section { padding: 80px 0; }
.section-title { font-size: 2rem; font-weight: 700; text-align: center; margin-bottom: 12px; }
.section-subtitle { text-align: center; color: var(--text-gray); font-size: 1.05rem; margin-bottom: 48px; max-width: 800px; margin-left: auto; margin-right: auto; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 28px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover { background: var(--primary-light); color: #fff; transform: translateY(-1px); }
.btn-outline {
    background: transparent;
    color: var(--text-white);
    border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary-light); }
.btn-gold {
    background: linear-gradient(135deg, #d4a843, #c4982e);
    color: #1a1a1a;
}
.btn-gold:hover { opacity: 0.9; color: #1a1a1a; }

/* ===== Header ===== */
#site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: rgba(10, 14, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    transition: var(--transition);
}
#site-header.scrolled { background: rgba(10, 14, 26, 0.98); box-shadow: 0 2px 20px rgba(0,0,0,0.4); }

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-wrap { display: flex; align-items: center; gap: 10px; }
.logo-wrap img { width: 40px; height: 40px; border-radius: 8px; }
.logo-text { font-size: 1.3rem; font-weight: 800; letter-spacing: 1px; color: #fff; }

.nav-menu { display: flex; align-items: center; gap: 8px; }
.nav-item {
    padding: 8px 18px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-gray);
    cursor: pointer;
    border-radius: var(--radius);
    transition: var(--transition);
}
.nav-item:hover, .nav-item.active { color: #fff; background: rgba(196, 30, 58, 0.15); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.header-actions .btn { padding: 8px 22px; font-size: 0.85rem; }

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
}
.menu-toggle span {
    width: 24px; height: 2px;
    background: #fff;
    transition: var(--transition);
    border-radius: 2px;
}
.menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== Banner ===== */
.banner {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    margin-top: var(--header-h);
    overflow: hidden;
}
.banner-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #0a0e1a 0%, #1a2138 40%, #2a1530 70%, #0a0e1a 100%);
    z-index: 0;
}
.banner-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(196,30,58,0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(212,168,67,0.08) 0%, transparent 50%);
}
.banner-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 50px 50px;
}
.banner-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}
.banner-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(196,30,58,0.2);
    border: 1px solid rgba(196,30,58,0.4);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--primary-light);
    margin-bottom: 20px;
}
.banner h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 0%, #c8d0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.banner h1 .highlight { color: var(--primary-light); -webkit-text-fill-color: var(--primary-light); }
.banner p {
    font-size: 1.15rem;
    color: var(--text-gray);
    max-width: 600px;
    margin-bottom: 36px;
}
.banner-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.banner-stats {
    display: flex;
    gap: 48px;
    margin-top: 56px;
    flex-wrap: wrap;
}
.banner-stat .num { font-size: 2.2rem; font-weight: 800; color: var(--gold); }
.banner-stat .label { font-size: 0.85rem; color: var(--text-muted); }

/* ===== Trading Environment Section ===== */
.trading-env { background: var(--bg-dark); }
.env-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.env-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    transition: var(--transition);
}
.env-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: 0 8px 32px rgba(196,30,58,0.15);
}
.env-card img { width: 64px; height: 64px; margin: 0 auto 20px; }
.env-card h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 10px; }
.env-card p { color: var(--text-gray); font-size: 0.9rem; line-height: 1.7; }

/* ===== Deposit/Withdrawal Section ===== */
.deposit-section { background: var(--bg-dark-2); }
.deposit-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.deposit-text h2 { font-size: 2rem; font-weight: 700; margin-bottom: 16px; }
.deposit-text p { color: var(--text-gray); margin-bottom: 24px; line-height: 1.8; }
.deposit-text .payment-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.deposit-text .pay-tag {
    padding: 6px 14px;
    background: var(--bg-dark-3);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--text-gray);
}
.deposit-img { text-align: center; }
.deposit-img img { max-width: 100%; border-radius: var(--radius-lg); }

/* ===== Account Types Section ===== */
.accounts-section { background: var(--bg-dark); position: relative; }
.accounts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.account-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}
.account-card:hover { transform: translateY(-4px); border-color: var(--primary); }
.account-card img { width: 100%; }
.account-info { padding: 20px; }
.account-info .acct-name { font-size: 1.3rem; font-weight: 800; margin-bottom: 4px; }
.account-info .acct-ccy { font-size: 0.8rem; color: var(--text-muted); margin-bottom: 16px; }
.acct-details { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.acct-detail-row { display: flex; justify-content: space-between; font-size: 0.85rem; }
.acct-detail-row .lbl { color: var(--text-muted); }
.acct-detail-row .val { font-weight: 600; }
.account-info .btn { width: 100%; }

/* ===== Liquidity Section ===== */
.liquidity-section { background: var(--bg-dark-2); text-align: center; }
.liquidity-section p { color: var(--text-gray); max-width: 900px; margin: 0 auto 32px; line-height: 1.8; }
.liquidity-section img { max-width: 800px; margin: 0 auto; border-radius: var(--radius-lg); }

/* ===== Social Trading Section ===== */
.social-section { background: var(--bg-dark); }
.social-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.social-text h2 { font-size: 2rem; font-weight: 700; margin-bottom: 16px; }
.social-text p { color: var(--text-gray); line-height: 1.8; }
.social-img { text-align: center; }
.social-img img { max-width: 100%; border-radius: var(--radius-lg); }

/* ===== News Section (Homepage) ===== */
.news-section { background: var(--bg-dark-2); }
.news-tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
.news-tab {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-gray);
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}
.news-tab:hover { color: #fff; }
.news-tab.active { background: var(--primary); color: #fff; }
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.news-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}
.news-card:hover { transform: translateY(-4px); border-color: var(--primary); }
.news-card .news-thumb {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-dark-3);
}
.news-card .news-body { padding: 20px; }
.news-card .news-date { font-size: 0.8rem; color: var(--primary-light); margin-bottom: 8px; }
.news-card .news-title { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; line-height: 1.5; }
.news-card .news-excerpt { font-size: 0.85rem; color: var(--text-gray); line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-more { text-align: center; margin-top: 36px; }

/* ===== Global Presence Section ===== */
.global-section { background: var(--bg-dark); }
.global-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.global-map img { width: 100%; border-radius: var(--radius-lg); }
.global-text h2 { font-size: 2rem; font-weight: 700; margin-bottom: 16px; }
.global-text > p { color: var(--text-gray); margin-bottom: 32px; line-height: 1.8; }
.global-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.global-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}
.global-stat .num { font-size: 2rem; font-weight: 800; color: var(--gold); }
.global-stat .desc { font-size: 0.85rem; color: var(--text-muted); margin-top: 4px; }

/* ===== Awards Section ===== */
.awards-section { background: var(--bg-dark-2); }
.awards-scroll {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    scroll-snap-type: x mandatory;
}
.awards-scroll::-webkit-scrollbar { height: 6px; }
.awards-scroll::-webkit-scrollbar-track { background: var(--bg-dark-3); border-radius: 3px; }
.awards-scroll::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }
.award-card {
    min-width: 240px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    scroll-snap-align: start;
    transition: var(--transition);
}
.award-card:hover { border-color: var(--gold); transform: translateY(-2px); }
.award-card img { width: 100px; height: 100px; margin: 0 auto 16px; object-fit: contain; }
.award-card h4 { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; min-height: 40px; }
.award-card h5 { font-size: 0.8rem; color: var(--text-gray); margin-bottom: 4px; min-height: 36px; }
.award-card .year { font-size: 0.85rem; color: var(--gold); font-weight: 600; }

/* ===== Footer ===== */
footer {
    background: var(--bg-dark);
    border-top: 1px solid var(--border);
    padding-top: 60px;
}
.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}
.footer-brand .logo-wrap { margin-bottom: 16px; }
.footer-brand p { color: var(--text-muted); font-size: 0.85rem; line-height: 1.7; }
.footer-col h4 { font-size: 1rem; font-weight: 700; margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: var(--text-muted); font-size: 0.85rem; }
.footer-col ul li a:hover { color: var(--primary-light); }

.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social a {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--bg-dark-3);
    border: 1px solid var(--border);
    font-size: 1.1rem;
    transition: var(--transition);
}
.footer-social a:hover { background: var(--primary); border-color: var(--primary); }

.footer-compliance {
    border-top: 1px solid var(--border);
    padding: 24px 0;
}
.footer-compliance h5 { font-size: 0.9rem; font-weight: 600; margin-bottom: 8px; color: var(--gold); }
.footer-compliance p { font-size: 0.78rem; color: var(--text-muted); line-height: 1.7; margin-bottom: 6px; }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 20px 0;
    text-align: center;
}
.footer-bottom p { font-size: 0.8rem; color: var(--text-muted); }

/* ===== Floating Buttons ===== */
.floating-btns {
    position: fixed;
    right: 20px;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 999;
}
.floating-btn {
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.3rem;
}
.floating-btn:hover { transform: scale(1.1); }
.telegram-btn { background: #2AABEE; color: #fff; }
.whatsapp-btn { background: #25D366; color: #fff; }
.wechat-btn { background: #07C160; color: #fff; }

/* ===== News List Page ===== */
.news-page-banner {
    margin-top: var(--header-h);
    padding: 60px 0;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-2) 100%);
    text-align: center;
}
.news-page-banner h1 { font-size: 2.5rem; font-weight: 800; margin-bottom: 12px; }
.news-page-banner p { color: var(--text-gray); }
.news-page-banner .breadcrumb { font-size: 0.85rem; color: var(--text-muted); margin-top: 16px; }
.news-page-banner .breadcrumb a { color: var(--primary-light); }

.news-list-section { padding: 60px 0; }
.news-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
.news-list-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.news-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 48px;
}
.page-btn {
    min-width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-gray);
    cursor: pointer;
    font-size: 0.9rem;
    transition: var(--transition);
}
.page-btn:hover { border-color: var(--primary); color: #fff; }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ===== News Detail Page ===== */
.news-detail-banner {
    margin-top: var(--header-h);
    padding: 50px 0 30px;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-2) 100%);
}
.news-detail-banner .breadcrumb { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; }
.news-detail-banner .breadcrumb a { color: var(--primary-light); }
.news-detail-banner .news-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(196,30,58,0.2);
    border-radius: 4px;
    font-size: 0.8rem;
    color: var(--primary-light);
    margin-bottom: 16px;
}
.news-detail-banner h1 { font-size: 2.2rem; font-weight: 800; margin-bottom: 16px; line-height: 1.4; }
.news-detail-meta { display: flex; gap: 20px; color: var(--text-muted); font-size: 0.85rem; }

.news-detail-body { padding: 40px 0 80px; }
.news-detail-content {
    max-width: 800px;
    margin: 0 auto;
}
.news-detail-cover {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
}
.news-detail-content p { font-size: 1.05rem; line-height: 1.9; margin-bottom: 20px; color: #cbd2e0; }
.news-detail-content h2 { font-size: 1.5rem; font-weight: 700; margin: 32px 0 16px; }
.news-detail-content h3 { font-size: 1.2rem; font-weight: 600; margin: 24px 0 12px; }
.news-detail-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 16px 24px;
    background: var(--bg-card);
    border-radius: 0 var(--radius) var(--radius) 0;
    margin: 24px 0;
    font-style: italic;
    color: var(--text-gray);
}
.news-detail-content ul { padding-left: 24px; margin-bottom: 20px; }
.news-detail-content ul li { list-style: disc; margin-bottom: 8px; color: #cbd2e0; }
.news-detail-content img { border-radius: var(--radius-lg); margin: 24px 0; }

.news-share {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}
.news-share span { color: var(--text-muted); font-size: 0.9rem; }

.news-related { margin-top: 60px; }
.news-related h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 24px; }
.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .env-grid { grid-template-columns: repeat(2, 1fr); }
    .accounts-grid { grid-template-columns: repeat(2, 1fr); }
    .news-grid, .news-list-grid, .related-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-main { grid-template-columns: 1fr 1fr; gap: 32px; }
    .banner h1 { font-size: 2.5rem; }
}

@media (max-width: 768px) {
    .section { padding: 50px 0; }
    
    /* Mobile nav */
    .menu-toggle { display: flex; }
    .nav-menu {
        position: fixed;
        top: var(--header-h);
        left: 0; right: 0;
        background: var(--bg-dark);
        flex-direction: column;
        padding: 20px;
        gap: 0;
        border-bottom: 1px solid var(--border);
        transform: translateY(-200%);
        transition: var(--transition);
        z-index: 999;
    }
    .nav-menu.active { transform: translateY(0); }
    .nav-item { width: 100%; padding: 14px 16px; }
    .header-actions { display: none; }
    .header-actions.mobile { display: flex; gap: 8px; }
    .header-actions.mobile .btn { padding: 6px 14px; font-size: 0.8rem; }

    /* Banner */
    .banner { min-height: 500px; }
    .banner h1 { font-size: 1.8rem; }
    .banner p { font-size: 1rem; }
    .banner-stats { gap: 24px; margin-top: 32px; }
    .banner-stat .num { font-size: 1.5rem; }

    /* Sections */
    .deposit-wrap, .social-wrap, .global-wrap { grid-template-columns: 1fr; gap: 32px; }
    .env-grid { grid-template-columns: 1fr; }
    .accounts-grid { grid-template-columns: 1fr; }
    .news-grid, .news-list-grid, .related-grid { grid-template-columns: 1fr; }
    .global-stats { grid-template-columns: 1fr; }
    .footer-main { grid-template-columns: 1fr; }
    
    .section-title { font-size: 1.5rem; }
    .news-detail-banner h1 { font-size: 1.5rem; }
    .news-detail-cover { height: 240px; }
    .news-detail-content p { font-size: 0.95rem; }
    
    .floating-btns { right: 12px; bottom: 20px; }
    .floating-btn { width: 42px; height: 42px; font-size: 1.1rem; }
}

@media (max-width: 480px) {
    .banner h1 { font-size: 1.5rem; }
    .banner-actions { flex-direction: column; }
    .banner-actions .btn { width: 100%; }
    .banner-stats { flex-direction: column; gap: 16px; }
    .container { padding: 0 16px; }
    .section-title { font-size: 1.3rem; }
}

/* ===== Animation ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-up { animation: fadeInUp 0.6s ease forwards; }
.animate-delay-1 { animation-delay: 0.1s; opacity: 0; }
.animate-delay-2 { animation-delay: 0.2s; opacity: 0; }
.animate-delay-3 { animation-delay: 0.3s; opacity: 0; }

/* ===== Utility ===== */
.text-center { text-align: center; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none !important; }
