/*
Theme Name: Rong Bach Kim 247 v4
Theme URI: https://rongbachkim247.live/
Author: Antigravity AI
Author URI: https://google.com
Description: Giao diện WordPress tự thiết kế (custom-coded), siêu nhẹ, tải nhanh, tối ưu hóa di động và SEO dành riêng cho rongbachkim247.live.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rongbachkim247
*/

/* ==========================================
   DESIGN SYSTEM & VARIABLES
   ========================================== */
:root {
  --primary-red: #d32f2f;
  --secondary-red: #b71c1c;
  --primary-gold: #ffd700;
  --bg-blue: #0f4c81;
  --bg-light-blue: #e8f1f5;
  --text-dark: #2d3748;
  --text-gray: #718096;
  --text-white: #ffffff;
  --bg-body: #f7fafc;
  --bg-card: #ffffff;
  --border-color: #e2e8f0;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --transition-fast: all 0.2s ease;
  --border-radius: 8px;
}

/* ==========================================
   RESET & CORE STYLES
   ========================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-dark);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--primary-red);
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================
   LAYOUT STRUCTURE
   ========================================== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.layout-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
  padding: 20px 0;
}

.main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

/* 3-column layout on desktop */
@media (min-width: 1200px) {
  .main-grid {
    grid-template-columns: 200px 1fr 300px;
  }
}

/* ==========================================
   CARD SYSTEM
   ========================================== */
.card {
  background-color: var(--bg-card);
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
  margin-bottom: 20px;
  overflow: hidden;
}

.card-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header-blue {
  background-color: var(--bg-blue);
  color: var(--text-white);
}

.card-header-red {
  background-color: var(--primary-red);
  color: var(--text-white);
}

.card-title {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-body {
  padding: 16px;
}

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */
.top-bar {
  background-color: var(--text-white);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
  font-size: 13px;
  color: var(--text-gray);
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.branding-section {
  background-color: var(--text-white);
  padding: 15px 0;
}

.branding-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo img {
  height: 50px;
  width: auto;
}

.menu-toggle-btn {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--bg-blue);
  cursor: pointer;
  display: none;
}

.main-nav {
  background-color: var(--bg-blue);
  color: var(--text-white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-menu {
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: 14px 20px;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
}

.nav-link:hover, .nav-item.active .nav-link {
  background-color: var(--secondary-red);
  color: var(--text-white);
}

/* Dropdown Menu */
.sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--text-white);
  color: var(--text-dark);
  min-width: 200px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  border-radius: 0 0 4px 4px;
  z-index: 1000;
}

.sub-menu .nav-link {
  color: var(--text-dark);
  padding: 10px 16px;
  text-transform: none;
  font-weight: normal;
  border-bottom: 1px solid var(--border-color);
}

.sub-menu .nav-link:hover {
  background-color: var(--bg-light-blue);
  color: var(--bg-blue);
}

.nav-item:hover .sub-menu {
  display: block;
}

/* ==========================================
   FOOTER
   ========================================== */
footer {
  background-color: #1a202c;
  color: #a0aec0;
  padding: 40px 0 20px;
  font-size: 14px;
  border-top: 4px solid var(--primary-red);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-bottom: 30px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-col h4 {
  color: var(--text-white);
  margin-bottom: 20px;
  font-size: 16px;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 8px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--primary-red);
}

.footer-col p {
  margin-bottom: 15px;
  line-height: 1.7;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a:hover {
  color: var(--text-white);
  padding-left: 5px;
}

.footer-bottom {
  border-top: 1px solid #2d3748;
  padding-top: 20px;
  text-align: center;
  font-size: 13px;
}

/* ==========================================
   SIDEBARS
   ========================================== */
.aside-list li {
  border-bottom: 1px solid var(--border-color);
}

.aside-list li:last-child {
  border-bottom: none;
}

.aside-list a {
  display: block;
  padding: 10px 15px;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.aside-list a:hover {
  background-color: var(--bg-light-blue);
  color: var(--bg-blue);
}

.vip-badge {
  background-color: var(--primary-red);
  color: var(--text-white);
  font-size: 10px;
  font-weight: bold;
  padding: 2px 5px;
  border-radius: 3px;
  text-transform: uppercase;
}

/* ==========================================
   LOTTERY TABLES (XSMB / XSMT / XSMN)
   ========================================== */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.table-result {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 15px;
}

.table-result th, .table-result td {
  border: 1px solid var(--border-color);
  padding: 10px;
  text-align: center;
}

.table-result tr:hover {
  background-color: #fcfcfc;
}

.table-result td:first-child {
  font-weight: 700;
  color: var(--text-gray);
  width: 50px;
  background-color: #f7fafc;
}

.text-number {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 1px;
}

.table-result tr:nth-child(2) .text-number { /* Special prize (Giải ĐB) */
  color: var(--primary-red);
  font-size: 22px;
}

.loto-table {
  width: 100%;
  border-collapse: collapse;
}

.loto-table th, .loto-table td {
  border: 1px solid var(--border-color);
  padding: 8px;
  text-align: center;
}

.loto-table th {
  background-color: var(--bg-light-blue);
  color: var(--bg-blue);
  font-weight: 700;
}

.loto-table td:first-child, .loto-table td:nth-child(3) {
  font-weight: 700;
  color: var(--primary-red);
  width: 45px;
  background-color: #f7fafc;
}

/* ==========================================
   PREDICTION TABLES & STYLES
   ========================================== */
.predict-table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
}

.predict-table td {
  border: 1px solid var(--border-color);
  padding: 12px;
  font-weight: 700;
}

.predict-table td:first-child {
  color: var(--text-dark);
  background-color: #f7fafc;
  width: 50%;
}

.predict-table td:last-child {
  color: var(--primary-red);
  font-size: 18px;
}

/* ==========================================
   RESPONSIVE DESIGN OVERRIDES
   ========================================== */
@media (max-width: 1199px) {
  .logo img {
    height: 40px;
  }
  
  .menu-toggle-btn {
    display: block;
  }
  
  .nav-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--bg-blue);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  }
  
  .nav-menu.show {
    display: flex;
  }
  
  .nav-item {
    width: 100%;
  }
  
  .nav-link {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  
  .sub-menu {
    position: static;
    display: none;
    background-color: rgba(255,255,255,0.05);
    box-shadow: none;
    width: 100%;
  }
  
  .sub-menu .nav-link {
    color: var(--text-white);
    padding-left: 40px;
    border-bottom: none;
  }
  
  .nav-item:hover .sub-menu {
    display: none; /* Disable hover dropdowns on mobile */
  }
  
  .nav-item.open .sub-menu {
    display: block; /* Toggle dropdown with JS on mobile */
  }
}
