/*
Theme Name: Bolly4umovie
Theme URI: https://bolly4umovie.in
Author: Piyush Manna
Author URI: https://www.linkedin.com/in/pcodesdaily/
Description: A responsive, SEO-friendly WordPress theme for movie and web series review sites, with built-in TMDB API integration, custom admin fields, and ad-ready widget areas.
Version: 1.3.2
Requires at least: 6.0
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: bolly4umovie
*/

/* -------------------------------------------------------------------------
   0. Reset & Variables
--------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; max-width: 100%; overflow-x: hidden; }
body {
	margin: 0;
	font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--b4u-text);
	background: var(--b4u-bg);
	line-height: 1.6;
	font-size: 16px;
	max-width: 100%;
	overflow-x: hidden;
	word-wrap: break-word;
	overflow-wrap: break-word;
}
:root {
	--b4u-navy: #101c2c;
	--b4u-navy-alt: #0b1420;
	--b4u-yellow: #f5cd19;
	--b4u-white: #ffffff;
	--b4u-bg: #f2f3f5;
	--b4u-text: #22262b;
	--b4u-text-light: #5a6472;
	--b4u-text-muted: #6b7280;
	--b4u-border: #e3e5e8;
	--b4u-link: #1a73e8;
	--b4u-radius: 6px;
	--b4u-shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
	--b4u-container: 1300px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--b4u-link); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.25em; }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.3; font-weight: 700; }
p { margin: 0 0 1em; }
table { border-collapse: collapse; width: 100%; }
button { font-family: inherit; cursor: pointer; }
.screen-reader-text {
	position: absolute !important;
	clip: rect(1px,1px,1px,1px);
	width: 1px; height: 1px; overflow: hidden;
}
.container {
	max-width: var(--b4u-container);
	margin: 0 auto;
	padding: 0 20px;
}
.btn {
	display: inline-block;
	padding: 10px 20px;
	border-radius: var(--b4u-radius);
	background: var(--b4u-navy);
	color: var(--b4u-white);
	border: none;
	font-weight: 600;
	font-size: .95em;
}
.btn:hover { background: var(--b4u-navy-alt); color: var(--b4u-white); text-decoration: none; }
.btn-yellow { background: var(--b4u-yellow); color: var(--b4u-navy); }
.btn-yellow:hover { background: #e0bc10; color: var(--b4u-navy); }
.btn-telegram { background: #229ed9; color: #fff; width: 100%; text-align: center; font-size: 1.05em; padding: 14px; }
.btn-telegram:hover { background: #1c86bd; color: #fff; }

/* -------------------------------------------------------------------------
   1. Header
--------------------------------------------------------------------------- */
.announcement-bar {
	background: var(--b4u-navy-alt);
	color: var(--b4u-white);
	text-align: center;
	padding: 12px 15px;
	font-size: .95em;
}
.announcement-bar a, .announcement-bar strong { color: var(--b4u-yellow); }

.site-header { background: var(--b4u-navy); position: relative; z-index: 100; }
.site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	max-width: var(--b4u-container);
	margin: 0 auto;
}
.site-branding a {
	color: var(--b4u-white);
	font-size: 1.9em;
	font-weight: 800;
	letter-spacing: -.5px;
}
.site-branding a:hover { text-decoration: none; }
.site-branding img.custom-logo { max-height: 50px; }

.primary-nav-wrap { display: flex; align-items: center; gap: 24px; }
.primary-menu { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.primary-menu li a {
	color: var(--b4u-white);
	font-weight: 600;
	font-size: .98em;
	white-space: nowrap;
}
.primary-menu li a:hover, .primary-menu li.current-menu-item > a { color: var(--b4u-yellow); text-decoration: none; }
.primary-menu li { position: relative; }

.menu-item-genres { display: flex; align-items: center; }
.genres-toggle {
	display: flex;
	align-items: center;
	gap: 6px;
	background: transparent;
	border: none;
	color: var(--b4u-white);
	font-family: inherit;
	font-weight: 600;
	font-size: .98em;
	padding: 0;
	cursor: pointer;
}
.genres-toggle svg { transition: transform .2s ease; }
.menu-item-genres.is-open .genres-toggle { color: var(--b4u-yellow); }
.menu-item-genres.is-open .genres-toggle svg { transform: rotate(180deg); }
.genres-dropdown {
	position: absolute;
	top: calc(100% + 14px);
	left: 0;
	background: var(--b4u-white);
	border-radius: var(--b4u-radius);
	box-shadow: 0 12px 28px rgba(0,0,0,.18);
	list-style: none;
	margin: 0;
	padding: 10px;
	min-width: 220px;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 2px;
	z-index: 200;
	visibility: hidden;
	opacity: 0;
}
.menu-item-genres.is-open .genres-dropdown { visibility: visible; opacity: 1; }
.genres-dropdown li a {
	display: block;
	color: var(--b4u-text) !important;
	font-size: .88em !important;
	font-weight: 500 !important;
	padding: 8px 10px;
	border-radius: 4px;
	white-space: nowrap;
}
.genres-dropdown li a:hover { background: var(--b4u-bg); color: var(--b4u-link) !important; }

.search-toggle-btn {
	background: transparent;
	border: none;
	color: var(--b4u-white);
	font-size: 1.3em;
	padding: 4px 8px;
}
.mobile-menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	background: transparent;
	border: none;
	color: var(--b4u-white);
	padding: 4px 8px;
	width: 40px;
	height: 40px;
}
.mobile-nav-close {
	display: none;
	align-items: center;
	justify-content: flex-end;
	width: 100%;
	background: transparent;
	border: none;
	color: var(--b4u-white);
	padding: 0 0 16px;
	margin-bottom: 10px;
	border-bottom: 1px solid rgba(255,255,255,.1);
}

.header-search-panel {
	display: none;
	background: var(--b4u-navy-alt);
	padding: 16px 20px;
	overflow-x: hidden;
	box-sizing: border-box;
}
.header-search-panel.is-open { display: block; }
.header-search-panel form { max-width: var(--b4u-container); margin: 0 auto; display: flex; width: 100%; box-sizing: border-box; }
.header-search-panel .search-form input[type="search"] {
	flex: 1;
	min-width: 0;
	padding: 12px 14px;
	border: none;
	border-radius: var(--b4u-radius) 0 0 var(--b4u-radius);
	font-size: 1em;
	box-sizing: border-box;
}
.header-search-panel .search-form button {
	padding: 12px 20px;
	border: none;
	background: var(--b4u-yellow);
	color: var(--b4u-navy);
	border-radius: 0 var(--b4u-radius) var(--b4u-radius) 0;
	font-weight: 700;
}
.header-search-panel .search-form button:hover { background: #e0bc10; }

/* Generic search form — used standalone on the search results page, 404
   page, and anywhere else get_search_form() is called outside the header. */
.search-form {
	display: flex;
	max-width: 480px;
	width: 100%;
	margin: 0 auto;
	box-sizing: border-box;
}
.search-form input[type="search"] {
	flex: 1;
	min-width: 0;
	padding: 12px 14px;
	border: 1px solid var(--b4u-border);
	border-right: none;
	border-radius: var(--b4u-radius) 0 0 var(--b4u-radius);
	font-size: 1em;
	font-family: inherit;
	box-sizing: border-box;
}
.search-form button {
	padding: 12px 20px;
	border: none;
	background: var(--b4u-yellow);
	color: var(--b4u-navy);
	border-radius: 0 var(--b4u-radius) var(--b4u-radius) 0;
	font-weight: 700;
}
.search-form button:hover { background: #e0bc10; }

.secondary-nav {
	background: var(--b4u-white);
	border-bottom: 1px solid var(--b4u-border);
	overflow-x: auto;
}
.secondary-menu {
	display: flex;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 12px 20px;
	max-width: var(--b4u-container);
	margin: 0 auto;
}
.secondary-menu li a {
	display: inline-block;
	white-space: nowrap;
	background: var(--b4u-bg);
	color: var(--b4u-text);
	padding: 9px 16px;
	border-radius: var(--b4u-radius);
	font-weight: 600;
	font-size: .92em;
}
.secondary-menu li a:hover { background: var(--b4u-navy); color: var(--b4u-white); text-decoration: none; }

/* -------------------------------------------------------------------------
   2. Layout: main content + sidebar
--------------------------------------------------------------------------- */
.site-main-wrap {
	max-width: var(--b4u-container);
	margin: 24px auto;
	padding: 0 20px;
	display: grid;
	grid-template-columns: minmax(0,1fr) 320px;
	gap: 24px;
	align-items: start;
}
.site-main-wrap.no-sidebar { grid-template-columns: 1fr; }
.content-column, .sidebar-column { min-width: 0; }

/* -------------------------------------------------------------------------
   3. Movie grid + cards
--------------------------------------------------------------------------- */
.movie-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 20px;
}
.movie-card {
	min-width: 0;
	background: var(--b4u-white);
	border-radius: 10px;
	overflow: hidden;
	box-shadow: var(--b4u-shadow);
	transition: transform .18s ease, box-shadow .18s ease;
}
.movie-card:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0,0,0,.16); }
.movie-card-thumb { position: relative; aspect-ratio: 2/3; overflow: hidden; background: linear-gradient(135deg,#22303f,#101c2c); display: block; }
.movie-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.movie-card:hover .movie-card-thumb img { transform: scale(1.04); }
.movie-card-date {
	position: absolute;
	left: 0; bottom: 0;
	background: var(--b4u-yellow);
	color: var(--b4u-navy);
	font-weight: 700;
	font-size: .78em;
	padding: 6px 10px;
	width: 100%;
}
.movie-card-body { padding: 12px 14px; }
.movie-card-body h3 {
	font-size: 1em;
	margin: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.movie-card-body h3 a { color: var(--b4u-text); }
.movie-card-body h3 a:hover { color: var(--b4u-link); text-decoration: none; }
.movie-card-type-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	display: inline-block;
	color: #fff;
	font-size: .68em;
	font-weight: 700;
	letter-spacing: .3px;
	text-transform: uppercase;
	padding: 4px 9px;
	border-radius: 4px;
	box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.movie-card-type-badge.is-movie { background: var(--b4u-navy); }
.movie-card-type-badge.is-series { background: #c0392b; }
.movie-card-rating {
	position: absolute;
	top: 10px;
	right: 10px;
	background: rgba(16,28,44,.85);
	color: var(--b4u-yellow);
	font-size: .72em;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 4px;
}

.section-heading {
	font-size: 1.3em;
	margin: 0 0 18px;
	padding-bottom: 10px;
	border-bottom: 3px solid var(--b4u-yellow);
	display: inline-block;
}

.pagination { display: flex; gap: 8px; justify-content: center; margin: 30px 0 10px; flex-wrap: wrap; }
.pagination a, .pagination span {
	padding: 8px 14px;
	background: var(--b4u-white);
	border: 1px solid var(--b4u-border);
	border-radius: var(--b4u-radius);
	color: var(--b4u-text);
}
.pagination .current { background: var(--b4u-navy); color: #fff; border-color: var(--b4u-navy); }
.pagination a:hover { background: var(--b4u-navy); color: #fff; text-decoration: none; }

/* -------------------------------------------------------------------------
   4. Sidebar / widgets
--------------------------------------------------------------------------- */
.widget {
	background: var(--b4u-white);
	border-radius: var(--b4u-radius);
	box-shadow: var(--b4u-shadow);
	margin-bottom: 20px;
	overflow: hidden;
}
.widget-title {
	background: var(--b4u-navy);
	color: #fff;
	padding: 14px 16px;
	margin: 0;
	font-size: 1.05em;
}
.widget-body { padding: 6px 16px 10px; }
.latest-list-item {
	padding: 12px 0;
	border-bottom: 1px solid var(--b4u-border);
}
.latest-list-item:last-child { border-bottom: none; }
.latest-list-item a { color: var(--b4u-text); font-weight: 600; display: block; margin-bottom: 4px; }
.latest-list-item a:hover { color: var(--b4u-link); text-decoration: none; }
.latest-list-item time { color: var(--b4u-text-muted); font-size: .85em; }
.ad-slot {
	background: var(--b4u-bg);
	border: 1px dashed var(--b4u-border);
	text-align: center;
	color: var(--b4u-text-muted);
	font-size: .85em;
	padding: 14px;
	border-radius: var(--b4u-radius);
	margin-bottom: 20px;
	min-height: 60px;
	overflow: hidden;
}
.ad-slot-label { display: block; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; font-size: .8em; }

/* -------------------------------------------------------------------------
   5. Single Movie / Web Series page
--------------------------------------------------------------------------- */
.breadcrumbs { font-size: .88em; color: var(--b4u-text-muted); margin-bottom: 14px; }
.breadcrumbs a { color: var(--b4u-text-muted); }

.entry-header { margin-bottom: 16px; }
.entry-title {
	font-size: clamp(1.3em, 1em + 1.5vw, 2em);
	margin-bottom: 8px;
	overflow-wrap: break-word;
	word-break: break-word;
}
.entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; color: var(--b4u-text-muted); font-size: .9em; margin-bottom: 10px; }
.entry-meta-byline { display: inline-flex; align-items: center; gap: 8px; }
.entry-meta .author-avatar { display: inline-block; border-radius: 50%; width: 26px; height: 26px; flex-shrink: 0; }

.share-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.share-buttons a {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: var(--b4u-radius);
	color: #fff;
	font-size: .85em;
	font-weight: 600;
}
.share-buttons a:hover { opacity: .9; text-decoration: none; }
.share-whatsapp { background: #25d366; }
.share-telegram { background: #229ed9; }
.share-facebook { background: #1877f2; }
.share-linkedin { background: #0a66c2; }
.share-x { background: #000; }

.featured-poster-wrap { text-align: center; margin-bottom: 24px; background: #000; border-radius: var(--b4u-radius); overflow: hidden; }
.featured-poster-wrap img { margin: 0 auto; max-height: 560px; width: auto; }

.content-card { background: var(--b4u-white); border-radius: var(--b4u-radius); box-shadow: var(--b4u-shadow); margin-bottom: 22px; overflow: hidden; }
.content-card-header {
	background: var(--b4u-navy);
	color: #fff;
	text-align: center;
	padding: 12px 16px;
	font-weight: 700;
	letter-spacing: .5px;
}
.content-card-body { padding: 18px 20px; }

.table-responsive { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

.detail-table { width: 100%; }
.detail-table td { padding: 10px 12px; border-bottom: 1px solid var(--b4u-border); vertical-align: top; }
.detail-table td:first-child { width: 160px; font-weight: 700; color: var(--b4u-navy); }
.detail-table tr:last-child td { border-bottom: none; }

.trailer-embed { position: relative; width: 100%; padding-top: 56.25%; border-radius: var(--b4u-radius); overflow: hidden; background: #000; }
.trailer-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.cast-table th, .cast-table td { padding: 10px 12px; border-bottom: 1px solid var(--b4u-border); text-align: left; }
.cast-table th { background: var(--b4u-bg); font-size: .85em; text-transform: uppercase; letter-spacing: .5px; }
.cast-table td:first-child { color: #d1373f; font-weight: 600; }

.movie-rating-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--b4u-yellow);
	color: var(--b4u-navy);
	padding: 6px 12px;
	border-radius: var(--b4u-radius);
	font-weight: 700;
}

.entry-content p { margin-bottom: 1.1em; }
.entry-content img { border-radius: var(--b4u-radius); }

.faq-item { border-bottom: 1px solid var(--b4u-border); padding: 6px 0; }
.faq-item:last-child { border-bottom: none; }
.faq-item summary {
	cursor: pointer;
	font-weight: 700;
	padding: 10px 4px;
	list-style: none;
	position: relative;
	padding-right: 30px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
	content: "+";
	position: absolute;
	right: 4px;
	top: 8px;
	font-size: 1.3em;
	color: var(--b4u-navy);
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .faq-answer { padding: 0 4px 14px; color: var(--b4u-text-light); }

.telegram-cta-wrap { margin-bottom: 22px; }

/* Related movies */
.related-movies .movie-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* -------------------------------------------------------------------------
   6. Static pages
--------------------------------------------------------------------------- */
.page-content { background: var(--b4u-white); border-radius: var(--b4u-radius); box-shadow: var(--b4u-shadow); padding: 30px; }

/* -------------------------------------------------------------------------
   7. Footer
--------------------------------------------------------------------------- */
.site-footer { background: var(--b4u-navy); color: #c7ccd4; margin-top: 40px; }
.footer-disclaimer { max-width: var(--b4u-container); margin: 0 auto; padding: 30px 20px 10px; font-size: .88em; line-height: 1.7; }
.footer-disclaimer strong { color: #fff; }
.footer-credit { max-width: var(--b4u-container); margin: 0 auto; padding: 0 20px 20px; font-size: .85em; }
.footer-nav-wrap { border-top: 1px solid rgba(255,255,255,.1); }
.footer-menu { max-width: var(--b4u-container); margin: 0 auto; padding: 18px 20px; list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 22px; }
.footer-menu a { color: #c7ccd4; font-size: .9em; }
.footer-menu a:hover { color: var(--b4u-yellow); text-decoration: none; }
.footer-bottom { text-align: center; padding: 16px 20px 26px; font-size: .85em; color: #8b929c; }
.footer-bottom a { color: #8b929c; }

/* -------------------------------------------------------------------------
   8. Responsive
--------------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.movie-grid, .related-movies .movie-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.site-main-wrap { grid-template-columns: 1fr; }
	.sidebar-column { order: 2; }
}
@media (max-width: 782px) {
	.primary-nav-wrap { position: fixed; top: 0; right: -300px; height: 100vh; width: 280px; background: var(--b4u-navy-alt); flex-direction: column; align-items: flex-start; padding: 70px 20px 20px; transition: right .25s ease; overflow-y: auto; }
	.primary-nav-wrap.is-open { right: 0; }
	.primary-menu { flex-direction: column; gap: 4px; width: 100%; }
	.primary-menu li { width: 100%; }
	.primary-menu li a { display: block; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
	.mobile-menu-toggle { display: inline-flex; }
	.mobile-nav-close { display: flex; }
	.menu-item-genres { flex-direction: column; align-items: flex-start; border-bottom: 1px solid rgba(255,255,255,.08); }
	.genres-toggle { width: 100%; justify-content: space-between; padding: 10px 0; }
	.genres-dropdown {
		position: static;
		visibility: visible;
		opacity: 1;
		display: none;
		grid-template-columns: 1fr;
		background: transparent;
		box-shadow: none;
		padding: 0 0 8px;
		width: 100%;
	}
	.menu-item-genres.is-open .genres-dropdown { display: grid; }
	.genres-dropdown li a { color: var(--b4u-white) !important; padding: 8px 0 8px 12px; }
	.genres-dropdown li a:hover { background: rgba(255,255,255,.06); }
	.movie-grid, .related-movies .movie-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.entry-title { font-size: 1.5em; }
}
@media (max-width: 480px) {
	.movie-grid, .related-movies .movie-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.site-branding a { font-size: 1.5em; }
	.share-buttons a { flex: 1 1 auto; justify-content: center; }
	.detail-table td:first-child { width: 120px; }
}

/* -------------------------------------------------------------------------
   9. Comments
--------------------------------------------------------------------------- */
.comment-list .comment { margin-bottom: 18px; }
.comment-list .comment-body { display: flex; gap: 12px; }
.comment-list .avatar { border-radius: 50%; flex-shrink: 0; }
.comment-list .comment-content p { margin-bottom: .6em; }
.comment-list .comment-metadata { font-size: .82em; color: var(--b4u-text-muted); margin-bottom: 6px; }
.comment-list .comment-metadata a { color: var(--b4u-text-muted); }
.comment-list ol.children { list-style: none; margin: 14px 0 0 30px; padding: 0; }
.comment-reply-link { font-size: .82em; }
#respond h3 { margin-top: 20px; }
.comment-form p { margin-bottom: 14px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--b4u-border);
	border-radius: var(--b4u-radius);
	font-family: inherit;
}
.comment-form textarea { min-height: 120px; }
.comment-form .form-submit input { background: var(--b4u-navy); color: #fff; border: none; padding: 10px 20px; border-radius: var(--b4u-radius); font-weight: 600; }
