/*
Theme Name: 8XBET
Theme URI: https://wartaberitaonline.com
Version: 4.0
*/

:root {
    --c: #1e40af;
    --c2: #1e3a8a;
    --a: #f59e0b;
    --t: #1e293b;
    --t2: #64748b;
    --bg: #fff;
    --bg2: #f8fafc;
    --bg3: #0f172a;
    --br: #e2e8f0;
    --r: 8px;
    --hh: 70px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font: 16px/1.6 'Be Vietnam Pro', sans-serif; color: var(--t); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
ul { list-style: none; }
h1, h2, h3 { font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.section { padding: 3rem 0; }
.section-head { text-align: center; max-width: 600px; margin: 0 auto 2rem; }
.section-head p { color: var(--t2); margin-top: .5rem; }

/* ===== HEADER ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--br);
    z-index: 1000;
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--hh);
}

.logo { display: flex; align-items: center; gap: .5rem; }
.logo img { height: 40px; }
.logo-vip { background: var(--a); color: #fff; font-size: .6rem; font-weight: 700; padding: 2px 6px; border-radius: 4px; }

.nav-menu { display: flex; gap: 1.5rem; }
.nav-menu a { font-size: .9rem; font-weight: 500; }
.nav-menu a:hover { color: var(--c); }

.header-btns { display: flex; gap: .5rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: .5rem 1.25rem; font-size: .875rem; font-weight: 600; border-radius: var(--r); }
.btn-outline { border: 2px solid var(--c); color: var(--c); }
.btn-outline:hover { background: var(--c); color: #fff; }
.btn-primary { background: var(--c); color: #fff; }
.btn-primary:hover { background: var(--c2); }
.btn-accent { background: var(--a); color: #fff; }
.btn-white { border: 2px solid #fff; color: #fff; }

/* Mobile Toggle */
.mobile-toggle { display: none; flex-direction: column; gap: 5px; padding: .5rem; }
.mobile-toggle span { width: 24px; height: 2px; background: var(--t); }

/* Mobile Buttons */
.mobile-btns { display: none; padding: .5rem 1rem; gap: .5rem; border-top: 1px solid var(--br); }
.mobile-btns .btn { flex: 1; text-align: center; justify-content: center; font-size: .8rem; padding: .5rem; }

/* Mobile Menu Overlay */
.mobile-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1001; }
.mobile-overlay.active { display: block; }

/* Mobile Menu */
.mobile-menu { position: fixed; top: 0; right: -280px; width: 280px; height: 100%; background: #fff; z-index: 1002; transition: right .3s; }
.mobile-menu.active { right: 0; }
.mobile-menu-top { display: flex; align-items: center; justify-content: space-between; padding: 1rem; border-bottom: 1px solid var(--br); }
.mobile-menu-top img { height: 36px; }
.mobile-menu-close { width: 36px; height: 36px; background: var(--t); color: #fff; border-radius: 4px; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; }
.mobile-menu-nav a { display: block; padding: 1rem 1.25rem; font-weight: 500; border-bottom: 1px solid var(--br); }

/* Main Content */
main { margin-top: var(--hh); }

/* ===== HERO ===== */
.hero { background: linear-gradient(135deg, var(--bg3), #1e3a5f); padding: 3rem 0; min-height: 400px; display: flex; align-items: center; }
.hero-content { max-width: 640px; color: #fff; }
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero p { font-size: 1.1rem; opacity: .9; margin-bottom: 1.5rem; }
.hero-btns { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 2rem; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.2); }
.stat { text-align: center; }
.stat b { display: block; font-size: 1.5rem; color: var(--a); }
.stat span { font-size: .85rem; opacity: .8; }

/* ===== GAMES GRID ===== */
.games-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; }
.game-card { position: relative; border-radius: var(--r); overflow: hidden; aspect-ratio: 4/3; }
.game-card img { width: 100%; height: 100%; object-fit: cover; }
.game-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.8), transparent); display: flex; align-items: flex-end; padding: 1rem; }
.game-overlay span { color: #fff; font-weight: 600; }

/* ===== FEATURES ===== */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; }
.feature-card { text-align: center; padding: 1.5rem; }
.feature-icon { width: 52px; height: 52px; background: var(--bg2); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; color: var(--c); }
.feature-card h3 { margin-bottom: .5rem; }
.feature-card p { color: var(--t2); font-size: .9rem; }

/* ===== ARTICLES ===== */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 1.5rem; }
.article-card { background: #fff; border-radius: var(--r); overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.article-thumb { aspect-ratio: 16/9; background-size: cover; background-position: center; background-color: var(--bg2); }
.article-body { padding: 1.25rem; }
.article-cat { display: inline-block; font-size: .7rem; font-weight: 600; color: var(--c); background: rgba(30,64,175,.1); padding: 3px 8px; border-radius: 4px; margin-bottom: .5rem; }
.article-card h3 { font-size: 1rem; margin-bottom: .5rem; }
.article-card p { font-size: .875rem; color: var(--t2); }
.article-meta { display: flex; justify-content: space-between; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--br); font-size: .8rem; color: #94a3b8; }
.article-meta a { color: var(--c); font-weight: 500; }

/* ===== REVIEWS ===== */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.5rem; }
.review-card { background: #fff; border-radius: var(--r); padding: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.review-stars { color: var(--a); font-size: 1.2rem; margin-bottom: 1rem; }
.review-text { color: var(--t2); line-height: 1.7; margin-bottom: 1rem; }
.review-author { display: flex; align-items: center; gap: 1rem; padding-top: 1rem; border-top: 1px solid var(--br); }
.review-avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--c), var(--a)); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; }
.review-info h4 { font-size: .9rem; }
.review-info span { font-size: .75rem; color: #94a3b8; }

/* ===== FAQ ===== */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-item { border: 1px solid var(--br); border-radius: var(--r); margin-bottom: .75rem; }
.faq-question { width: 100%; padding: 1rem 1.25rem; text-align: left; font-weight: 600; background: #fff; display: flex; justify-content: space-between; align-items: center; }
.faq-icon { width: 20px; height: 20px; transition: transform .2s; }
.faq-item.active .faq-icon { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height .3s; }
.faq-item.active .faq-answer { max-height: 300px; }
.faq-answer-text { padding: 0 1.25rem 1.25rem; color: var(--t2); }

/* ===== CATEGORY ===== */
.category-hero { padding: 2rem 0; text-align: center; color: #fff; }
.category-hero h1 { color: #fff; margin-bottom: .5rem; }

/* ===== SINGLE ===== */
.single-grid { display: grid; grid-template-columns: 1fr 300px; gap: 2rem; padding: 2rem 0; }
.single-main { max-width: 800px; }
.breadcrumb { font-size: .85rem; color: var(--t2); margin-bottom: 1.5rem; }
.single-head { margin-bottom: 1.5rem; }
.single-head h1 { margin-bottom: 1rem; }
.single-author { display: flex; align-items: center; gap: .75rem; color: var(--t2); font-size: .9rem; }
.single-author img { width: 36px; height: 36px; border-radius: 50%; }
.single-content { font-size: 1.05rem; line-height: 1.8; }
.single-content h2 { margin: 2rem 0 1rem; }
.single-content p { margin-bottom: 1rem; }

/* Sidebar */
.sidebar { position: sticky; top: 90px; }
.sidebar-widget { background: #fff; border-radius: var(--r); padding: 1.25rem; margin-bottom: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.sidebar-widget h3 { font-size: .95rem; margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 2px solid var(--c); }
.sidebar-post { display: flex; gap: .75rem; padding: .5rem 0; border-bottom: 1px solid var(--br); }
.sidebar-post:last-child { border-bottom: none; }
.sidebar-post-thumb { width: 60px; height: 42px; border-radius: 4px; background-size: cover; flex-shrink: 0; }
.sidebar-post-title { font-size: .8rem; font-weight: 500; }
.sidebar-post-date { font-size: .7rem; color: #94a3b8; margin-top: 3px; }

/* ===== FOOTER ===== */
.site-footer { background: var(--bg3); color: #fff; padding: 3rem 0 1rem; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 2rem; margin-bottom: 2rem; }
.footer-brand p { color: rgba(255,255,255,.7); font-size: .9rem; margin: 1rem 0; }
.site-footer h4 { margin-bottom: 1rem; }
.footer-links a { display: block; color: rgba(255,255,255,.7); font-size: .9rem; padding: .25rem 0; }
.footer-links a:hover { color: #fff; }
.footer-bottom { padding-top: 1rem; border-top: 1px solid rgba(255,255,255,.1); text-align: center; color: rgba(255,255,255,.5); font-size: .85rem; }

/* ===== MODAL ===== */
.modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: all .2s; }
.modal.active { opacity: 1; visibility: visible; }
.modal-bg { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.modal-box { position: relative; background: #fff; border-radius: var(--r); padding: 2rem; width: 90%; max-width: 400px; }
.modal-close { position: absolute; top: 1rem; right: 1rem; font-size: 1.5rem; color: #94a3b8; }
.modal h2 { margin-bottom: 1.5rem; }
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: .5rem; }
.form-group input { width: 100%; padding: .75rem; border: 1px solid var(--br); border-radius: var(--r); }
.btn-block { width: 100%; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: .5rem; margin-top: 2rem; }
.pagination a, .pagination span { padding: .5rem 1rem; border: 1px solid var(--br); border-radius: var(--r); }
.pagination .current { background: var(--c); color: #fff; border-color: var(--c); }

/* ===== TABLET ===== */
@media (max-width: 1024px) {
    .single-grid { grid-template-columns: 1fr; }
    .sidebar { position: static; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
    :root { --hh: 110px; }
    
    .header-row { height: 55px; justify-content: center; position: relative; }
    .nav-menu, .header-btns { display: none; }
    .mobile-toggle { display: flex; position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); }
    .logo-vip { font-size: .5rem; padding: 1px 4px; }
    .mobile-btns { display: flex; }
    
    main { margin-top: var(--hh); }
    
    .hero { min-height: auto; padding: 2rem 0; }
    .hero-stats { flex-wrap: wrap; gap: 1rem; }
    .stat { flex: 1 1 45%; }
    .footer-grid { grid-template-columns: 1fr; }
}

@media print { .site-header, .site-footer, .sidebar { display: none; } }
