/* ============================================
   365Sportia — Bilingual Sports Magazine Theme
   Color: Teal + Gold on Dark Charcoal
   Fonts: Oswald (headlines), Outfit (body)
   RTL (Arabic) + LTR (German) support
   ============================================ */

/* --- Reset & Base --- */
*,*::before,*::after{margin:0;padding:0;box-sizing:border-box}

:root{
  --charcoal:#1a1a2e;
  --charcoal-light:#16213e;
  --charcoal-mid:#0f3460;
  --teal:#0d9488;
  --teal-dark:#0f766e;
  --teal-light:#14b8a6;
  --gold:#d4a017;
  --gold-light:#f0c040;
  --gold-soft:#fef3c7;
  --bg:#f0f4f8;
  --white:#fff;
  --text:#1a1a2e;
  --text-light:#4a5568;
  --text-muted:#8896a6;
  --border:#dce3eb;
  --card-shadow:0 2px 4px rgba(0,0,0,.06),0 1px 2px rgba(0,0,0,.04);
  --card-shadow-hover:0 12px 28px rgba(0,0,0,.12),0 4px 10px rgba(0,0,0,.06);
  --radius:12px;
  --radius-sm:6px;
  --max-width:1200px;
  --content-width:760px;
}

html{font-size:16px;scroll-behavior:smooth}

body{
  font-family:'Outfit',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  line-height:1.7;
  color:var(--text);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

a{color:inherit;text-decoration:none}
img{max-width:100%;display:block}

.container{max-width:var(--max-width);margin:0 auto;padding:0 24px}
.container--narrow{max-width:var(--content-width);margin:0 auto;padding:0 24px}

/* --- Header --- */
.site-header{
  background:var(--charcoal);
  position:sticky;
  top:0;
  z-index:100;
  border-bottom:3px solid var(--gold);
}

.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  height:64px;
}

.logo{
  font-family:'Oswald',sans-serif;
  font-size:1.5rem;
  font-weight:700;
  letter-spacing:.02em;
  color:var(--white);
}

.logo a{color:var(--white);text-decoration:none;display:flex;align-items:center;gap:2px}

.logo-num{
  color:var(--gold);
  font-weight:700;
}

.logo-accent{
  color:var(--teal-light);
}

/* Main nav */
.main-nav{display:flex;align-items:center;gap:0;overflow-x:auto;-webkit-overflow-scrolling:touch}
.main-nav::-webkit-scrollbar{display:none}

.main-nav a{
  color:#94a3b8;
  font-family:'Outfit',sans-serif;
  font-size:.82rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.06em;
  padding:8px 14px;
  border-radius:var(--radius-sm);
  transition:color .2s,background .2s;
  white-space:nowrap;
}

.main-nav a:hover,
.main-nav a.active{
  color:var(--white);
  background:rgba(255,255,255,.07);
}

/* Language switcher */
.lang-switch{
  display:flex;
  align-items:center;
  gap:0;
  margin-inline-start:12px;
}

.lang-switch a{
  font-family:'Outfit',sans-serif;
  font-size:.78rem;
  font-weight:700;
  letter-spacing:.04em;
  padding:4px 10px;
  color:#64748b;
  border:1px solid rgba(255,255,255,.12);
  transition:all .2s;
  text-decoration:none;
}

.lang-switch a:first-child{
  border-radius:var(--radius-sm) 0 0 var(--radius-sm);
  border-right:none;
}

.lang-switch a:last-child{
  border-radius:0 var(--radius-sm) var(--radius-sm) 0;
}

.lang-switch a.active{
  background:var(--teal);
  color:var(--white);
  border-color:var(--teal);
}

.lang-switch a:hover:not(.active){
  color:var(--white);
  border-color:rgba(255,255,255,.25);
}

/* --- Category badges --- */
.badge{
  display:inline-block;
  font-family:'Outfit',sans-serif;
  font-size:.68rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.06em;
  padding:3px 10px;
  border-radius:3px;
  line-height:1.4;
}

.badge--football{background:#0d9488;color:#fff}
.badge--nba{background:#e06c2e;color:#fff}
.badge--nfl{background:#2563eb;color:#fff}
.badge--lifestyle{background:#9333ea;color:#fff}
.badge--collectibles{background:#d4a017;color:#1a1a2e}
.badge--health{background:#16a34a;color:#fff}
.badge--ucl{background:#1e40af;color:#fff}
.badge--worldcup{background:#b91c1c;color:#fff}
.badge--transfers{background:#0e7490;color:#fff}
.badge--site{background:#64748b;color:#fff}

/* --- Homepage: Hero / Featured --- */
.featured{
  padding:40px 0 0;
}

.featured-card{
  border-radius:var(--radius);
  overflow:hidden;
  position:relative;
  min-height:360px;
  display:flex;
  flex-direction:column;
  justify-content:flex-end;
  padding:52px 48px;
  color:var(--white);
  background:
    linear-gradient(135deg,rgba(26,26,46,.96) 0%,rgba(15,52,96,.92) 40%,rgba(13,148,136,.15) 100%),
    repeating-linear-gradient(120deg,transparent,transparent 40px,rgba(212,160,23,.04) 40px,rgba(212,160,23,.04) 80px);
  background-color:var(--charcoal);
}

.featured-card .badge{margin-bottom:16px}
.featured-card .featured-label{
  font-family:'Oswald',sans-serif;
  font-size:.72rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.12em;
  color:var(--gold);
  margin-bottom:8px;
}

.featured-card h2{
  font-family:'Oswald',sans-serif;
  font-size:2.2rem;
  font-weight:700;
  line-height:1.15;
  margin-bottom:14px;
  max-width:720px;
}

.featured-card h2 a{color:var(--white)}
.featured-card h2 a:hover{text-decoration:underline;text-decoration-color:var(--gold);text-underline-offset:4px}

.featured-card .featured-excerpt{
  font-size:1.05rem;
  color:#b0bec5;
  line-height:1.6;
  max-width:600px;
  margin-bottom:14px;
}

.featured-card .featured-date{
  font-size:.8rem;
  color:var(--text-muted);
}

/* --- Homepage: Articles Grid --- */
.articles-section{
  padding:48px 0 64px;
}

.section-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:28px;
  border-bottom:2px solid var(--charcoal);
  padding-bottom:12px;
}

.section-header h2{
  font-family:'Oswald',sans-serif;
  font-size:1.3rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.03em;
  color:var(--charcoal);
}

.section-header .accent-bar{
  width:4px;
  height:22px;
  background:var(--gold);
  border-radius:2px;
  display:inline-block;
  vertical-align:middle;
}

.articles-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:24px;
}

.article-card{
  background:var(--white);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--card-shadow);
  transition:transform .22s,box-shadow .22s;
  display:flex;
  flex-direction:column;
}

.article-card:hover{
  transform:translateY(-4px);
  box-shadow:var(--card-shadow-hover);
}

.card-visual{
  height:6px;
  flex-shrink:0;
}

.card-visual--football{background:linear-gradient(90deg,#0d9488,#2dd4bf)}
.card-visual--nba{background:linear-gradient(90deg,#e06c2e,#f59e0b)}
.card-visual--nfl{background:linear-gradient(90deg,#2563eb,#60a5fa)}
.card-visual--lifestyle{background:linear-gradient(90deg,#9333ea,#c084fc)}
.card-visual--collectibles{background:linear-gradient(90deg,#d4a017,#fbbf24)}
.card-visual--health{background:linear-gradient(90deg,#16a34a,#4ade80)}
.card-visual--ucl{background:linear-gradient(90deg,#1e40af,#3b82f6)}
.card-visual--worldcup{background:linear-gradient(90deg,#b91c1c,#f87171)}
.card-visual--transfers{background:linear-gradient(90deg,#0e7490,#22d3ee)}
.card-visual--site{background:linear-gradient(90deg,#64748b,#94a3b8)}

.card-body{
  padding:20px 22px 24px;
  flex:1;
  display:flex;
  flex-direction:column;
}

.card-body .badge{margin-bottom:10px;align-self:flex-start}

.card-body h3{
  font-family:'Oswald',sans-serif;
  font-size:1.08rem;
  font-weight:600;
  line-height:1.3;
  margin-bottom:8px;
  color:var(--charcoal);
}

.card-body h3 a{color:var(--charcoal)}
.card-body h3 a:hover{color:var(--teal)}

.card-body .card-excerpt{
  font-size:.9rem;
  color:var(--text-light);
  line-height:1.55;
  flex:1;
  margin-bottom:12px;
}

.card-body .card-meta{
  font-size:.78rem;
  color:var(--text-muted);
  font-weight:500;
  margin-top:auto;
  display:flex;
  align-items:center;
  gap:8px;
}

.card-body .card-meta .meta-dot{
  width:3px;
  height:3px;
  border-radius:50%;
  background:var(--text-muted);
}

/* --- Article Page --- */
.article-header{
  background:
    linear-gradient(135deg,rgba(26,26,46,.97) 0%,rgba(15,52,96,.93) 50%,rgba(13,148,136,.12) 100%),
    repeating-linear-gradient(135deg,transparent,transparent 50px,rgba(212,160,23,.03) 50px,rgba(212,160,23,.03) 100px);
  background-color:var(--charcoal);
  color:var(--white);
  padding:56px 0 48px;
}

.article-header .badge{margin-bottom:16px}

.article-header h1{
  font-family:'Oswald',sans-serif;
  font-size:2.2rem;
  font-weight:700;
  line-height:1.15;
  margin-bottom:16px;
  max-width:700px;
}

.article-meta{
  display:flex;
  align-items:center;
  gap:14px;
  font-size:.85rem;
  color:#8896a6;
}

.article-meta .meta-divider{
  width:4px;
  height:4px;
  border-radius:50%;
  background:#4a5568;
}

/* Article body */
.article-body{
  padding:48px 0 60px;
}

.article-body p{
  font-size:1.08rem;
  line-height:1.8;
  margin-bottom:20px;
  color:var(--text);
}

.article-body h2{
  font-family:'Oswald',sans-serif;
  font-size:1.45rem;
  font-weight:600;
  color:var(--charcoal);
  margin:40px 0 16px;
  padding-inline-start:16px;
  border-inline-start:4px solid var(--teal);
}

.article-body h3{
  font-family:'Oswald',sans-serif;
  font-size:1.15rem;
  font-weight:600;
  color:var(--charcoal-mid);
  margin:28px 0 12px;
}

.article-body ul,.article-body ol{
  margin:0 0 20px;
  padding-inline-start:24px;
  font-size:1.05rem;
  line-height:1.8;
  color:var(--text);
}

.article-body li{
  margin-bottom:6px;
}

.article-body a{
  color:var(--teal);
  text-decoration:underline;
  text-decoration-color:rgba(13,148,136,.3);
  text-underline-offset:3px;
  transition:text-decoration-color .2s;
}

.article-body a:hover{
  text-decoration-color:var(--teal);
}

.article-body blockquote{
  border-inline-start:4px solid var(--gold);
  padding:12px 20px;
  margin:24px 0;
  background:var(--gold-soft);
  border-radius:0 var(--radius-sm) var(--radius-sm) 0;
  font-style:italic;
  color:var(--text-light);
}

/* Related stories */
.related-stories{
  margin-top:56px;
  padding-top:32px;
  border-top:2px solid var(--border);
}

.related-stories h3{
  font-family:'Oswald',sans-serif;
  font-size:1.1rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.03em;
  color:var(--charcoal);
  margin-bottom:20px;
  display:flex;
  align-items:center;
  gap:10px;
  border:none;
  padding:0;
}

.related-stories h3::before{
  content:'';
  display:inline-block;
  width:4px;
  height:20px;
  background:var(--gold);
  border-radius:2px;
}

.related-list{
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:12px;
}

.related-list li{
  background:var(--white);
  border-radius:var(--radius-sm);
  border:1px solid var(--border);
  transition:border-color .2s,box-shadow .2s;
}

.related-list li:hover{
  border-color:#b0bec5;
  box-shadow:0 2px 8px rgba(0,0,0,.06);
}

.related-list a{
  display:flex;
  align-items:center;
  gap:14px;
  padding:14px 18px;
  text-decoration:none !important;
  color:var(--text) !important;
}

.related-list .related-badge{flex-shrink:0}

.related-list .related-title{
  font-family:'Outfit',sans-serif;
  font-size:.95rem;
  font-weight:600;
  line-height:1.35;
  color:var(--charcoal);
}

/* --- Footer --- */
.site-footer{
  background:var(--charcoal);
  color:#8896a6;
  padding:48px 0 32px;
  margin-top:0;
}

.footer-inner{
  display:grid;
  grid-template-columns:1.5fr 1fr 1fr;
  gap:40px;
  margin-bottom:36px;
}

.footer-about h4,
.footer-nav h4,
.footer-categories h4{
  color:var(--white);
  font-family:'Oswald',sans-serif;
  font-size:.92rem;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.06em;
  margin-bottom:14px;
}

.footer-about p{
  font-size:.88rem;
  line-height:1.65;
  color:#5a6a7a;
}

.footer-links{
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:8px;
}

.footer-links a{
  font-size:.85rem;
  color:#5a6a7a;
  transition:color .2s;
}

.footer-links a:hover{color:var(--white)}

.footer-bottom{
  border-top:1px solid rgba(255,255,255,.07);
  padding-top:20px;
  text-align:center;
  font-size:.8rem;
  color:#4a5568;
}

/* --- Static page (about, disclaimer) --- */
.static-page{
  padding:48px 0 60px;
}

.static-page h2{
  font-family:'Oswald',sans-serif;
  font-size:1.4rem;
  font-weight:600;
  color:var(--charcoal);
  margin:32px 0 14px;
  padding-inline-start:16px;
  border-inline-start:4px solid var(--teal);
}

.static-page p{
  font-size:1.05rem;
  line-height:1.8;
  margin-bottom:18px;
  color:var(--text);
}

.static-page ul{
  margin:0 0 18px;
  padding-inline-start:24px;
  font-size:1.05rem;
  line-height:1.8;
}

/* ============================================
   RTL Support (Arabic pages)
   ============================================ */

/* RTL base direction */
html[dir="rtl"] body{
  direction:rtl;
  text-align:right;
}

html[dir="rtl"] .header-inner{
  flex-direction:row-reverse;
}

html[dir="rtl"] .main-nav{
  flex-direction:row-reverse;
}

html[dir="rtl"] .lang-switch{
  margin-inline-start:0;
  margin-inline-end:12px;
}

html[dir="rtl"] .section-header{
  flex-direction:row-reverse;
}

html[dir="rtl"] .section-header .accent-bar{
  margin-right:0;
  margin-left:12px;
}

html[dir="rtl"] .card-body .badge{
  align-self:flex-end;
}

html[dir="rtl"] .card-body .card-meta{
  flex-direction:row-reverse;
}

html[dir="rtl"] .article-meta{
  flex-direction:row-reverse;
}

html[dir="rtl"] .featured-card{
  text-align:right;
}

html[dir="rtl"] .article-header{
  text-align:right;
}

html[dir="rtl"] .article-body blockquote{
  border-radius:var(--radius-sm) 0 0 var(--radius-sm);
}

html[dir="rtl"] .related-stories h3{
  flex-direction:row-reverse;
}

html[dir="rtl"] .related-list a{
  flex-direction:row-reverse;
}

html[dir="rtl"] .footer-inner{
  direction:rtl;
}

html[dir="rtl"] .footer-bottom{
  direction:rtl;
}

/* --- Responsive --- */
@media(max-width:1024px){
  .articles-grid{grid-template-columns:repeat(2,1fr)}
  .footer-inner{grid-template-columns:1fr 1fr}
}

@media(max-width:768px){
  .header-inner{flex-wrap:wrap;height:auto;padding:12px 0}
  .main-nav{width:100%;padding-top:8px;gap:0}
  .main-nav a{font-size:.74rem;padding:6px 10px}

  .featured-card{min-height:280px;padding:32px 24px}
  .featured-card h2{font-size:1.6rem}

  .articles-grid{grid-template-columns:1fr}

  .article-header{padding:36px 0 32px}
  .article-header h1{font-size:1.7rem}

  .footer-inner{grid-template-columns:1fr;gap:28px}

  html[dir="rtl"] .header-inner{flex-wrap:wrap}
}

@media(max-width:480px){
  .container{padding:0 16px}
  .container--narrow{padding:0 16px}
  .featured-card{padding:24px 18px}
  .featured-card h2{font-size:1.35rem}
  .card-body{padding:16px 16px 20px}
  .article-header h1{font-size:1.45rem}
  .article-body p{font-size:1rem}
}
