/*
Theme Name: Marathon Radio
Theme URI: http://marathonradio.ddev.site
Description: Custom child theme for Marathon Radio (Ραδιόφωνο Μαραθώνα) – a Greek internet radio station. Built on Twenty Twenty-Five with a magazine-style news layout, broadcast identity, and full Greek typography support.
Author: Marathon Radio
Author URI: http://marathonradio.ddev.site
Template: twentytwentyfive
Version: 2.8.3
Requires at least: 6.7
Tested up to: 6.9
Requires PHP: 7.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: marathon-radio
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, accessibility-ready, blog, news
*/

/* ===== ACCESSIBILITY: Focus & Touch ===== */

:where(.wp-site-blocks *:focus) {
	outline: 2px solid var(--wp--preset--color--accent-3, #1976D2);
	outline-offset: 2px;
}
.wp-block-button .wp-block-button__link:focus {
	outline-offset: 2px;
}

.wp-block-button .wp-block-button__link {
	min-height: 44px;
	min-width: 44px;
	padding: max(0.75rem, 12px) max(1.5rem, 20px);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 3px;
	font-weight: 600;
	letter-spacing: 0.01em;
	transition: background-color 0.15s ease, transform 0.1s ease;
}
.wp-block-button .wp-block-button__link:hover {
	transform: translateY(-1px);
}
.wp-block-button .wp-block-button__link:active {
	transform: translateY(0);
}

.wp-block-button.is-style-outline .wp-block-button__link {
	border-width: 2px;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: rgba(255, 255, 255, 0.08);
}

.wp-block-navigation .wp-block-navigation-item__content {
	min-height: 44px;
	padding-top: max(0.5em, 8px);
	padding-bottom: max(0.5em, 8px);
	display: inline-flex;
	align-items: center;
}

/* ===== TOP BAR ===== */

.mr-topbar {
	position: relative;
	z-index: 100;
}
.mr-topbar p {
	margin: 0;
	line-height: 1;
}
.mr-live-dot {
	display: inline-flex !important;
	align-items: center;
	gap: 0.4em;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.mr-pulse {
	display: inline-block;
	width: 8px;
	height: 8px;
	background: #D32F2F;
	border-radius: 50%;
	animation: mr-pulse-anim 1.5s ease-in-out infinite;
}
@keyframes mr-pulse-anim {
	0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.5); }
	50% { opacity: 0.8; box-shadow: 0 0 0 6px rgba(211, 47, 47, 0); }
}

/* ===== MAIN HEADER ===== */

.mr-main-header {
	position: sticky;
	top: 0;
	z-index: 99;
	box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

.mr-main-header .mr-site-title,
.mr-main-header .wp-block-site-title {
	margin: 0;
	font-size: clamp(1.2rem, 2.8vw, 1.45rem);
	font-weight: 800;
	letter-spacing: -0.02em;
	line-height: 1.2;
}
.mr-main-header .mr-site-title a,
.mr-main-header .wp-block-site-title a {
	color: #ffffff;
	text-decoration: none;
}
.mr-main-header .mr-site-title a:hover,
.mr-main-header .wp-block-site-title a:hover {
	color: #e8a817;
}

.mr-main-nav .wp-block-navigation-item__content {
	position: relative;
}
.mr-main-nav .wp-block-navigation-item__content::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	width: 0;
	height: 2px;
	background: var(--wp--preset--color--accent-1, #D32F2F);
	transition: width 0.2s ease, left 0.2s ease;
}
.mr-main-nav .wp-block-navigation-item__content:hover::after {
	width: 100%;
	left: 0;
}

/* ===== HERO (full-width carousel + text overlay) ===== */

.mr-hero {
	--mr-hero-side: clamp(2rem, 6vw, 4rem);
	--mr-hero-height: 460px;
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: minmax(var(--mr-hero-height), auto);
	padding-left: var(--mr-hero-side);
	padding-right: var(--mr-hero-side);
	box-sizing: border-box;
}

.mr-hero.alignfull {
	width: calc(100% - (2 * var(--mr-hero-side))) !important;
	margin-left: var(--mr-hero-side) !important;
	margin-right: var(--mr-hero-side) !important;
	max-width: none;
	padding-left: 0;
	padding-right: 0;
}

.mr-hero > .mr-carousel,
.mr-hero > .mr-hero__overlay {
	grid-column: 1;
	grid-row: 1;
}

.mr-hero > .mr-carousel {
	position: relative;
	width: 100%;
	min-height: var(--mr-hero-height);
	height: var(--mr-hero-height);
	z-index: 1;
	overflow: hidden;
}

.mr-hero > .mr-carousel .mr-carousel__track,
.mr-hero > .mr-carousel .mr-carousel__slide,
.mr-hero > .mr-carousel .mr-carousel__slide-link {
	height: 100%;
	min-height: var(--mr-hero-height);
}
.mr-hero > .mr-carousel .mr-carousel__slide img {
	height: 100%;
	object-position: center 40%;
}
.mr-hero > .mr-carousel .mr-carousel__slide::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(
		90deg,
		rgba(15, 25, 35, 0.82) 0%,
		rgba(15, 25, 35, 0.55) 50%,
		rgba(15, 25, 35, 0.15) 100%
	);
	pointer-events: none;
}
.mr-hero:has(.mr-carousel--news) > .mr-carousel .mr-carousel__slide::after {
	background: linear-gradient(
		0deg,
		rgba(15, 25, 35, 0.92) 0%,
		rgba(15, 25, 35, 0.45) 42%,
		rgba(15, 25, 35, 0.1) 100%
	);
}
.mr-hero:has(.mr-carousel--news) .mr-hero__title,
.mr-hero:has(.mr-carousel--news) .mr-hero__subtitle {
	display: none;
}
.mr-hero:has(.mr-carousel--news) .mr-hero__overlay {
	padding: clamp(1.5rem, 4vw, 2.5rem) var(--mr-hero-side) clamp(4rem, 10vw, 6rem);
	pointer-events: none;
}
.mr-hero:has(.mr-carousel--news) .mr-hero__overlay .wp-block-buttons,
.mr-hero:has(.mr-carousel--news) .mr-hero__overlay .mr-hero__badge {
	pointer-events: auto;
}

.mr-hero__overlay {
	position: relative;
	z-index: 3;
	align-self: start;
	width: 100%;
	padding: clamp(3rem, 8vw, 6rem) 0;
	pointer-events: none;
}

.mr-hero__overlay .wp-block-buttons,
.mr-hero__overlay .mr-hero__badge {
	pointer-events: auto;
}
.mr-hero__badge {
	display: inline-block !important;
	font-weight: 800;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	margin-bottom: 0.5rem !important;
}
.mr-hero__title {
	margin-bottom: 0.25em !important;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
.mr-hero__subtitle {
	max-width: 560px;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

@media (max-width: 600px) {
	.mr-hero {
		--mr-hero-side: clamp(1.25rem, 5vw, 2rem);
		--mr-hero-height: 400px;
	}
	.mr-hero > .mr-carousel .mr-carousel__slide::after {
		background: linear-gradient(
			180deg,
			rgba(15, 25, 35, 0.3) 0%,
			rgba(15, 25, 35, 0.8) 100%
		);
	}
	.mr-hero:has(.mr-carousel--news) > .mr-carousel .mr-carousel__slide::after {
		background: linear-gradient(
			0deg,
			rgba(15, 25, 35, 0.95) 0%,
			rgba(15, 25, 35, 0.5) 50%,
			rgba(15, 25, 35, 0.15) 100%
		);
	}
	.mr-hero:has(.mr-carousel--news) .mr-hero__overlay {
		padding-bottom: 4rem;
	}
	.mr-hero__overlay {
		padding: clamp(2rem, 6vw, 4rem) 0;
	}
	.mr-hero__subtitle {
		max-width: 100%;
	}
}

/* ===== PLAYER STRIP ===== */

.mr-player-strip {
	border-top: 3px solid var(--wp--preset--color--accent-1, #D32F2F);
}

/* ===== SECTION TITLES ===== */

.mr-section-title {
	position: relative;
	padding-bottom: 0.5rem;
}
.mr-section-title::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 48px;
	height: 3px;
	background: var(--wp--preset--color--accent-1, #D32F2F);
	border-radius: 2px;
}
.has-text-align-center.mr-section-title::after {
	left: 50%;
	transform: translateX(-50%);
}

/* ===== NEWS GRID ===== */

.mr-news-card {
	background: var(--mr-card-bg, #162029);
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.mr-news-card:hover {
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
	transform: translateY(-2px);
}
.mr-news-card .wp-block-post-featured-image {
	margin: 0;
	overflow: hidden;
}
.mr-news-card .wp-block-post-featured-image img {
	width: 100%;
	height: auto;
	display: block;
	transition: transform 0.3s ease;
}
.mr-news-card:hover .wp-block-post-featured-image img {
	transform: scale(1.03);
}

.mr-news-badge {
	display: inline-flex;
	gap: 0.4em;
	margin-bottom: 0.5rem;
}

.mr-news-badge:empty,
.mr-news-card .wp-block-post-terms:not(:has(a)) {
	display: none;
	margin: 0;
}
.mr-news-badge a {
	display: inline-block;
	background: var(--wp--preset--color--accent-2, #E8A817);
	color: #0F1923 !important;
	padding: 0.2em 0.6em;
	border-radius: 3px;
	font-weight: 700;
	font-size: 0.7rem !important;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none !important;
	line-height: 1.4;
}

.mr-news-card__excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	margin-top: 0.65rem !important;
	margin-bottom: 0 !important;
}

.mr-news-card__excerpt p {
	margin: 0;
}

/* ===== SECTION CARDS ===== */

.mr-section-cards .wp-block-group.has-background {
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}
.mr-section-cards .wp-block-group.has-background:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
	transform: translateY(-2px);
}

/* ===== ARTIST CARDS ===== */

.mr-artist-card {
	text-align: center;
	transition: transform 0.2s ease;
}
.mr-artist-card:hover {
	transform: translateY(-3px);
}
.mr-artist-card .wp-block-post-featured-image {
	overflow: hidden;
	border-radius: 8px;
}
.mr-artist-card .wp-block-post-featured-image img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
	transition: transform 0.3s ease;
}
.mr-artist-card:hover .wp-block-post-featured-image img {
	transform: scale(1.04);
}

/* ===== ABOUT CTA ===== */

.mr-about-cta {
	text-align: center;
}

/* ===== FOOTER ===== */

.mr-footer a {
	color: #9ca3af !important;
	text-decoration: none !important;
	transition: color 0.15s ease;
}
.mr-footer a:hover {
	color: #E8A817 !important;
}
.mr-footer .mr-footer-nav .wp-block-navigation-item__content {
	color: #9ca3af !important;
	min-height: 36px;
	padding-top: 4px;
	padding-bottom: 4px;
}
.mr-footer .mr-footer-nav .wp-block-navigation-item__content:hover {
	color: #E8A817 !important;
}
.mr-footer-columns h3 {
	position: relative;
	padding-bottom: 0.75rem;
	margin-bottom: 1rem !important;
}
.mr-footer-columns h3::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 24px;
	height: 2px;
	background: var(--wp--preset--color--accent-1, #D32F2F);
	border-radius: 1px;
}

/* ===== RESPONSIVE: GALLERIES & EMBEDS ===== */

.wp-block-gallery {
	display: grid;
	gap: 0.5em;
}
.wp-block-gallery img {
	max-width: 100%;
	height: auto;
	display: block;
}
.wp-block-gallery figcaption {
	font-size: 0.875em;
	color: var(--wp--preset--color--accent-4, #4B5563);
	margin-top: 0.25em;
}

.wp-block-embed {
	max-width: 100%;
}
.wp-block-embed iframe,
.wp-block-embed__wrapper iframe {
	max-width: 100%;
}

/* ===== PLACEHOLDER IMAGES ===== */

.mr-placeholder-image {
	margin: 0;
	overflow: hidden;
	background: #0f1923;
	position: relative;
}
.mr-placeholder-image img {
	transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), filter 0.5s ease;
}
.mr-placeholder-image--mousiki img {
	filter: saturate(1.12) contrast(1.08);
}
.mr-placeholder-image--technes img {
	filter: saturate(1.18) contrast(1.1);
}
.mr-placeholder-image--nea img {
	filter: saturate(1.08) contrast(1.04);
}
.mr-news-card:hover .mr-placeholder-image img,
.mr-artist-card:hover .mr-placeholder-image img {
	transform: scale(1.06);
	filter: saturate(1.22) brightness(1.08) contrast(1.05);
}

.mr-news-grid a.mr-external-link::after,
.mr-search__item.mr-external-link::after,
.marathon-radio-source-attribution a.mr-external-link::after {
	content: ' ↗';
	font-size: 0.75em;
	opacity: 0.65;
}

/* ===== RESPONSIVE TWEAKS ===== */

@media (max-width: 781px) {
	.mr-section-cards .wp-block-columns {
		gap: var(--wp--preset--spacing--30, 1rem);
	}
	.mr-artists-grid .wp-block-post-template {
		grid-template-columns: repeat(2, 1fr) !important;
	}
	.mr-footer-columns.wp-block-columns {
		gap: var(--wp--preset--spacing--50, 2rem);
	}
}

@media (max-width: 600px) {
	.mr-topbar .wp-block-group.alignwide > .wp-block-group {
		flex-wrap: wrap;
		justify-content: center !important;
		gap: 0.25rem;
	}
	.mr-news-grid .wp-block-post-template {
		grid-template-columns: 1fr !important;
	}
	.mr-artists-grid .wp-block-post-template {
		grid-template-columns: 1fr !important;
	}
	.mr-section-cards .wp-block-columns {
		flex-direction: column;
	}
	.mr-footer-columns.wp-block-columns {
		flex-direction: column;
	}
}

/* ===== SITE-WIDE DARK MODE ===== */

body.mr-site-dark {
	--mr-dark-bg: #0a1018;
	--mr-dark-surface: #0f1923;
	--mr-dark-elevated: #162029;
	--mr-dark-border: rgba(255, 255, 255, 0.1);
	--mr-dark-text: #eef1f5;
	--mr-dark-muted: #9ca3af;
	--mr-dark-link: #e8a817;
	--mr-card-bg: #162029;
	--mr-article-bg: #ffffff;
	--mr-article-text: #1f2937;
	--mr-article-muted: #4b5563;
	background-color: var(--mr-dark-bg);
	color: var(--mr-dark-text);
}

body.mr-site-dark .wp-site-blocks,
body.mr-site-dark main,
body.mr-site-dark #content {
	background-color: var(--mr-dark-bg);
	color: var(--mr-dark-text);
}

body.mr-site-dark .mr-main-header .wp-block-site-title a,
body.mr-site-dark .mr-main-header .wp-block-navigation-item__content {
	color: var(--mr-dark-text) !important;
}

body.mr-site-dark .wp-block-heading,
body.mr-site-dark .wp-block-query-title,
body.mr-site-dark .wp-block-post-title,
body.mr-site-dark .wp-block-post-title a {
	color: var(--mr-dark-text) !important;
}

body.mr-site-dark .wp-block-post-date,
body.mr-site-dark main p.has-text-color {
	color: var(--mr-dark-muted) !important;
}

body.mr-site-dark main a:not(.wp-block-button__link):not(.wp-element-button):not(.wp-block-post-content a) {
	color: var(--mr-dark-link);
}

body.mr-site-dark main a:not(.wp-block-button__link):not(.wp-element-button):not(.wp-block-post-content a):hover {
	color: #f5c84d;
}

body.mr-site-dark .mr-news-card,
body.mr-site-dark .mr-artist-card {
	background: var(--mr-dark-elevated);
	border-color: var(--mr-dark-border) !important;
}

body.mr-site-dark .mr-artist-card {
	border: 1px solid var(--mr-dark-border);
	padding: 0.75rem !important;
}

body.mr-site-dark .mr-artist-card:hover {
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

body.mr-site-dark .mr-news-section,
body.mr-site-dark .mr-artists-section {
	background-color: var(--mr-dark-surface) !important;
	color: var(--mr-dark-text) !important;
}

body.mr-site-dark .mr-sections,
body.mr-site-dark .mr-about-cta {
	background-color: var(--mr-dark-bg) !important;
	color: var(--mr-dark-text) !important;
}

body.mr-site-dark .mr-sections > .wp-block-group.has-background {
	background-color: var(--mr-dark-elevated) !important;
	border: 1px solid var(--mr-dark-border) !important;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
	color: var(--mr-dark-text) !important;
}

body.mr-site-dark .mr-sections__lead {
	color: #d1d5db !important;
}

body.mr-site-dark .wp-block-query-pagination a,
body.mr-site-dark .wp-block-query-pagination span {
	color: var(--mr-dark-text) !important;
}

body.mr-site-dark .wp-block-post-navigation-link a {
	color: var(--mr-dark-link) !important;
}

/* Light reading surface inside articles only */
body.mr-site-dark .wp-block-post-content,
body.mr-site-dark .mr-article-content {
	background: var(--mr-article-bg);
	color: var(--mr-article-text);
	padding: clamp(1.5rem, 4vw, 2.5rem);
	border-radius: 8px;
	border: 1px solid var(--mr-dark-border);
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

body.mr-site-dark .wp-block-post-content :where(h1, h2, h3, h4, h5, h6),
body.mr-site-dark .mr-article-content :where(h1, h2, h3, h4, h5, h6) {
	color: #0f1923 !important;
}

body.mr-site-dark .wp-block-post-content :where(p, li, blockquote, figcaption),
body.mr-site-dark .mr-article-content :where(p, li, blockquote, figcaption) {
	color: var(--mr-article-muted) !important;
}

body.mr-site-dark .wp-block-post-content a,
body.mr-site-dark .mr-article-content a {
	color: #1976d2 !important;
}

body.mr-site-dark .wp-block-post-content a:hover,
body.mr-site-dark .mr-article-content a:hover {
	color: #0d47a1 !important;
}

body.mr-site-dark .wp-block-post-content .marathon-radio-source-attribution,
body.mr-site-dark .mr-article-content .marathon-radio-source-attribution {
	color: var(--mr-article-muted) !important;
	border-top: 1px solid #e2e6ea;
	padding-top: 1rem;
	margin-top: 1.5rem;
}

.marathon-radio-source-cta {
	margin-top: 1.5rem;
	margin-bottom: 0;
}

.marathon-radio-source-cta__link {
	display: inline-block;
	padding: 0.65rem 1.25rem;
	border-radius: 6px;
	background: #E8A817;
	color: #0f1923 !important;
	font-weight: 700;
	text-decoration: none;
}

.marathon-radio-source-cta__link:hover {
	background: #f0b429;
	color: #0f1923 !important;
}

.mr-news-card__source {
	display: block;
	margin-top: 0.5rem;
	font-size: 0.8125rem;
	color: var(--wp--preset--color--accent-4, #9ca3af);
}

.mr-search__item-source {
	display: block;
	font-size: 0.75rem;
	opacity: 0.85;
	margin-top: 0.15rem;
}

/* ===== SITE-WIDE LIGHT MODE ===== */

body.mr-site-light {
	--mr-dark-bg: #f3f4f6;
	--mr-dark-surface: #ffffff;
	--mr-dark-elevated: #ffffff;
	--mr-dark-border: rgba(15, 25, 35, 0.1);
	--mr-dark-text: #0f1923;
	--mr-dark-muted: #4b5563;
	--mr-dark-link: #b45309;
	--mr-card-bg: #ffffff;
	background-color: var(--mr-dark-bg);
	color: var(--mr-dark-text);
}

body.mr-site-light .wp-site-blocks,
body.mr-site-light main,
body.mr-site-light #content {
	background-color: var(--mr-dark-bg);
	color: var(--mr-dark-text);
}

body.mr-site-light .mr-topbar,
body.mr-site-light .mr-main-header,
body.mr-site-light .mr-footer {
	background-color: #ffffff !important;
	color: #0f1923 !important;
	border-color: rgba(15, 25, 35, 0.1) !important;
}

body.mr-site-light .mr-topbar p,
body.mr-site-light .mr-topbar a,
body.mr-site-light .mr-main-header .mr-site-title a,
body.mr-site-light .mr-main-header .wp-block-site-title a,
body.mr-site-light .mr-main-header .wp-block-navigation-item__content {
	color: #0f1923 !important;
}

body.mr-site-light .mr-topbar a[href*="listen"] {
	color: #b45309 !important;
}

body.mr-site-light .wp-block-heading,
body.mr-site-light .wp-block-query-title,
body.mr-site-light .wp-block-post-title,
body.mr-site-light .wp-block-post-title a {
	color: var(--mr-dark-text) !important;
}

body.mr-site-light .mr-news-card {
	background: #ffffff;
	border-color: var(--mr-dark-border) !important;
	box-shadow: 0 2px 12px rgba(15, 25, 35, 0.06);
}

body.mr-site-light .mr-news-section,
body.mr-site-light .mr-sections,
body.mr-site-light .mr-player-strip {
	background-color: #ffffff !important;
	color: var(--mr-dark-text) !important;
}

body.mr-site-light .mr-sections > .wp-block-group.has-background {
	background-color: #f9fafb !important;
	border: 1px solid var(--mr-dark-border) !important;
	color: var(--mr-dark-text) !important;
}

body.mr-site-light .mr-sections__lead {
	color: #4b5563 !important;
}

body.mr-site-light .wp-block-post-content,
body.mr-site-light .mr-article-content {
	background: #ffffff;
	color: #1f2937;
	border: 1px solid var(--mr-dark-border);
	box-shadow: 0 4px 16px rgba(15, 25, 35, 0.06);
}

body.mr-site-light .mr-contact-info,
body.mr-site-light .mr-contact-form {
	background: #ffffff !important;
	color: #0f1923 !important;
	border-color: var(--mr-dark-border) !important;
}

body.mr-site-light .mr-mini-player__inner {
	background: rgba(255, 255, 255, 0.96);
	border-top-color: rgba(15, 25, 35, 0.1);
}

body.mr-site-light .mr-mini-player__title {
	color: #0f1923;
}

body.mr-site-light .mr-back-to-top {
	background: rgba(255, 255, 255, 0.95);
	color: #0f1923;
	border-color: rgba(15, 25, 35, 0.15);
}
