/* ============================================================
   Sport Portal - Main CSS
   sport.l4t.pl
   ============================================================ */

/* ─── Variables ─────────────────────────────────────────────── */
:root {
  --red:       #e63946;
  --red-dark:  #c1121f;
  --dark:      #0d0d0d;
  --dark2:     #1a1a1a;
  --gray:      #2d2d2d;
  --gray-light:#6b6b6b;
  --border:    #333;
  --white:     #ffffff;
  --off-white: #f5f5f5;
  --text:      #e8e8e8;
  --text-muted:#999;
  --accent:    #ffd60a;
  --live:      #ff0040;
  --green:     #06d6a0;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-head: 'Oswald', 'Inter', sans-serif;

  --container: 1300px;
  --gap:       16px;
  --radius:    8px;
  --shadow:    0 2px 12px rgba(0,0,0,.4);
}

/* ─── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  background: var(--dark);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }

/* ─── Container & Layout ─────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
}
.layout-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  padding: 20px 0 40px;
}
.content-area { min-width: 0; }
.sidebar { display: flex; flex-direction: column; gap: 20px; }

/* ─── Ad Banners ─────────────────────────────────────────────── */
.ad-banner {
  text-align: center;
  padding: 8px 0;
  background: var(--dark2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.ad-header { margin-bottom: 4px; }
.ad-inline { margin: 24px 0; border-radius: var(--radius); }
.ad-footer { margin-top: 0; }

/* ─── Header ─────────────────────────────────────────────────── */
.site-header {
  background: var(--dark2);
  border-bottom: 3px solid var(--red);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}
.logo-icon { font-size: 1.4rem; }
.logo-text { color: var(--white); }
.logo-text span { color: var(--red); }

.lang-switch {
  display: flex;
  gap: 6px;
  margin-left: auto;
}
.lang-switch a {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: .2s;
}
.lang-switch a.active, .lang-switch a:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
}

.live-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--live);
  color: var(--white);
  padding: 5px 12px;
  border-radius: 4px;
  font-weight: 800;
  font-size: .8rem;
  letter-spacing: .05em;
  flex-shrink: 0;
}
.live-dot {
  width: 8px; height: 8px;
  background: var(--white);
  border-radius: 50%;
  animation: pulse 1.2s ease infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .4; transform: scale(1.4); }
}
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
}

/* ─── Navigation ─────────────────────────────────────────────── */
.main-nav {
  background: var(--gray);
  border-bottom: 1px solid var(--border);
}
.nav-list {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-link {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  font-weight: 600;
  font-size: .88rem;
  white-space: nowrap;
  color: var(--text);
  transition: background .2s;
  position: relative;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cat-color, var(--red));
  opacity: 0;
  transition: opacity .2s;
}
.nav-link:hover, .nav-link.active { color: var(--white); }
.nav-link:hover::after, .nav-link.active::after { opacity: 1; }
.nav-link--live { color: var(--live); font-weight: 800; }

/* ─── Live Ticker ────────────────────────────────────────────── */
.live-ticker {
  background: var(--red);
  display: flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  height: 36px;
}
.ticker-label {
  background: var(--dark);
  color: var(--white);
  font-weight: 800;
  font-size: .8rem;
  padding: 0 16px;
  height: 100%;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
}
.ticker-track {
  display: flex;
  animation: ticker 30s linear infinite;
  gap: 40px;
  padding: 0 20px;
  align-items: center;
}
.ticker-item {
  font-size: .88rem;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
}
@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─── Hero Section ───────────────────────────────────────────── */
.hero-section {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--gap);
  margin-bottom: 24px;
}
.hero-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--gray);
}
.hero-img {
  width: 100%;
  height: 420px;
  background-size: cover;
  background-position: center;
  transition: transform .3s;
}
.hero-img--small { height: 130px; }
.hero-card:hover .hero-img { transform: scale(1.03); }
.hero-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.85) 60%, rgba(0,0,0,.95));
  padding: 60px 18px 18px;
}
.hero-cat {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-size: .72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 8px;
}
.hero-title {
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 6px;
}
.hero-title--sm { font-size: 1rem; }
.hero-excerpt {
  font-size: .85rem;
  color: rgba(255,255,255,.75);
  margin-bottom: 6px;
}
.hero-date { font-size: .78rem; color: rgba(255,255,255,.5); }
.hero-side {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}
.hero-card--small { height: calc(33.33% - 11px); }

/* ─── Matches Strip ──────────────────────────────────────────── */
.matches-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.match-card {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  text-align: center;
  transition: border-color .2s;
}
.match-card--live { border-color: var(--live); }
.match-league { font-size: .72rem; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; }
.match-teams { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.match-team { font-size: .82rem; font-weight: 600; flex: 1; }
.match-team--away { text-align: right; }
.match-score { font-family: var(--font-head); font-size: 1.2rem; font-weight: 700; color: var(--white); min-width: 40px; }
.match-time { font-size: .9rem; color: var(--text-muted); }
.match-elapsed { font-size: .72rem; color: var(--live); font-weight: 700; margin-top: 4px; }

/* ─── Section Block ──────────────────────────────────────────── */
.section-block { margin-bottom: 36px; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--red);
}
.section-header h2 {
  font-family: var(--font-head);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.category-strip .section-header { border-bottom-color: var(--strip-color, var(--red)); }
.see-all {
  font-size: .82rem;
  font-weight: 700;
  color: var(--red);
  transition: color .2s;
}
.see-all:hover { color: var(--red-dark); }

/* ─── Article Cards ──────────────────────────────────────────── */
.articles-grid {
  display: grid;
  gap: 16px;
}
.articles-grid--4 { grid-template-columns: repeat(4, 1fr); }
.articles-grid--3 { grid-template-columns: repeat(3, 1fr); }
.articles-grid--2 { grid-template-columns: repeat(2, 1fr); }

.article-card {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.article-card:hover { border-color: var(--red); transform: translateY(-2px); }
.article-card__img-wrap { display: block; overflow: hidden; aspect-ratio: 16/9; }
.article-card__img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.article-card:hover .article-card__img { transform: scale(1.05); }
.article-card__body { padding: 12px; }
.article-card__cat {
  font-size: .72rem;
  font-weight: 700;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: .04em;
  display: block;
  margin-bottom: 6px;
}
.article-card__title {
  font-family: var(--font-head);
  font-size: 1rem;
  line-height: 1.3;
  margin-bottom: 8px;
  color: var(--white);
}
.article-card__title a { color: inherit; }
.article-card__title a:hover { color: var(--red); }
.article-card__excerpt {
  font-size: .83rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 8px;
}
.article-card__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .78rem;
  color: var(--text-muted);
}
.article-views { margin-left: auto; }

/* ─── Article Full ───────────────────────────────────────────── */
.article-full { max-width: 800px; }
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.breadcrumbs a { color: var(--red); }
.bc-sep { color: var(--border); }

.article-meta-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.article-cat-badge {
  background: var(--red);
  color: var(--white);
  font-size: .75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 3px;
  text-transform: uppercase;
}
.lang-version-link {
  font-size: .82rem;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 2px 8px;
  border-radius: 3px;
}

.article-title {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 14px;
}
.article-lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
  border-left: 4px solid var(--red);
  padding-left: 16px;
}
.article-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: .82rem;
  color: var(--text-muted);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.article-source { color: var(--accent); }

.article-featured-img {
  margin-bottom: 24px;
  border-radius: var(--radius);
  overflow: hidden;
}
.article-img { width: 100%; max-height: 480px; object-fit: cover; }

.article-content {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text);
}
.article-content h2 {
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: var(--white);
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--red);
}
.article-content h3 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--white);
  margin: 22px 0 10px;
}
.article-content p { margin-bottom: 16px; }
.article-content ul, .article-content ol {
  padding-left: 22px;
  margin-bottom: 16px;
  list-style: disc;
}
.article-content ol { list-style: decimal; }
.article-content li { margin-bottom: 6px; }
.article-content strong { color: var(--white); font-weight: 700; }
.article-content blockquote {
  border-left: 4px solid var(--red);
  padding: 10px 18px;
  margin: 20px 0;
  background: var(--dark2);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text-muted);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  align-items: center;
}
.tags-label { font-size: .82rem; color: var(--text-muted); }
.tag {
  background: var(--gray);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 20px;
  font-size: .8rem;
  color: var(--text);
  transition: .2s;
}
.tag:hover { background: var(--red); border-color: var(--red); color: var(--white); }

.article-share {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  flex-wrap: wrap;
}
.article-share > span { font-size: .85rem; color: var(--text-muted); }
.share-btn {
  padding: 6px 14px;
  border-radius: 4px;
  font-size: .82rem;
  font-weight: 700;
}
.share-fb { background: #1877f2; color: #fff; }
.share-tw { background: #000; color: #fff; }
.share-wa { background: #25d366; color: #fff; }

.related-articles {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 3px solid var(--red);
}
.related-articles h3 {
  font-family: var(--font-head);
  font-size: 1.2rem;
  margin-bottom: 16px;
  color: var(--white);
}

/* ─── Sidebar Widgets ────────────────────────────────────────── */
.widget {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.widget-header {
  background: var(--gray);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.widget-header h3 {
  font-family: var(--font-head);
  font-size: .95rem;
  color: var(--white);
  text-transform: uppercase;
}
.widget--live .widget-header { background: var(--live); }
.live-scores-mini { padding: 8px; }
.live-scores-mini .match-card { margin-bottom: 6px; }
.widget-more {
  display: block;
  text-align: center;
  padding: 8px;
  font-size: .82rem;
  color: var(--red);
  border-top: 1px solid var(--border);
}
.popular-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.popular-item:last-child { border-bottom: none; }
.popular-rank {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--red);
  min-width: 22px;
}
.popular-item a { font-size: .85rem; color: var(--text); line-height: 1.4; }
.popular-item a:hover { color: var(--red); }

/* ─── Live Scores Page ───────────────────────────────────────── */
.live-page-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--live);
}
.live-page-header h1 {
  font-family: var(--font-head);
  font-size: 1.5rem;
  color: var(--white);
}
.live-count {
  background: var(--live);
  color: var(--white);
  padding: 2px 10px;
  border-radius: 20px;
  font-weight: 700;
  font-size: .85rem;
}
.matches-full-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.match-card--full { text-align: left; padding: 14px 16px; }
.match-card--full .match-teams { margin: 8px 0; }

/* ─── Category Page ──────────────────────────────────────────── */
.category-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 3px solid var(--red);
}
.category-header h1 {
  font-family: var(--font-head);
  font-size: 1.8rem;
  color: var(--white);
  margin-bottom: 6px;
}
.category-desc { color: var(--text-muted); font-size: .95rem; }

/* ─── Pagination ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 28px;
}
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: .9rem;
  color: var(--text);
  transition: .2s;
}
.page-btn:hover, .page-btn.active { background: var(--red); border-color: var(--red); color: var(--white); }

/* ─── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--dark2);
  border-top: 3px solid var(--red);
  padding-top: 40px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 32px;
  padding: 0 0 32px;
}
.footer-logo {
  display: block;
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}
.footer-brand p { font-size: .88rem; color: var(--text-muted); margin-bottom: 12px; }
.social-rss {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--red);
  color: var(--white);
  padding: 5px 12px;
  border-radius: 4px;
  font-size: .82rem;
  font-weight: 700;
}
.footer-nav h4 {
  font-family: var(--font-head);
  font-size: .9rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.footer-nav ul li { margin-bottom: 7px; }
.footer-nav ul li a { font-size: .88rem; color: var(--text-muted); transition: color .2s; }
.footer-nav ul li a:hover { color: var(--red); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 0;
  text-align: center;
  font-size: .82rem;
  color: var(--text-muted);
}

/* ─── Auth ───────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark);
  padding: 20px;
}
.auth-card {
  background: var(--dark2);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 100%;
  max-width: 440px;
  overflow: hidden;
}
.auth-card-header {
  background: var(--red);
  padding: 28px 32px;
  text-align: center;
}
.auth-card-header h1 { font-family: var(--font-head); font-size: 1.4rem; color: var(--white); }
.auth-card-body { padding: 32px; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: .85rem; color: var(--text-muted); margin-bottom: 6px; font-weight: 600; }
.form-group input {
  width: 100%;
  padding: 10px 14px;
  background: var(--gray);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: .95rem;
  transition: border-color .2s;
}
.form-group input:focus { outline: none; border-color: var(--red); }
.btn-primary {
  width: 100%;
  padding: 12px;
  background: var(--red);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.btn-primary:hover { background: var(--red-dark); }
.alert { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-size: .9rem; }
.alert-err { background: rgba(230,57,70,.15); border: 1px solid var(--red); color: #ff6b6b; }

/* ─── Loading spinner ────────────────────────────────────────── */
.loading-spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--border);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin: 16px auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Error pages ────────────────────────────────────────────── */
.error-page { text-align: center; padding: 80px 20px; }
.error-code { font-family: var(--font-head); font-size: 6rem; font-weight: 900; color: var(--red); line-height: 1; }
.error-msg { font-size: 1.3rem; color: var(--text-muted); margin: 12px 0 24px; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .layout-grid { grid-template-columns: 1fr; }
  .sidebar { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .hero-section { grid-template-columns: 1fr; }
  .hero-side { flex-direction: row; }
  .hero-card--small { height: 180px; flex: 1; }
  .articles-grid--4 { grid-template-columns: repeat(2, 1fr); }
  .matches-strip { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .mobile-menu-btn { display: block; }
  .lang-switch { display: none; }
  .live-badge { font-size: .72rem; padding: 4px 8px; }
  .main-nav { display: none; }
  .main-nav.open { display: block; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-link { width: 100%; border-bottom: 1px solid var(--border); }
  .hero-section { grid-template-columns: 1fr; }
  .hero-img { height: 280px; }
  .hero-side { display: none; }
  .articles-grid--4 { grid-template-columns: 1fr; }
  .articles-grid--2 { grid-template-columns: 1fr; }
  .matches-strip { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: 1fr; }
  .article-title { font-size: 1.5rem; }
  .matches-full-grid { grid-template-columns: 1fr; }
}
