/*
Theme Name: MRR Child
Theme URI: https://mitrarakyatreformasi.com/
Description: Child theme khusus Mitra Rakyat Reformasi, berbasis Routine News.
Author: MRR
Template: routine-news
Version: 1.2.0
Text Domain: mrr-child
*/

/* Custom styles MRR. Gaya navigasi dipisahkan ke assets/css/mrr-navigation.css. */

/*
 * MRR Header Branding — Step 2.3
 * Mengatur identitas brand, tagline, area pencarian, dan proporsi header MRR
 * dengan tetap menjaga kompatibilitas Routine News.
 */

:root {
	--mrr-header-bg: #ffffff;
	--mrr-header-ink: #171717;
	--mrr-header-muted: #555555;
	--mrr-header-accent: #B51F2A;
	--mrr-header-border: #e5e5e5;
}

.mrr-site-header .mrr-middle-header {
	background-color: var(--mrr-header-bg);
	padding-block: 18px;
	border-bottom: 1px solid var(--mrr-header-border);
}

.mrr-site-header .mrr-middle-header-wrapper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.mrr-site-header .mrr-middle-header-left,
.mrr-site-header .mrr-middle-header-right {
	flex: 1 1 0;
	min-width: 0;
}

.mrr-site-header .mrr-middle-header-left {
	display: flex;
	align-items: center;
	justify-content: flex-start;
}

.mrr-site-header .mrr-middle-header-right {
	display: flex;
	align-items: center;
	justify-content: flex-end;
}

.mrr-site-header .mrr-middle-header-controls {
	display: inline-flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	flex-wrap: nowrap;
}

/* Social icons bar */
.mrr-site-header .header-social-icon .social-links {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mrr-site-header .header-social-icon .social-links li {
	margin: 0;
	flex: 0 0 auto;
}

.mrr-site-header .header-social-icon .social-links li a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	border: 1px solid var(--mrr-header-border);
	border-radius: 2px;
	color: var(--mrr-header-ink);
	transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.mrr-site-header .header-social-icon .social-links li a:hover,
.mrr-site-header .header-social-icon .social-links li a:focus-visible {
	background-color: var(--mrr-header-accent);
	border-color: var(--mrr-header-accent);
	color: #ffffff;
}

/* Brand & Tagline */
.mrr-site-header .mrr-site-branding {
	flex: 0 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	text-align: center;
	min-width: 0;
}

.mrr-site-header .mrr-site-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
}

.mrr-site-header .mrr-site-logo a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.mrr-site-header .mrr-site-logo img {
	display: block;
	max-height: 76px;
	height: auto;
	width: auto;
	object-fit: contain;
}

.mrr-site-header .mrr-site-identity {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 3px;
}

.mrr-site-header .mrr-site-title {
	margin: 0;
	font-size: clamp(1.6rem, 2.5vw, 2.4rem);
	font-weight: 800;
	line-height: 1.06;
	letter-spacing: -0.02em;
}

.mrr-site-header .mrr-site-title a {
	color: var(--mrr-header-accent);
	text-decoration: none;
}

.mrr-site-header .mrr-site-title a:hover,
.mrr-site-header .mrr-site-title a:focus-visible {
	color: var(--mrr-header-ink);
	text-decoration: none;
}

.mrr-site-header .mrr-site-tagline {
	margin: 0;
	font-size: 0.78rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: 0.04em;
	color: var(--mrr-header-muted);
}

/* CTA & Search area */
.mrr-site-header .mrr-header-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 34px;
	padding: 6px 14px;
	background-color: var(--mrr-header-accent);
	color: #ffffff;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.2;
	border-radius: 2px;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 180ms ease;
}

.mrr-site-header .mrr-header-cta:hover,
.mrr-site-header .mrr-header-cta:focus-visible {
	background-color: var(--mrr-header-ink);
	color: #ffffff;
	text-decoration: none;
}

.mrr-site-header .mrr-header-search .search-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	color: var(--mrr-header-ink);
	border-radius: 2px;
	transition: color 180ms ease, background-color 180ms ease;
}

.mrr-site-header .mrr-header-search .search-icon:hover,
.mrr-site-header .mrr-header-search .search-icon:focus-visible {
	color: var(--mrr-header-accent);
	background-color: #f5f5f5;
}

/* Tablet & Mobile responsiveness */
@media (max-width: 991px) {
	.mrr-site-header .mrr-site-logo img {
		max-height: 58px;
	}

	.mrr-site-header .mrr-site-title {
		font-size: 1.7rem;
	}

	.mrr-site-header .mrr-site-tagline {
		font-size: 0.72rem;
	}
}

@media (max-width: 480px) {
	.mrr-site-header .header-social-icon .social-links {
		gap: 3px;
	}

	.mrr-site-header .header-social-icon .social-links li a {
		width: 24px;
		height: 24px;
	}

	.mrr-site-header .mrr-middle-header-controls {
		gap: 6px;
	}
}

.mrr-search-svg { display: block; }

/*
 * MRR Navigation — Step 2.5 (Finalisasi)
 * 1. Desktop: menu menyebar merata memenuhi bar merah dengan hover konsisten.
 * 2. Mobile: warna bar merah #B51F2A menyatu penuh + satu tombol toggle submenu bersih.
 * Child theme override; parent Routine News files remain untouched.
 */

:root {
	--mrr-nav-bg: #171717;
	--mrr-nav-text: #ffffff;
	--mrr-nav-accent: #B51F2A;
	--mrr-nav-dropdown-bg: #ffffff;
	--mrr-nav-dropdown-text: #171717;
}

/* Shared navigation bar surface. */
.site-header .routine-news-navigation-outer-wrapper,
.site-header .routine-news-bottom-header {
	background-color: var(--mrr-nav-bg);
}

.site-header .routine-news-bottom-header-wrapper,
.site-header .navigation,
.site-header #site-navigation {
	min-width: 0;
}

/* Desktop: menyebar seimbang memenuhi bar merah, hover konsisten, dropdown vertikal. */
@media (min-width: 992px) {
	.site-header .routine-news-navigation-outer-wrapper,
	.site-header .routine-news-bottom-header,
	.site-header .routine-news-bottom-header-wrapper,
	.site-header .navigation,
	.site-header #site-navigation,
	.site-header #site-navigation .navigation-area,
	.site-header #site-navigation .menu-primary-container {
		width: 100%;
		background-color: var(--mrr-nav-accent);
	}

	.site-header #site-navigation .navigation-area ul#primary-menu {
		display: flex;
		flex-direction: row;
		flex-wrap: nowrap;
		align-items: stretch;
		justify-content: space-between;
		gap: 0;
		width: 100%;
		margin: 0;
		padding: 0;
		background-color: var(--mrr-nav-accent);
	}

	.site-header #site-navigation .navigation-area ul#primary-menu > li.menu-item {
		position: relative;
		display: flex;
		flex: 1 1 auto;
		align-items: stretch;
		justify-content: center;
		float: none;
		white-space: nowrap;
		border: 0;
		margin: 0;
	}

	.site-header #site-navigation .navigation-area ul#primary-menu > li.menu-item > a {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 5px;
		width: 100%;
		min-height: 48px;
		padding: 13px 14px;
		color: var(--mrr-nav-text);
		background-color: var(--mrr-nav-accent);
		font-size: 0.84rem;
		font-weight: 700;
		line-height: 1.25;
		letter-spacing: 0.015em;
		text-align: center;
		text-decoration: none;
		white-space: nowrap;
		box-shadow: inset 0 -3px 0 transparent;
		transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
	}

	.site-header #site-navigation .navigation-area ul#primary-menu > li.menu-item:hover > a,
	.site-header #site-navigation .navigation-area ul#primary-menu > li.menu-item:focus-within > a,
	.site-header #site-navigation .navigation-area ul#primary-menu > li.menu-item > a:hover,
	.site-header #site-navigation .navigation-area ul#primary-menu > li.menu-item > a:focus {
		color: #ffffff;
		background-color: var(--mrr-nav-bg);
		box-shadow: inset 0 -3px 0 #ffffff;
		text-decoration: none;
	}

	.site-header #site-navigation .navigation-area ul#primary-menu > li.current-menu-item > a,
	.site-header #site-navigation .navigation-area ul#primary-menu > li.current-menu-ancestor > a,
	.site-header #site-navigation .navigation-area ul#primary-menu > li.current_page_item > a,
	.site-header #site-navigation .navigation-area ul#primary-menu > li.current_page_ancestor > a {
		color: #ffffff;
		background-color: var(--mrr-nav-bg);
		box-shadow: inset 0 -3px 0 var(--mrr-nav-accent);
		text-decoration: none;
	}

	/* Sembunyikan tombol toggle mobile pada desktop */
	.site-header #site-navigation .mrr-submenu-toggle {
		display: none !important;
	}

	/* Keep submenu layout vertical and independent of the top-level flex row. */
	.site-header #site-navigation .navigation-area ul#primary-menu > li > ul.sub-menu {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		min-width: 230px;
		background: var(--mrr-nav-dropdown-bg);
		border-top: 3px solid var(--mrr-nav-bg);
		box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
		z-index: 999;
	}

	.site-header #site-navigation .navigation-area ul#primary-menu > li > ul.sub-menu > li {
		display: block;
		flex: 0 0 auto;
		float: none;
		white-space: normal;
		padding: 0;
		border-bottom: 1px solid #eeeeee;
	}

	.site-header #site-navigation .navigation-area ul#primary-menu > li > ul.sub-menu > li:last-child {
		border-bottom: 0;
	}

	.site-header #site-navigation .navigation-area ul#primary-menu > li > ul.sub-menu > li > a {
		display: block;
		padding: 11px 15px;
		color: var(--mrr-nav-dropdown-text);
		background-color: #ffffff;
		font-size: 0.875rem;
		font-weight: 600;
		line-height: 1.4;
		white-space: normal;
		text-align: left;
		text-decoration: none;
		transition: background-color 150ms ease, color 150ms ease, padding-left 150ms ease;
	}

	.site-header #site-navigation .navigation-area ul#primary-menu > li > ul.sub-menu > li > a:hover,
	.site-header #site-navigation .navigation-area ul#primary-menu > li > ul.sub-menu > li > a:focus {
		color: var(--mrr-nav-accent);
		background-color: #f5f5f5;
		padding-left: 19px;
		text-decoration: none;
	}

	.site-header #site-navigation .navigation-area ul#primary-menu > li > a:focus-visible,
	.site-header #site-navigation .navigation-area ul#primary-menu > li > ul.sub-menu a:focus-visible {
		outline: 2px solid #ffffff;
		outline-offset: -2px;
	}
}

/* Mobile/tablet: warna bar merah seragam penuh + hanya satu tombol panah toggle submenu. */
@media (max-width: 991px) {
	.site-header .routine-news-navigation-outer-wrapper,
	.site-header .routine-news-bottom-header,
	.site-header .routine-news-bottom-header-wrapper,
	.site-header .navigation,
	.site-header #site-navigation {
		background-color: var(--mrr-nav-accent) !important;
	}

	.site-header #site-navigation button.menu-toggle {
		border-radius: 3px;
		background-color: var(--mrr-nav-accent) !important;
		color: #ffffff;
	}

	.site-header #site-navigation button.menu-toggle .ham-icon {
		background-color: #ffffff;
	}

	.site-header #site-navigation button.menu-toggle:focus-visible {
		outline: 2px solid #ffffff;
		outline-offset: 3px;
	}

	.site-header #site-navigation .navigation-area {
		width: min(340px, 88vw);
		min-width: 0;
		max-width: 88vw;
		box-sizing: border-box;
		background-color: #ffffff;
		color: #171717;
		overflow-y: auto;
	}

	.site-header #site-navigation .navigation-area .menu-primary-container,
	.site-header #site-navigation .navigation-area ul#primary-menu {
		display: block;
		width: 100%;
		margin: 0;
		padding: 8px 0 24px;
		list-style: none;
		opacity: 1;
		visibility: visible;
	}

	.site-header #site-navigation .navigation-area ul#primary-menu > li {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		position: relative;
		width: 100%;
		margin: 0;
		padding: 0;
		border-bottom: 1px solid #ececec;
		text-align: left;
	}

	.site-header #site-navigation .navigation-area ul#primary-menu > li > a {
		flex: 1 1 auto;
		display: block;
		padding: 12px 8px 12px 4px;
		color: #171717;
		background-color: transparent;
		font-size: 0.92rem;
		font-weight: 700;
		line-height: 1.35;
		text-decoration: none;
	}

	/* Hilangkan panah ganda bawaan parent theme di dalam link teks pada mobile */
	.site-header #site-navigation .navigation-area ul#primary-menu li.menu-item-has-children > a::before,
	.site-header #site-navigation .navigation-area ul#primary-menu li.menu-item-has-children > a::after,
	.site-header #site-navigation .navigation-area ul#primary-menu li.menu-item-has-children > a > i,
	.site-header #site-navigation .navigation-area ul#primary-menu li.menu-item-has-children > a > svg,
	.site-header #site-navigation .navigation-area ul#primary-menu li.menu-item-has-children > a > span:not(.screen-reader-text),
	.site-header #site-navigation .navigation-area ul#primary-menu li.menu-item-has-children > .dropdown-toggle {
		display: none !important;
		content: none !important;
	}

	.site-header #site-navigation .navigation-area ul#primary-menu > li > a:hover,
	.site-header #site-navigation .navigation-area ul#primary-menu > li > a:focus,
	.site-header #site-navigation .navigation-area ul#primary-menu > li.current-menu-item > a,
	.site-header #site-navigation .navigation-area ul#primary-menu > li.current-menu-ancestor > a {
		color: var(--mrr-nav-accent);
	}

	/* Satu tombol panah toggle terpisah di sisi kanan menu induk */
	.site-header #site-navigation .mrr-submenu-toggle {
		flex: 0 0 42px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 42px;
		height: 42px;
		margin: 0;
		padding: 0;
		border: 0;
		border-left: 1px solid #eeeeee;
		background-color: transparent;
		color: #171717;
		cursor: pointer;
		transition: background-color 150ms ease, color 150ms ease;
	}

	.site-header #site-navigation .mrr-submenu-toggle:hover,
	.site-header #site-navigation .mrr-submenu-toggle:focus-visible {
		background-color: #f7f7f7;
		color: var(--mrr-nav-accent);
	}

	.site-header #site-navigation .mrr-submenu-toggle .mrr-toggle-arrow {
		display: inline-block;
		width: 8px;
		height: 8px;
		border-right: 2px solid currentColor;
		border-bottom: 2px solid currentColor;
		transform: rotate(45deg);
		margin-top: -3px;
		transition: transform 180ms ease;
	}

	.site-header #site-navigation li.is-submenu-open > .mrr-submenu-toggle {
		color: var(--mrr-nav-accent);
		background-color: #fdf2f3;
	}

	.site-header #site-navigation li.is-submenu-open > .mrr-submenu-toggle .mrr-toggle-arrow {
		transform: rotate(-135deg);
		margin-top: 3px;
	}

	/* Submenu tertutup secara default di mobile, terbuka saat .is-submenu-open */
	.site-header #site-navigation .navigation-area ul#primary-menu li.menu-item-has-children > ul.sub-menu {
		flex: 1 1 100%;
		display: none !important;
		width: 100%;
		margin: 0 0 10px 10px;
		padding: 4px 0 4px 12px;
		list-style: none;
		border-left: 2px solid var(--mrr-nav-accent);
		background-color: #fafafa;
	}

	.site-header #site-navigation .navigation-area ul#primary-menu li.menu-item-has-children.is-submenu-open > ul.sub-menu {
		display: block !important;
	}

	.site-header #site-navigation .navigation-area ul#primary-menu ul.sub-menu li {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
		border-bottom: 1px solid #f0f0f0;
	}

	.site-header #site-navigation .navigation-area ul#primary-menu ul.sub-menu li:last-child {
		border-bottom: 0;
	}

	.site-header #site-navigation .navigation-area ul#primary-menu ul.sub-menu li a {
		flex: 1 1 auto;
		display: block;
		padding: 9px 8px;
		color: #333333;
		font-size: 0.86rem;
		font-weight: 600;
		line-height: 1.35;
		text-decoration: none;
	}

	.site-header #site-navigation .navigation-area ul#primary-menu ul.sub-menu li a:hover,
	.site-header #site-navigation .navigation-area ul#primary-menu ul.sub-menu li a:focus {
		color: var(--mrr-nav-accent);
	}
}

@media (max-width: 360px) {
	.site-header #site-navigation .navigation-area {
		width: 88vw;
		max-width: 88vw;
		padding-inline: 16px;
	}
}

/**
 * Styling Slot Advertising Mitra Rakyat Reformasi (MRR)
 */

.mrr-header-top-ad-wrap:empty {
	display: none;
}

.mrr-ad-slot-header-top {
	margin: 16px 0 4px;
}

.mrr-ad-container {
	width: 100%;
	margin: 20px 0;
	display: flex;
	justify-content: center;
	clear: both;
}

.mrr-ad-inner {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	background-color: #F8F9FA;
	border: 1px solid #E2E4E8;
	border-radius: 4px;
	padding: 8px;
}

.mrr-ad-label {
	display: block;
	font-size: 0.65rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #888888;
	margin-bottom: 4px;
	line-height: 1;
}

.mrr-ad-link {
	display: block;
	width: 100%;
	text-align: center;
	line-height: 0;
}

.mrr-ad-img {
	max-width: 100%;
	height: auto;
	margin: 0 auto;
	border-radius: 2px;
}

.mrr-ad-img-desktop {
	display: block;
}

.mrr-ad-img-mobile {
	display: none;
}

.mrr-ad-html-wrap {
	width: 100%;
	text-align: center;
	overflow: hidden;
}

/* Slot Khusus Sidebar */
.mrr-ad-slot-sidebar-top,
.mrr-ad-slot-sidebar-middle {
	margin-top: 0;
	margin-bottom: 20px;
}

@media (max-width: 767px) {
	.mrr-ad-img-desktop {
		display: none;
	}

	.mrr-ad-img-mobile {
		display: block;
	}
}

/**
 * Footer Centered Mitra Rakyat Reformasi (MRR)
 */

.mrr-before-footer-ad-wrap:empty {
	display: none;
}

.mrr-centered-footer {
	background-color: #171717 !important;
	color: #ffffff;
	border-top: 4px solid #B51F2A;
	margin-top: 40px;
}

.mrr-footer-center-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding-block: 44px 32px;
	gap: 18px;
}

.mrr-footer-logo a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
}

.mrr-footer-logo img {
	max-height: 72px;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
	margin: 0 auto;
}

.mrr-footer-logo-fallback {
	display: inline-block;
	font-size: 1.8rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	color: #ffffff;
	line-height: 1.2;
}

.mrr-footer-identity {
	max-width: 680px;
	margin: 0 auto;
}

.mrr-footer-company {
	margin: 0 0 6px;
	font-size: 0.92rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #ffffff;
}

.mrr-footer-address,
.mrr-footer-contact {
	margin: 0 0 4px;
	font-size: 0.9rem;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.9);
}

.mrr-footer-contact:last-child {
	margin-bottom: 0;
}

.mrr-footer-nav {
	margin-top: 6px;
}

.mrr-footer-nav-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px 14px;
}

.mrr-footer-nav-list li {
	display: inline-flex;
	align-items: center;
	margin: 0;
}

.mrr-footer-nav-list li:not(:last-child)::after {
	content: "|";
	margin-left: 14px;
	color: rgba(255, 255, 255, 0.55);
	font-weight: 400;
}

.mrr-footer-nav-list li a {
	color: #ffffff !important;
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-decoration: none;
	transition: opacity 0.2s ease, color 0.2s ease;
}

.mrr-footer-nav-list li a:hover,
.mrr-footer-nav-list li a:focus-visible {
	color: #ffb3b8 !important;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.mrr-footer-bottom {
	background-color: #111111;
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	padding: 15px 0;
	text-align: center;
}

.mrr-copyright {
	margin: 0;
	font-size: 0.78rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.75);
}

@media (max-width: 767px) {
	.mrr-footer-center-wrap {
		padding-block: 36px 28px;
		gap: 14px;
	}

	.mrr-footer-logo img {
		max-height: 58px;
	}

	.mrr-footer-address,
	.mrr-footer-contact {
		font-size: 0.84rem;
	}

	.mrr-footer-nav-list {
		gap: 6px 10px;
	}

	.mrr-footer-nav-list li:not(:last-child)::after {
		margin-left: 10px;
	}

	.mrr-footer-nav-list li a {
		font-size: 0.78rem;
	}
}

/* ============================================================
 * MRR Custom Sidebar Widgets (Referensi Visual MRR)
 * ============================================================ */
.widget.widget_mrr_popular_news,
.widget.widget_mrr_latest_compact,
.widget.widget_mrr_featured_news,
.widget.widget_mrr_newsletter,
.widget.widget_mrr_social {
	margin-bottom: 24px;
}

.widget.widget_mrr_popular_news .widget-title,
.widget.widget_mrr_latest_compact .widget-title,
.widget.widget_mrr_featured_news .widget-title,
.widget.widget_mrr_newsletter .widget-title,
.widget.widget_mrr_social .widget-title {
	position: relative;
	margin: 0 0 16px;
	padding-bottom: 8px;
	font-size: 1.05rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	color: #171717;
	border-bottom: 1px solid #e5e5e5;
}

.widget.widget_mrr_popular_news .widget-title::after,
.widget.widget_mrr_latest_compact .widget-title::after,
.widget.widget_mrr_featured_news .widget-title::after,
.widget.widget_mrr_newsletter .widget-title::after,
.widget.widget_mrr_social .widget-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -1px;
	width: 54px;
	height: 2px;
	background-color: #B51F2A;
}

.mrr-popular-list,
.mrr-compact-list,
.mrr-social {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* 1. Berita Terbaru Compact (Nomor Urut 01..05 Merah) */
.mrr-compact-item {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	width: 100%;
	padding: 12px 0;
	margin: 0;
	border-bottom: 1px solid #ececec;
	box-sizing: border-box;
}

.mrr-compact-item:first-child {
	padding-top: 2px;
}

.mrr-compact-item:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.mrr-compact-item__num {
	flex: 0 0 28px;
	font-family: Georgia, "Times New Roman", serif;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.2;
	color: #B51F2A;
}

.mrr-compact-item__title {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1.38;
}

.mrr-compact-item__title a {
	color: #171717;
	text-decoration: none;
}

.mrr-compact-item__title a:hover {
	color: #B51F2A;
}

/* 2. Berita Populer (Thumbnail Kiri + Judul + Tanggal) */
.mrr-popular-item {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding: 12px 0;
	margin: 0;
	border-bottom: 1px solid #ececec;
}

.mrr-popular-item:first-child {
	padding-top: 2px;
}

.mrr-popular-item:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.mrr-popular-item__thumb {
	flex: 0 0 84px;
	width: 84px;
	height: 62px;
	overflow: hidden;
	border-radius: 2px;
	background-color: #171717;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
}

.mrr-popular-item__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mrr-popular-item__placeholder {
	color: #ffffff;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.06em;
}

.mrr-popular-item__body {
	flex: 1 1 auto;
	min-width: 0;
}

.mrr-popular-item__title {
	margin: 0 0 4px;
	font-size: 0.88rem;
	font-weight: 700;
	line-height: 1.35;
}

.mrr-popular-item__title a {
	color: #171717;
	text-decoration: none;
}

.mrr-popular-item__title a:hover {
	color: #B51F2A;
}

.mrr-popular-item .post-meta,
.mrr-popular-item .post-meta time {
	font-size: 0.76rem;
	color: #777777;
	line-height: 1.3;
}

/* 3. Konten Pilihan / Featured */
.mrr-featured-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.mrr-featured-item--large .mrr-featured-item__image {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	border-radius: 2px;
	background-color: #171717;
	margin-bottom: 10px;
}

.mrr-featured-item--large .mrr-featured-item__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mrr-featured-item__cat {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #B51F2A;
	text-decoration: none;
	margin-bottom: 4px;
}

.mrr-featured-item--large .mrr-featured-item__title {
	margin: 0 0 6px;
	font-size: 1rem;
	font-weight: 800;
	line-height: 1.35;
}

.mrr-featured-item__title a {
	color: #171717;
	text-decoration: none;
}

.mrr-featured-item__title a:hover {
	color: #B51F2A;
}

.mrr-featured-item__excerpt {
	margin: 0;
	font-size: 0.82rem;
	line-height: 1.48;
	color: #666666;
}

.mrr-featured-item--small {
	display: flex;
	gap: 12px;
	align-items: center;
	padding-top: 12px;
	border-top: 1px solid #ececec;
}

.mrr-featured-item--small .mrr-featured-item__image {
	flex: 0 0 84px;
	width: 84px;
	height: 62px;
	overflow: hidden;
	border-radius: 2px;
	background-color: #171717;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.mrr-featured-item--small .mrr-featured-item__image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mrr-featured-item--small .mrr-featured-item__title {
	margin: 0;
	font-size: 0.88rem;
	font-weight: 700;
	line-height: 1.35;
}

/* 4. Ikuti Kami (Grid 2 Kolom) */
.mrr-social {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

.mrr-social__item {
	margin: 0;
}

.mrr-social__link {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 9px 12px;
	border: 1px solid #e2e2e2;
	border-radius: 2px;
	background-color: #ffffff;
	color: #444444;
	font-size: 0.82rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: border-color 150ms ease, color 150ms ease;
}

.mrr-social__link:hover:not(.mrr-social__link--placeholder) {
	border-color: #B51F2A;
	color: #B51F2A;
}

.mrr-social__link--placeholder {
	color: #666666;
	cursor: default;
}

.mrr-social__icon {
	width: 10px;
	height: 10px;
	border-radius: 2px;
	background-color: #777777;
	flex: 0 0 10px;
}

/* 5. Newsletter Sidebar */
.mrr-newsletter {
	background-color: #f4f5f7;
	padding: 16px;
	border-radius: 2px;
}

.mrr-newsletter__text {
	margin: 0 0 12px;
	font-size: 0.84rem;
	line-height: 1.45;
	color: #333333;
}

.mrr-newsletter__input {
	width: 100%;
	padding: 10px 12px;
	margin-bottom: 10px;
	border: 1px solid #d4d4d4;
	border-radius: 2px;
	background-color: #ffffff;
	color: #171717;
	font-size: 0.86rem;
	box-sizing: border-box;
}

.mrr-newsletter__button {
	width: 100%;
	padding: 11px 14px;
	border: 0;
	border-radius: 2px;
	background-color: #B51F2A;
	color: #ffffff;
	font-size: 0.82rem;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	cursor: pointer;
	transition: background-color 150ms ease;
}

.mrr-newsletter__button:hover {
	background-color: #171717;
}

.mrr-sb-nl-feedback {
	margin: 8px 0 0;
	font-size: 0.8rem;
}

.mrr-sb-nl-feedback.is-success {
	color: #156b2a;
}

.mrr-sb-nl-feedback.is-error {
	color: #B51F2A;
}

.mrr-newsletter__note {
	margin: 10px 0 0;
	font-size: 0.76rem;
	font-style: italic;
	line-height: 1.4;
	color: #777777;
}

/* =========================================================
   MRR RESPONSIVE SAFETY
   Mencegah horizontal overflow pada viewport mobile tanpa
   menyembunyikan sumber masalah dengan overflow-x pada body.
   ========================================================= */
*,
*::before,
*::after {
	box-sizing: border-box;
}

img,
svg,
video,
canvas,
iframe {
	max-width: 100%;
}

img,
video,
iframe {
	height: auto;
}

.mrr-single-content,
.entry-content,
.widget,
.widget-area,
.site-main,
.section-wrapper,
.routine-news-container-wrapper {
	min-width: 0;
	max-width: 100%;
}

.entry-content {
	overflow-wrap: anywhere;
	word-break: break-word;
}

.entry-content table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
}

.mrr-header-top-ad-wrap,
.mrr-ad-container,
.mrr-ad-inner,
.mrr-ad-html-wrap {
	max-width: 100%;
}

@media (max-width: 767px) {
	.section-wrapper {
		width: 100%;
		padding-left: 14px;
		padding-right: 14px;
	}

	.site-header .routine-news-middle-header .middle-header-wrapper {
		min-width: 0;
	}

	.site-header .routine-news-middle-header .middle-header-wrapper > * {
		min-width: 0;
		max-width: 100%;
	}

	.site-header .site-branding,
	.site-header .site-identity,
	.site-header .middle-header-right {
		min-width: 0;
		max-width: 100%;
	}

	.site-header .site-title,
	.site-header .site-description {
		max-width: 100%;
		overflow-wrap: anywhere;
	}

	.routine-news-flash-news .section-wrapper {
		padding-left: 0;
		padding-right: 0;
	}

	.routine-news-flash-news,
	.flash-news-section,
	.flash-news-wrapper,
	.flash-news-area,
	.flash-news {
		max-width: 100%;
		min-width: 0;
	}

	.mrr-single-title,
	.mrr-archive-title,
	.mrr-section-title,
	.mrr-related-title,
	.mrr-nav-post-title {
		max-width: 100%;
		overflow-wrap: anywhere;
		word-break: break-word;
	}
}

/* Menjaga bar Flash News tetap satu baris sebelum jquery.marquee diinisialisasi */
body #routine_news_flash_news_section.routine-news-flash-news .flash-news-section .flash-news-wrapper .flash-news-area {
	flex: 1 1 0;
	min-width: 0;
	overflow: hidden;
}

body #routine_news_flash_news_section.routine-news-flash-news .flash-news-section .flash-news-wrapper .flash-news-area .flash-news,
body #routine_news_flash_news_section.routine-news-flash-news .flash-news-section .flash-news-wrapper .flash-news-area .flash-news .flash-news-posts-wrapper {
	min-width: 0;
	max-width: 100%;
}

body #routine_news_flash_news_section.routine-news-flash-news .flash-news-section .flash-news-wrapper .flash-news-area .flash-news .flash-news-posts-wrapper .flash-news-post {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
}

body #routine_news_flash_news_section.routine-news-flash-news .flash-news-section .flash-news-wrapper .flash-news-area .flash-news .flash-news-posts-wrapper .flash-news-post .single-post-wrap {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
}

body #routine_news_flash_news_section.routine-news-flash-news .flash-news-section .flash-news-wrapper .flash-news-area .flash-news .flash-news-posts-wrapper .flash-news-post .single-post-wrap .content-wrap,
body #routine_news_flash_news_section.routine-news-flash-news .flash-news-section .flash-news-wrapper .flash-news-area .flash-news .flash-news-posts-wrapper .flash-news-post .single-post-wrap .content-wrap .flash-title,
body #routine_news_flash_news_section.routine-news-flash-news .flash-news-section .flash-news-wrapper .flash-news-area .flash-news .flash-news-posts-wrapper .flash-news-post .single-post-wrap .content-wrap .flash-title a {
	white-space: nowrap;
}

/* Hilangkan pseudo-element glyph Font Awesome yang kosong pada menu sosial & topbar */
.mrr-site-header .header-social-icon .social-links li a::before,
.routine-news-topbar .topbar-date::before,
.routine-news-topbar .topbar-right::before {
	content: none !important;
	display: none !important;
}

/* Pastikan SVG di dalam tombol sosial tampil rapi berdampingan tanpa elemen ekstra */
.mrr-site-header .header-social-icon .social-links li a svg {
	display: block;
	flex: 0 0 auto;
}

/* Ikon kalender SVG ringan untuk tanggal di topbar */
.routine-news-topbar .topbar-date {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.routine-news-topbar .topbar-date::after {
	content: "";
	order: -1;
	width: 14px;
	height: 14px;
	flex: 0 0 auto;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") no-repeat center / contain;
}