/*
Theme Name: FilmyMama theme
Theme URI: https://www.filmymama.com/
Description: Child theme of Bricks for FilmyMama.com.
Author: FilmyMama
Template: bricks
Version: 1.1.0
Text Domain: filmymama-theme
*/

:root {
	--fm-red: #cd2122;
	--fm-red-dark: #a91a1b;
	--fm-ink: #1d1d1f;
	--fm-text: #333;
	--fm-muted: #6b6b70;
	--fm-line: #e7e7ea;
	--fm-bg: #f4f4f6;
	--fm-card: #fff;
	--fm-nav: #2c2c2c;
	--fm-wrap: 1200px;
	--fm-gap: 24px;
	--fm-radius: 6px;
	--fm-head: "Oswald", "Arial Narrow", Arial, sans-serif;
	--fm-body: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
}

body {
	background: var(--fm-bg);
	color: var(--fm-text);
	font-family: var(--fm-body);
	font-size: 16px;
	line-height: 1.6;
}
a { color: var(--fm-ink); }
a:hover { color: var(--fm-red); }

.fm-wrap {
	width: 100%;
	max-width: var(--fm-wrap);
	margin-inline: auto;
	padding-inline: 16px;
}

/* ---------- Top bar ---------- */
.fm-topbar { background: #1b1b1b; color: #ccc; font-size: 13px; }
.fm-topbar__row {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	min-height: 38px;
	gap: 12px;
}
.fm-topmenu .bricks-nav-menu { gap: 16px; }
.fm-topmenu .bricks-nav-menu a { color: #ddd; padding: 8px 0; }
.fm-topmenu .bricks-nav-menu a:hover { color: #fff; }
.fm-topbar__right { display: flex; flex-direction: row; align-items: center; gap: 14px; margin-left: auto; }
.fm-topbar__row { justify-content: flex-end !important; }
.fm-topbar .fm-search .toggle { color: #fff; font-size: 16px; padding: 6px; }
.fm-social { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.fm-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	color: #fff;
	background: #333;
	transition: background .15s;
}
.fm-social a:hover { color: #fff; }
.fm-social__facebook:hover { background: #1877f2; }
.fm-social__x:hover { background: #000; }
.fm-social__instagram:hover { background: #d62976; }
.fm-social__rss:hover { background: #f26522; }

/* ---------- Header ---------- */
.fm-header { background: #fff; border-top: 4px solid var(--fm-red); }
.fm-header__row {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-block: 12px;
	flex-wrap: wrap;
}
.fm-logo img { max-height: 70px; width: auto; }
.fm-header__row .fm-ad-wrap { flex: 0 1 728px; min-width: 0; }

.fm-navbar { background: var(--fm-nav); position: sticky; top: 0; z-index: 50; }
.fm-navbar__row {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	min-height: 48px;
}
.fm-menu { width: 100%; min-width: 0; }
.fm-menu .bricks-nav-menu { flex-wrap: wrap; justify-content: flex-start; gap: 0; column-gap: 0; }
.fm-menu .bricks-nav-menu > li { margin: 0 !important; }
/* Stretch the menu across the full layout width (desktop). */
@media (min-width: 992px) {
	.fm-menu, .fm-menu nav, .fm-menu .bricks-nav-menu-wrapper { width: 100%; }
	.fm-menu .bricks-nav-menu { width: 100%; flex-wrap: nowrap; justify-content: space-between; }
	.fm-menu .bricks-nav-menu > li { flex: 1 1 auto; }
	.fm-menu .bricks-nav-menu > li > a,
	.fm-menu .bricks-nav-menu > li > .brx-submenu-toggle { justify-content: center; text-align: center; width: 100%; }
	.fm-menu .bricks-nav-menu > li > a { padding-inline: 6px; }
}
.fm-menu .bricks-nav-menu > li > a,
.fm-menu .bricks-nav-menu > li > .brx-submenu-toggle > a {
	color: #fff;
	font-family: var(--fm-head);
	font-size: 14px;
	letter-spacing: .02em;
	text-transform: uppercase;
	padding: 13px 10px;
	white-space: nowrap;
}
.fm-menu .bricks-nav-menu > li > .brx-submenu-toggle button { color: #fff; }
.fm-menu .bricks-nav-menu > li > a:hover,
.fm-menu .bricks-nav-menu > li.current-menu-item > a { background: var(--fm-red); color: #fff; }
.fm-menu .bricks-nav-menu .sub-menu { background: var(--fm-nav); min-width: 200px; }
.fm-menu .bricks-nav-menu .sub-menu a { color: #fff; padding: 10px 14px; }
.fm-menu .bricks-nav-menu .sub-menu a:hover { background: var(--fm-red); }
.fm-menu .bricks-mobile-menu-toggle { color: #fff; }
.fm-menu .bricks-mobile-menu-wrapper { background: var(--fm-nav); }
.fm-menu .bricks-mobile-menu a { color: #fff; }
.fm-search .toggle { color: #fff; font-size: 18px; }

/* ---------- Layout ---------- */
.fm-page { padding-block: 24px 40px; }
.fm-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: var(--fm-gap);
	align-items: start;
}
.fm-main, .fm-sidebar { min-width: 0; }
.fm-main {
	background: var(--fm-card);
	border-radius: var(--fm-radius);
	padding: 20px;
}
.fm-sidebar {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.fm-box { background: var(--fm-card); border-radius: var(--fm-radius); overflow: hidden; }
.fm-box__title {
	font-family: var(--fm-head);
	font-size: 16px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: #fff;
	background: var(--fm-red);
	margin: 0;
	padding: 9px 14px;
}
.fm-box > :not(.fm-box__title) { padding: 6px 14px 10px; }
.fm-box .fm-mini-list { padding: 4px 14px; }
.fm-sticky { position: sticky; top: 64px; }

/* ---------- Section titles ---------- */
.fm-section-title {
	font-family: var(--fm-head);
	font-size: 18px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: .03em;
	color: #fff;
	background: var(--fm-red);
	display: block;
	padding: 8px 14px;
	margin: 28px 0 14px;
	border-radius: var(--fm-radius) var(--fm-radius) 0 0;
}
.fm-section-title a { color: #fff; }
.fm-main > .fm-section-title:first-child { margin-top: 0; }

/* ---------- Cards ---------- */
.fm-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fm-card__img { width: 100%; }
.fm-card__img img,
.fm-card__img a img {
	width: 100%;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--fm-radius);
	display: block;
}
.fm-card__img { display: block; }
.fm-thumb--none {
	display: block;
	aspect-ratio: 16 / 9;
	border-radius: var(--fm-radius);
	background: linear-gradient(135deg, #2c2c2c, var(--fm-red));
}
.fm-post__image:empty { display: none; }
.fm-post__image img { margin-bottom: 8px; }
.fm-card__body { display: flex; flex-direction: column; gap: 4px; }
.fm-card__title { font-family: var(--fm-body); font-size: 16px; font-weight: 700; line-height: 1.35; margin: 0; }
.fm-card__title a { color: var(--fm-ink); text-decoration: none; }
.fm-card__title a:hover { color: var(--fm-red); }
.fm-card__meta { font-size: 13px; color: var(--fm-muted); }
.fm-card__excerpt { font-size: 15px; color: var(--fm-text); }

.fm-grid, .fm-hero__side {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}
.fm-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	gap: 20px;
}
.fm-hero__side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fm-hero__side .fm-card__title { font-size: 15px; }
.fm-card--big .fm-card__title { font-family: var(--fm-head); font-weight: 500; font-size: 28px; line-height: 1.2; }

.fm-list { display: flex; flex-direction: column; gap: 18px; }
.fm-card--list {
	display: grid;
	grid-template-columns: 260px minmax(0, 1fr);
	gap: 16px;
	padding-bottom: 18px;
	border-bottom: 1px solid var(--fm-line);
}
.fm-card--list:last-child { border-bottom: 0; }
.fm-card--list .fm-card__title { font-size: 19px; }

.fm-mini-list { display: flex; flex-direction: column; }
.fm-card--mini {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr);
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid var(--fm-line);
}
.fm-card--mini:last-child { border-bottom: 0; }
.fm-card--mini .fm-card__title { font-size: 14px; }
.fm-card--mini .fm-card__meta { font-size: 12px; }

.fm-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* ---------- Single post ---------- */
.fm-post__cats a {
	display: inline-block;
	background: var(--fm-red);
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	padding: 3px 8px;
	border-radius: 3px;
	text-decoration: none;
	margin-right: 6px;
}
.fm-post__title {
	font-family: var(--fm-head);
	font-weight: 500;
	font-size: clamp(26px, 3.4vw, 38px);
	line-height: 1.2;
	color: var(--fm-ink);
	margin: 12px 0 8px;
}
.fm-post__meta { font-size: 14px; color: var(--fm-muted); gap: 12px; margin-bottom: 16px; }
.fm-post__image img { width: 100%; height: auto; border-radius: var(--fm-radius); }
.fm-post__content { font-size: 18px; line-height: 1.75; margin-top: 18px; }
.fm-post__content p { margin-bottom: 1.1em; }
.fm-post__content img { max-width: 100%; height: auto; border-radius: var(--fm-radius); }
.fm-post__content h2, .fm-post__content h3 { font-family: var(--fm-head); font-weight: 500; color: var(--fm-ink); margin: 1.2em 0 .5em; }
.fm-post__content iframe { max-width: 100%; }
.fm-post__content .wp-video, .fm-post__content iframe[src*="youtube"] { width: 100% !important; aspect-ratio: 16 / 9; height: auto; }
.fm-share { margin: 20px 0; }
.fm-post__tags a {
	display: inline-block;
	border: 1px solid var(--fm-line);
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 13px;
	margin: 0 6px 6px 0;
	text-decoration: none;
	color: var(--fm-muted);
}
.fm-related ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.fm-related li { display: flex; flex-direction: column; gap: 6px; }
.fm-related img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--fm-radius); }
.fm-related h3 { font-size: 15px; line-height: 1.35; margin: 0; }
.fm-related h3 a { color: var(--fm-ink); text-decoration: none; }
.fm-related .post-content div { font-size: 12px; color: var(--fm-muted); }
.fm-comments { margin-top: 28px; }

/* ---------- Archive / search ---------- */
.fm-archive__title {
	font-family: var(--fm-head);
	font-weight: 500;
	font-size: 30px;
	color: var(--fm-ink);
	padding-bottom: 10px;
	margin-bottom: 18px;
	border-bottom: 3px solid var(--fm-red);
}
.fm-pagination { margin-top: 24px; }
.fm-pagination .page-numbers { padding: 6px 12px; border: 1px solid var(--fm-line); border-radius: 4px; }
.fm-pagination .page-numbers.current { background: var(--fm-red); border-color: var(--fm-red); color: #fff; }
.fm-search-inline { margin-bottom: 20px; }
.fm-404__text { margin-bottom: 16px; }

/* ---------- Ads ---------- */
.fm-ad-wrap:empty { display: none; }
.fm-ad { text-align: center; margin: 16px auto; max-width: 100%; overflow: hidden; }
.fm-header__row .fm-ad { margin: 0; }
.fm-sidebar .fm-ad { margin: 0; }

/* ---------- Footer ---------- */
.fm-footer { background: #222; color: #bbb; padding-block: 36px 24px; font-size: 14px; }
.fm-footer__cols {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 32px;
}
.fm-footer__col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fm-footer__title {
	font-family: var(--fm-head);
	font-weight: 500;
	font-size: 17px;
	text-transform: uppercase;
	color: #fff;
	margin: 0;
	padding-bottom: 8px;
	border-bottom: 2px solid var(--fm-red);
}
.fm-footer__title a { color: #fff; text-decoration: none; }
.fm-footer a { color: #ddd; }
.fm-footer a:hover { color: #fff; }
.fm-rss { list-style: none; margin: 0; padding: 0; }
.fm-rss li { padding: 7px 0; border-bottom: 1px solid #333; line-height: 1.4; }
.fm-rss li:last-child { border-bottom: 0; }
.fm-rss a { text-decoration: none; }
.fm-footer-bottom { background: #181818; color: #999; padding-block: 14px; font-size: 13px; }
.fm-footer-bottom__row {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}
.fm-footer-links-wrap { margin-left: auto; width: auto !important; flex: 0 1 auto !important; }
.fm-footer-bottom__row { flex-wrap: nowrap !important; align-items: center; }
@media (max-width: 767px) { .fm-footer-bottom__row { flex-wrap: wrap !important; } }
.fm-footer-bottom__row { flex-direction: row !important; }
.fm-footer-links { display: flex; justify-content: flex-end; gap: 18px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.fm-footer-links a { color: #ccc; text-decoration: none; }
.fm-footer-links a:hover { color: #fff; }

/* ---------- Newsletter (Jetpack Forms) ---------- */
.fm-newsletter__title:empty { display: none; }
.fm-newsletter__title { font-weight: 700; margin-bottom: 4px; }
.fm-newsletter__text { margin: 0 0 10px; font-size: 14px; }
.fm-newsletter .wp-block-jetpack-contact-form,
.fm-newsletter form { display: flex; flex-direction: column; gap: 8px; padding: 0; }
.fm-newsletter .grunion-field-label,
.fm-newsletter label { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.fm-newsletter input[type="email"] {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 15px;
	background: #fff;
	color: #222;
}
.fm-newsletter button,
.fm-newsletter .wp-block-button__link,
.fm-newsletter input[type="submit"] {
	width: 100%;
	background: var(--fm-red);
	color: #fff;
	border: 0;
	border-radius: 4px;
	padding: 10px 14px;
	font-weight: 700;
	cursor: pointer;
}
.fm-newsletter button:hover { background: var(--fm-red-dark); }
.fm-footer .fm-newsletter__text { color: #bbb; }
.fm-fb iframe { display: block; max-width: 100%; }

/* ---------- Pagination: homepage blocks + multi-page posts ---------- */
.fm-pagination--block { margin: 12px 0 0; }
.fm-pagination--block .page-numbers { padding: 4px 10px; font-size: 13px; }
.fm-block.brx-ajax-loading, .fm-block .brx-ajax-loading { opacity: .5; }
.fm-pagenav {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin: 28px 0;
	padding: 12px;
	background: var(--fm-bg);
	border-radius: var(--fm-radius);
	font-weight: 700;
}
.fm-pagenav > *,
.fm-post__content .fm-pagenav > * { display: inline-block !important; list-style: none !important; margin: 0 !important; }
.fm-pagenav > *::before,
.fm-pagenav > *::marker { content: none !important; display: none !important; }
.fm-showmore {
	display: inline-block;
	margin: 12px 0 4px;
	font-weight: 700;
	font-size: 14px;
	color: var(--fm-red);
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: .03em;
}
.fm-showmore:hover { color: var(--fm-red-dark); text-decoration: underline; }
.fm-pagenav a, .fm-pagenav .is-disabled {
	padding: 10px 16px;
	border-radius: 4px;
	text-decoration: none;
	white-space: nowrap;
}
.fm-pagenav a { background: var(--fm-red); color: #fff; }
.fm-pagenav a:hover { background: var(--fm-red-dark); color: #fff; }
.fm-pagenav .is-disabled { background: #ddd; color: #888; }
.fm-pagenav__count { color: var(--fm-muted); text-align: center; }

/* ---------- Video ---------- */
.fm-video { position: relative; aspect-ratio: 16 / 9; margin: 0 0 18px; background: #000; border-radius: var(--fm-radius); overflow: hidden; }
.fm-video iframe { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; }

/* ---------- Related (shortcode cards) ---------- */
.fm-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fm-related-grid .fm-card__img img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--fm-radius); display: block; }

/* ---------- Menu + multi-page posts ---------- */
.fm-menu .bricks-nav-menu > li > a { white-space: nowrap; }
@media (max-width: 1280px) {
	.fm-menu .bricks-nav-menu > li > a { padding-inline: 8px; font-size: 14px; }
}
.fm-post__content .post-nav-links,
.fm-post__content .page-links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 24px 0;
	font-weight: 700;
}
.fm-post__content .post-page-numbers {
	min-width: 40px;
	padding: 8px 12px;
	text-align: center;
	border: 1px solid var(--fm-line);
	border-radius: 4px;
	text-decoration: none;
}
.fm-post__content .post-page-numbers.current { background: var(--fm-red); border-color: var(--fm-red); color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.fm-layout { grid-template-columns: minmax(0, 1fr); }
	.fm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.fm-sticky { position: static; }
}
@media (max-width: 767px) {
	.fm-main { padding: 14px; border-radius: 0; }
	.fm-page { padding-block: 0 24px; }
	.fm-page .fm-wrap { padding-inline: 0; }
	.fm-hero { grid-template-columns: minmax(0, 1fr); }
	.fm-hero__side { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
	.fm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
	.fm-card--list { grid-template-columns: 120px minmax(0, 1fr); gap: 12px; }
	.fm-card--list .fm-card__title { font-size: 16px; }
	.fm-card--list .fm-card__excerpt { display: none; }
	.fm-card__title { font-size: 15px; }
	.fm-card--big .fm-card__title { font-size: 22px; }
	.fm-two-col { grid-template-columns: minmax(0, 1fr); }
	.fm-footer__cols { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-inline: 16px; }
	.fm-footer-bottom__row { justify-content: center; text-align: center; }
	.fm-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.fm-pagenav { flex-wrap: wrap; justify-content: center; }
	.fm-pagenav__count { order: -1; width: 100%; }
	.fm-topbar .fm-social a { width: 26px; height: 26px; }
	.fm-related ul { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.fm-post__content { font-size: 17px; }
	.fm-logo img { max-height: 50px; }
	.fm-header__row { justify-content: center; }
	.fm-sidebar { padding-inline: 14px; }
}
