/* =========================================================================
   Sodik & Co. — penyesuaian WordPress (di atas style.css)
   ========================================================================= */

/* Monogram brand "S&C" */
.brand__mark {
	font-size: 0.82rem;
	letter-spacing: 0.02em;
}

/* Logo image */
.brand__logo {
	width: 50px;
	height: 50px;
	object-fit: contain;
	border-radius: 4px;
	flex-shrink: 0;
}
.brand__logo--footer {
	width: 44px;
	height: 44px;
}

/* Menu WordPress */
.nav__menu .menu-item > a {
	font-size: 0.92rem;
	font-weight: 500;
	position: relative;
	padding: 0.3rem 0;
	display: inline-block;
}

.nav__menu .current-menu-item > a::after,
.nav__menu .current-menu-ancestor > a::after {
	width: 100%;
}

.nav__menu .sub-menu {
	position: absolute;
	min-width: 200px;
	background: #fff;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow);
	padding: 0.5rem;
	display: none;
	z-index: 140;
}

.nav__menu .menu-item-has-children {
	position: relative;
}

.nav__menu .menu-item-has-children:hover > .sub-menu {
	display: block;
}

.nav__menu .sub-menu a {
	padding: 0.45rem 0.7rem;
	display: block;
	border-radius: 6px;
}

.nav__menu .sub-menu a:hover {
	background: var(--ivory);
}

/* =========================================================================
   Widget headings — seragamkan klasik & block
   ========================================================================= */
.widget h2,
.widget h3,
.widget .wp-block-heading {
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 0.8rem;
	padding-bottom: 0.6rem;
	border-bottom: 1px solid var(--border);
}

/* Widget: remove extra top margin */
.widget {
	margin-top: 0;
}

/* =========================================================================
   WP Block widgets — jaring pengaman
   ========================================================================= */

/* Search block */
.wp-block-search__inside-wrapper {
	display: flex;
	gap: 0.5rem;
}
.wp-block-search__input {
	flex: 1;
	padding: 0.55rem 0.8rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	font-family: inherit;
	font-size: 0.88rem;
}
.wp-block-search__button {
	background: var(--merah);
	color: #fff;
	border: 0;
	border-radius: var(--radius-sm);
	padding: 0.55rem 1rem;
	font-weight: 600;
	cursor: pointer;
}
.wp-block-search__button:hover {
	background: var(--merah-2);
}

/* Latest Posts block */
.wp-block-latest-posts {
	list-style: none;
	padding: 0;
	margin: 0.3rem 0;
}
.wp-block-latest-posts li {
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--border);
}
.wp-block-latest-posts li:last-child {
	border-bottom: none;
}
.wp-block-latest-posts__post-title {
	font-weight: 600;
	font-size: 0.9rem;
	line-height: 1.4;
	text-decoration: none;
	color: var(--ink);
}
.wp-block-latest-posts__post-title:hover {
	color: var(--merah);
}
.wp-block-latest-posts__post-date {
	display: block;
	font-size: 0.78rem;
	color: var(--muted);
	margin-top: 0.15rem;
}
.wp-block-latest-posts__post-excerpt {
	font-size: 0.85rem;
	color: var(--muted);
	margin-top: 0.3rem;
}

/* Latest Comments block */
.wp-block-latest-comments {
	list-style: none;
	padding: 0;
	margin: 0.3rem 0;
}
.wp-block-latest-comments__comment {
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--border);
	font-size: 0.88rem;
	line-height: 1.5;
}
.wp-block-latest-comments__comment:last-child {
	border-bottom: none;
}

/* Group block spacing inside widgets */
.widget_block .wp-block-group__inner-container > :first-child {
	margin-top: 0;
}
.widget_block .wp-block-group__inner-container > :last-child {
	margin-bottom: 0;
}

/* =========================================================================
   Theme Artikel Terbaru widget
   ========================================================================= */
.sc-recent {
	list-style: none;
	padding: 0;
	margin: 0;
}
.sc-recent__item {
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--border);
}
.sc-recent__item:last-child {
	border-bottom: none;
}
.sc-recent__title {
	display: block;
	font-weight: 600;
	font-size: 0.9rem;
	line-height: 1.4;
	text-decoration: none;
	color: var(--ink);
}
.sc-recent__title:hover {
	color: var(--merah);
}
.sc-recent__date {
	display: block;
	font-size: 0.78rem;
	color: var(--muted);
	margin-top: 0.15rem;
}

/* =========================================================================
   Sidebar spacing
   ========================================================================= */
.sidebar .widget + .widget {
	margin-top: 1.2rem;
}

/* Konten WordPress (Gutenberg) */
.prose .wp-block-image img,
.entry-content img {
	border-radius: var(--radius-sm);
}

.prose .alignleft {
	float: left;
	margin: 0 1.2rem 1rem 0;
}

.prose .alignright {
	float: right;
	margin: 0 0 1rem 1.2rem;
}

.prose .aligncenter {
	margin-left: auto;
	margin-right: auto;
}

.prose .wp-block-quote,
.prose blockquote {
	border-left: 4px solid var(--merah);
	background: var(--ivory);
	padding: 0.6rem 1.2rem;
}

.prose .wp-block-button__link {
	background: var(--merah);
	border-radius: 999px;
}

.prose figcaption,
.prose .wp-element-caption {
	font-size: 0.82rem;
	color: var(--muted);
	text-align: center;
}

/* Halaman Galeri penuh */
.gallery--full {
	grid-template-columns: repeat(3, 1fr);
}

.gallery--full .gallery__item {
	border-radius: var(--radius);
}

@media (max-width: 1024px) {
	.gallery--full {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Paginasi WordPress */
.pagination a,
.pagination .page-numbers {
	display: inline-block;
	padding: 0.4rem 0.8rem;
	border: 1px solid var(--border);
	border-radius: 8px;
	margin: 0 0.15rem;
	font-weight: 600;
	font-size: 0.9rem;
}

.pagination .page-numbers.current {
	background: var(--merah);
	color: #fff;
	border-color: transparent;
}

/* Metadata artikel */
.article-single__meta a {
	color: inherit;
	text-decoration: underline;
}

/* Komentar (jika diaktifkan) */
.comments-area {
	margin-top: 2.5rem;
	border-top: 1px solid var(--border);
	padding-top: 1.6rem;
}

.comment-list {
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
}

.comment-list .children {
	list-style: none;
	margin-left: 1.4rem;
	padding: 0;
}

.comment-body {
	background: var(--ivory);
	border-radius: var(--radius-sm);
	padding: 1rem 1.2rem;
	margin-bottom: 1rem;
}

/* Form bawaan WP */
.prose input[type="text"],
.prose input[type="email"],
.prose input[type="url"],
.prose textarea,
.prose select {
	width: 100%;
	padding: 0.7rem 0.9rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	font-family: inherit;
}

.prose input[type="submit"],
.prose button[type="submit"] {
	background: var(--merah);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 0.75rem 1.4rem;
	font-weight: 600;
	cursor: pointer;
}

/* Admin bar: beri ruang saat login */
body.admin-bar .site-header {
	top: 32px;
}

@media (max-width: 782px) {
	body.admin-bar .site-header {
		top: 46px;
	}
}

/* =========================================================================
   Iklan — Widget sidebar & Popup
   ========================================================================= */

/* Widget iklan sidebar */
.widget--ad {
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	overflow: hidden;
}
.widget--ad h3 {
	font-size: 0.82rem;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--muted);
	margin: 0;
	padding: 10px 14px 0;
}
.sc-ad-link {
	display: block;
	line-height: 0;
}
.sc-ad-link img {
	width: 100%;
	height: auto;
	border-radius: 0;
}

/* Popup overlay */
.sc-popup {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
	align-items: center;
	justify-content: center;
}
.sc-popup.is-open {
	display: flex;
}
.sc-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(10, 10, 11, 0.7);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	cursor: pointer;
}
.sc-popup__inner {
	position: relative;
	z-index: 1;
	background: var(--paper);
	border-radius: var(--radius);
	box-shadow: var(--shadow-lg);
	max-width: 90vw;
	max-height: 90vh;
	overflow: hidden;
	animation: sc-popup-in 0.3s ease;
}
@keyframes sc-popup-in {
	from { opacity: 0; transform: translateY(24px) scale(0.96); }
	to { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
	.sc-popup__inner { animation: none; }
}
.sc-popup__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: rgba(0,0,0,0.65);
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
}
.sc-popup__close:hover,
.sc-popup__close:focus {
	background: var(--merah);
	outline: none;
}
.sc-popup__link {
	display: block;
	line-height: 0;
}
.sc-popup__link img {
	width: 100%;
	height: auto;
}

/* =========================================================================
   Google Ads (AdSense)
   ========================================================================= */
.sc-gads {
	margin: 1.5rem 0;
	padding: 0.8rem;
	background: var(--ivory);
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	text-align: center;
	overflow: hidden;
	min-height: 90px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.sc-gads--top {
	margin-top: 0;
	margin-bottom: 1.5rem;
}
.sc-gads--bottom {
	margin-top: 1.5rem;
	margin-bottom: 0;
}
.sc-gads--inarticle {
	margin-left: 0;
	margin-right: 0;
}
.sc-gads ins.adsbygoogle {
	text-align: center;
}
.sc-gads--shortcode {
	margin: 1.5rem 0;
}
