/*
Theme Name:   Fanminton Child
Theme URI:    https://fanminton.id/
Description:  Child theme GeneratePress untuk Fanminton.id, direktori badminton se-Indonesia. Versi 2: header merah 3 lapis, beranda full-width (hero miring, kartu cepat, papan pertandingan, artikel model majalah), gaya Gen Z (outline tebal, bayangan tegas, tombol pill, stiker, ticker), font lokal Bricolage Grotesque + Plus Jakarta Sans, bar navigasi dock di HP. Butuh tema induk GeneratePress.
Author:       Fanminton
Author URI:   https://fanminton.id/
Template:     generatepress
Version:      2.4.4
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  fanminton-child
Tags:         blog, news, custom-colors, custom-menu, right-sidebar, sticky-post
*/

/* ==========================================================================
   Kerangka situs (front-end). Komponen blok ada di assets/css/components.css
   ========================================================================== */

html { overflow-x: clip; }
body {
	background-color: var(--fm-floor);
	background-image: radial-gradient(rgba(22, 22, 22, .09) 1.2px, transparent 1.2px);
	background-size: 22px 22px;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}

/* ---------- Lapis 1: strip atas ---------- */
.fm-topbar {
	background: var(--fm-ink);
	color: #D6D6D6;
	font-size: .8rem;
}
.fm-topbar-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
	min-height: 34px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}
.fm-topbar-tag { font-family: var(--fm-font-head); font-weight: 700; letter-spacing: .1em; }
.fm-topbar-tag::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--fm-green); margin-right: .5em; vertical-align: .1em; }
.fm-topbar-links { display: flex; align-items: center; gap: 1.1rem; margin: 0; padding: 0; list-style: none; }
.fm-topbar-links a { color: #fff; text-decoration: none; font-weight: 600; }
.fm-topbar-links a:hover { color: var(--fm-yellow); }
.fm-topbar .fm-social { gap: .2rem; }
.fm-topbar .fm-social a { width: 26px; height: 26px; border: 0; }
.fm-topbar .fm-social svg { width: 15px; height: 15px; }
@media (max-width: 768px) {
	.fm-topbar-links li:not(.fm-topbar-cta) { display: none; }
	.fm-topbar-inner { padding: 0 14px; }
}

/* ---------- Lapis 2: header merah sticky ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 500;
	background: var(--fm-red);
	border-bottom: 3px solid var(--fm-ink);
	box-shadow: none;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

body .site-header .inside-header { padding-top: 8px; padding-bottom: 8px; align-items: center; }

.site-logo img, .site-logo .header-image { height: 44px; width: auto; max-width: 220px; aspect-ratio: 690 / 200; }
@media (max-width: 768px) { .site-logo img, .site-logo .header-image { height: 36px; max-width: 170px; } }

.main-title { font-family: var(--fm-font-head); font-size: 2rem; }
.main-title a, .main-title a:hover { color: #fff; }

body .main-navigation { background: transparent; }
body .main-navigation .main-nav ul li a {
	font-family: var(--fm-font-head);
	font-weight: 700;
	font-size: 1.08rem;
	letter-spacing: .05em;
	color: #fff;
	line-height: 38px;
	padding-left: 14px;
	padding-right: 14px;
	margin: 8px 1px;
	border-radius: 999px;
	transition: background-color .12s ease, color .12s ease;
}
body .main-navigation .main-nav ul li:not([class*="current-menu-"]):hover > a,
body .main-navigation .main-nav ul li:not([class*="current-menu-"]):focus-within > a {
	background: var(--fm-red-deep);
	color: #fff;
}
body .main-navigation .main-nav ul li[class*="current-menu-"] > a { background: #fff; color: var(--fm-red); }
body .main-navigation .main-nav ul li .dropdown-menu-toggle { color: inherit; }

body .main-navigation ul ul {
	background: #fff;
	border: var(--fm-stroke);
	border-radius: var(--fm-radius-sm);
	box-shadow: var(--fm-shadow-sm);
	overflow: hidden;
}
body .main-navigation .main-nav ul ul li a,
body .main-navigation .main-nav ul ul li[class*="current-menu-"] > a {
	font-family: var(--fm-font-body);
	font-style: normal;
	text-transform: none;
	letter-spacing: 0;
	font-size: .95rem;
	font-weight: 600;
	line-height: 1.4;
	margin: 0;
	border-radius: 0;
	color: var(--fm-ink);
	background: #fff;
}
body .main-navigation .main-nav ul ul li:not([class*="current-menu-"]):hover > a { background: var(--fm-pink); color: var(--fm-ink); }

body .main-navigation .menu-toggle,
body .main-navigation .menu-toggle:hover,
body .main-navigation .menu-toggle:focus {
	font-family: var(--fm-font-head);
	font-weight: 700;
	letter-spacing: .05em;
	color: #fff;
	background: transparent;
	border: 0;
	box-shadow: none;
	border-radius: 0;
	transform: none;
	padding-left: 10px;
	padding-right: 10px;
}
@media (max-width: 768px) {
	body .main-navigation.toggled .main-nav > ul { background: var(--fm-red); border-top: 2px solid rgba(255, 255, 255, .25); padding: 6px 0 10px; }
	body .main-navigation .main-nav ul li a { margin: 2px 10px; }
}

/* Tombol kuning di header (hook tema) atau item menu ber-class fm-btn */
.fm-header-btn,
body .main-navigation .main-nav ul li.fm-btn > a {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
	font-family: var(--fm-font-head);
	font-weight: 700;
	font-size: 1.02rem;
	letter-spacing: .05em;
	line-height: 1;
	background: var(--fm-yellow);
	color: var(--fm-ink) !important;
	padding: .72em 1.1em;
	border: var(--fm-stroke);
	border-radius: 999px;
	box-shadow: var(--fm-shadow-sm);
	text-decoration: none;
	white-space: nowrap;
	margin-left: .5rem;
	transition: transform .12s ease, box-shadow .12s ease;
}
.fm-header-btn:hover, .fm-header-btn:focus,
body .main-navigation .main-nav ul li.fm-btn > a:hover { background: #FFD45E !important; transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--fm-ink); }
.fm-header-btn svg { width: 16px; height: 16px; flex: none; }
.main-navigation .menu-bar-items { align-items: center; }
@media (max-width: 768px) { .fm-header-btn { font-size: .9rem; padding: .6em .85em; margin-left: .2rem; } }

/* ---------- Lapis 3: strip info ---------- */
.fm-infobar { background: var(--fm-red-deep); border-bottom: 3px solid var(--fm-ink); color: #fff; }
.fm-infobar-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 7px 24px;
	display: flex;
	align-items: center;
	gap: .7rem;
	font-size: .9rem;
	overflow: hidden;
	white-space: nowrap;
}
.fm-infobar-inner .fm-badge { flex: none; font-size: .72rem; }
.fm-infobar a { color: #fff; text-decoration: none; font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.fm-infobar a:hover { color: var(--fm-yellow); }
.fm-infobar a::after { content: " →"; color: var(--fm-yellow); }
@media (max-width: 768px) { .fm-infobar-inner { padding: 6px 14px; font-size: .82rem; } }

/* ---------- Progress baca (artikel) ---------- */
.fm-progress {
	position: fixed;
	top: 0;
	left: 0;
	height: 5px;
	width: 100%;
	transform-origin: 0 50%;
	transform: scaleX(0);
	background: var(--fm-yellow);
	z-index: 1000;
	pointer-events: none;
}
.admin-bar .fm-progress { top: 32px; }
@media (max-width: 782px) { .admin-bar .fm-progress { top: 46px; } }

/* ---------- Beranda full-width ---------- */
body.fm-front .site.grid-container { max-width: none; padding: 0; }
body.fm-front .site-content { display: block; padding: 0; }
body.fm-front .site-main { margin: 0 !important; }
body.fm-front .site-main > article { margin: 0; }
body.fm-front .inside-article { padding: 0 !important; background: transparent !important; border: 0 !important; box-shadow: none !important; }
body.fm-front .entry-content { margin: 0 !important; }
body.fm-front .entry-content > * { margin-top: 0; margin-bottom: 0; }

.fm-band > *, .fm-hero > * {
	max-width: 1200px;
	margin-left: auto !important;
	margin-right: auto !important;
}
.fm-quick { max-width: calc(1200px + 4rem); margin-left: auto !important; margin-right: auto !important; }

/* ---------- Konten & kontainer umum ---------- */
body .separate-containers .inside-article,
body .separate-containers .comments-area,
body .separate-containers .page-header,
body .separate-containers .paging-navigation,
body .inside-page-header {
	background: #fff;
	border: var(--fm-stroke);
	border-radius: var(--fm-radius);
	box-shadow: var(--fm-shadow-sm);
}
.entry-meta, .entry-meta a { color: var(--fm-muted); font-size: .86rem; }
.entry-meta a:hover { color: var(--fm-red); }
.entry-content a:not(.wp-block-button__link):not(.fm-cat-badge):not(.fm-badge) {
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
	text-decoration-color: rgba(224, 38, 46, .4);
}
.entry-content a:not(.wp-block-button__link):not(.fm-cat-badge):not(.fm-badge):hover { background: var(--fm-yellow); color: var(--fm-ink); text-decoration-color: var(--fm-ink); }
.fm-front .entry-content a:not(.wp-block-button__link):hover { background: transparent; }
.fm-entry-cats { margin-bottom: .7rem; display: flex; flex-wrap: wrap; gap: .35rem; }

/* Artikel tunggal: judul besar */
.single .entry-header .entry-title { font-size: clamp(2.3rem, 5.4vw, 3.8rem); line-height: .92; margin-bottom: .6rem; }
.single .featured-image img, .single .post-image img { border: var(--fm-stroke); border-radius: var(--fm-radius); }
.single .entry-content > p:first-of-type { font-size: 1.15rem; font-weight: 500; }

/* Arsip: judul */
.page-header .page-title { font-size: clamp(2.3rem, 5vw, 3.4rem); line-height: .95; }
.page-header .page-title::before {
	content: "";
	display: inline-block;
	width: .45em;
	height: .45em;
	margin-right: .3em;
	border-radius: 50%;
	background: var(--fm-red);
	border: 2px solid var(--fm-ink);
	vertical-align: .1em;
}
body .separate-containers .page-header { background: var(--fm-yellow); }
.taxonomy-description { color: var(--fm-ink); }

/* ---------- Daftar artikel (arsip, kategori, tag, cari) ---------- */
.fm-list .site-main > article { margin-bottom: 14px; }
.fm-list .site-main > article .inside-article {
	display: grid;
	grid-template-columns: 1fr;
	grid-template-areas: "head" "sum" "foot";
	column-gap: 22px;
	align-content: start;
	padding: 16px 18px;
	transition: transform .12s ease, box-shadow .12s ease;
}
.fm-list .site-main > article .inside-article:hover { transform: translate(-2px, -2px); box-shadow: var(--fm-shadow); }
.fm-list .site-main > article.has-post-thumbnail .inside-article {
	grid-template-columns: 240px 1fr;
	grid-template-areas: "img head" "img sum" "img foot";
}
.fm-list .site-main > article .inside-article > .entry-header { grid-area: head; }
.fm-list .site-main > article .inside-article > .post-image { grid-area: img; margin: 0 !important; align-self: start; }
.fm-list .site-main > article .inside-article > .entry-summary,
.fm-list .site-main > article .inside-article > .entry-content { grid-area: sum; margin-top: .4rem; }
.fm-list .site-main > article .inside-article > footer.entry-meta { grid-area: foot; margin-top: .5rem; }
.fm-list .post-image img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; border: 2px solid var(--fm-ink); border-radius: var(--fm-radius-sm); }
.fm-list .entry-title { font-size: 1.65rem; line-height: 1.02; margin-bottom: .25rem; }
.fm-list .entry-title a { color: var(--fm-ink); text-decoration: none; }
.fm-list .entry-title a:hover { color: var(--fm-red); }
.fm-list .entry-summary p { font-size: .96rem; margin-bottom: 0; }
.fm-list .entry-summary .read-more-container,
.fm-list footer.entry-meta .tags-links,
.fm-list footer.entry-meta .comments-link { display: none; }
@media (max-width: 768px) {
	.fm-list .site-main > article.has-post-thumbnail .inside-article { grid-template-columns: 104px 1fr; grid-template-areas: "img head" "img head"; column-gap: 12px; padding: 12px; }
	.fm-list .entry-title { font-size: 1.2rem; }
	.fm-list .entry-summary, .fm-list footer.entry-meta { display: none; }
}

.paging-navigation .page-numbers {
	display: inline-block;
	min-width: 2.4em;
	padding: .35em .7em;
	text-align: center;
	font-family: var(--fm-font-head);
	font-weight: 700;
	border: 2px solid var(--fm-ink);
	border-radius: 999px;
	background: #fff;
	text-decoration: none;
	color: var(--fm-ink);
}
.paging-navigation .page-numbers.current { background: var(--fm-red); color: #fff; }

/* ---------- Sidebar ---------- */
body .sidebar .widget {
	background: #fff;
	border: var(--fm-stroke);
	border-radius: var(--fm-radius);
	box-shadow: var(--fm-shadow-sm);
	padding: 18px 20px;
	font-size: .95rem;
}
.sidebar .widget-title, .sidebar .widget h2 { font-size: 1.35rem; margin-bottom: .8rem; }
.sidebar .widget ul { margin-left: 0; }
.sidebar .widget ul li { list-style: none; padding: .4rem 0; border-bottom: 1px dashed var(--fm-line); }
.sidebar .widget ul li:last-child { border-bottom: 0; }
.sidebar .widget a { text-decoration: none; font-weight: 600; color: var(--fm-ink); }
.sidebar .widget a:hover { color: var(--fm-red); }
.sidebar .widget:has(.fm-cta) { background: var(--fm-yellow); }

/* ---------- Footer ---------- */
body .site-footer { margin-top: 0; border-top: var(--fm-stroke); }
body:not(.fm-front) .site-footer { margin-top: 56px; }
body .site-footer,
body .site-footer .footer-widgets,
body .site-info { background: var(--fm-ink); color: #D6D6D6; }
body .site-footer a { color: #fff; text-decoration: none; }
body .site-footer a:hover { color: var(--fm-yellow); }
body .footer-widgets .widget-title, body .footer-widgets h2 { color: var(--fm-yellow); font-size: 1.25rem; }
body .footer-widgets ul { margin-left: 0; }
body .footer-widgets li { list-style: none; padding: .2rem 0; }
body .site-info { font-size: .9rem; }
body .site-info .inside-site-info { padding-top: 0; padding-bottom: 26px; display: block; }
body .site-info .copyright-bar { width: 100%; }

.fm-footer-shout {
	font-family: var(--fm-font-head);
	font-weight: 700;
	font-size: clamp(4rem, 16vw, 13rem);
	line-height: .8;
	letter-spacing: -.01em;
	color: transparent;
	-webkit-text-stroke: 2px rgba(255, 255, 255, .35);
	text-align: center;
	margin: 0;
	padding: 28px 0 14px;
	user-select: none;
	white-space: nowrap;
	overflow: hidden;
}
.fm-footer-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	flex-wrap: wrap;
	border-top: 2px dashed rgba(255, 255, 255, .25);
	padding-top: 18px;
}
.fm-footer-row img { height: 38px; width: auto; display: block; }
.fm-social { display: flex; gap: .45rem; margin: 0; padding: 0; list-style: none; }
.fm-social a {
	display: inline-flex;
	width: 38px;
	height: 38px;
	align-items: center;
	justify-content: center;
	border: 2px solid rgba(255, 255, 255, .35);
	border-radius: 999px;
	color: #fff;
}
.fm-social a:hover { background: var(--fm-yellow); border-color: var(--fm-yellow); color: var(--fm-ink) !important; }
.fm-social svg { width: 17px; height: 17px; fill: currentColor; }
.fm-copy { margin: 0; color: #BDBDBD; }
@media (max-width: 768px) { .fm-footer-row { justify-content: center; text-align: center; } }

/* ---------- Bar navigasi bawah HP: dock melayang ---------- */
.fm-bottom-bar { display: none; }
@media (max-width: 767px) {
	body.fm-has-bottom-bar { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
	.fm-bottom-bar {
		display: grid;
		grid-template-columns: repeat(var(--fm-bar-items, 4), 1fr);
		gap: 4px;
		position: fixed;
		left: 12px;
		right: 12px;
		bottom: calc(12px + env(safe-area-inset-bottom));
		z-index: 600;
		padding: 6px;
		background: var(--fm-ink);
		border: 2.5px solid var(--fm-ink);
		border-radius: 999px;
		box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
	}
	.fm-bottom-bar a {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 2px;
		height: 54px;
		border-radius: 999px;
		color: #CFCFCF;
		text-decoration: none;
		font-family: var(--fm-font-head);
		font-weight: 700;
		font-size: .78rem;
		letter-spacing: .06em;
	}
	.fm-bottom-bar svg { width: 22px; height: 22px; }
	.fm-bottom-bar a[aria-current="page"] { background: var(--fm-red); color: #fff; }
	body.fm-has-bottom-bar .generate-back-to-top { bottom: calc(96px + env(safe-area-inset-bottom)); }
}

/* v2.2 — tipografi tegak */
.fm-topbar-tag { text-transform: uppercase; font-size: .72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.fm-topbar-links { white-space: nowrap; flex: none; }
@media (max-width: 480px) { .fm-topbar-tag { font-size: .62rem; letter-spacing: .04em; } }
body .main-navigation .main-nav ul li a { font-size: .98rem; font-weight: 700; letter-spacing: -.01em; }
.fm-header-btn, body .main-navigation .main-nav ul li.fm-btn > a { font-size: .95rem; letter-spacing: -.005em; }
.single .entry-header .entry-title { font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.05; letter-spacing: -.035em; }
.page-header .page-title { font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.05; letter-spacing: -.035em; }
.fm-list .entry-title { font-size: 1.35rem; line-height: 1.15; letter-spacing: -.02em; }
.sidebar .widget-title, .sidebar .widget h2 { font-size: 1.15rem; }
body .footer-widgets .widget-title, body .footer-widgets h2 { font-size: 1.05rem; }
.fm-footer-shout { font-weight: 800; letter-spacing: -.05em; font-size: clamp(3.4rem, 13vw, 10.5rem); line-height: .9; }
.fm-bottom-bar a { font-family: var(--fm-font-body); font-size: .72rem; letter-spacing: 0; }

@media print {
	.fm-topbar, .fm-infobar, .site-header, .fm-bottom-bar, .site-footer, .sidebar, .fm-progress { display: none !important; }
}

/* v2.3.1 — tombol "kembali ke atas" tidak menimpa teks footer */
body .generate-back-to-top {
	right: 20px;
	bottom: 20px;
	width: 46px;
	height: 46px;
	line-height: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: var(--fm-yellow, #FFC531);
	color: var(--fm-ink, #161616);
	border: 2px solid var(--fm-ink, #161616);
	box-shadow: 3px 3px 0 var(--fm-ink, #161616);
}
body .generate-back-to-top:hover, body .generate-back-to-top:focus { background: #fff; color: var(--fm-ink, #161616); }
@media (min-width: 769px) {
	body .site-info .inside-site-info { padding-right: 84px; }
}
@media (max-width: 768px) {
	body .generate-back-to-top { right: 14px; bottom: 14px; }
	body .site-info .inside-site-info { padding-bottom: 72px; }
	body.fm-has-bottom-bar .generate-back-to-top { bottom: calc(96px + env(safe-area-inset-bottom)); }
}
