/*
Theme Name: Studio MD1
Theme URI: https://studio-md1.com/
Description: Brza, lagana tema za Studio MD1 (serije, zanimljivosti, chat, radio). Isti dizajn kao stara Bridge-based tema, bez Bridge/WPBakery/LayerSlider balasta.
Author: Studio MD
Version: 1.1.0
Requires at least: 5.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: studiomd1
*/

:root {
	--bg: #161616;
	--fg: #fff;
	--accent: #027b76;
	--card: rgba(48, 48, 48, .53);
	--card-solid: #1b1b1b;
	--bar: #1c1c1c;
	--bar-line: #2b2b2b;
	--line: #a4a4a4;
	--hdr: 80px;
	--w: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: auto; }
body {
	margin: 0;
	display: flex; flex-direction: column; min-height: 100vh;
	background: var(--bg);
	color: var(--fg);
	font: 400 14px/26px Lekton, sans-serif;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}
main { flex: 1 0 auto; width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5, h6, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}
/* One content width for the whole site: header, pages and footer. */
.wrap { width: min(var(--w), calc(100% - 40px)); margin: 0 auto; }

/* ---------- header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 110; height: var(--hdr);
	background: var(--bar); border-bottom: 1px solid var(--bar-line);
	transition: box-shadow .2s;
}
.site-header.is-scrolled { box-shadow: 0 4px 18px rgba(0, 0, 0, .35); }
.hdr-in { display: flex; align-items: center; gap: 24px; height: 100%; }
.logo { flex: none; display: block; line-height: 0; }
.logo img, .ft-logo img { filter: brightness(1.5) saturate(1.15); }
.logo img { height: 60px; width: auto; max-width: none; }
.nav { flex: 1; display: flex; justify-content: center; }
.nav ul { display: flex; gap: 4px; }
.nav a { position: relative; display: block; padding: 0 14px; font-size: 16px; line-height: var(--hdr); color: var(--fg); }
.nav a::after {
	content: ""; position: absolute; left: 14px; right: 14px; bottom: -1px; height: 2px;
	background: var(--accent); transform: scaleX(0); transition: transform .2s;
}
.nav a:hover { color: var(--fg); }
.nav a:hover::after, .nav .current-menu-item > a::after, .nav .current-menu-ancestor > a::after { transform: scaleX(1); }
.search-btn {
	flex: none; display: inline-flex; align-items: center; background: none; border: 0; cursor: pointer;
	color: var(--accent); padding: 0;
}
.search-btn:hover { color: #fff; }
.search-btn svg { width: 26px; height: 28px; fill: currentColor; }
.menu-toggle { display: none; background: none; border: 0; padding: 0; cursor: pointer; width: 27px; height: 22px; position: relative; flex: none; }
.menu-toggle span, .menu-toggle::before, .menu-toggle::after {
	content: ""; position: absolute; left: 0; right: 0; height: 4px; background: var(--accent);
}
.menu-toggle::before { top: 0; }
.menu-toggle span { top: 9px; }
.menu-toggle::after { bottom: 0; }

/* ---------- footer ---------- */
.site-footer { flex: none; margin-top: 40px; background: var(--bar); border-top: 1px solid var(--bar-line); }
.ft-in { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 28px 0; }
.ft-logo { flex: none; line-height: 0; }
.ft-logo img { height: 46px; width: auto; max-width: none; }
.ft-nav ul { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 6px; }
.ft-nav a { display: block; padding: 4px 12px; font-size: 14px; color: #b4b4b4; }
.ft-nav a:hover { color: #fff; }
.ft-copy { padding: 16px 0 18px; border-top: 1px solid var(--bar-line); text-align: center; font-size: 12px; color: #8a8a8a; }

/* ---------- search overlay ---------- */
.search-overlay {
	position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-start; justify-content: center;
	background: rgba(22, 22, 22, .97); padding: 14vh 20px 20px; overflow-y: auto;
}
.search-overlay[hidden] { display: none; }
.search-box { width: min(900px, 100%); }
.search-overlay form { display: flex; border-bottom: 2px solid var(--accent); }
.sr-list { margin-top: 18px; max-height: calc(100vh - 14vh - 150px); overflow-y: auto; }
.sr-list[hidden] { display: none; }
.sr-list li + li { margin-top: 2px; }
.sr-list a {
	display: flex; align-items: center; gap: 16px; padding: 8px 12px; border-left: 3px solid transparent;
	font-size: 18px; line-height: 24px; color: #fff;
}
.sr-list a:hover, .sr-list a.is-active { background: var(--card-solid); border-left-color: var(--accent); color: #fff; }
.sr-list img { flex: none; width: 40px; height: 56px; object-fit: cover; border-radius: 3px; background: #202020; }
.sr-list .sr-all a { min-height: 44px; font-size: 14px; color: #b4b4b4; }
.sr-list .sr-all a:hover, .sr-list .sr-all a.is-active { color: #fff; }
.search-overlay input {
	flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--fg);
	font: 400 32px/60px Lekton, sans-serif; text-transform: uppercase;
}
.search-overlay button[type=submit] { background: none; border: 0; color: var(--accent); cursor: pointer; }
.search-overlay button[type=submit] svg { width: 32px; height: 34px; fill: currentColor; }
.search-close {
	position: absolute; top: 28px; right: 45px; background: none; border: 0; color: var(--fg);
	font: 400 44px/1 Lekton, sans-serif; cursor: pointer;
}

/* ---------- layout ---------- */
.page-body { padding: 48px 0 76px; }
.page-body--plain { padding-bottom: 60px; }

/* ---------- home ---------- */
.hero { height: 420px; margin-top: 32px; border-radius: 4px; overflow: hidden; background: #000; }
.hero img { width: 100%; height: 100%; object-fit: cover; max-width: none; }
.slider { position: relative; }
.slide { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .7s, visibility .7s; }
.slide.is-active { opacity: 1; visibility: visible; }
.slide a { display: block; height: 100%; color: #fff; }
.slide-title {
	position: absolute; left: 0; right: 0; bottom: 0; padding: 60px 30px 46px;
	background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, .65));
	font: 700 26px/1.25 Lekton, sans-serif; text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
}
.slider-arrow {
	position: absolute; top: 50%; z-index: 2; width: 44px; height: 44px; margin-top: -22px;
	border: 0; border-radius: 50%; background: rgba(0, 0, 0, .45); color: #fff; cursor: pointer;
	font: 400 34px/40px sans-serif; opacity: 0; transition: opacity .2s, background-color .2s;
}
.slider:hover .slider-arrow, .slider-arrow:focus-visible { opacity: 1; }
.slider-arrow:hover { background: var(--accent); }
.slider-prev { left: 16px; }
.slider-next { right: 16px; }
.slider-dots { position: absolute; left: 0; right: 0; bottom: 16px; z-index: 2; display: flex; justify-content: center; gap: 8px; }
.slider-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .5); cursor: pointer; transition: background-color .2s, transform .2s; }
.slider-dots button.is-active { background: var(--accent); transform: scale(1.3); }
@media (hover: none) { .slider-arrow { opacity: 1; } }
.hr-row { display: grid; grid-template-columns: 2fr 1fr; align-items: start; padding-top: 24px; }
.hr-row .chat-link { display: block; margin: 10px auto 0; width: 163px; }
.hr-row .radio { padding-left: 20px; line-height: 0; }
.hr-row iframe { border: 0; width: 150px; height: 30px; }
.sec { width: min(var(--w), calc(100% - 40px)); margin: 0 auto; }
.sec-sep {
	box-sizing: content-box; height: 1px; margin: 20px 0 0; padding: 0 0 20px;
	border-top: 1px solid var(--line); text-align: center;
}
.sec-sep span {
	display: inline-block; position: relative; top: -19px; padding: 0 35px;
	background: var(--accent); color: #fff; font: 700 12px/36px Lekton, sans-serif;
}
.sec-body { padding: 55px 0; }
.cards4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px 22px; align-items: start; }
.card { background: var(--card); text-align: center; }
.card img { width: 100%; aspect-ratio: 600 / 350; object-fit: cover; }
.card-text { padding: 19px 20px 10px; }
.card-title { margin: 0 0 10px; font-size: 14px; line-height: 26px; font-weight: 400; color: #f2f2f2; }
.card-date { display: block; font-weight: 500; }

/* ---------- archives ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 35px; align-items: start; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; align-items: start; margin-bottom: 23px; }
.post-card { margin: 0 0 30px; }
.post-card img { width: 100%; aspect-ratio: 600 / 350; object-fit: cover; background: #202020; }
.pc-text { padding: 17px 15px 18px; background: var(--card-solid); }
.pc-title { margin: 0 0 10px; font: 700 15px/23.57px Lekton, sans-serif; letter-spacing: 1px; text-transform: uppercase; }
.pc-title a { color: #fff; }
.pc-title a:hover { color: var(--accent); }
.grid4 .post-card { margin: 0; }
.grid4 .pc-text { padding: 45px 23px 31px; }
.grid4 .pc-title { font-weight: 400; font-size: 18px; line-height: 26px; letter-spacing: 1px; margin: 0; }
.sec-sep--tight { margin-top: 0; }
.search-series { margin: 34px 0 20px; }
.search-posts .sec-sep { margin-top: 40px; margin-bottom: 34px; }
.pager { display: flex; justify-content: center; flex-wrap: wrap; row-gap: 11px; }
.pager li { margin: 0 11px 0 0; }
.pager a, .pager span {
	display: block; width: 42px; height: 42px; border: 2px solid #e5e5e5; border-radius: 4px;
	color: #b4b4b4; font-size: 18px; line-height: 38px; text-align: center; text-transform: uppercase;
}
.pager a:hover { color: #fff; border-color: #fff; }
.pager .is-current span { background: #e5e5e5; color: #5a5a5a; }
.pager li:last-child svg { width: 12px; }
.pager svg { width: 8px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; vertical-align: -1px; }
.empty { text-align: center; padding: 40px 0; font-size: 18px; text-transform: uppercase; }

/* ---------- series poster grid (sub-categories) ---------- */
.series-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); gap: 30px 24px; }
.series-card {
	position: relative; display: block; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 4px;
	background: var(--card-solid); outline: 2px solid transparent; transition: outline-color .2s, transform .2s;
}
.series-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; }
.series-card::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(rgba(22, 22, 22, 0) 55%, rgba(22, 22, 22, .92));
}
.series-name {
	position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 0 10px 12px;
	font: 700 14px/18px Lekton, sans-serif; text-align: center; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}
.series-card:hover { outline-color: var(--accent); transform: translateY(-3px); color: #fff; }

/* ---------- series page: image + episode buttons ---------- */
/* Full content width: the (low-resolution) image sits centred over a dimmed, blurred copy of itself. */
.series-hero {
	position: relative; display: flex; justify-content: center; margin: 0 0 36px;
	border-radius: 4px; overflow: hidden; background: #000;
}
.series-hero::before {
	content: ""; position: absolute; inset: -40px; background: var(--img) center / cover;
	filter: blur(26px) brightness(.45);
}
.series-hero img { position: relative; width: auto; max-width: 100%; height: 440px; max-height: 60vw; object-fit: contain; }
.ep-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 24px; border-bottom: 1px solid #303030; padding-bottom: 18px; }
.ep-tab {
	padding: 0 22px; background: var(--card-solid); border: 1px solid #303030; border-radius: 4px; color: #fff; cursor: pointer;
	font: 700 13px/38px Lekton, sans-serif; text-transform: uppercase; letter-spacing: 1px;
	transition: background-color .15s, border-color .15s;
}
.ep-tab:hover { border-color: var(--accent); }
.ep-tab.is-active { background: var(--accent); border-color: var(--accent); }
.ep-panel { display: none; }
.ep-panel.is-active { display: block; }
.ep-list { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 10px; }
.ep-btn {
	display: block; padding: 8px 4px; background: var(--card-solid); border: 1px solid #303030;
	border-radius: 4px; color: #fff; font-size: 14px; line-height: 22px; text-align: center; white-space: nowrap;
	transition: background-color .15s, border-color .15s;
}
.ep-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.ep-panel:not(.is-open) .ep-more { display: none; }
.ep-show-more {
	display: block; margin: 30px auto 0; padding: 0 40px; background: var(--accent); border: 0; border-radius: 4px;
	color: #fff; font: 700 14px/46px Lekton, sans-serif; text-transform: uppercase; letter-spacing: 1px; cursor: pointer;
	transition: opacity .15s;
}
.ep-show-more:hover { opacity: .85; }
.ep-panel.is-open .ep-show-more { display: none; }

/* ---------- single ---------- */
.post-hero {
	position: relative; width: min(var(--w), calc(100% - 40px)); margin: 32px auto 0;
	border-radius: 4px; overflow: hidden; background: #000;
}
.post-hero img { width: 100%; height: auto; max-width: none; }
.post-hero--empty { min-height: 420px; background: #202020; }
.post-hero::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(rgba(22, 22, 22, 0) 45%, rgba(22, 22, 22, .4)), rgba(0, 0, 0, .33);
}
.post-hero-text {
	position: absolute; inset: 0 0 18px; z-index: 2; display: flex; flex-direction: column;
	align-items: center; justify-content: center; text-align: center; padding: 0 20px;
}
.post-cat, .post-meta { font-size: 10px; font-weight: 500; line-height: 26px; letter-spacing: 3px; text-transform: uppercase; }
.post-cat { margin: 0 0 17px; }
.post-title { font-size: 30px; line-height: 37.5px; font-weight: 700; margin: 0; }
.post-bar { width: 64px; height: 4px; margin: 35px 0; background: linear-gradient(to right, #31c8a2, #ae66fd); }
.post-meta { margin: 0; }
.post-meta .like-btn { background: none; border: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; padding: 0; }
.post-meta .like-btn.is-liked { color: var(--accent); }
.entry { padding-top: 56px; text-align: center; }
.entry > * + * { margin-top: 1em; }
.entry iframe, .entry video { max-width: 100%; display: inline-block; }
.entry a { color: var(--accent); }
.ep-nav {
	width: min(var(--w), calc(100% - 40px)); margin: 40px auto 0;
	display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px;
}
.ep-nav-btn {
	display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 58px; padding: 8px 20px;
	background: var(--card-solid); border: 1px solid #303030; border-radius: 4px; color: #fff;
	font: 700 14px/1.3 Lekton, sans-serif; text-transform: uppercase; letter-spacing: 1px;
	transition: background-color .15s, border-color .15s;
}
.ep-nav-btn small { font-weight: 400; font-size: 12px; letter-spacing: 0; text-transform: none; color: #bdbdbd; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
a.ep-nav-btn:hover { border-color: var(--accent); }
.ep-next { text-align: right; align-items: flex-end; background: var(--accent); border-color: var(--accent); }
.ep-next small { color: #e3f4f3; }
.ep-next:hover { opacity: .9; }
.ep-all { text-align: center; align-items: center; }
.ep-nav-btn.is-off { opacity: .35; }
.ep-nav-btn.is-off:last-child { text-align: right; align-items: flex-end; }
.ep-here { width: min(var(--w), calc(100% - 40px)); margin: 40px auto 0; }
.ep-here-title { margin: 0 0 18px; font-size: 16px; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 2px; }
.ep-btn.is-current { background: var(--accent); border-color: var(--accent); color: #fff; }
.post-foot { width: min(var(--w), calc(100% - 40px)); margin: 56px auto 0; padding: 0 0 40px; text-align: center; }
.share { display: flex; justify-content: center; gap: 10px; padding-bottom: 38px; border-bottom: 1px solid var(--bar-line); }
.share a { color: #bcbcbc; line-height: 0; }
.share a:hover { color: var(--accent); }
.share svg { width: 14px; height: 14px; fill: currentColor; }

/* ---------- 404 ---------- */
.nf { padding: 110px 0 80px; text-align: center; }
.nf h1 { font-size: 32px; line-height: 40px; font-weight: 400; text-transform: uppercase; margin-bottom: 66px; }
.nf p { font-size: 13px; margin-bottom: 52px; }
.nf .btn { display: inline-block; border: 1px solid #fff; padding: 0 29px; font-size: 20px; line-height: 60px; color: #fff; }
.nf .btn:hover { background: #fff; color: var(--bg); }

/* ---------- chat ---------- */
.chat-row { display: grid; grid-template-columns: 5fr 1fr; gap: 20px; align-items: start; }
.chat-row .radio { line-height: 0; }
.chat-row iframe { border: 0; width: 150px; height: 30px; }
.rumbletalk-handle { height: 500px; max-width: 100%; }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
	:root { --hdr: 68px; }
	.hdr-in { gap: 12px; }
	.menu-toggle { display: block; }
	.logo { flex: 1; text-align: center; }
	.logo img { height: 46px; display: inline-block; }
	.nav {
		position: absolute; top: 100%; left: 0; right: 0; display: none; background: var(--bar);
		border-bottom: 1px solid var(--bar-line);
	}
	.nav ul { display: block; }
	.nav a { padding: 0 20px; line-height: 50px; border-top: 1px solid rgba(255, 255, 255, .06); }
	.nav a::after { display: none; }
	.nav .current-menu-item > a { color: var(--accent); }
	.nav-open .nav { display: block; }
	.hero { height: auto; aspect-ratio: 16 / 9; margin-top: 20px; }
	.page-body { padding-top: 28px; }
	.cards4, .grid4 { grid-template-columns: repeat(2, 1fr); }
	.grid3 { grid-template-columns: repeat(2, 1fr); }
	.ep-list { grid-template-columns: repeat(5, minmax(0, 1fr)); }
	.hr-row, .chat-row { grid-template-columns: 1fr; justify-items: center; }
	.hr-row .radio { padding: 10px 0 20px; }
	.post-hero { margin-top: 20px; }
	.ft-in { flex-direction: column; text-align: center; }
	.ft-nav ul { justify-content: center; }
}
@media (max-width: 600px) {
	.ep-nav { grid-template-columns: 1fr 1fr; }
	.ep-all { grid-column: 1 / -1; order: -1; }
	.ep-nav-btn { padding: 8px 12px; font-size: 13px; }
	.slide-title { padding: 40px 16px 34px; font-size: 17px; }
	.slider-arrow { width: 36px; height: 36px; margin-top: -18px; font-size: 28px; line-height: 32px; }
	.cards4, .grid4, .grid3 { grid-template-columns: 1fr; }
	.ep-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.grid3 { gap: 0; }
	.search-btn svg { width: 24px; height: 26px; }
	.post-title { font-size: 24px; line-height: 30px; }
	.post-bar { margin: 20px 0; }
	.entry { padding-top: 32px; }
	.nf { padding-top: 70px; }
	.nf h1 { font-size: 24px; line-height: 32px; margin-bottom: 40px; }
	.search-overlay input { font-size: 22px; }
	.search-close { right: 20px; top: 20px; }
	.pager a, .pager span { width: 38px; height: 38px; line-height: 34px; font-size: 16px; }
	.pager li { margin-right: 6px; }
}
