/* Default (light theme) */
:root {
  --news-bg-color: var(--hs-bg-page, #f3f5f8);
  --news-item-odd: rgba(15, 23, 42, 0.02);
  --news-item-even: rgba(15, 23, 42, 0.055);
  --news-border-color: var(--hs-border-mid, rgba(15, 23, 42, 0.10));
  --news-hover-bg: var(--hs-bg-row-hover, #f2f5fa);
  --news-accent-color: var(--light-theme-link-color, rgb(0, 0, 203));
  --news-text-primary: var(--hs-text-1, #0e1726);
  --news-text-secondary: var(--hs-text-2, #475569);
  --news-card-bg: rgba(255, 255, 255, 0.96);
  --news-card-border: var(--hs-border-mid, rgba(15, 23, 42, 0.10));
  --news-shadow: rgba(15, 23, 42, 0.08);
  --news-glow: rgba(29, 78, 216, 0.08);
}

/* Dark theme override */
:root[data-bs-theme="dark"] {
  --news-bg-color: var(--hs-bg-page, #101722);
  --news-item-odd: rgba(255, 255, 255, 0.035);
  --news-item-even: rgba(255, 255, 255, 0.065);
  --news-border-color: var(--hs-border-mid, rgba(255, 255, 255, 0.09));
  --news-hover-bg: var(--hs-bg-row-hover, #1f2835);
  --news-accent-color: var(--dark-theme-link-color, #29C0EE);
  --news-text-primary: var(--hs-text-1, #eef2f8);
  --news-text-secondary: var(--hs-text-2, #a8b3c4);
  --news-card-bg: rgba(19, 26, 36, 0.96);
  --news-card-border: var(--hs-border-mid, rgba(255, 255, 255, 0.09));
  --news-shadow: rgba(0, 0, 0, 0.26);
  --news-glow: rgba(126, 187, 214, 0.10);
}

/* Section background */
.news-section {
  background: var(--news-bg-color);
  position: relative;
}

.news-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, var(--news-glow), transparent 58%);
  pointer-events: none;
  z-index: 0;
}

.news-section .container {
  position: relative;
  z-index: 1;
}

[data-bs-theme="dark"] .news-section {
  background: var(--news-bg-color);
}

[data-bs-theme="dark"] .news-section::before {
  background: radial-gradient(circle at top, var(--news-glow), transparent 58%);
}

/* Enhanced news container */
.news-card {
  background: var(--news-card-bg);
  border: 1px solid var(--news-card-border);
  backdrop-filter: blur(18px);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.news-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.news-card-glow {
  position: absolute;
  inset: 12% 6%;
  background: radial-gradient(circle, var(--news-glow) 0%, transparent 65%);
  filter: blur(32px);
  opacity: 0.85;
  pointer-events: none;
}

[data-bs-theme="dark"] .news-card {
  background: var(--news-card-bg);
  border-color: var(--news-card-border);
  box-shadow: 0 16px 38px var(--news-shadow);
}

[data-bs-theme="dark"] .news-card-glow {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.07) 0%, transparent 70%);
}


.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 60px var(--news-shadow);
}

/* Enhanced header styling */
.news-header {
  position: relative;
}

.news-header::after {
  content: '';
  position: absolute;
  bottom: -0.4rem;
  left: 0;
  width: 72px;
  height: 3px;
  background: linear-gradient(90deg, var(--news-accent-color), rgba(0, 123, 255, 0.25));
  border-radius: 2px;
}

[data-bs-theme="dark"] .news-header::after {
  background: linear-gradient(90deg, var(--news-accent-color), rgba(77, 171, 247, 0.25));
}

.news-header-icons {
  padding: 0.9rem 1.2rem;
  border-radius: 1.1rem;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.07);
}

[data-bs-theme="dark"] .news-header-icons {
  background: rgba(44, 47, 54, 0.6);
  border-color: rgba(166, 173, 187, 0.28);
}

[data-bs-theme="dark"] .news-header-text {
  color: var(--news-text-primary);
}

.news-football-icon {
  animation: spin-slow 8s linear infinite;
  font-size: 1.6rem;
  color: var(--news-accent-color);
}

.news-emoji {
  font-size: 1.8rem;
}

.news-title-text {
  font-weight: 600;
  font-size: 1.85rem;
  color: var(--news-text-primary);
  letter-spacing: 0.5px;
}

.news-subtitle {
  color: var(--news-text-secondary);
  font-size: 0.95rem;
  opacity: 0.85;
}

/* Enhanced news items */
.news-item {
  background-color: var(--news-item-odd);
  border: 1px solid transparent;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
}

.news-item::after {
  content: '';
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  opacity: 0;
  background: linear-gradient(135deg, rgba(0, 123, 255, 0.14), transparent 70%);
  transition: opacity 0.3s ease;
  pointer-events: none;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.news-item.even {
  background-color: var(--news-item-even);
}

.news-item:hover {
  background-color: var(--news-hover-bg);
  border-color: var(--news-border-color);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--news-shadow);
}

.news-item:hover::after {
  opacity: 1;
}

.news-item-border {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(135deg, var(--news-accent-color), rgba(0, 123, 255, 0.6));
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.news-item:hover .news-item-border {
  transform: scaleY(1);
}

/* Article thumbnails */
.news-image-link {
  display: block;
  width: 104px;
  height: 104px;
  max-width: 104px;
  max-height: 104px;
  padding: 4px;
  border-radius: 0.75rem;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff, #e2e8f0);
  border: 2px solid rgba(30, 64, 175, 0.34);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14), 0 0 0 3px rgba(148, 163, 184, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.news-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0.55rem;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.12);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.news-item:hover .news-image-link {
  border-color: var(--news-accent-color);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.18), 0 0 0 4px rgba(29, 78, 216, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
}

.news-item:hover .news-thumb {
  transform: scale(1.04);
}

[data-bs-theme="dark"] .news-image-link {
  background: linear-gradient(135deg, rgba(71, 85, 105, 0.98), rgba(15, 23, 42, 0.92));
  border-color: rgba(126, 187, 214, 0.58);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.34), 0 0 0 3px rgba(126, 187, 214, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

[data-bs-theme="dark"] .news-thumb {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

[data-bs-theme="dark"] .news-item:hover .news-image-link {
  border-color: var(--news-accent-color);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.42), 0 0 0 4px rgba(41, 192, 238, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

/* Enhanced icon styling */
.news-icon-container {
  position: relative;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-icon-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.news-item:hover .news-icon-wrapper {
  transform: scale(1.1);
}

.news-category-icon {
  font-size: 1.2rem;
  z-index: 2;
  position: relative;
}

.news-emoji-icon {
  font-size: 1.3rem;
  z-index: 2;
  position: relative;
}

.news-icon-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 50%;
  opacity: 0.1;
  transition: opacity 0.3s ease;
}

.news-item:hover .news-icon-bg {
  opacity: 0.28;
}

[data-bs-theme="dark"] .news-item {
  background-color: rgba(32, 35, 41, 0.78);
  border-color: rgba(166, 173, 187, 0.24);
}

[data-bs-theme="dark"] .news-item.even {
  background-color: rgba(29, 32, 38, 0.74);
}

[data-bs-theme="dark"] .news-item:hover {
  background-color: rgba(40, 43, 50, 0.94);
  border-color: rgba(201, 206, 216, 0.4);
  box-shadow: 0 18px 38px rgba(12, 14, 18, 0.45);
}

[data-bs-theme="dark"] .news-item::after {
  background: linear-gradient(135deg, rgba(201, 206, 216, 0.18), transparent 70%);
}

/* Category-specific backgrounds */
.transfer-bg { background: #007bff; }
.injury-bg { background: #dc3545; }
.match-bg { background: #28a745; }
.goal-bg { background: #ffc107; }
.bbc-bg { background: #17a2b8; }
.espn-bg { background: #dc3545; }
.sky-bg { background: #6c757d; }
.general-bg { background: #6f42c1; }
.football-bg { background: #28a745; }
.world-bg { background: #20c997; }
.trending-bg { background: #fd7e14; }
.announcement-bg { background: #e83e8c; }

/* Enhanced content styling */
.news-content {
  min-width: 0;
}

.news-title-link {
  font-size: 1.05rem;
  line-height: 1.4;
  transition: all 0.3s ease;
  display: block;
  word-break: break-word;
  color: var(--news-text-primary);
}

[data-bs-theme="dark"] .news-title-link {
  color: var(--news-text-primary);
}

.news-title-link:hover {
  color: var(--news-accent-color) !important;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

/* Enhanced meta information */
.news-meta {
  flex-wrap: wrap;
  gap: 0.6rem;
}

.news-summary {
  color: var(--news-text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
  opacity: 0.85;
}

[data-bs-theme="dark"] .news-summary {
  color: rgba(214, 218, 226, 0.78);
}

.news-date, .news-source {
  display: flex;
  align-items: center;
  font-size: 0.85rem;
  color: var(--news-text-secondary);
}

[data-bs-theme="dark"] .news-date,
[data-bs-theme="dark"] .news-source {
  color: rgba(180, 186, 198, 0.85);
}

.news-source i,
.news-date i {
  color: var(--news-accent-color);
}

.news-separator {
  width: 4px;
  height: 4px;
  background: var(--news-text-secondary);
  border-radius: 50%;
  opacity: 0.5;
}

/* No news message enhancement */
.no-news-message {
  opacity: 0.75;
  background: var(--news-card-bg);
  border: 1px solid var(--news-card-border);
  border-radius: 1.5rem;
  box-shadow: 0 18px 45px var(--news-shadow);
}

[data-bs-theme="dark"] .no-news-message {
  background: rgba(28, 30, 36, 0.92);
  border-color: rgba(166, 173, 187, 0.28);
  box-shadow: 0 20px 50px rgba(12, 14, 18, 0.4);
}

.no-news-icon i {
  color: var(--news-text-secondary);
}

.no-news-icon-symbol {
  font-size: 3rem;
  opacity: 0.35;
}

/* Animations */
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* RTL support enhancement */
[data-bs-theme="dark"] .news-title-link:hover {
  color: var(--news-accent-color) !important;
}

html[dir="rtl"] .news-header::after {
  right: 0;
  left: auto;
}

html[dir="rtl"] .news-item-border {
  right: 0;
  left: auto;
}

html[dir="rtl"] .news-header-icons {
  justify-content: flex-end;
}

html[dir="rtl"] .news-meta {
  justify-content: flex-end;
}

/* Responsive enhancements */
@media (max-width: 768px) {
  .news-title-text {
    font-size: 1.5rem;
  }

  .news-card {
    padding: 2.5rem 1.75rem;
  }

  .news-icon-container {
    width: 35px;
    height: 35px;
  }

  .news-category-icon {
    font-size: 1rem;
  }

  .news-emoji-icon {
    font-size: 1.1rem;
  }

  .news-item {
    padding: 1rem !important;
  }

  .news-item-layout {
    gap: 0.85rem !important;
  }

  .news-image-link {
    width: 84px;
    height: 84px;
    max-width: 84px;
    max-height: 84px;
    padding: 3px;
  }


  .news-header::after {
    left: 0;
    right: auto;
  }

  .news-header-icons {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  .news-card,
  .news-item,
  .news-icon-wrapper,
  .news-title-link {
    transition: none;
  }

  .news-football-icon {
    animation: none;
  }

  .news-card:hover,
  .news-item:hover {
    transform: none;
  }
}

/* Focus states for accessibility */
.news-title-link:focus {
  outline: 2px solid var(--news-accent-color);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ManyScore theme overrides */
body.site-manyscore {
  --news-bg-color: #f4f6f8;
  --news-item-odd: rgba(15, 23, 42, 0.03);
  --news-item-even: rgba(15, 23, 42, 0.07);
  --news-border-color: rgba(15, 23, 42, 0.14);
  --news-hover-bg: rgba(255, 255, 255, 0.95);
  --news-accent-color: #1a4fc1;
  --news-text-primary: #1f2937;
  --news-text-secondary: #6b7280;
  --news-card-bg: rgba(248, 249, 251, 0.96);
  --news-card-border: rgba(148, 163, 184, 0.24);
  --news-shadow: rgba(15, 23, 42, 0.15);
  --news-glow: rgba(15, 23, 42, 0.08);
}

[data-bs-theme="dark"] body.site-manyscore {
  --news-bg-color: #1a1f26;
  --news-item-odd: rgba(255, 255, 255, 0.05);
  --news-item-even: rgba(255, 255, 255, 0.1);
  --news-border-color: rgba(255, 255, 255, 0.16);
  --news-hover-bg: rgba(255, 255, 255, 0.18);
  --news-accent-color: #8fb5ff;
  --news-text-primary: #e5e7eb;
  --news-text-secondary: #b4bcc8;
  --news-card-bg: rgba(28, 32, 39, 0.96);
  --news-card-border: rgba(166, 173, 187, 0.28);
  --news-shadow: rgba(8, 12, 18, 0.45);
  --news-glow: rgba(255, 255, 255, 0.08);
}

body.site-manyscore .news-section {
  background: radial-gradient(circle at top, rgba(15, 23, 42, 0.08), transparent 60%);
}

body.site-manyscore .news-section::before {
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.06), transparent 52%);
}

[data-bs-theme="dark"] body.site-manyscore .news-section {
  background: radial-gradient(circle at top, rgba(255, 255, 255, 0.08), rgba(20, 24, 30, 0.9) 62%);
}

[data-bs-theme="dark"] body.site-manyscore .news-section::before {
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.08), transparent 55%);
}

body.site-manyscore .news-card {
  background: linear-gradient(180deg, rgba(249, 250, 252, 0.98), rgba(242, 245, 248, 0.96)) !important;
  border-color: rgba(148, 163, 184, 0.26) !important;
  box-shadow: 0 24px 58px rgba(15, 23, 42, 0.15) !important;
}

body.site-manyscore .news-card::after {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55) !important;
}

[data-bs-theme="dark"] body.site-manyscore .news-card {
  background: linear-gradient(180deg, rgba(28, 32, 39, 0.98), rgba(24, 28, 34, 0.96)) !important;
  border-color: rgba(166, 173, 187, 0.32) !important;
  box-shadow: 0 24px 58px rgba(5, 12, 20, 0.48) !important;
}

[data-bs-theme="dark"] body.site-manyscore .news-card::after {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12) !important;
}

/* HalaScore website theme alignment */
body:not(.site-manyscore) {
  --news-bg-color: var(--hs-bg-page);
  --news-card-bg: var(--hs-bg-elev-1);
  --news-item-odd: var(--hs-bg-elev-1);
  --news-item-even: var(--hs-bg-elev-2);
  --news-hover-bg: var(--hs-bg-row-hover);
  --news-border-color: var(--hs-border-mid);
  --news-card-border: var(--hs-border-strong);
  --news-text-primary: var(--hs-text-1);
  --news-text-secondary: var(--hs-text-2);
  --news-shadow: rgba(0, 0, 0, 0.26);
  --news-glow: transparent;
  --news-accent-color: var(--dark-theme-link-color, #29C0EE);
}

[data-bs-theme="light"] body:not(.site-manyscore) {
  --news-accent-color: var(--light-theme-link-color, rgb(0, 0, 203));
  --news-shadow: rgba(15, 23, 42, 0.06);
}

body:not(.site-manyscore) .news-section,
[data-bs-theme="dark"] body:not(.site-manyscore) .news-section {
  background: var(--hs-bg-page) !important;
}

body:not(.site-manyscore) .news-section::before,
body:not(.site-manyscore) .news-card-glow,
[data-bs-theme="dark"] body:not(.site-manyscore) .news-section::before,
[data-bs-theme="dark"] body:not(.site-manyscore) .news-card-glow {
  display: none !important;
}

body:not(.site-manyscore) .news-card,
[data-bs-theme="dark"] body:not(.site-manyscore) .news-card {
  background: var(--hs-bg-elev-1) !important;
  border-color: var(--hs-border-strong) !important;
  box-shadow: var(--hs-shadow-card) !important;
}

body:not(.site-manyscore) .news-card::after,
[data-bs-theme="dark"] body:not(.site-manyscore) .news-card::after {
  box-shadow: inset 0 1px 0 var(--hs-border-soft) !important;
}

body:not(.site-manyscore) .news-header-icons,
[data-bs-theme="dark"] body:not(.site-manyscore) .news-header-icons {
  background: var(--hs-bg-elev-2) !important;
  border-color: var(--hs-border-mid) !important;
  box-shadow: none !important;
}

body:not(.site-manyscore) .news-title-text,
body:not(.site-manyscore) .news-header-text,
body:not(.site-manyscore) .news-title-link,
[data-bs-theme="dark"] body:not(.site-manyscore) .news-title-text,
[data-bs-theme="dark"] body:not(.site-manyscore) .news-header-text,
[data-bs-theme="dark"] body:not(.site-manyscore) .news-title-link {
  color: var(--hs-text-1) !important;
}

body:not(.site-manyscore) .news-subtitle,
body:not(.site-manyscore) .news-summary,
body:not(.site-manyscore) .news-date,
body:not(.site-manyscore) .news-source,
[data-bs-theme="dark"] body:not(.site-manyscore) .news-subtitle,
[data-bs-theme="dark"] body:not(.site-manyscore) .news-summary,
[data-bs-theme="dark"] body:not(.site-manyscore) .news-date,
[data-bs-theme="dark"] body:not(.site-manyscore) .news-source {
  color: var(--hs-text-2) !important;
}

body:not(.site-manyscore) .news-title-link:hover,
[data-bs-theme="dark"] body:not(.site-manyscore) .news-title-link:hover,
body:not(.site-manyscore) .news-football-icon,
body:not(.site-manyscore) .news-source i,
body:not(.site-manyscore) .news-date i {
  color: var(--news-accent-color) !important;
}

body:not(.site-manyscore) .news-header::after,
[data-bs-theme="dark"] body:not(.site-manyscore) .news-header::after,
body:not(.site-manyscore) .news-item-border {
  background: var(--news-accent-color) !important;
}

body:not(.site-manyscore) .news-item,
[data-bs-theme="dark"] body:not(.site-manyscore) .news-item {
  background: var(--hs-bg-elev-1) !important;
  border-color: var(--hs-border-mid) !important;
  box-shadow: none !important;
}

body:not(.site-manyscore) .news-item.even,
[data-bs-theme="dark"] body:not(.site-manyscore) .news-item.even {
  background: var(--hs-bg-elev-2) !important;
}

body:not(.site-manyscore) .news-item:hover,
[data-bs-theme="dark"] body:not(.site-manyscore) .news-item:hover {
  background: var(--hs-bg-row-hover) !important;
  border-color: var(--hs-border-strong) !important;
  box-shadow: var(--hs-shadow-card) !important;
}

body:not(.site-manyscore) .news-item::after,
[data-bs-theme="dark"] body:not(.site-manyscore) .news-item::after {
  background: var(--hs-accent-soft) !important;
}

body:not(.site-manyscore) .news-separator {
  background: var(--hs-text-3) !important;
}

body:not(.site-manyscore) .no-news-message,
[data-bs-theme="dark"] body:not(.site-manyscore) .no-news-message {
  background: var(--hs-bg-elev-1) !important;
  border-color: var(--hs-border-strong) !important;
  box-shadow: var(--hs-shadow-card) !important;
}

/* News page footer transition */
body:not(.site-manyscore) .news-section {
  padding-bottom: 1.5rem !important;
}

body:not(.site-manyscore) main:has(.news-section) + .hs-site-footer {
  margin-top: 2rem !important;
  background: linear-gradient(180deg, rgba(16, 23, 34, 0), var(--hs-bg-page) 22px, var(--hs-bg-page) 100%) !important;
}

[data-bs-theme="light"] body:not(.site-manyscore) main:has(.news-section) + .hs-site-footer {
  background: linear-gradient(180deg, rgba(243, 245, 248, 0), var(--hs-bg-page) 22px, var(--hs-bg-page) 100%) !important;
}

