/* ==========================================================================
   RALLY24 – Esilehe ja artiklivaate stiilileht (assets/css/front-page.css)
   ========================================================================== */

:root {
	--r24-dark: #111111;
	--r24-accent: #C8F000;
	--r24-accent-hover: #b4d800;
	--r24-bg: #F4F4F0;
	--r24-surface: #FFFFFF;
	--r24-border: #E2E2DC;
	--r24-text: #111111;
	--r24-muted: #5A5A54;
	--r24-radius: 8px;
	--r24-font-display: 'Barlow Condensed', -apple-system, BlinkMacSystemFont, sans-serif;
	--r24-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	--r24-max-width: 1320px;
}

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

body.r24-front-page {
	margin: 0;
	background-color: var(--r24-bg);
	color: var(--r24-text);
	font-family: var(--r24-font-body);
	font-size: 15px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

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

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

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

.r24-container {
	width: 100%;
	max-width: var(--r24-max-width);
	margin: 0 auto;
	padding-left: 20px;
	padding-right: 20px;
}

/* 1. PÄIS (Sticky Header) */
.r24-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background-color: var(--r24-dark);
	color: #FFFFFF;
	border-bottom: 1px solid #242424;
}

body.admin-bar .r24-header {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar .r24-header {
		top: 46px;
	}
}

.r24-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	height: 64px;
}

.r24-logo {
	display: inline-flex;
	align-items: baseline;
	font-family: var(--r24-font-display);
	font-weight: 800;
	font-size: 28px;
	letter-spacing: 0.02em;
	line-height: 1;
	white-space: nowrap;
	flex-shrink: 0;
}

.r24-logo__rally { color: #FFFFFF; }
.r24-logo__24 { color: var(--r24-accent); }

.r24-nav__list {
	display: flex;
	align-items: center;
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.r24-nav__list a {
	font-family: var(--r24-font-body);
	font-size: 14px;
	font-weight: 600;
	color: #E4E4DE;
	white-space: nowrap;
	padding: 6px 0;
	border-bottom: 2px solid transparent;
	transition: color 150ms ease, border-color 150ms ease;
}

.r24-nav__list a:hover,
.r24-nav__list .current-menu-item a {
	color: var(--r24-accent);
	border-bottom-color: var(--r24-accent);
}

.r24-header__actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.r24-header-search {
	display: flex;
	align-items: center;
	background: #1D1D1D;
	border: 1px solid #2E2E2E;
	border-radius: 6px;
	padding: 0 8px;
}

.r24-header-search__input {
	width: 130px;
	background: transparent;
	border: 0;
	color: #FFFFFF;
	font-size: 13px;
	padding: 6px 4px;
	outline: none;
}

.r24-header-search__input::placeholder { color: #8C8C86; }

.r24-header-search__btn {
	background: transparent;
	border: 0;
	color: #C8F000;
	cursor: pointer;
	padding: 4px;
	display: inline-flex;
	align-items: center;
}

.r24-lang-switcher {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	background: #1D1D1D;
	border: 1px solid #2E2E2E;
	border-radius: 6px;
	padding: 2px;
}

.r24-lang-btn {
	font-size: 11px;
	font-weight: 700;
	padding: 4px 7px;
	border-radius: 4px;
	color: #B4B4AE;
	transition: background-color 150ms ease, color 150ms ease;
}

.r24-lang-btn.is-active,
.r24-lang-btn:hover {
	background-color: var(--r24-accent);
	color: var(--r24-dark);
}

.r24-mobile-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 4px;
	width: 36px;
	height: 36px;
	background: #1D1D1D;
	border: 1px solid #2E2E2E;
	border-radius: 6px;
	padding: 8px;
	cursor: pointer;
}

.r24-mobile-toggle span {
	display: block;
	width: 100%;
	height: 2px;
	background: #FFFFFF;
}

.r24-mobile-drawer {
	background: #181818;
	border-top: 1px solid #2A2A2A;
	padding: 12px 20px 18px;
}

.r24-mobile-drawer__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 8px;
}

.r24-mobile-drawer__list a {
	display: block;
	padding: 8px 0;
	font-weight: 600;
	color: #FFFFFF;
	border-bottom: 1px solid #262626;
}

/* 2. VÄLKUUDISTE RIBA */
.r24-ticker {
	background-color: var(--r24-accent);
	color: var(--r24-dark);
	border-bottom: 1px solid #B0D400;
}

.r24-ticker__inner {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 40px;
	padding-top: 6px;
	padding-bottom: 6px;
}

.r24-ticker__badge {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-family: var(--r24-font-display);
	font-weight: 800;
	font-size: 14px;
	letter-spacing: 0.05em;
	background: var(--r24-dark);
	color: #FFFFFF;
	padding: 3px 9px;
	border-radius: 4px;
	flex-shrink: 0;
}

.r24-ticker__dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background-color: #E11D48;
	animation: r24-pulse 1.5s infinite ease-in-out;
}

@keyframes r24-pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.45; transform: scale(0.8); }
}

.r24-ticker__link {
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	flex: 1;
}

.r24-ticker__link:hover { text-decoration: underline; }

.r24-ticker__time {
	font-size: 12px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	opacity: 0.75;
	flex-shrink: 0;
}

/* 3. PÕHISISU 2-VEERULINE PAIGUTUS */
.r24-main { padding: 28px 0 56px; }

.r24-layout {
	display: grid;
	grid-template-columns: minmax(0, 68%) minmax(0, 32%);
	gap: 28px;
	align-items: start;
}

.r24-feed {
	min-width: 0;
}

.r24-feed__header { margin-bottom: 20px; }

.r24-feed__title-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
	margin-bottom: 14px;
}

.r24-section-title {
	margin: 0;
	font-family: var(--r24-font-display);
	font-weight: 800;
	font-size: 32px;
	line-height: 1.05;
	letter-spacing: 0.01em;
	text-transform: uppercase;
}

.r24-live-search__input {
	width: 240px;
	padding: 8px 12px;
	font-family: var(--r24-font-body);
	font-size: 13px;
	color: var(--r24-text);
	background: var(--r24-surface);
	border: 1px solid var(--r24-border);
	border-radius: 6px;
	outline: none;
	transition: border-color 150ms ease;
}

.r24-live-search__input:focus { border-color: var(--r24-dark); }

.r24-filters {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.r24-filter-btn {
	font-family: var(--r24-font-body);
	font-size: 13px;
	font-weight: 600;
	padding: 7px 14px;
	border-radius: 6px;
	border: 1px solid var(--r24-border);
	background: var(--r24-surface);
	color: var(--r24-text);
	cursor: pointer;
	white-space: nowrap;
	transition: background-color 150ms ease, border-color 150ms ease;
}

.r24-filter-btn:hover { border-color: var(--r24-dark); }

.r24-filter-btn.is-active {
	background: var(--r24-accent);
	border-color: var(--r24-accent);
	color: var(--r24-dark);
	font-weight: 700;
}

/* Juhtlugu: pilt püsib rangelt oma veerus ega kattu kunagi tekstiga */
.featured-card {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	background: var(--r24-surface);
	border: 1px solid var(--r24-border);
	border-radius: var(--r24-radius);
	overflow: hidden;
	margin-bottom: 20px;
}

.featured-card__media {
	position: relative;
	display: block;
	width: 100%;
	min-width: 0;
	height: 100%;
	min-height: 290px;
	overflow: hidden;
	background: #1A1A1A;
}

.featured-card__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-card__body {
	position: relative;
	z-index: 1;
	min-width: 0;
	background: var(--r24-surface);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: 24px;
}

.featured-card__title {
	margin: 0 0 12px;
	font-family: var(--r24-font-display);
	font-weight: 800;
	font-size: 32px;
	line-height: 1.06;
	text-wrap: balance;
}

.featured-card__title a:hover {
	text-decoration: underline;
	text-decoration-thickness: 2px;
}

.featured-card__excerpt {
	margin: 0 0 18px;
	font-size: 14px;
	line-height: 1.55;
	color: #3A3A36;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Uudiste ruudustiku kaardid */
.news-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
}

.news-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	background: var(--r24-surface);
	border: 1px solid var(--r24-border);
	border-radius: var(--r24-radius);
	overflow: hidden;
	transition: border-color 150ms ease;
}

.news-card:hover { border-color: #C4C4BC; }

.news-card__media {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #1A1A1A;
}

.news-card__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-card:hover .featured-card__img,
.news-card:hover .news-card__img {
	transform: scale(1.025);
}

.r24-watermark {
	position: absolute;
	right: 10px;
	bottom: 8px;
	z-index: 2;
	font-family: var(--r24-font-display);
	font-weight: 800;
	font-size: 26px;
	line-height: 1;
	color: rgba(200, 240, 0, 0.72);
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.65);
	pointer-events: none;
	user-select: none;
}

.r24-img-fallback {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--r24-font-display);
	font-weight: 800;
	font-size: 24px;
	color: #555550;
}

.r24-cat-label {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--r24-dark);
	background: var(--r24-accent);
	padding: 3px 8px;
	border-radius: 4px;
	margin-bottom: 10px;
}

.r24-meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 500;
	color: var(--r24-muted);
	font-variant-numeric: tabular-nums;
	margin-top: auto;
}

.news-card__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex: 1;
	padding: 18px;
}

.news-card__title {
	margin: 0 0 8px;
	font-family: var(--r24-font-display);
	font-weight: 700;
	font-size: 22px;
	line-height: 1.12;
	text-wrap: balance;
}

.news-card__title a:hover { text-decoration: underline; }

.news-card__excerpt {
	margin: 0 0 14px;
	font-size: 13.5px;
	line-height: 1.5;
	color: #4A4A44;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.r24-story-item.is-hidden { display: none !important; }

.r24-empty-state {
	background: var(--r24-surface);
	border: 1px solid var(--r24-border);
	border-radius: var(--r24-radius);
	padding: 28px;
	text-align: center;
	color: var(--r24-muted);
	margin: 16px 0;
}

.r24-load-more-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 16px;
	margin-top: 28px;
}

.r24-btn-primary {
	font-family: var(--r24-font-display);
	font-weight: 700;
	font-size: 17px;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	padding: 12px 28px;
	border-radius: 6px;
	border: 0;
	background: var(--r24-accent);
	color: var(--r24-dark);
	cursor: pointer;
	transition: background-color 150ms ease;
}

.r24-btn-primary:hover { background: var(--r24-accent-hover); }
.r24-btn-primary:disabled { opacity: 0.6; cursor: wait; }

.r24-pagination {
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}

.r24-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 34px;
	padding: 0 10px;
	font-size: 13px;
	font-weight: 600;
	background: var(--r24-surface);
	border: 1px solid var(--r24-border);
	border-radius: 6px;
}

.r24-pagination .page-numbers.current {
	background: var(--r24-dark);
	border-color: var(--r24-dark);
	color: var(--r24-accent);
}

/* Üksiku artikli vaade (single.php) */
.r24-single-article {
	max-width: 880px;
	margin: 0 auto;
	background: var(--r24-surface);
	border: 1px solid var(--r24-border);
	border-radius: var(--r24-radius);
}

.r24-single-article__inner {
	padding: 32px;
}

.r24-single-article__title {
	margin: 4px 0 0;
	font-family: var(--r24-font-display);
	font-weight: 800;
	font-size: clamp(28px, 4vw, 40px);
	line-height: 1.06;
	text-wrap: balance;
}

.r24-single-article__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 14px 0 22px;
	padding-bottom: 16px;
	border-bottom: 1px solid var(--r24-border);
	font-size: 13px;
	font-weight: 500;
	color: var(--r24-muted);
	font-variant-numeric: tabular-nums;
}

.r24-single-article__media {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	margin: 0 0 24px;
	border-radius: 6px;
	overflow: hidden;
	background: #1A1A1A;
}

.r24-single-article__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.r24-single-content {
	font-size: 16px;
	line-height: 1.7;
	color: #222220;
}

.r24-single-content p {
	margin: 0 0 18px;
}

.r24-single-content img {
	border-radius: 6px;
	margin: 18px auto;
}

.r24-single-content figcaption {
	font-size: 12px;
	color: var(--r24-muted);
	text-align: center;
	margin-top: 6px;
}

/* Külgpaneel */
.r24-sidebar {
	position: sticky;
	top: 84px;
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
}

body.admin-bar .r24-sidebar {
	top: 116px;
}

.r24-widget {
	background: var(--r24-surface);
	border: 1px solid var(--r24-border);
	border-radius: var(--r24-radius);
	padding: 20px;
}

.r24-widget__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding-bottom: 14px;
	margin-bottom: 14px;
	border-bottom: 1px solid var(--r24-border);
}

.r24-widget__title {
	margin: 0;
	font-family: var(--r24-font-display);
	font-weight: 800;
	font-size: 21px;
	text-transform: uppercase;
	line-height: 1.1;
}

.r24-tabs {
	display: inline-flex;
	background: var(--r24-bg);
	padding: 3px;
	border-radius: 6px;
	gap: 2px;
}

.r24-tab {
	border: 0;
	background: transparent;
	font-family: var(--r24-font-body);
	font-size: 12px;
	font-weight: 600;
	padding: 5px 10px;
	border-radius: 4px;
	color: var(--r24-muted);
	cursor: pointer;
	white-space: nowrap;
}

.r24-tab.is-active {
	background: var(--r24-dark);
	color: var(--r24-accent);
}

.r24-calendar-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.r24-calendar-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 8px 0;
	border-bottom: 1px solid #F0F0EA;
}

.r24-calendar-item:last-child { border-bottom: 0; padding-bottom: 0; }
.r24-calendar-item.is-hidden { display: none; }

.r24-date-box {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-width: 54px;
	padding: 6px 4px;
	background: var(--r24-bg);
	border: 1px solid var(--r24-border);
	border-radius: 6px;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.r24-date-box__day {
	font-family: var(--r24-font-display);
	font-weight: 800;
	font-size: 15px;
	line-height: 1.1;
}

.r24-date-box__month {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--r24-muted);
}

.r24-calendar-item__info { flex: 1; min-width: 0; }

.r24-calendar-item__name {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.3;
}

.r24-surface-tag {
	display: inline-block;
	font-size: 11px;
	font-weight: 600;
	color: var(--r24-muted);
	margin-top: 2px;
}

.r24-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
	font-variant-numeric: tabular-nums;
}

.r24-table th {
	text-align: left;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--r24-muted);
	padding: 0 4px 8px;
	border-bottom: 1px solid var(--r24-border);
}

.r24-table td {
	padding: 8px 4px;
	border-bottom: 1px solid #F0F0EA;
	vertical-align: middle;
}

.r24-table tr:last-child td { border-bottom: 0; }
.r24-table .is-right { text-align: right; }

.r24-table__pos {
	width: 28px;
	font-family: var(--r24-font-display);
	font-weight: 800;
	font-size: 16px;
}

.r24-table__name { display: block; font-weight: 700; }
.r24-table__sub { display: block; font-size: 11px; color: var(--r24-muted); }

.r24-table__pts {
	font-family: var(--r24-font-display);
	font-weight: 800;
	font-size: 17px;
}

.r24-coming-soon {
	background: var(--r24-bg);
	border: 1px solid var(--r24-border);
	border-radius: 6px;
	padding: 20px 16px;
	text-align: center;
}

.r24-coming-soon__badge {
	display: inline-block;
	font-family: var(--r24-font-display);
	font-weight: 800;
	font-size: 15px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	background: var(--r24-accent);
	color: var(--r24-dark);
	padding: 4px 10px;
	border-radius: 4px;
	margin-bottom: 10px;
}

.r24-coming-soon__text {
	margin: 0;
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--r24-muted);
}

/* Jalus */
.r24-footer {
	background-color: var(--r24-dark);
	color: #E4E4DE;
	padding: 40px 0 24px;
	border-top: 3px solid var(--r24-accent);
}

.r24-footer__inner {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 32px;
	flex-wrap: wrap;
	padding-bottom: 24px;
	border-bottom: 1px solid #262626;
}

.r24-footer__tagline {
	margin: 10px 0 0;
	font-size: 14px;
	color: #A4A49E;
	max-width: 340px;
}

.r24-footer__links {
	display: flex;
	flex-wrap: wrap;
	gap: 18px 24px;
	align-items: center;
}

.r24-footer__links a {
	font-size: 14px;
	font-weight: 600;
	color: #D4D4CE;
}

.r24-footer__links a:hover { color: var(--r24-accent); }

.r24-footer__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px 20px;
	padding-top: 18px;
	font-size: 12px;
	color: #7D7D77;
}

.r24-footer__bottom p { margin: 0; }

.r24-footer__contact a {
	color: #D4D4CE;
	font-weight: 600;
	transition: color 150ms ease;
}

.r24-footer__contact a:hover {
	color: var(--r24-accent);
	text-decoration: underline;
}

@media (max-width: 1024px) {
	.r24-layout { grid-template-columns: 1fr; }
	.r24-sidebar { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
	.r24-nav, .r24-header-search { display: none; }
	.r24-mobile-toggle { display: inline-flex; }
	.featured-card, .news-grid, .r24-sidebar { grid-template-columns: 1fr; }
	.featured-card__media { height: auto; min-height: 0; aspect-ratio: 16 / 9; }
	.r24-single-article__inner { padding: 20px; }
	.r24-live-search, .r24-live-search__input { width: 100%; }
}
