/*
 * WebSporTV Tema - Temel Stiller
 *
 * Tasarim yonu: WebSporTV oncelikle bir MAC TAKVIMI / YAYIN REHBERIDIR
 * (kim, ne zaman, hangi kanalda oynuyor). Bu yuzden renk/tipografi
 * secimleri jenerik bir "SaaS" gorunumu yerine futbol sahasindan
 * (cim yesili, tebesir cizgisi beyazi) ve canli yayin gostergelerinden
 * (kirmizi "CANLI" noktasi) ilham alir. Sayi/saat gorunumlerinde
 * tablo (tabular) rakamlar kullanilir - bir skor tablosu gibi hizali
 * durmasi icin. Harici font/framework yuklenmez; sistem font yigini
 * kullanilir (hiz + bagimliliksizlik icin).
 */

/* ==========================================================================
   1) Tasarim Token'lari
   ========================================================================== */

:root {
	/* Renkler */
	--wstv-ink: #101b13;          /* ana metin rengi (cim-siyahi) */
	--wstv-pitch: #14532d;        /* marka rengi: koyu cim yesili */
	--wstv-pitch-bright: #2f9e56; /* vurgu: parlak cim yesili */
	--wstv-chalk: #fafaf7;        /* sayfa arka plani (sicak beyaz) */
	--wstv-surface: #ffffff;      /* kart/panel arka plani */
	--wstv-line: #e3e6df;         /* ince ayirici cizgi rengi */
	--wstv-muted: #5b665c;        /* ikincil metin rengi */
	--wstv-live: #d21f2e;         /* canli mac gostergesi */
	--wstv-gold: #b8860b;         /* one cikan/skor vurgusu */

	/* Tipografi */
	--wstv-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

	/* Olcek */
	--wstv-radius: 6px;
	--wstv-container-width: 1600px;
	--wstv-header-height: 64px;
}

/* ==========================================================================
   2) Sifirlama / Temel
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: var(--wstv-chalk);
	color: var(--wstv-ink);
	font-family: var(--wstv-font-sans);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
}

ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

h1, h2, h3, h4 {
	margin: 0 0 0.5em;
	line-height: 1.2;
	font-weight: 700;
}

p {
	margin: 0 0 1em;
}

button {
	font-family: inherit;
}

/* Sure/saat/skor gibi rakamlarin bir skor tablosu gibi hizali durmasi
   icin: bu sinif kullanilan her yerde rakamlar esit genislikte basilir. */
.wstv-nums {
	font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   3) Erisilebilirlik yardimcilari
   ========================================================================== */

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.wstv-skip-link {
	position: absolute;
	top: -100px;
	left: 0;
	z-index: 10000;
	padding: 12px 16px;
	background: var(--wstv-pitch);
	color: #fff;
}

.wstv-skip-link:focus {
	top: 0;
	width: auto;
	height: auto;
	clip: auto;
}

:focus-visible {
	outline: 2px solid var(--wstv-pitch-bright);
	outline-offset: 2px;
}

/* ==========================================================================
   4) Duzen (Layout)
   ========================================================================== */

.wstv-container {
	max-width: var(--wstv-container-width);
	margin-inline: auto;
	padding-inline: 20px;
}

.wstv-main {
	padding-block: 32px;
	min-height: 50vh;
}

/* ==========================================================================
   5) Site Header
   ========================================================================== */

.wstv-site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--wstv-surface);
	border-bottom: 1px solid var(--wstv-line);
}

.wstv-site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: var(--wstv-header-height);
	gap: 16px;
}

.wstv-logo {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.wstv-logo__text {
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--wstv-pitch);
}

.wstv-logo img {
	max-height: 44px;
	width: auto;
}

/* Mobil hamburger butonu (varsayilan olarak gorunur; masaustunde gizlenir) */
.wstv-menu-toggle {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	padding: 0;
	border: none;
	background: transparent;
	cursor: pointer;
}

.wstv-menu-toggle__bar {
	display: block;
	height: 2px;
	width: 100%;
	background: var(--wstv-ink);
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.wstv-menu-toggle[aria-expanded="true"] .wstv-menu-toggle__bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.wstv-menu-toggle[aria-expanded="true"] .wstv-menu-toggle__bar:nth-child(2) {
	opacity: 0;
}

.wstv-menu-toggle[aria-expanded="true"] .wstv-menu-toggle__bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* Mobilde: menu varsayilan olarak kapali, JS ile ".is-open" eklenir. */
.wstv-primary-nav {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: var(--wstv-surface);
	border-bottom: 1px solid var(--wstv-line);
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.25s ease;
}

.wstv-primary-nav.is-open {
	max-height: 70vh;
	overflow-y: auto;
}

.wstv-primary-nav__list li {
	border-top: 1px solid var(--wstv-line);
}

.wstv-primary-nav__list a {
	display: block;
	padding: 14px 20px;
	font-weight: 600;
}

.wstv-primary-nav__list a:hover,
.wstv-primary-nav__list a:focus-visible {
	color: var(--wstv-pitch);
	background: var(--wstv-chalk);
}

/* ==========================================================================
   6) Site Footer
   ========================================================================== */

.wstv-site-footer {
	margin-top: 48px;
	border-top: 1px solid var(--wstv-line);
	background: var(--wstv-surface);
}

.wstv-site-footer__inner {
	padding-block: 28px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.wstv-footer-nav__list {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
}

.wstv-footer-nav__list a {
	color: var(--wstv-muted);
	font-size: 0.9rem;
}

.wstv-footer-nav__list a:hover,
.wstv-footer-nav__list a:focus-visible {
	color: var(--wstv-pitch);
}

.wstv-site-footer__copy {
	margin: 0;
	color: var(--wstv-muted);
	font-size: 0.85rem;
}

/* ==========================================================================
   7) Genel amacli (index.php yer tutucusu, bos durumlar)
   ========================================================================== */

.wstv-empty-state {
	padding: 48px 0;
	text-align: center;
	color: var(--wstv-muted);
}

.wstv-empty-state--compact {
	padding: 12px 0;
	text-align: left;
	font-size: 0.85rem;
}

.wstv-generic-article__content {
	max-width: 70ch;
}

/* ==========================================================================
   8) Masaustu (>= 860px): yatay navigasyon, hamburger gizli
   ========================================================================== */

@media (min-width: 860px) {
	.wstv-menu-toggle {
		display: none;
	}

	.wstv-primary-nav {
		position: static;
		max-height: none;
		overflow: visible;
		background: transparent;
		border-bottom: none;
	}

	.wstv-primary-nav__list {
		display: flex;
		gap: 4px;
	}

	.wstv-primary-nav__list li {
		border-top: none;
	}

	.wstv-primary-nav__list a {
		padding: 10px 14px;
		border-radius: var(--wstv-radius);
	}

	.wstv-site-footer__inner {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}

	/* Masaustunde mobil-turevi sikisik olculeri degil, biraz daha
	   ferah bir yerlesim kullan. */
	.wstv-section__head h2 {
		font-size: 1.5rem;
	}

	.wstv-match-row {
		padding: 15px 20px;
	}

	.wstv-match-row__team {
		font-size: 1rem;
	}

	.wstv-broadcast-row {
		padding: 13px 20px;
	}

	.wstv-broadcast-row__match {
		font-size: 0.95rem;
	}

	.wstv-broadcast-row__channel {
		max-width: 160px;
	}

	.wstv-tile-grid {
		grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
		gap: 16px;
	}
}

/* ==========================================================================
   9) Bolumler (Section) - Ana Sayfa ve diger listeleme sayfalari icin ortak
   ========================================================================== */

.wstv-section {
	padding-block: 28px;
}

.wstv-section--alt {
	background: var(--wstv-surface);
	border-top: 1px solid var(--wstv-line);
	border-bottom: 1px solid var(--wstv-line);
}

.wstv-section__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
}

.wstv-section__head h2 {
	font-size: 1.25rem;
	margin: 0;
	padding-bottom: 8px;
	border-bottom: 3px solid var(--wstv-pitch-bright);
}

.wstv-section__all {
	flex-shrink: 0;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--wstv-pitch);
	white-space: nowrap;
}

.wstv-section__all:hover,
.wstv-section__all:focus-visible {
	text-decoration: underline;
}

/* ==========================================================================
   10) Durum rozeti (Planlandı / Canlı / Tamamlandı ...)
   ========================================================================== */

.wstv-status-badge {
	display: inline-flex;
	align-items: center;
	flex-shrink: 0;
	font-size: 0.72rem;
	font-weight: 600;
	padding: 3px 9px;
	border-radius: 999px;
	border: 1px solid var(--wstv-line);
	color: var(--wstv-muted);
	white-space: nowrap;
}

.wstv-status-badge--live {
	color: var(--wstv-live);
	border-color: var(--wstv-live);
}

.wstv-status-badge--scheduled {
	color: var(--wstv-pitch);
	border-color: var(--wstv-pitch-bright);
}

.wstv-status-badge--postponed,
.wstv-status-badge--suspended {
	color: var(--wstv-gold);
	border-color: var(--wstv-gold);
}

.wstv-status-badge--cancelled {
	color: var(--wstv-muted);
	text-decoration: line-through;
}

.wstv-status-badge--live::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-right: 5px;
	border-radius: 50%;
	background: currentColor;
	animation: wstv-pulse 1.4s ease-in-out infinite;
}

@keyframes wstv-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
	.wstv-status-badge--live::before {
		animation: none;
	}
}

/* ==========================================================================
   11) Mac satiri (Bugünün Maçları / Yaklaşan Maçlar)
   ========================================================================== */

.wstv-match-list {
	display: flex;
	flex-direction: column;
	border-top: 1px solid var(--wstv-line);
}

.wstv-match-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 13px 14px;
	background: var(--wstv-surface);
	border-bottom: 1px solid var(--wstv-line);
	border-left: 3px solid transparent;
}

.wstv-match-row:hover,
.wstv-match-row:focus-visible {
	background: var(--wstv-chalk);
}

.wstv-match-row--live {
	border-left-color: var(--wstv-live);
}

.wstv-match-row--scheduled {
	border-left-color: var(--wstv-pitch-bright);
}

.wstv-match-row--finished {
	border-left-color: var(--wstv-line);
}

.wstv-match-row--postponed,
.wstv-match-row--suspended {
	border-left-color: var(--wstv-gold);
}

.wstv-match-row--cancelled {
	border-left-color: var(--wstv-muted);
}

.wstv-match-row__when {
	flex: 0 0 auto;
	min-width: 44px;
	font-weight: 700;
	font-size: 0.9rem;
	text-align: center;
}

.wstv-match-row__date {
	display: block;
	font-size: 0.68rem;
	font-weight: 500;
	color: var(--wstv-muted);
}

.wstv-match-row__teams {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 8px;
}

.wstv-match-row__team {
	flex: 1 1 0;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 600;
	font-size: 0.92rem;
}

.wstv-match-row__team:last-child {
	text-align: right;
}

.wstv-match-row__score {
	flex: 0 0 auto;
	min-width: 34px;
	text-align: center;
	font-weight: 700;
	font-size: 0.85rem;
	color: var(--wstv-muted);
}

.wstv-match-row__league {
	display: none;
	flex: 0 0 auto;
	font-size: 0.78rem;
	color: var(--wstv-muted);
	max-width: 130px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wstv-match-row__channels {
	display: none;
	flex: 0 0 auto;
	align-items: center;
	gap: 3px;
	font-size: 0.72rem;
	font-weight: 600;
	color: var(--wstv-pitch);
	max-width: 110px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wstv-match-row__channels-more {
	color: var(--wstv-muted);
	font-weight: 500;
}

@media (min-width: 640px) {
	.wstv-match-row__league {
		display: inline-block;
	}

	.wstv-match-row__channels {
		display: inline-flex;
	}
}

/* En dar telefon genislikleri (~320-360px) icin siklastirma: saat/skor/
   rozet alanlarindan biraz yer geri kazanip takim isimlerine birakiyoruz
   - "takim isimleri belirgin olsun" hedefi icin onemli. */
@media (max-width: 400px) {
	.wstv-match-row {
		padding: 12px 10px;
		gap: 8px;
	}

	.wstv-match-row__when {
		min-width: 36px;
	}

	.wstv-match-row__score {
		min-width: 26px;
		font-size: 0.78rem;
	}

	.wstv-status-badge {
		padding: 3px 7px;
		font-size: 0.66rem;
	}
}

/* ==========================================================================
   12) Yayin akisi satiri
   ========================================================================== */

.wstv-broadcast-list {
	display: flex;
	flex-direction: column;
	border-top: 1px solid var(--wstv-line);
}

.wstv-broadcast-row {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	background: var(--wstv-surface);
	border-bottom: 1px solid var(--wstv-line);
	font-size: 0.88rem;
}

.wstv-broadcast-row:hover,
.wstv-broadcast-row:focus-visible {
	background: var(--wstv-chalk);
}

.wstv-broadcast-row__time {
	flex: 0 0 auto;
	min-width: 42px;
	font-weight: 700;
}

.wstv-broadcast-row__match {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 600;
}

.wstv-broadcast-row__channel {
	flex: 0 0 auto;
	max-width: 100px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 600;
	font-size: 0.82rem;
	color: var(--wstv-pitch);
}

.wstv-broadcast-row__type {
	display: none;
	flex: 0 0 auto;
	font-size: 0.7rem;
	color: var(--wstv-muted);
	border: 1px solid var(--wstv-line);
	border-radius: 999px;
	padding: 2px 8px;
}

@media (min-width: 640px) {
	.wstv-broadcast-row__type {
		display: inline-block;
	}
}

/* ==========================================================================
   13) Lig / Takim kartlari (grid)
   ========================================================================== */

.wstv-tile-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(112px, 1fr));
	gap: 12px;
}

.wstv-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 16px 8px;
	background: var(--wstv-surface);
	border: 1px solid var(--wstv-line);
	border-radius: var(--wstv-radius);
	text-align: center;
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.wstv-tile:hover,
.wstv-tile:focus-visible {
	border-color: var(--wstv-pitch-bright);
	transform: translateY(-2px);
}

.wstv-tile__logo {
	width: 48px;
	height: 48px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wstv-tile__logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.wstv-tile__logo-fallback {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--wstv-chalk);
	border-radius: 50%;
	font-weight: 700;
	color: var(--wstv-pitch);
}

.wstv-tile__name {
	font-size: 0.83rem;
	font-weight: 600;
	line-height: 1.25;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	max-height: 2.55em;
	word-break: break-word;
}

.wstv-tile__meta {
	font-size: 0.72rem;
	color: var(--wstv-muted);
}

/* ==========================================================================
   14) 3 Kolonlu Mac-Gunu Duzeni (Ana Sayfa + /maclar/{tarih}/)
   ========================================================================== */

.wstv-matchday {
	padding-block: 24px;
	display: grid;
	grid-template-columns: 1fr; /* mobil: tek kolon (varsayilan) */
	gap: 24px;
	/* Yatay tasma kesinlikle olmamali: genis icerik (ör. uzun mac
	   satirlari) grid hucresini asarsa bile tasmasin. */
	min-width: 0;
}

.wstv-matchday__sidebar,
.wstv-matchday__main {
	min-width: 0;
}

.wstv-matchday__sidebar--left {
	order: -1;
}

.wstv-matchday__sidebar--right {
	order: 1;
}

@media (min-width: 1024px) {
	.wstv-matchday {
		grid-template-columns: 220px minmax(0, 1fr) 280px;
		align-items: start;
	}

	.wstv-matchday__sidebar--left,
	.wstv-matchday__sidebar--right {
		order: 0;
		position: sticky;
		top: calc(var(--wstv-header-height) + 20px);
	}
}

/* ==========================================================================
   15) Sidebar bloklari (sol: spor dallari, sag: populer lig/takim)
   ========================================================================== */

.wstv-sidebar-block {
	margin-bottom: 24px;
}

.wstv-sidebar-block__title {
	font-size: 0.95rem;
	margin: 0 0 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--wstv-line);
}

.wstv-sport-list__item {
	display: block;
	padding: 10px 12px;
	border-radius: var(--wstv-radius);
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--wstv-muted);
}

.wstv-sport-list__item.is-active {
	background: var(--wstv-pitch);
	color: #fff;
}

/* Sag sidebar'da lig/takim kartlarini (mevcut .wstv-tile bileseni)
   yeniden kullanirken, dar kolona uygun KOMPAKT/YATAY bir gorunume
   ceviriyoruz - bunun icin ayri bir sablon/HTML gerekmez, sadece bu
   baglamdaki CSS farklidir (kod tekrarindan kacinma). */
.wstv-sidebar-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.wstv-sidebar-list .wstv-tile {
	flex-direction: row;
	align-items: center;
	text-align: left;
	padding: 8px 10px;
	gap: 10px;
}

.wstv-sidebar-list .wstv-tile__logo {
	width: 32px;
	height: 32px;
	flex-shrink: 0;
}

.wstv-sidebar-list .wstv-tile__name {
	font-size: 0.82rem;
	-webkit-line-clamp: 1;
	max-height: 1.3em;
}

.wstv-sidebar-list .wstv-tile__meta {
	font-size: 0.68rem;
}

/* ==========================================================================
   16) Tarih navigasyonu (onceki/sonraki gun + yatay gun seridi)
   ========================================================================== */

.wstv-date-nav {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 4px;
}

.wstv-date-nav__arrow {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--wstv-surface);
	border: 1px solid var(--wstv-line);
	font-size: 1.3rem;
	line-height: 1;
	color: var(--wstv-pitch);
}

.wstv-date-nav__arrow:hover,
.wstv-date-nav__arrow:focus-visible {
	border-color: var(--wstv-pitch-bright);
}

.wstv-date-nav__strip {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	gap: 6px;
	overflow-x: auto;
	scrollbar-width: none;
	scroll-snap-type: x proximity;
}

.wstv-date-nav__strip::-webkit-scrollbar {
	display: none;
}

.wstv-date-nav__day {
	flex: 0 0 auto;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 2px;
	min-width: 52px;
	padding: 8px 6px;
	border-radius: var(--wstv-radius);
	border: 1px solid var(--wstv-line);
	background: var(--wstv-surface);
}

.wstv-date-nav__day:hover,
.wstv-date-nav__day:focus-visible {
	border-color: var(--wstv-pitch-bright);
}

.wstv-date-nav__day.is-selected {
	background: var(--wstv-pitch);
	border-color: var(--wstv-pitch);
}

.wstv-date-nav__day.is-selected .wstv-date-nav__dow,
.wstv-date-nav__day.is-selected .wstv-date-nav__num {
	color: #fff;
}

.wstv-date-nav__dow {
	font-size: 0.68rem;
	font-weight: 600;
	color: var(--wstv-muted);
	text-transform: uppercase;
}

.wstv-date-nav__num {
	font-size: 0.95rem;
	font-weight: 700;
}

.wstv-date-nav__day.is-today:not(.is-selected) .wstv-date-nav__dow {
	color: var(--wstv-pitch);
}

.wstv-date-nav__heading {
	margin: 10px 0 16px;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--wstv-muted);
	text-transform: capitalize;
}

@media (min-width: 640px) {
	.wstv-date-nav__day {
		min-width: 60px;
	}
}
