/**
 * Rasad Sport (rasadvarzeshi.com) Level-1 Modernization Layer v2.2
 * Clean modern sports UI, dark sports header, crisp Vazirmatn typography
 */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --theme: #FF1744 !important;
  --theme-secondary: #00F2FE !important;
  --bg-dark: #0B0F19 !important;
  --card-dark: #131B2E !important;
  --border-dark: #1E293B !important;
  --container: transparent !important;
  --body-color: #F8FAFC !important;
  --font-family-sports: 'Vazirmatn', -apple-system, BlinkMacSystemFont, Tahoma, sans-serif !important;
}

body {
  font-family: var(--font-family-sports);
  background-color: #F8FAFC !important;
  color: #0F172A !important;
  -webkit-font-smoothing: antialiased;
}

/* ==================================================
   Header & Brand Identity (Dark Sports Bar)
================================================== */
#header.header,
#header .container,
#header .row,
#header .logo,
#header .header-top {
  background: #0B0F19 !important;
  border: 0 !important;
}

#header.header {
  border-bottom: 2px solid #FF1744 !important;
  padding: 14px 0 !important;
}

#header .logo {
  padding: 0 !important;
  display: flex;
  align-items: center;
}

#header .logo img {
  max-height: 54px !important;
  width: auto !important;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

/* ==================================================
   Navigation Bar & Date/Search Bar
================================================== */
.main-nav,
.main-nav .container,
.main-nav .row,
.site-navigation,
.site-nav-inner {
  background: #131B2E !important;
  border-color: #1E293B !important;
}

.main-nav > .container > .row {
  border-top: 0 !important;
  border-bottom: 1px solid #1E293B !important;
}

/* Menu Links */
ul.navbar-nav > li > a,
.site-navigation .navbar-nav > li > a {
  font-family: var(--font-family-sports) !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
  color: #F1F5F9 !important;
  padding: 14px 14px !important;
  line-height: 24px !important;
  transition: all 0.2s ease !important;
}

ul.navbar-nav > li > a:hover,
ul.navbar-nav > li.active > a,
.site-navigation .navbar-nav > li > a:hover,
.site-navigation .navbar-nav > li.active > a {
  color: #00F2FE !important;
  background: rgba(0, 242, 254, 0.1) !important;
  border-bottom: 2px solid #00F2FE !important;
}

/* Date and search box in navbar */
.ts-date,
.ts-date i,
ul.top-info-box > li.nav-search i,
.top-info-box {
  color: #94A3B8 !important;
  font-family: var(--font-family-sports) !important;
  font-size: 13px !important;
}

/* ==================================================
   Content Containers & Sports Cards (Bento)
================================================== */
.container {
  background: transparent !important;
}

.block-wrapper {
  background: #F8FAFC !important;
  padding: 20px 0;
}

/* Hide empty ad widgets that don't have active banners */
.widget.noprint:not(:has(img)):not(:has(a)):not(:has(iframe)) {
  display: none !important;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  box-shadow: none !important;
}

.post-block-style,
.featured-tab.widget,
.news-card {
  background: #FFFFFF !important;
  border-radius: 12px !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04) !important;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  padding: 12px;
  margin-bottom: 18px;
}

.post-block-style:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08) !important;
  border-color: #CBD5E1 !important;
}

/* Post Titles & Sports Headlines */
.post-title,
h1.post-title,
.post-title a {
  font-family: var(--font-family-sports) !important;
  font-weight: 800 !important;
  line-height: 1.55 !important;
  color: #0F172A !important;
  letter-spacing: -0.3px;
}

.post-title a:hover {
  color: #FF1744 !important;
}

.block-title {
  border-bottom: 2px solid #FF1744 !important;
  padding-bottom: 8px !important;
  margin-bottom: 18px !important;
  font-family: var(--font-family-sports) !important;
  font-size: 16px !important;
  font-weight: 900 !important;
}

.block-title > span {
  background: #FF1744 !important;
  border-radius: 6px 6px 0 0;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  letter-spacing: 0.2px;
}

/* Post Thumbnails */
.post-thumb {
  border-radius: 10px !important;
  overflow: hidden !important;
}

.post-thumb img {
  border-radius: 10px !important;
  transition: transform 0.35s ease !important;
}

.post-block-style:hover .post-thumb img {
  transform: scale(1.04) !important;
}

/* Post Excerpt */
.post-content p {
  color: #475569 !important;
  font-size: 13.5px !important;
  line-height: 1.7 !important;
  margin-top: 8px !important;
}

/* ==================================================
   Footer Modernization
================================================== */
#footer,
.footer,
.footer-info {
  background: #0B0F19 !important;
  color: #94A3B8 !important;
  border-top: 3px solid #FF1744 !important;
}

.footer a {
  color: #CBD5E1 !important;
}

.footer a:hover {
  color: #00F2FE !important;
}

.copyright {
  background: #060911 !important;
  color: #64748B !important;
  border-top: 1px solid #1E293B !important;
}


/* ==================================================
   Layout Density & Container Expansion (No Empty Space)
================================================== */
.container {
  max-width: 1300px !important;
  width: 96% !important;
  padding-left: 10px !important;
  padding-right: 10px !important;
}

.block-wrapper {
  padding: 12px 0 30px !important;
}

/* ==================================================
   Live Match Center & Fixtures Bar
================================================== */
.rasad-match-bar-wrapper {
  background: #0B0F19;
  border-radius: 12px;
  border: 1px solid #1E293B;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  margin-bottom: 20px;
  padding: 14px 16px;
  overflow: hidden;
}

.match-bar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}

.match-bar-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.match-bar-heading {
  font-family: var(--font-family-sports);
  font-size: 14.5px;
  font-weight: 800;
  color: #F8FAFC;
}

.live-indicator-pulse {
  width: 9px;
  height: 9px;
  background-color: #FF1744;
  border-radius: 50%;
  box-shadow: 0 0 10px #FF1744;
  animation: pulseLive 1.5s infinite;
  display: inline-block;
}

@keyframes pulseLive {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 23, 68, 0.7); }
  70% { transform: scale(1.15); box-shadow: 0 0 0 7px rgba(255, 23, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 23, 68, 0); }
}

.match-bar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.match-bar-subtext {
  font-size: 11.5px;
  color: #64748B;
  display: inline-block;
}

.match-bar-arrows {
  display: inline-flex;
  gap: 6px;
}

.match-scroll-btn {
  background: #1E293B;
  border: 1px solid #334155;
  color: #CBD5E1;
  border-radius: 6px;
  width: 26px;
  height: 26px;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.match-scroll-btn:hover {
  background: #00F2FE;
  color: #0B0F19;
  border-color: #00F2FE;
}

.match-cards-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  padding-bottom: 6px;
  -webkit-overflow-scrolling: touch;
}

.match-cards-container::-webkit-scrollbar {
  height: 4px;
}

.match-cards-container::-webkit-scrollbar-thumb {
  background: #1E293B;
  border-radius: 4px;
}

.match-card {
  flex: 0 0 240px;
  scroll-snap-align: start;
  background: #131B2E;
  border: 1px solid #1E293B;
  border-radius: 10px;
  padding: 10px 12px;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.match-card:hover {
  border-color: #00F2FE;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 242, 254, 0.1);
}

.match-card.live-card {
  border-color: rgba(255, 23, 68, 0.4);
  background: linear-gradient(180deg, #18192E 0%, #131B2E 100%);
}

.match-card-league {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  margin-bottom: 8px;
}

.league-name {
  color: #94A3B8;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

.match-status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
}

.match-status-badge.is-live {
  background: rgba(255, 23, 68, 0.2);
  color: #FF1744;
  border: 1px solid rgba(255, 23, 68, 0.4);
}

.match-status-badge.is-upcoming {
  background: #1E293B;
  color: #38BDF8;
}

.match-status-badge.is-finished {
  background: #0F172A;
  color: #64748B;
}

.mini-pulse {
  display: inline-block;
  width: 5px;
  height: 5px;
  background-color: #FF1744;
  border-radius: 50%;
  margin-left: 3px;
}

.match-teams-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 6px 0 8px;
  gap: 6px;
}

.team-side {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  font-size: 12.5px;
  font-weight: 700;
  color: #F8FAFC;
}

.home-side {
  justify-content: space-between;
}

.away-side {
  justify-content: space-between;
  flex-direction: row-reverse;
}

.team-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 80px;
}

.mini-team-logo {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.team-score {
  font-family: var(--font-family-sports);
  font-size: 14px;
  font-weight: 900;
  color: #00F2FE;
  padding: 0 4px;
}

.match-vs-divider {
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.match-card-footer {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #64748B;
  border-top: 1px dashed rgba(255, 255, 255, 0.06);
  padding-top: 6px;
}

.match-time-tag {
  color: #94A3B8;
}

/* ==================================================
   League Standings Widget
================================================== */
.league-table-widget {
  background: #FFFFFF !important;
  border-radius: 12px !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04) !important;
  padding: 16px !important;
  margin-bottom: 20px !important;
}

.league-widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  border-bottom: 2px solid #FF1744;
  padding-bottom: 8px;
}

.league-title-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.league-trophy-icon {
  font-size: 16px;
}

.league-title {
  font-family: var(--font-family-sports) !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  color: #0F172A !important;
  margin: 0 !important;
}

.league-season-tag {
  font-size: 11px;
  background: #F1F5F9;
  padding: 2px 8px;
  border-radius: 10px;
  color: #475569;
  font-weight: 600;
}

.rasad-league-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.rasad-league-table thead th {
  background: #F8FAFC;
  color: #64748B;
  font-weight: 700;
  padding: 8px 6px;
  border-bottom: 1px solid #E2E8F0;
  text-align: center;
  font-size: 11.5px;
}

.rasad-league-table thead th.th-team {
  text-align: right;
  padding-right: 10px;
}

.rasad-league-table tbody tr {
  border-bottom: 1px solid #F1F5F9;
  transition: background 0.15s;
}

.rasad-league-table tbody tr:hover {
  background: #F8FAFC;
}

.rasad-league-table td {
  padding: 8px 6px;
  text-align: center;
  color: #1E293B;
  vertical-align: middle;
}

.rasad-league-table td.td-team {
  text-align: right;
  padding-right: 10px;
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 700;
}

.team-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.dot-red { background: #DC2626; }
.dot-yellow { background: #EAB308; }
.dot-blue { background: #2563EB; }
.dot-green { background: #16A34A; }
.dot-white { background: #64748B; }

.rank-badge {
  display: inline-block;
  width: 20px;
  height: 20px;
  line-height: 20px;
  text-align: center;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  background: #F1F5F9;
  color: #475569;
}

.rank-badge.rank-1 {
  background: #FEF08A;
  color: #854D0E;
}

.rank-badge.rank-2 {
  background: #E2E8F0;
  color: #334155;
}

.rank-badge.rank-3 {
  background: #FED7AA;
  color: #9A3412;
}

.td-pts strong {
  color: #0F172A;
  font-size: 13.5px;
}

.ltr-num {
  direction: ltr;
  display: inline-block;
}

.league-widget-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid #F1F5F9;
  font-size: 11px;
  color: #64748B;
}

.legend-box {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  margin-left: 2px;
}

.acl-elite { background: #16A34A; }
.acl-two { background: #EAB308; }

.full-table-link {
  color: #FF1744;
  font-weight: 700;
  text-decoration: none;
}

.full-table-link:hover {
  color: #B91C1C;
}

/* ==================================================
   Mobile Ergonomics & Responsive Tuning
================================================== */
@media (max-width: 768px) {
  .container {
    width: 100% !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  .block-wrapper {
    padding: 8px 0 20px !important;
  }

  .rasad-match-bar-wrapper {
    margin-bottom: 14px;
    padding: 10px 10px;
    border-radius: 8px;
  }

  .match-card {
    flex: 0 0 215px;
  }

  .match-bar-subtext {
    display: none;
  }

  .post-title.title-extra-large,
  h1.post-title {
    font-size: 18px !important;
    line-height: 28px !important;
  }

  .post-block-style,
  .featured-tab.widget,
  .league-table-widget {
    padding: 10px !important;
    margin-bottom: 12px !important;
    border-radius: 8px !important;
  }
}


/* Clean modern table border override */
.rasad-league-table th,
.rasad-league-table td {
  border: none !important;
  border-bottom: 1px solid #F1F5F9 !important;
}
.rasad-league-table {
  border: none !important;
}
