/* ================================================================
   PARIPESA KENYA — Mtindo Mkuu wa Tovuti
   Rangi ya Chapa: Bluu Mkali #0500FF | Dhahabu #FFD700
   Nchi: Kenya | Lugha: Kiswahili
   ================================================================ */

/* ---- Reset & Misingi ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; overflow-x: hidden; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  background: #020018;
  color: #ffffff;
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: all .3s ease; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: transparent; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ---- Accessibility: Skip Navigation ---- */
.skip-nav {
  position: absolute; top: -100px; left: 16px; z-index: 9999;
  background: var(--accent); color: #0A0010; font-weight: 700; font-size: .9rem;
  padding: 10px 20px; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none; transition: top .2s ease;
}
.skip-nav:focus { top: 0; }

/* ---- Accessibility: Focus Visible ---- */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: none;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(5,0,255,.2) !important;
}

/* ---- Accessibility: Active nav aria-current ---- */
.header-nav a[aria-current="page"] { color: var(--text); background: rgba(5,0,255,.18); }

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

/* ---- Vigeuzi vya CSS ---- */
:root {
  --primary:       #0500FF;
  --primary-dark:  #0300B0;
  --primary-light: #2E2AFF;
  --accent:        #FFD700;
  --accent-dark:   #E6C000;
  --dark:          #020018;
  --darker:        #010010;
  --card-bg:       rgba(5, 0, 80, 0.55);
  --card-solid:    #08004A;
  --border:        rgba(5, 0, 255, 0.35);
  --border-light:  rgba(255,255,255,0.07);
  --text:          #FFFFFF;
  --text-muted:    #A5A3CC;
  --text-dim:      #5E5C8A;
  --success:       #00C853;
  --warning:       #FF9800;
  --danger:        #F44336;
  --shadow:        0 4px 24px rgba(5,0,255,.22);
  --shadow-hover:  0 10px 40px rgba(5,0,255,.42);
  --radius:        14px;
  --radius-sm:     8px;
  --radius-lg:     24px;
  --transition:    all .3s cubic-bezier(.4,0,.2,1);
}

/* ---- Taypografia ---- */
h1 { font-size: clamp(1.8rem, 4.5vw, 3rem); font-weight: 800; line-height: 1.2; }
h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); font-weight: 700; line-height: 1.3; }
h3 { font-size: clamp(1.05rem, 2vw, 1.45rem); font-weight: 600; line-height: 1.4; }
h4 { font-size: 1.05rem; font-weight: 600; }
p  { margin-bottom: 1rem; color: var(--text-muted); font-size: .97rem; }
strong { color: var(--text); font-weight: 600; }

/* ---- Chombo ---- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ================================================================
   KICHWA CHA UKURASA (HEADER)
   ================================================================ */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: rgba(2,0,24,.96);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 68px; gap: 12px;
}
.header-logo { display: flex; align-items: center; flex-shrink: 0; }
.header-logo img { height: 38px; width: auto; }

.header-nav { display: flex; align-items: center; gap: 2px; flex: 1; justify-content: center; }
.header-nav a {
  padding: 7px 13px; border-radius: var(--radius-sm);
  font-size: .88rem; font-weight: 500; color: var(--text-muted);
  transition: var(--transition); white-space: nowrap;
}
.header-nav a:hover, .header-nav a.active {
  color: var(--text); background: rgba(5,0,255,.18);
}

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.btn-login {
  padding: 8px 18px; border-radius: var(--radius-sm);
  font-size: .88rem; font-weight: 600; color: var(--text);
  border: 1.5px solid var(--border); transition: var(--transition);
  display: inline-flex; align-items: center;
}
.btn-login:hover { border-color: var(--primary); background: rgba(5,0,255,.12); }
.btn-register {
  padding: 8px 20px; border-radius: var(--radius-sm);
  font-size: .88rem; font-weight: 700; color: #0A0010;
  background: var(--accent); transition: var(--transition);
  display: inline-flex; align-items: center; gap: 5px;
}
.btn-register:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255,215,0,.4);
}

/* ---- Hamburger ---- */
.hamburger {
  display: none; flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; padding: 10px; min-width: 44px; min-height: 44px;
  background: transparent; border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; -webkit-tap-highlight-color: rgba(255,255,255,.1);
  position: relative; z-index: 1002;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition); pointer-events: none; }
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ---- Menyu ya Simu ---- */
.mobile-menu {
  display: none; position: fixed; top: 68px; left: 0; right: 0;
  width: 100vw; height: calc(100vh - 68px); max-height: calc(100vh - 68px);
  background: rgba(2,0,24,.98); backdrop-filter: blur(24px);
  z-index: 1001; padding: 20px; overflow-y: auto;
  flex-direction: column; gap: 8px;
  box-sizing: border-box;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  padding: 13px 16px; border-radius: var(--radius-sm);
  font-size: .97rem; font-weight: 500; color: var(--text-muted);
  border: 1px solid var(--border-light); transition: var(--transition);
  display: flex; align-items: center; gap: 10px;
}
.mobile-menu a:hover { color: var(--text); border-color: var(--primary); background: rgba(5,0,255,.1); }
.mobile-ctas { display: flex; gap: 10px; margin-top: 12px; }
.mobile-ctas .btn-login, .mobile-ctas .btn-register { flex: 1; justify-content: center; padding: 13px 16px; font-size: .97rem; }

/* ================================================================
   CHINI YA UKURASA (FOOTER)
   ================================================================ */
.site-footer { background: #010012; border-top: 1px solid var(--border); padding: 56px 0 0; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-brand img { height: 40px; margin-bottom: 14px; }
.footer-brand p { font-size: .88rem; line-height: 1.75; max-width: 270px; }
.footer-col h4 {
  font-size: .8rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: var(--accent); margin-bottom: 14px;
}
.footer-col ul li { margin-bottom: 9px; }
.footer-col ul li a { font-size: .88rem; color: var(--text-muted); transition: var(--transition); }
.footer-col ul li a:hover { color: var(--text); padding-left: 4px; }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.social-icon {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border); display: flex; align-items: center; justify-content: center;
  font-size: .9rem; color: var(--text-muted); transition: var(--transition);
}
.social-icon:hover { border-color: var(--primary); color: var(--text); background: rgba(5,0,255,.15); }
.footer-bottom {
  border-top: 1px solid var(--border-light); padding: 22px 0;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
}
.footer-bottom p { font-size: .78rem; color: var(--text-dim); margin: 0; }
.footer-badges { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.badge-18 { background: var(--danger); color: #fff; font-size: .72rem; font-weight: 700; padding: 4px 9px; border-radius: 6px; }
.badge-license { background: var(--card-solid); color: var(--text-muted); font-size: .72rem; padding: 4px 9px; border-radius: 6px; border: 1px solid var(--border-light); }

/* ================================================================
   VIFUNGO (BUTTONS)
   ================================================================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius-sm);
  font-weight: 700; font-size: 1rem; transition: var(--transition);
  cursor: pointer; border: none; text-decoration: none; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-accent { background: var(--accent); color: #0A0010; }
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(255,215,0,.32); }
.btn-outline { background: transparent; color: var(--text); border: 2px solid var(--border); }
.btn-outline:hover { border-color: var(--primary); background: rgba(5,0,255,.1); }
.btn-lg { padding: 15px 38px; font-size: 1.08rem; border-radius: var(--radius); }
.btn-sm { padding: 7px 16px; font-size: .83rem; }
.btn-block { width: 100%; justify-content: center; }

/* ================================================================
   KADI (CARDS)
   ================================================================ */
.card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  transition: var(--transition); backdrop-filter: blur(10px);
}
.card:hover { border-color: var(--primary-light); box-shadow: var(--shadow); transform: translateY(-3px); }
.card-img { width: 100%; border-radius: var(--radius-sm); overflow: hidden; margin-bottom: 16px; }

/* ================================================================
   SEHEMU ZA KURASA (SECTIONS)
   ================================================================ */
.section { padding: 76px 0; }
.section-sm { padding: 48px 0; }
.section-header { text-align: center; margin-bottom: 46px; }
.section-tag {
  display: inline-block; background: rgba(5,0,255,.14);
  color: #7B78FF; border: 1px solid var(--border); border-radius: 100px;
  padding: 5px 16px; font-size: .78rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px;
}
.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2.4rem); font-weight: 800; margin-bottom: 14px;
  background: linear-gradient(135deg,#fff 0%,#A0A0FF 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.section-desc { font-size: 1.02rem; color: var(--text-muted); max-width: 580px; margin: 0 auto; }

/* ================================================================
   GRIDI (GRIDS)
   ================================================================ */
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 22px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap: 22px; }

/* ================================================================
   MEZA (TABLES)
   ================================================================ */
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border-radius: var(--radius); border: 1px solid var(--border);
}
.data-table { width: 100%; min-width: 560px; border-collapse: collapse; }
.data-table th {
  background: rgba(5,0,255,.2); padding: 13px 16px;
  text-align: left; font-size: .8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; color: var(--accent); white-space: nowrap;
}
.data-table td {
  padding: 13px 16px; border-bottom: 1px solid var(--border-light);
  font-size: .88rem; color: var(--text-muted); white-space: nowrap;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(5,0,255,.06); color: var(--text); }
.data-table .hi  { color: var(--accent);  font-weight: 700; }
.data-table .gr  { color: var(--success); font-weight: 600; }
.data-table .rd  { color: var(--danger);  font-weight: 600; }
.data-table .bold { color: var(--text); font-weight: 600; }

/* ================================================================
   CHATI (CHARTS)
   ================================================================ */
.chart-box {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
}
.chart-title {
  font-size: .97rem; font-weight: 700; margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
}
.chart-title::before {
  content: ''; display: block; width: 4px; height: 20px;
  background: linear-gradient(180deg,var(--primary),var(--accent)); border-radius: 2px;
}

/* ================================================================
   HERO SEHEMU
   ================================================================ */
.hero {
  padding-top: 108px; padding-bottom: 60px; position: relative;
  overflow: hidden; min-height: 520px; display: flex; align-items: center;
}
.hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse at 15% 60%, rgba(5,0,255,.35) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 10%, rgba(255,215,0,.1) 0%, transparent 45%),
    linear-gradient(180deg, #020018 0%, #010012 100%);
}
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
.hero-content { position: relative; z-index: 1; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(255,215,0,.1); border: 1px solid rgba(255,215,0,.28);
  border-radius: 100px; padding: 5px 14px;
  font-size: .78rem; font-weight: 700; color: var(--accent);
  margin-bottom: 18px; text-transform: uppercase; letter-spacing: .06em;
}
.hero h1 { margin-bottom: 18px; }
.hero h1 .gold { color: var(--accent); }
.hero > .container > .hero-content > p,
.hero-content > p { font-size: 1.07rem; color: var(--text-muted); margin-bottom: 30px; max-width: 520px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-stats { display: flex; gap: 28px; margin-top: 42px; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid var(--border-light); }
.stat-item { display: flex; flex-direction: column; gap: 3px; }
.stat-val { font-size: 1.75rem; font-weight: 800; color: var(--accent); line-height: 1; }
.stat-lbl { font-size: .75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }

/* ---- Hero Picha ---- */
.hero-img-wrap { position: relative; z-index: 1; }
.hero-img-wrap svg, .hero-img-wrap img { width: 100%; border-radius: var(--radius-lg); box-shadow: var(--shadow-hover); }

/* ================================================================
   KIPANDE CHA MKONDO WA HABARI (ODDS TICKER)
   ================================================================ */
.odds-ticker {
  background: rgba(5,0,255,.18); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: 10px 0; overflow: hidden; position: relative;
}
.ticker-inner { display: flex; gap: 32px; animation: ticker 30s linear infinite; width: max-content; }
.ticker-item { display: flex; align-items: center; gap: 8px; font-size: .82rem; white-space: nowrap; color: var(--text-muted); }
.ticker-item .tm { color: var(--text); font-weight: 600; }
.ticker-item .od { color: var(--accent); font-weight: 700; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ================================================================
   VIASHIRIA (BADGES / ICONS)
   ================================================================ */
.live-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: .75rem; font-weight: 700; color: var(--danger); text-transform: uppercase; letter-spacing: .08em;
}
.live-dot { width: 7px; height: 7px; background: var(--danger); border-radius: 50%; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100% { opacity:1; transform:scale(1); } 50% { opacity:.4; transform:scale(1.5); } }

.odds-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(5,0,255,.18); border: 1px solid var(--primary);
  border-radius: 7px; padding: 4px 12px; min-width: 48px;
  font-size: .88rem; font-weight: 700; color: var(--accent);
  cursor: pointer; transition: var(--transition);
}
.odds-btn:hover { background: var(--primary); color: #fff; }

/* ================================================================
   NJIA YA MKATE (BREADCRUMB)
   ================================================================ */
.breadcrumb { display: flex; align-items: center; gap: 7px; font-size: .82rem; color: var(--text-dim); margin-bottom: 18px; flex-wrap: wrap; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .sep { opacity: .5; }
.breadcrumb .cur { color: var(--text); }

/* ================================================================
   ONYO / ARIFA (ALERTS)
   ================================================================ */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); border: 1px solid; margin-bottom: 14px; font-size: .88rem; }
.alert-warn { background: rgba(255,152,0,.1); border-color: rgba(255,152,0,.28); color: #FFB74D; }
.alert-info { background: rgba(5,0,255,.09); border-color: var(--border); color: var(--text-muted); }
.alert-success { background: rgba(0,200,83,.08); border-color: rgba(0,200,83,.25); color: #69F0AE; }

/* ================================================================
   KICHWA CHA UKURASA WA NDANI (PAGE HERO)
   ================================================================ */
.page-hero {
  padding-top: 108px; padding-bottom: 44px; position: relative; overflow: hidden;
}
.page-hero::before {
  content: ''; position: absolute; inset: 0; z-index: 0;
  background: radial-gradient(ellipse at 20% 80%, rgba(5,0,255,.25) 0%, transparent 60%);
  pointer-events: none;
}
.page-hero.has-photo::before { display: none; }
.page-hero[style*="url("]::before { display: none; }
.page-hero .container { position: relative; z-index: 1; }
.page-hero h1 { margin-bottom: 12px; }
.page-hero .lead { font-size: 1.05rem; max-width: 650px; margin-bottom: 0; }

/* ================================================================
   MSTARI WA MGAWANYO (DIVIDER)
   ================================================================ */
.divider { height: 1px; background: linear-gradient(90deg,transparent,var(--border),transparent); margin: 56px 0; }

/* ================================================================
   MAELEZO YA MWANDISHI (AUTHOR BOX)
   ================================================================ */
.author-box {
  display: flex; align-items: center; gap: 18px;
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 22px; margin-top: 32px;
}
.author-box img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--primary); flex-shrink: 0; }
.author-box-info .name { font-weight: 700; color: var(--text); font-size: .97rem; }
.author-box-info .role { font-size: .82rem; color: var(--text-muted); }
.author-box-info .date { font-size: .78rem; color: var(--text-dim); margin-top: 4px; }

/* ================================================================
   TOFAUTI (MISC UTILITY)
   ================================================================ */
.text-center { text-align: center; }
.text-accent  { color: var(--accent); }
.text-primary { color: var(--primary-light); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-muted   { color: var(--text-muted); }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.mt-8  { margin-top: 8px;  }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8  { margin-bottom: 8px;  }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.gap-8  { gap: 8px;  }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.flex        { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.w-full { width: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ================================================================
   KUJIBU KWA SIMU (MOBILE RESPONSIVE)
   ================================================================ */
@media (max-width: 1024px) {
  .grid-4  { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-img-wrap { display: none; }
}

@media (max-width: 768px) {
  .header-nav { display: none; }
  .hamburger  { display: flex; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2,1fr); gap: 14px; }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; padding-bottom: 20px; }
  .footer-brand { display: none; }
  .hero { min-height: auto; padding-top: 96px; padding-bottom: 40px; }
  .hero-stats { gap: 16px; }
  .section { padding: 48px 0; }
  .table-wrap { margin-left: -20px; margin-right: -20px; border-radius: 0; border-left: none; border-right: none; }
  .page-hero { padding-top: 96px; padding-bottom: 32px; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.75rem; }
  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { width: 100%; justify-content: center; }
  .header-actions .btn-login { display: none; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .section-title { font-size: 1.4rem; }
}

/* ================================================================
   MOBILE RESPONSIVE FIXES — comprehensive overrides
   ================================================================ */

/* Global overflow safety */
html, body { overflow-x: hidden; max-width: 100%; }
img, picture, video, canvas, svg { max-width: 100%; height: auto; }
.container { box-sizing: border-box; }
.grid-2 > *, .grid-3 > *, .grid-4 > *, .grid-auto > * { min-width: 0; }

/* Tablet & below */
@media (max-width: 1024px) {
  /* Force inline-styled grids with hardcoded columns to stack */
  [style*="grid-template-columns:1fr 1fr"],
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 380px"],
  [style*="grid-template-columns: 1fr 380px"],
  [style*="grid-template-columns:1fr 420px"],
  [style*="grid-template-columns: 1fr 420px"],
  [style*="grid-template-columns:2fr 1fr"],
  [style*="grid-template-columns: 2fr 1fr"],
  [style*="grid-template-columns:1fr 1.2fr"],
  [style*="grid-template-columns: 1fr 1.2fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* Phone */
@media (max-width: 768px) {
  /* Container padding */
  .container { padding: 0 14px; }

  /* Force ALL multi-column inline grids to stack on phones */
  [style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  /* But keep 4-col grids as 2 cols (looks better than 1 col for small cards) */
  [style*="repeat(4,1fr)"],
  [style*="repeat(4, 1fr)"],
  [style*="repeat(4,minmax"],
  [style*="grid-template-columns:repeat(4"],
  [style*="grid-template-columns: repeat(4"] { grid-template-columns: repeat(2,1fr) !important; }

  /* Re-enable hero image on mobile (was hidden at 1024) */
  .hero-img-wrap { display: block !important; max-width: 100%; }
  .hero-img-wrap img { width: 100%; height: auto; border-radius: 12px; }

  /* Hero typography & spacing */
  .hero h1 { font-size: clamp(1.6rem, 6vw, 2.2rem) !important; line-height: 1.18; }
  .hero-content > p, .hero p.lead { font-size: .95rem; }
  .page-hero h1 { font-size: clamp(1.5rem, 5.5vw, 2rem) !important; line-height: 1.2; }
  .page-hero .lead { font-size: .92rem; }

  /* Hero stats — wrap & shrink */
  .hero-stats, .stats-row { gap: 10px !important; flex-wrap: wrap !important; }
  .hero-stats > *, .stats-row > * { flex: 1 1 calc(50% - 10px) !important; min-width: 0; }

  /* Section headings */
  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.4rem; }
  h3 { font-size: 1.2rem; }

  /* Cards inner overflow protection */
  .card, .game-card, .stat-card, .pay-method-card, .feature-card { min-width: 0; }
  .card *, .game-card *, .stat-card * { max-width: 100%; word-wrap: break-word; }

  /* Tables — wrap forces horizontal scroll */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table { font-size: .82rem; }
  .data-table th, .data-table td { padding: 8px 10px; }

  /* Charts/diagrams — limit height and force responsive */
  .chart-wrap, .chart-box, canvas { max-width: 100% !important; height: auto !important; }
  .chart-wrap { padding: 14px !important; }
  .chart-wrap canvas { max-height: 280px !important; }

  /* Big numbers in inline styles — shrink */
  [style*="font-size:1.6rem"], [style*="font-size: 1.6rem"],
  [style*="font-size:1.8rem"], [style*="font-size: 1.8rem"],
  [style*="font-size:2rem"], [style*="font-size: 2rem"] {
    font-size: 1.3rem !important;
  }
  [style*="font-size:2.6rem"], [style*="font-size: 2.6rem"],
  [style*="font-size:3rem"], [style*="font-size: 3rem"] {
    font-size: 1.8rem !important;
  }

  /* Buttons that look like CTAs on hero - full width */
  .hero-ctas, .hero-btns { flex-direction: column !important; gap: 10px !important; }
  .hero-ctas > *, .hero-btns > * { width: 100% !important; justify-content: center !important; }

  /* Page hero text-align: keep left, but tighter */
  .page-hero .container { padding-top: 8px; padding-bottom: 8px; }

  /* Fixed-width inline flex with side stats */
  [style*="display:flex"][style*="gap:20px"][style*="flex-wrap"] > [style*="width:1px"],
  [style*="display:flex"][style*="gap:24px"] > [style*="width:1px"] {
    display: none !important;
  }
}

/* Small phones */
@media (max-width: 480px) {
  .container { padding: 0 12px; }
  .grid-4 { gap: 10px; }
  .hero { padding: 64px 0 28px !important; }
  .page-hero { padding-top: 80px !important; padding-bottom: 24px !important; }
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  .data-table { font-size: .76rem; }
  .data-table th, .data-table td { padding: 7px 8px; }
  /* Force ALL 2-col inline grids to stack */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
  /* Cards padding tighter */
  .card, .game-card, .stat-card, .pay-method-card { padding: 16px !important; }
}

/* ================================================================
   LADHA ZA UKURASA (PAGE ACCENTS)
   ================================================================ */
.accent-sports      { --page-accent: #00C853; }
.accent-casino      { --page-accent: #AA00FF; }
.accent-bonuses     { --page-accent: #FFD700; }
.accent-live        { --page-accent: #F44336; }
.accent-tournaments { --page-accent: #FF9800; }
.accent-blog        { --page-accent: #00B0FF; }
.accent-payment     { --page-accent: #00C853; }
.accent-app         { --page-accent: #40C4FF; }
