/*
Theme Name: Koora Live
Theme URI: https://example.com/koora-live
Author: Koora Live
Description: KoraHubs-style responsive football theme with English SEO metadata, localized match times, live status handling, and responsive football pages.
Version: 4.1.8
License: GPL-2.0-or-later
Text Domain: koora-live
Tags: rtl-language-support, sports, custom-post-types, translation-ready, one-column
*/

:root{
  --kl-primary:#9d0f16;
  --kl-primary-dark:#68070c;
  --kl-red:#d91523;
  --kl-red-soft:#f3dadd;
  --kl-navy:#0c1a2b;
  --kl-navy-2:#17283e;
  --kl-blue:#1674b8;
  --kl-bg:#f5f7fa;
  --kl-card:#fff;
  --kl-card-soft:#eef1f5;
  --kl-text:#17202b;
  --kl-muted:#727b87;
  --kl-border:#e1e5ea;
  --kl-radius:18px;
  --kl-shadow:0 5px 20px rgba(15,23,42,.08);
}
*{box-sizing:border-box}
html{direction:rtl;scroll-behavior:smooth}
body{
  margin:0;
  font-family:"Tajawal","Cairo","Segoe UI",Tahoma,sans-serif;
  background:var(--kl-bg);
  color:var(--kl-text);
  line-height:1.6;
}
body.kl-dark{--kl-bg:#07101c;--kl-card:#101c2a;--kl-card-soft:#172536;--kl-text:#f5f7fb;--kl-muted:#aeb8c5;--kl-border:#26384b;--kl-navy:#050d17}
a{color:inherit;text-decoration:none}
body.kl-ltr{direction:ltr}
body.kl-ltr .kl-brand-text small{margin-left:0;margin-right:4px}
img{max-width:100%;height:auto;display:block}

/* ===== KoraHubs header ===== */
.kl-header{
  position:relative;
  z-index:60;
  background:
    radial-gradient(circle at 50% 10%,rgba(255,255,255,.07),transparent 42%),
    linear-gradient(135deg,#7f070d 0%,#a30d15 48%,#74070d 100%);
  border-bottom:3px solid rgba(255,255,255,.12);
  box-shadow:0 5px 18px rgba(0,0,0,.12);
}
.kl-header-inner{
  width:min(1180px,calc(100% - 28px));
  min-height:108px;
  margin:0 auto;
  display:grid;
  grid-template-columns:76px 1fr auto;
  align-items:center;
  gap:20px;
  direction:ltr;
}
.kl-icon-btn{
  width:58px;height:58px;
  background:#243247;
  color:#fff;
  border:1px solid rgba(255,255,255,.12);
  border-radius:16px;
  display:flex;align-items:center;justify-content:center;
  cursor:pointer;
  box-shadow:0 5px 15px rgba(0,0,0,.18);
  transition:transform .18s ease,background .18s ease;
}
.kl-icon-btn:hover{transform:translateY(-2px);background:#304159}
.kl-menu-btn{justify-self:start}
.kl-theme-btn{font-size:31px;line-height:1}
.kl-hamburger{width:29px;display:flex;flex-direction:column;gap:6px}
.kl-hamburger i{display:block;height:3px;background:#fff;border-radius:4px}

.kl-brand{
  justify-self:center;
  display:flex;
  align-items:center;
  gap:8px;
  color:#fff;
  direction:ltr;
  min-width:0;
}
.kl-brand-ball{position:relative;width:76px;height:68px;display:block}
.kl-brand-soccer{
  position:absolute;z-index:2;
  left:16px;top:7px;
  font-size:51px;line-height:1;
  filter:drop-shadow(0 4px 3px rgba(0,0,0,.35));
}
.kl-brand-crown{
  position:absolute;z-index:3;
  left:26px;top:-13px;
  color:#ffd33d;font-size:30px;
  transform:rotate(-2deg);
}
.kl-brand-swoosh{
  position:absolute;
  left:0;top:39px;
  width:70px;height:13px;
  border-top:5px solid #fff;
  border-bottom:4px solid #ef1a2a;
  transform:skewX(-30deg) rotate(-10deg);
  opacity:.95;
}
.kl-brand-text{display:flex;align-items:baseline;gap:0;white-space:nowrap}
.kl-brand-text b{font-size:39px;line-height:1;font-style:italic;letter-spacing:-1.5px}
.kl-brand-text b span{color:#ff2635}
.kl-brand-text small{display:block;font-size:20px;font-weight:700;margin-left:4px;margin-top:24px}

.kl-header-actions{
  justify-self:end;
  display:flex;align-items:center;gap:12px;
  direction:ltr;
}
.kl-language{
  display:flex;align-items:center;gap:8px;
  padding:7px 12px;
  min-height:58px;
  border:1px solid rgba(255,255,255,.32);
  background:rgba(77,0,5,.2);
  border-radius:17px;
}
.kl-language-icon{font-size:27px;line-height:1;order:2}
.kl-language select{
  height:42px;
  border:0;
  border-radius:11px;
  background:transparent;
  color:#fff;
  padding:0 7px;
  min-width:110px;
  font:700 16px "Tajawal","Segoe UI",sans-serif;
  cursor:pointer;
  outline:none;
}
.kl-language select option{background:#fff;color:#222}
.screen-reader-text{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* Menu drawer */
.kl-menu{
  display:none;
  position:relative;
  z-index:55;
  background:var(--kl-card);
  border-bottom:1px solid var(--kl-border);
  padding:12px 16px;
  box-shadow:0 8px 20px rgba(0,0,0,.08);
}
.kl-menu.is-open{display:block}
.kl-menu ul{max-width:1180px;margin:0 auto;padding:0;list-style:none;display:flex;flex-wrap:wrap;gap:8px}
.kl-menu a{display:block;padding:9px 15px;border-radius:10px;background:var(--kl-card-soft);font-weight:700}

/* Live ticker */
.kl-live-ticker__item{gap:6px}}

/* Main */
.kl-container{width:min(1120px,calc(100% - 28px));margin:0 auto;padding:24px 0 70px}
.kl-tz{
  display:block;width:max-content;
  margin:0 12px -1px auto;
  padding:9px 18px;
  border:1px solid var(--kl-border);
  border-bottom:none;
  border-radius:14px 14px 0 0;
  font-size:14px;background:var(--kl-card);
  color:var(--kl-muted);position:relative;z-index:2;
}
.kl-panel{
  background:var(--kl-card-soft);
  border:1px solid var(--kl-border);
  border-radius:24px;
  padding:18px;
  box-shadow:var(--kl-shadow);
}
.kl-section-heading{display:flex;align-items:center;justify-content:center;gap:14px;margin-bottom:18px}
.kl-title{
  margin:0;
  background:linear-gradient(135deg,#9f0e15,#78080d);
  color:#fff;text-align:center;
  padding:15px 35px;
  border-radius:16px;
  font-size:25px;font-weight:900;
  box-shadow:0 5px 14px rgba(120,8,13,.2);
}
.kl-heading-ball{font-size:25px;opacity:.85}

/* Day tabs */
.kl-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:18px}
.kl-tab{
  text-align:center;padding:15px 8px;border-radius:15px;color:#fff;
  font-weight:900;font-size:16px;transition:.18s ease;
}
.kl-tab:hover{transform:translateY(-2px);filter:brightness(1.04)}
.kl-tab--yesterday{background:#2363a0}
.kl-tab--today{background:#9d0f16}
.kl-tab--tomorrow{background:#c76613}
.kl-tab.is-active{outline:4px solid rgba(157,15,22,.16);outline-offset:1px}

/* Match cards */
.kl-match{
  position:relative;
  background:var(--kl-card);
  border:1px solid var(--kl-border);
  border-radius:20px;
  margin-bottom:15px;
  box-shadow:var(--kl-shadow);
  overflow:hidden;
}
.kl-match-topline{
  display:flex;justify-content:space-between;gap:10px;
  padding:8px 15px;
  background:#f8f9fb;
  border-bottom:1px solid var(--kl-border);
  color:var(--kl-muted);
  font-size:12px;font-weight:700;
}
.kl-dark .kl-match-topline{background:#132233}
.kl-match-body{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;padding:20px 18px}
.kl-team{display:flex;flex-direction:column;align-items:center;gap:9px;text-align:center}
.kl-team img,.kl-team-logo{width:82px;height:82px;border-radius:50%;object-fit:contain;background:#fff;border:1px solid var(--kl-border);padding:5px}
.kl-team-name{font-weight:900;font-size:17px}
.kl-center{display:flex;flex-direction:column;align-items:center;gap:7px;min-width:125px}
.kl-score{font-size:30px;font-weight:950;letter-spacing:2px}
.kl-time{font-size:23px;font-weight:900}.kl-date{font-size:12px;font-weight:700;color:var(--kl-muted);margin-top:-2px}
.kl-js-hidden{display:none!important}.kl-status{background:#9d0f16;color:#fff;padding:6px 15px;border-radius:999px;font-size:12px;font-weight:900}
.kl-status--soon{background:#273548}.kl-status--ended{background:#64748b}
.kl-match-foot{display:flex;justify-content:space-between;align-items:center;padding:10px 16px;border-top:1px solid var(--kl-border);background:#fafbfc;font-size:13px;color:#4b5563;gap:10px;flex-wrap:wrap}
.kl-dark .kl-match-foot{background:#132131;color:#c6d0dc}
.kl-foot-item{display:flex;align-items:center;gap:6px}

/* Watch Now: normal flow button; never overlaps match footer/content. */
.kl-watch-btn{display:none;align-items:center;justify-content:center;width:calc(100% - 24px);min-height:48px;margin:0 12px 12px;padding:11px 18px;box-sizing:border-box;background:#e31827;color:#fff;border-radius:12px;box-shadow:0 8px 20px rgba(0,0,0,.22);font-size:17px;font-weight:900;line-height:1.2;cursor:pointer;text-decoration:none}
.kl-watch-btn.kl-watch-visible{display:flex}
.kl-watch-btn:hover,.kl-watch-btn:focus-visible{color:#fff;filter:brightness(.96);box-shadow:0 14px 34px rgba(227,24,39,.38),0 4px 12px rgba(0,0,0,.20)}
.kl-watch-btn::before{content:"●";font-size:10px;margin-left:7px}
@media(max-width:600px){.kl-watch-btn{width:calc(100% - 16px);margin-left:8px;margin-right:8px;margin-bottom:8px;font-size:14px;min-height:44px}}
/* Empty */
.kl-empty{text-align:center;padding:48px 20px;color:var(--kl-muted);background:var(--kl-card);border-radius:18px;border:1px solid var(--kl-border)}
.kl-empty p{margin:8px 0}

/* Latest posts */
.kl-posts{margin-top:25px}
.kl-posts-heading{
  background:linear-gradient(135deg,#9f0e15,#78080d);
  color:#fff;border-radius:16px;padding:15px 18px;margin-bottom:14px;text-align:center;
  box-shadow:0 5px 14px rgba(120,8,13,.15)
}
.kl-posts-heading h2{margin:0;font-size:23px;font-weight:900}
.kl-posts-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}
.kl-post-card{background:var(--kl-card);border-radius:18px;overflow:hidden;box-shadow:var(--kl-shadow);border:1px solid var(--kl-border);display:flex;flex-direction:column}
.kl-post-thumb{display:block;aspect-ratio:16/9;background:#e9edf2;overflow:hidden}
.kl-post-thumb img{width:100%;height:100%;object-fit:cover;transition:transform .3s ease}
.kl-post-card:hover .kl-post-thumb img{transform:scale(1.035)}
.kl-post-thumb--empty{display:flex;align-items:center;justify-content:center;font-size:46px}
.kl-post-content{padding:14px 15px 16px}
.kl-post-date{font-size:12px;color:var(--kl-muted);margin-bottom:4px}
.kl-post-content h3{font-size:18px;line-height:1.45;margin:0 0 7px;font-weight:900}
.kl-post-content p{font-size:13px;line-height:1.7;color:var(--kl-muted);margin:0 0 10px}
.kl-post-read{display:inline-block;background:#9d0f16;color:#fff;border-radius:10px;padding:8px 13px;font-size:13px;font-weight:800}

/* Single / pages / footer */
.kl-single{background:var(--kl-card);border:1px solid var(--kl-border);border-radius:20px;padding:22px;box-shadow:var(--kl-shadow)}
.kl-single h1{margin-top:0}
.kl-footer{background:#60070b;color:#fff;text-align:center;padding:22px;margin-top:20px;font-size:14px}
.kl-footer p{margin:0}

/* RTL/LTR support */
html[dir="ltr"] .kl-match-foot{direction:ltr}
html[dir="ltr"] .kl-tabs{direction:ltr}
html[dir="ltr"] .kl-header-inner{direction:ltr}
html[dir="ltr"] .kl-post-read{direction:ltr}

/* Responsive */
@media(max-width:850px){
  .kl-header-inner{min-height:92px;grid-template-columns:60px 1fr auto;gap:10px}
  .kl-icon-btn{width:50px;height:50px}
  .kl-brand-ball{width:56px;height:55px}
  .kl-brand-soccer{left:8px;top:7px;font-size:42px}
  .kl-brand-crown{left:17px;top:-10px;font-size:24px}
  .kl-brand-swoosh{left:-2px;top:35px;width:53px}
  .kl-brand-text b{font-size:30px}
  .kl-brand-text small{font-size:15px;margin-top:20px}
  .kl-language{min-height:50px}
  .kl-language select{min-width:85px;height:36px;font-size:14px}
}
@media(max-width:600px){
  .kl-header-inner{
    width:calc(100% - 16px);
    min-height:78px;
    grid-template-columns:48px 1fr auto;
    gap:5px;
  }
  .kl-icon-btn{width:46px;height:46px;border-radius:13px}
  .kl-theme-btn{font-size:27px}
  .kl-brand{gap:2px}
  .kl-brand-ball{width:43px;height:45px}
  .kl-brand-soccer{left:5px;top:5px;font-size:34px}
  .kl-brand-crown{left:12px;top:-7px;font-size:18px}
  .kl-brand-swoosh{top:29px;width:40px;height:8px;border-top-width:3px;border-bottom-width:3px}
  .kl-brand-text b{font-size:23px;letter-spacing:-1px}
  .kl-brand-text small{font-size:12px;margin-top:16px}
  .kl-header-actions{gap:5px}
  .kl-language{padding:3px 5px;min-height:46px;border-radius:12px}
  .kl-language-icon{font-size:19px}
  .kl-language select{min-width:70px;max-width:92px;height:34px;padding:0 3px;font-size:12px}
  .kl-container{width:calc(100% - 16px);padding-top:15px}
  .kl-panel{padding:11px;border-radius:18px}
  .kl-tz{font-size:12px;padding:7px 12px}
  .kl-section-heading{gap:7px;margin-bottom:12px}
  .kl-title{font-size:19px;padding:12px 18px;border-radius:13px}
  .kl-heading-ball{font-size:19px}
  .kl-tabs{gap:7px}
  .kl-tab{font-size:13px;padding:12px 4px;border-radius:12px}
  .kl-match-body{padding:16px 9px;gap:4px}
  .kl-team img,.kl-team-logo{width:62px;height:62px}
  .kl-team-name{font-size:13px;line-height:1.35}
  .kl-center{min-width:82px;gap:5px}
  .kl-score,.kl-time{font-size:19px}
  .kl-status{font-size:10px;padding:5px 9px}
  .kl-match-foot{font-size:11px;padding:8px 10px}
  .kl-posts-grid{grid-template-columns:1fr}
  .kl-posts-heading h2{font-size:20px}
}
@media(max-width:390px){
  .kl-brand-text b{font-size:20px}
  .kl-brand-text small{font-size:10px}
  .kl-language select{min-width:62px;font-size:11px}
  .kl-language-icon{font-size:17px}
  .kl-icon-btn{width:42px;height:42px}
}


/* Normal WordPress article pages: posts are NOT matches. */
.kl-normal-post{
    max-width:980px;
    margin:24px auto;
    background:#fff;
    border-radius:18px;
    padding:24px;
    box-sizing:border-box;
}
.kl-post-header h1{
    margin:8px 0 18px;
    line-height:1.35;
}
.kl-normal-post-thumb{
    margin:0 0 24px;
    text-align:center;
}
.kl-normal-post-thumb img{
    display:block;
    width:100%;
    max-height:560px;
    object-fit:cover;
    border-radius:14px;
}
.kl-normal-post-content{
    font-size:18px;
    line-height:1.9;
}
.kl-normal-post-content img{
    max-width:100%;
    height:auto;
}
.kl-normal-post-content iframe,
.kl-normal-post-content video{
    max-width:100%;
}
.kl-normal-post-footer{
    margin-top:28px;
    padding-top:18px;
    border-top:1px solid #e5e7eb;
}
.kl-post-categories{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
}
.kl-post-categories a{
    text-decoration:none;
    padding:6px 12px;
    border-radius:999px;
    background:#f1f5f9;
}
@media(max-width:600px){
    .kl-normal-post{padding:16px;margin:16px auto;border-radius:14px}
    .kl-normal-post-content{font-size:16px}
}

/* Match page centering fix: keep the scoreboard frame centered on all layouts. */
.single-match .kl-container, .single-match .kh-match-page { width:100%; max-width:1120px; margin-left:auto; margin-right:auto; box-sizing:border-box; }
@media(max-width:600px){ .single-match .kl-container{ width:100%; padding-left:14px; padding-right:14px; box-sizing:border-box; } .single-match .kh-match-page{ width:100%; } }
