/*
Theme Name:   Filmų bazė
Theme URI:    https://filmubaze.lt
Author:       Filmubaze.lt
Description:  Juoda-auksinė tema filmų ir aktorių duomenų bazei. Tamsi antraštė ir hero, šviesūs („clear“) įrašai. Sukurta kartu su įskiepiu „Filmų bazė“.
Version:      1.0.0
Requires at least: 6.4
Requires PHP: 7.4
License:      GPL-2.0-or-later
Text Domain:  filmu-baze
*/

/* ==========================================================================
   Spalvos
   ========================================================================== */
:root {
	--fb-gold: #d4af37;
	--fb-gold-light: #f0d27c;
	--fb-gold-dark: #9a7720;
	--fb-gold-grad: linear-gradient(135deg, #f7e3a1 0%, #d4af37 45%, #a07c22 100%);
	--fbt-header-bg: #000;
	--fb-hero-bg: #060606;
	--fbt-footer-bg: #030303;
	--fb-bg: #f7f5f0;
	--fb-surface: #fff;
	--fb-surface-2: #fbfaf6;
	--fb-text: #16140f;
	--fb-muted: #6d685e;
	--fb-border: #e9e4d7;
	--fb-star-off: #ddd6c4;
	--fb-font-display: "Playfair Display", Georgia, "Times New Roman", serif;
	--fbt-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--fbt-header-h: 76px;
}

/* Tamsus įrašų variantas (Išvaizda → Tinkinti → Filmų bazės tema) */
body.fbt-content-dark {
	--fb-bg: #111110;
	--fb-surface: #191917;
	--fb-surface-2: #1f1f1c;
	--fb-text: #efeadd;
	--fb-muted: #9d978a;
	--fb-border: #2c2a24;
	--fb-star-off: #3b382f;
	--fb-gold-dark: #e0bf5c;
	--fb-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px rgba(0, 0, 0, .35);
}

/* ==========================================================================
   Pagrindas
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--fbt-header-h) + 16px); }
body {
	margin: 0;
	background: var(--fb-bg);
	color: var(--fb-text);
	font-family: var(--fbt-font);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--fb-gold-dark); }
h1, h2, h3, h4 { line-height: 1.25; }
::selection { background: var(--fb-gold); color: #000; }
:focus-visible { outline: 2px solid var(--fb-gold); outline-offset: 2px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.fbt-skip:focus { clip: auto; width: auto; height: auto; z-index: 1000; left: 12px; top: 12px; background: var(--fb-gold); color: #000; padding: 10px 16px; border-radius: 6px; }

.fbt-main { min-height: 60vh; }

/* ==========================================================================
   Antraštė
   ========================================================================== */
.fbt-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: var(--fbt-header-bg);
	color: #f4efe2;
	transition: box-shadow .25s, background .25s;
}
.admin-bar .fbt-header { top: 32px; }
.fbt-header::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(212, 175, 55, .6) 20%, rgba(212, 175, 55, .6) 80%, transparent);
}
.fbt-header.is-scrolled { background: rgba(0, 0, 0, .92); backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.fbt-header__inner { display: flex; align-items: center; gap: 32px; height: var(--fbt-header-h); }

.fbt-logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; flex: none; }
.fbt-logo__mark svg { width: 34px; height: 34px; display: block; fill: none; stroke: var(--fb-gold); stroke-width: 1.4; }
.fbt-logo__text { font-family: var(--fb-font-display); font-weight: 700; font-size: 1.45rem; letter-spacing: .01em; white-space: nowrap; }
.fbt-logo__gold { background: var(--fb-gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.custom-logo { max-height: 52px; width: auto; display: block; }

.fbt-nav { margin-left: auto; }
.fbt-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.fbt-menu > li { position: relative; }
.fbt-menu a {
	display: block;
	padding: 10px 14px;
	color: #e8e2d2;
	text-decoration: none;
	font-size: .94rem;
	font-weight: 500;
	letter-spacing: .02em;
	border-radius: 8px;
	transition: color .15s, background .15s;
}
.fbt-menu > li > a { position: relative; }
.fbt-menu > li > a::after {
	content: "";
	position: absolute;
	left: 14px; right: 14px; bottom: 4px;
	height: 2px;
	background: var(--fb-gold-grad);
	transform: scaleX(0);
	transition: transform .2s;
	border-radius: 2px;
}
.fbt-menu > li > a:hover, .fbt-menu > .current-menu-item > a, .fbt-menu > .current-menu-ancestor > a { color: var(--fb-gold-light); }
.fbt-menu > li > a:hover::after, .fbt-menu > .current-menu-item > a::after, .fbt-menu > .current-menu-ancestor > a::after { transform: scaleX(1); }
.fbt-menu .menu-item-has-children > a { padding-right: 26px; }
.fbt-menu .menu-item-has-children > a::before {
	content: "";
	position: absolute;
	right: 11px; top: 50%;
	width: 6px; height: 6px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-70%) rotate(45deg);
	opacity: .7;
}
.fbt-menu .sub-menu {
	list-style: none;
	margin: 0;
	padding: 10px;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background: #0b0b0b;
	border: 1px solid rgba(212, 175, 55, .25);
	border-radius: 12px;
	box-shadow: 0 20px 50px rgba(0, 0, 0, .5);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: all .18s;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2px;
}
.fbt-menu li:hover > .sub-menu, .fbt-menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.fbt-menu .sub-menu a { font-size: .88rem; padding: 8px 10px; white-space: nowrap; }
.fbt-menu .sub-menu a:hover { background: rgba(212, 175, 55, .1); color: var(--fb-gold-light); }

.fbt-header__actions { display: flex; align-items: center; gap: 6px; }
.fbt-icon-btn {
	width: 42px; height: 42px;
	display: inline-flex; align-items: center; justify-content: center;
	background: transparent;
	border: 1px solid rgba(255, 255, 255, .14);
	border-radius: 50%;
	color: #f1ead6;
	cursor: pointer;
	transition: border-color .15s, color .15s;
}
.fbt-icon-btn:hover, .fbt-icon-btn[aria-expanded=true] { border-color: var(--fb-gold); color: var(--fb-gold-light); }
.fbt-icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.fbt-burger { display: none; flex-direction: column; gap: 4px; }
.fbt-burger span { display: block; width: 16px; height: 1.5px; background: currentColor; transition: transform .2s, opacity .2s; }
.fbt-menu-open .fbt-burger span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.fbt-menu-open .fbt-burger span:nth-child(2) { opacity: 0; }
.fbt-menu-open .fbt-burger span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.fbt-search { background: #050505; border-top: 1px solid rgba(255, 255, 255, .06); padding: 18px 0 22px; }

/* Paieškos forma */
.fbt-searchform { position: relative; display: flex; align-items: center; max-width: 680px; }
.fbt-searchform svg { position: absolute; left: 20px; width: 18px; height: 18px; fill: none; stroke: var(--fb-gold); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.fbt-searchform input {
	flex: 1;
	min-width: 0;
	height: 56px;
	padding: 0 130px 0 52px;
	border-radius: 999px;
	border: 1px solid rgba(212, 175, 55, .35);
	background: rgba(255, 255, 255, .06);
	color: #fff;
	font: inherit;
	font-size: 1rem;
	transition: border-color .15s, background .15s;
}
.fbt-searchform input::placeholder { color: #9b958a; }
.fbt-searchform input:focus { outline: 0; border-color: var(--fb-gold); background: rgba(255, 255, 255, .09); }
.fbt-searchform button {
	position: absolute;
	right: 6px;
	height: 44px;
	padding: 0 22px;
	border: 0;
	border-radius: 999px;
	background: var(--fb-gold-grad);
	color: #120f05;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.fbt-searchform button:hover { filter: brightness(1.06); }
/* Šviesiame fone */
.fbt-content-area .fbt-searchform input, .fbt-search-again .fbt-searchform input { background: var(--fb-surface); color: var(--fb-text); border-color: var(--fb-border); }
.fbt-content-area .fbt-searchform input::placeholder { color: var(--fb-muted); }

/* ==========================================================================
   Pradžios hero
   ========================================================================== */
.fbt-hero { padding: 120px 0 110px; min-height: 600px; display: flex; align-items: center; }
.fbt-hero::before { filter: blur(6px) saturate(.9); opacity: .28; background-position: center 30%; }
.fbt-hero::after {
	background:
		radial-gradient(1000px 500px at 80% 0%, rgba(212, 175, 55, .20), transparent 60%),
		radial-gradient(700px 400px at 0% 100%, rgba(212, 175, 55, .08), transparent 60%),
		linear-gradient(90deg, rgba(6, 6, 6, .96) 0%, rgba(6, 6, 6, .75) 55%, rgba(6, 6, 6, .55) 100%),
		linear-gradient(180deg, transparent 60%, rgba(6, 6, 6, 1) 100%);
}
.fbt-hero__inner { max-width: var(--fb-container); }
.fbt-kicker {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 22px;
	color: var(--fb-gold);
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .24em;
	text-transform: uppercase;
}
.fbt-kicker::before { content: ""; width: 36px; height: 1px; background: var(--fb-gold); }
.fbt-hero__title {
	font-family: var(--fb-font-display);
	font-size: clamp(2.6rem, 7vw, 5.4rem);
	line-height: 1.02;
	letter-spacing: -.02em;
	font-weight: 800;
	margin: 0;
	max-width: 15ch;
	color: #fff;
	text-wrap: balance;
}
.fbt-hero__text { max-width: 560px; color: #b8b1a4; font-size: 1.15rem; margin: 24px 0 36px; }
.fbt-hero__search .fbt-searchform input { height: 62px; font-size: 1.05rem; }
.fbt-hero__search .fbt-searchform button { height: 50px; }
.fbt-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 48px; margin: 48px 0 0; padding: 0; }
.fbt-stats li { display: flex; flex-direction: column; }
.fbt-stats strong { font-family: var(--fb-font-display); font-size: 2.2rem; line-height: 1; background: var(--fb-gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fbt-stats span { color: #8f897d; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; margin-top: 6px; }

/* ==========================================================================
   Pradžios sekcijos
   ========================================================================== */
.fbt-home { padding-top: 24px; padding-bottom: 80px; }
.fbt-section { margin-top: 64px; }
.fbt-section__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 24px; }
.fbt-section__head .fb-section__title { margin: 0; }
.fbt-more { color: var(--fb-text); font-weight: 600; font-size: .92rem; text-decoration: none; border-bottom: 1px solid var(--fb-gold); padding-bottom: 2px; white-space: nowrap; }
.fbt-more:hover { color: var(--fb-gold-dark); }

.fbt-genre-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.fbt-genre-tile {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	min-height: 96px;
	padding: 16px 18px;
	border-radius: 14px;
	background: #0b0b0b;
	color: #fff;
	text-decoration: none;
	isolation: isolate;
	transition: transform .2s;
}
.fbt-genre-tile::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: radial-gradient(160px 100px at 100% 0%, rgba(212, 175, 55, .35), transparent 70%);
	transition: opacity .2s;
}
.fbt-genre-tile:hover { transform: translateY(-3px); }
.fbt-genre-tile:hover::before { opacity: 1.6; background: radial-gradient(220px 140px at 100% 0%, rgba(212, 175, 55, .55), transparent 70%); }
.fbt-genre-tile span { font-family: var(--fb-font-display); font-weight: 700; font-size: 1.15rem; }
.fbt-genre-tile small { color: var(--fb-gold); font-size: .78rem; letter-spacing: .06em; }

.fbt-empty-state {
	margin: 64px auto 0;
	max-width: 620px;
	text-align: center;
	padding: 48px 32px;
	background: var(--fb-surface);
	border: 1px solid var(--fb-border);
	border-radius: 18px;
	box-shadow: var(--fb-shadow);
}
.fbt-empty-state h2 { font-family: var(--fb-font-display); font-size: 2rem; margin: 0 0 10px; }
.fbt-empty-state p { color: var(--fb-muted); margin: 0 0 24px; }

/* ==========================================================================
   Įrašai ir puslapiai
   ========================================================================== */
.fbt-page-hero { padding: 72px 0 60px; }
.fbt-page-hero .fb-crumbs a { color: var(--fb-gold); }
.fbt-content-area { padding-top: 48px; padding-bottom: 80px; }
.fbt-entry { max-width: 820px; }
.fbt-entry__media { margin: 0 0 32px; }
.fbt-entry__media img { border-radius: 14px; display: block; width: 100%; }
.fbt-entry__content { max-width: none; }
.fbt-entry__content h2, .fbt-entry__content h3 { font-family: var(--fb-font-display); }
.fbt-entry__content blockquote { margin: 1.6em 0; padding: 4px 0 4px 24px; border-left: 3px solid var(--fb-gold); font-family: var(--fb-font-display); font-size: 1.25rem; }
.fbt-tags a { display: inline-block; margin: 0 6px 6px 0; padding: 4px 12px; border: 1px solid var(--fb-border); border-radius: 999px; font-size: .82rem; text-decoration: none; color: var(--fb-text); }

.fbt-post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 28px; }
.fbt-post-card {
	display: flex;
	flex-direction: column;
	background: var(--fb-surface);
	border: 1px solid var(--fb-border);
	border-radius: 14px;
	overflow: hidden;
	transition: transform .2s, box-shadow .2s, border-color .2s;
}
.fbt-post-card:hover { transform: translateY(-3px); box-shadow: var(--fb-shadow); border-color: rgba(212, 175, 55, .5); }
.fbt-post-card__media img { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.fbt-post-card__body { padding: 22px 24px 24px; }
.fbt-post-card__meta { margin: 0 0 6px; font-size: .78rem; color: var(--fb-gold-dark); letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.fbt-post-card__title { margin: 0 0 8px; font-family: var(--fb-font-display); font-size: 1.35rem; }
.fbt-post-card__title a { color: var(--fb-text); text-decoration: none; }
.fbt-post-card__title a:hover { color: var(--fb-gold-dark); }
.fbt-post-card__excerpt { color: var(--fb-muted); font-size: .95rem; }
.fbt-post-card__excerpt p { margin: 0; }

.post-navigation { margin: 48px 0; max-width: 820px; }
.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.post-navigation a { display: block; padding: 18px 20px; background: var(--fb-surface); border: 1px solid var(--fb-border); border-radius: 12px; text-decoration: none; color: var(--fb-text); }
.post-navigation a:hover { border-color: var(--fb-gold); }
.post-navigation small { display: block; color: var(--fb-gold-dark); font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; }
.post-navigation .nav-next { text-align: right; }

.fbt-search-again { margin-bottom: 16px; }
.fbt-404 { text-align: center; }
.fbt-404 .fbt-searchform { margin: 0 auto 28px; }

/* WordPress lygiavimai */
.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--fb-muted); text-align: center; }

/* ==========================================================================
   Poraštė
   ========================================================================== */
.fbt-footer { position: relative; background: var(--fbt-footer-bg); color: #9d978a; margin-top: 0; }
.fbt-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(212, 175, 55, .5), transparent); }
.fbt-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1.4fr; gap: 48px; padding-top: 64px; padding-bottom: 48px; }
.fbt-footer__brand p { max-width: 340px; margin: 18px 0 0; font-size: .92rem; line-height: 1.7; }
.fbt-footer__title { color: var(--fb-gold); font-size: .76rem; letter-spacing: .2em; text-transform: uppercase; margin: 6px 0 18px; font-weight: 700; }
.fbt-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.fbt-footer__links--cols { grid-template-columns: 1fr 1fr; }
.fbt-footer a { color: #d6cfbf; text-decoration: none; font-size: .92rem; }
.fbt-footer a:hover { color: var(--fb-gold-light); }
.fbt-footer__bottom { border-top: 1px solid rgba(255, 255, 255, .06); padding: 20px 0; font-size: .82rem; }
.fbt-footer__bottom .fb-container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.fbt-footer__note { color: #6e695f; }

/* ==========================================================================
   Filmų bazės įskiepio derinimas su tema
   ========================================================================== */
.fb-hero { margin-top: 0; }
.fb-hero--single .fb-crumbs, .fb-hero--archive .fb-crumbs { margin-bottom: 16px; }
.fb-section__title { font-family: var(--fb-font-display); }
.fb-card__title { font-family: var(--fbt-font); }
.fb-comments .comment-respond { margin-top: 0; }
.fbt-content-dark .fb-btn--ghost { color: var(--fb-text) !important; }
.fbt-content-dark .fb-count { background: var(--fb-gold); color: #000; }
.fbt-content-dark .fb-chip.is-active, .fbt-content-dark .fb-pagination .page-numbers.current { background: var(--fb-gold); color: #000; border-color: var(--fb-gold); }

/* ==========================================================================
   Prisitaikymas
   ========================================================================== */
@media (max-width: 1100px) {
	.fbt-header__inner { gap: 20px; }
	.fbt-menu a { padding: 10px 10px; }
}
@media (max-width: 900px) {
	:root { --fbt-header-h: 66px; }
	.fbt-burger { display: inline-flex; }
	.fbt-nav {
		position: fixed;
		left: 0; right: 0;
		top: var(--fbt-header-h);
		bottom: 0;
		background: #000;
		padding: 16px 16px 40px;
		overflow-y: auto;
		transform: translateX(100%);
		transition: transform .25s ease;
		margin: 0;
	}
	.admin-bar .fbt-nav { top: calc(var(--fbt-header-h) + 46px); }
	.fbt-menu-open .fbt-nav { transform: none; }
	.fbt-menu-open { overflow: hidden; }
	.fbt-header__actions { margin-left: auto; }
	.fbt-menu { flex-direction: column; gap: 0; }
	.fbt-menu > li { border-bottom: 1px solid rgba(255, 255, 255, .06); }
	.fbt-menu a { padding: 16px 6px; font-size: 1.05rem; }
	.fbt-menu > li > a::after { display: none; }
	.fbt-menu .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; display: none; box-shadow: none; border: 0; background: transparent; padding: 0 0 12px 8px; }
	.fbt-menu li.is-open > .sub-menu { display: grid; }
	.fbt-hero { padding: 72px 0 72px; min-height: 0; }
	.fbt-stats { gap: 28px; }
	.fbt-footer__grid { grid-template-columns: 1fr 1fr; }
	.fbt-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 782px) {
	.admin-bar .fbt-header { top: 46px; }
}
@media (max-width: 600px) {
	.admin-bar .fbt-header { top: 0; }
	.fbt-logo__text { font-size: 1.2rem; }
	.fbt-logo__mark svg { width: 28px; height: 28px; }
	.fbt-searchform input { padding-right: 16px; height: 52px; }
	.fbt-searchform button { display: none; }
	.fbt-hero__search .fbt-searchform input { height: 54px; }
	.fbt-hero__text { font-size: 1rem; }
	.fbt-stats strong { font-size: 1.7rem; }
	.fbt-post-grid { grid-template-columns: 1fr; }
	.fbt-genre-grid { grid-template-columns: 1fr 1fr; }
	.fbt-footer__grid { grid-template-columns: 1fr; gap: 32px; }
	.post-navigation .nav-links { grid-template-columns: 1fr; }
	.fbt-section__head { flex-wrap: wrap; }
}
