/**
 * APMobile - Modern Mobile Experience Stylesheet
 * Replicates the clean APMobile template design for mobile devices.
 */

:root {
	--ap-primary: #e81b5c;
	--ap-primary-dark: #c4134a;
	--ap-primary-light: #fff0f5;
	--ap-bg: #f8f9fa;
	--ap-card-bg: #ffffff;
	--ap-text: #1a1a1a;
	--ap-text-muted: #737373;
	--ap-border: #eef0f2;
	--ap-border-subtle: #f0f0f0;
	--ap-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
	--ap-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
	--ap-radius-sm: 4px;
	--ap-radius-md: 8px;
	--ap-radius-lg: 14px;
	--ap-font: 'Cairo', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	--ap-header-height: 54px;
}

/* Dark Mode Tokens */
html.ap-dark {
	--ap-bg: #121212;
	--ap-card-bg: #1e1e1e;
	--ap-text: #e5e7eb;
	--ap-text-muted: #9ca3af;
	--ap-border: #2d2d2d;
	--ap-border-subtle: #262626;
	--ap-primary-light: rgba(232, 27, 92, 0.15);
	--ap-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
	--ap-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
}

/* -------------------------------------------------------------
 * 1. Base & Reset
 * ----------------------------------------------------------- */
*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	-webkit-tap-highlight-color: transparent;
}

html, body {
	width: 100%;
	min-height: 100%;
	font-family: var(--ap-font);
	font-size: 15px;
	line-height: 1.6;
	color: var(--ap-text);
	background-color: var(--ap-bg);
	direction: rtl;
	text-align: right;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

a {
	color: inherit;
	text-decoration: none;
	transition: color 0.2s ease, opacity 0.2s ease;
}

img,
video,
canvas,
audio,
iframe,
embed,
object {
	max-width: 100%;
}

img {
	height: auto;
	display: block;
}

button, input, textarea {
	font-family: inherit;
	font-size: inherit;
}

.ap-site-wrap {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	width: 100%;
	max-width: 600px; /* Constrain nicely on tablets/desktop preview */
	margin: 0 auto;
	background-color: var(--ap-bg);
	box-shadow: 0 0 30px rgba(0, 0, 0, 0.04);
	position: relative;
	overflow-x: hidden;
}

.ap-container {
	padding: 0 14px;
	width: 100%;
}

/* -------------------------------------------------------------
 * 2. Header (Crimson APMobile App Bar)
 * ----------------------------------------------------------- */
.ap-header {
	position: sticky;
	top: 0;
	z-index: 999;
	background-color: var(--ap-primary);
	color: #ffffff;
	box-shadow: 0 2px 8px rgba(232, 27, 92, 0.25);
}

.ap-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--ap-header-height);
	padding: 0 12px;
}

/* Menu Toggle Button (Right in RTL) */
.ap-btn {
	background: none;
	border: none;
	color: #ffffff;
	cursor: pointer;
	padding: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--ap-radius-sm);
	transition: background-color 0.15s ease;
}

.ap-btn:active {
	background-color: rgba(255, 255, 255, 0.15);
}

/* Center Logo */
.ap-header__logo {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
}

.ap-logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	color: #ffffff;
	font-weight: 800;
	font-size: 20px;
	letter-spacing: -0.3px;
	max-height: calc(var(--ap-header-height) - 10px);
}

.ap-logo--image {
	padding: 2px 0;
}

.ap-logo__img {
	max-height: 34px;
	width: auto;
	max-width: 170px;
	object-fit: contain;
	display: block;
	transition: opacity 0.2s ease;
}

.ap-logo__symbol {
	display: flex;
	align-items: center;
}

.ap-logo__symbol svg {
	stroke: #ffffff;
}

/* Drawer Logo Image */
.ap-drawer__logo .ap-logo--image {
	max-height: 40px;
}
.ap-drawer__logo .ap-logo__img {
	max-height: 36px;
}

/* Footer Logo Image */
.ap-footer__logo .ap-logo--image {
	margin-bottom: 4px;
}
.ap-footer__logo .ap-logo__img {
	max-height: 40px;
	max-width: 180px;
	margin: 0 auto;
}

/* Left Actions (Dark Mode, Categories & Search) */
.ap-header__actions {
	display: flex;
	align-items: center;
	gap: 6px;
}

/* Dark Mode Switcher in Header */
.ap-btn--dark {
	position: relative;
	width: 36px;
	height: 36px;
	padding: 0;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease, transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ap-btn--dark:active {
	transform: scale(0.88);
}

.ap-btn--dark .ap-icon-moon,
.ap-btn--dark .ap-icon-sun {
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}

/* Light mode state: show moon, hide sun */
.ap-btn--dark .ap-icon-sun {
	display: none;
}
.ap-btn--dark .ap-icon-moon {
	display: inline-flex;
	color: #ffffff;
}

/* Dark mode state: show sun, hide moon */
html.ap-dark .ap-btn--dark .ap-icon-moon {
	display: none;
}
html.ap-dark .ap-btn--dark .ap-icon-sun {
	display: inline-flex;
	color: #fbbf24; /* Warm golden sun */
	transform: rotate(0deg);
}
html.ap-dark .ap-btn--dark:hover .ap-icon-sun {
	transform: rotate(45deg);
}

/* -------------------------------------------------------------
 * 3. Search Bar Overlay
 * ----------------------------------------------------------- */
.ap-search-bar {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.25s ease-out, padding 0.25s ease-out;
	background-color: #ffffff;
	border-bottom: 1px solid var(--ap-border);
}

html.ap-dark .ap-search-bar {
	background-color: #1e1e1e;
	border-bottom-color: var(--ap-border);
}

.ap-search-bar.is-open {
	max-height: 70px;
	padding: 10px 14px;
}

.ap-search-input-wrap {
	display: flex;
	align-items: center;
	background: var(--ap-bg);
	border: 1px solid var(--ap-border);
	border-radius: 24px;
	padding: 0 12px;
}

html.ap-dark .ap-search-input-wrap {
	background: #282828;
}

.ap-search-input {
	flex: 1;
	border: none;
	background: transparent;
	padding: 8px 10px;
	outline: none;
	font-size: 14px;
	color: var(--ap-text);
}

.ap-search-submit {
	background: none;
	border: none;
	color: var(--ap-primary);
	cursor: pointer;
	padding: 6px;
	display: flex;
	align-items: center;
}

.ap-search-close {
	background: none;
	border: none;
	color: var(--ap-text-muted);
	font-size: 16px;
	cursor: pointer;
	padding: 6px;
	margin-inline-start: 4px;
}

/* -------------------------------------------------------------
 * 4. Breaking News Ticker (Matching Screenshot 1)
 * ----------------------------------------------------------- */
.ap-ticker-bar {
	display: flex;
	align-items: center;
	background: #ffffff;
	border-bottom: 1px solid var(--ap-border);
	padding: 7px 12px;
	gap: 10px;
	overflow: hidden;
}

html.ap-dark .ap-ticker-bar {
	background: #181818;
}

.ap-ticker-badge {
	background-color: var(--ap-primary);
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 3px;
	white-space: nowrap;
	flex-shrink: 0;
	letter-spacing: 0.5px;
}

.ap-ticker-marquee {
	flex: 1;
	overflow: hidden;
	white-space: nowrap;
	position: relative;
}

.ap-ticker-items {
	display: inline-flex;
	gap: 20px;
	animation: ap-ticker-scroll 25s linear infinite;
}

.ap-ticker-items:hover {
	animation-play-state: paused;
}

.ap-ticker-link {
	font-size: 13px;
	font-weight: 600;
	color: var(--ap-text);
	display: inline-block;
}

.ap-ticker-link::after {
	content: "•";
	margin-inline-start: 20px;
	color: var(--ap-primary);
}

@keyframes ap-ticker-scroll {
	0% {
		transform: translateX(0);
	}
	100% {
		transform: translateX(50%);
	}
}

/* -------------------------------------------------------------
 * 5. Posts Feed & Cards (Screenshot 1 Layout)
 * ----------------------------------------------------------- */
.ap-main {
	flex: 1;
	padding: 12px 0 24px;
}

.ap-posts-stream {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ap-card {
	position: relative;
	background: var(--ap-card-bg);
	border-radius: var(--ap-radius-md);
	overflow: hidden;
	border: 1px solid var(--ap-border);
	box-shadow: var(--ap-shadow-sm);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ap-card:active {
	transform: scale(0.995);
}

/* -------------------------------------------------------------
 * 1. Overlay Gradient Card Style (Matching Screenshot)
 * ----------------------------------------------------------- */
.ap-card--overlay {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10.5;
	min-height: 235px;
	border: none;
	background-color: #121212;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.16);
}

/* Invisible tap target over the entire card */
.ap-card__cover-link {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 2;
}

/* Full-bleed media layer */
.ap-card--overlay .ap-card__media {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 100%;
	aspect-ratio: unset;
	z-index: 1;
	background-color: #181818;
	overflow: hidden;
}

.ap-card--overlay .ap-card__thumb-link {
	display: block;
	width: 100%;
	height: 100%;
}

.ap-card--overlay .ap-thumb-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.4s ease;
}

.ap-card--overlay:hover .ap-thumb-img,
.ap-card--overlay:active .ap-thumb-img {
	transform: scale(1.03);
}

/* Bottom Dark Gradient Overlay */
.ap-card__overlay {
	position: absolute;
	bottom: 0;
	right: 0;
	left: 0;
	z-index: 3;
	padding: 55px 14px 14px 14px;
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, 0.96) 0%,
		rgba(0, 0, 0, 0.88) 38%,
		rgba(0, 0, 0, 0.52) 70%,
		rgba(0, 0, 0, 0.18) 86%,
		transparent 100%
	);
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	pointer-events: none;
}

.ap-card__overlay .ap-card__meta,
.ap-card__overlay .ap-card__title,
.ap-card__overlay a {
	pointer-events: auto;
}

/* Post Info / Date above Title (Matching Screenshot) */
.ap-card--overlay .ap-card__meta {
	order: 1;
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 6px;
}

.ap-card--overlay .ap-meta__date {
	font-size: 12.5px;
	font-weight: 700;
	color: #ffffff;
	opacity: 0.96;
	letter-spacing: 0.1px;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

/* Post Title inside Gradient (Matching Screenshot) */
.ap-card--overlay .ap-card__title {
	order: 2;
	font-size: 16.5px;
	font-weight: 800;
	line-height: 1.46;
	color: #ffffff;
	margin: 0;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 2px 8px rgba(0, 0, 0, 0.7);
}

.ap-card--overlay .ap-card__title a {
	color: #ffffff;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ap-card--overlay .ap-card__title a:hover {
	color: #ffffff;
	text-decoration: underline;
}

/* Category Badge in Overlay mode */
.ap-card--overlay .ap-badge {
	z-index: 4;
	top: 12px;
	right: 12px;
	position: absolute;
	background-color: var(--ap-primary);
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 14px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

/* -------------------------------------------------------------
 * 2. Classic Card Style Fallback (Image on Top, Info Below)
 * ----------------------------------------------------------- */
.ap-card--classic .ap-card__media {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background-color: #222222;
	overflow: hidden;
}

.ap-card--classic .ap-card__thumb-link {
	display: block;
	width: 100%;
	height: 100%;
}

.ap-card--classic .ap-thumb-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 0.3s ease;
}

.ap-card--classic:hover .ap-thumb-img {
	transform: scale(1.03);
}

.ap-thumb-fallback {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #333333, #1e1e1e);
	display: flex;
	align-items: center;
	justify-content: center;
}

.ap-fallback-icon {
	font-size: 36px;
	opacity: 0.5;
}

.ap-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	background-color: var(--ap-primary);
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	padding: 3px 10px;
	border-radius: 14px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
	letter-spacing: 0.2px;
	z-index: 2;
	transition: background-color 0.2s ease;
}

.ap-badge:hover {
	background-color: var(--ap-primary-dark);
}

.ap-card--classic .ap-card__info {
	padding: 12px 14px 14px;
}

.ap-card--classic .ap-card__title {
	font-size: 16.5px;
	font-weight: 800;
	line-height: 1.45;
	margin-bottom: 8px;
	color: var(--ap-text);
}

.ap-card--classic .ap-card__title a {
	color: inherit;
}

.ap-card--classic .ap-card__title a:hover {
	color: var(--ap-primary);
}

.ap-card--classic .ap-card__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 11.5px;
	color: var(--ap-text-muted);
	font-weight: 600;
}

.ap-card--classic .ap-meta__cat {
	color: var(--ap-primary);
	font-weight: 700;
}

.ap-card--classic .ap-meta__cat::after {
	content: "•";
	margin-inline-start: 8px;
	color: var(--ap-border);
}

/* Load More Button */
.ap-load-more-wrap {
	display: flex;
	justify-content: center;
	margin-top: 20px;
	padding: 0 14px;
}

/* -------------------------------------------------------------
 * APMobile AdSense & Ad Placements
 * ----------------------------------------------------------- */
.ap-ad-slot {
	position: relative;
	margin: 18px auto;
	text-align: center;
	overflow: hidden;
	width: 100%;
}

.ap-ad-label {
	display: block;
	font-size: 10px;
	color: var(--ap-text-muted);
	font-weight: 700;
	letter-spacing: 0.5px;
	margin-bottom: 4px;
	text-align: center;
	opacity: 0.75;
}

.ap-ad-content {
	display: flex;
	justify-content: center;
	align-items: center;
	min-height: 50px;
	width: 100%;
	overflow: hidden;
}

.ap-ad-content ins.adsbygoogle {
	width: 100%;
	display: block;
	margin: 0 auto;
}

.ap-ad-content img {
	max-width: 100%;
	height: auto;
	margin: 0 auto;
	border-radius: var(--ap-radius-sm);
}

.ap-ad-slot--inline {
	margin: 22px 0;
	padding: 12px 0;
	border-top: 1px dashed var(--ap-border);
	border-bottom: 1px dashed var(--ap-border);
}

.ap-ad-slot--feed_stream {
	margin: 14px 0;
	background: var(--ap-card-bg);
	border: 1px solid var(--ap-border);
	border-radius: var(--ap-radius-md);
	padding: 12px;
	box-shadow: var(--ap-shadow-sm);
}

.ap-btn-load-more {
	width: 100%;
	max-width: 280px;
	background: var(--ap-card-bg);
	border: 1.5px solid var(--ap-primary);
	color: var(--ap-primary);
	font-weight: 700;
	font-size: 14px;
	padding: 10px 20px;
	border-radius: 24px;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-shadow: var(--ap-shadow-sm);
	transition: all 0.2s ease;
}

.ap-btn-load-more:active {
	background-color: var(--ap-primary);
	color: #ffffff;
}

.ap-btn-spinner {
	width: 14px;
	height: 14px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: ap-spin 0.6s linear infinite;
	display: inline-block;
}

@keyframes ap-spin {
	to { transform: rotate(360deg); }
}

/* -------------------------------------------------------------
 * 6. Single Post Layout (Matching Screenshot 2)
 * ----------------------------------------------------------- */
.ap-single-article {
	background: var(--ap-card-bg);
	border-bottom: 1px solid var(--ap-border);
	padding-bottom: 24px;
}

.ap-single__media {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10;
	background-color: #222222;
	overflow: hidden;
}

.ap-single__media .ap-thumb-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ap-badge--single {
	top: 14px;
	right: 14px;
	font-size: 12px;
	padding: 4px 12px;
}

.ap-single__header {
	padding: 16px 0 12px;
	border-bottom: 1px solid var(--ap-border-subtle);
	margin-bottom: 16px;
}

.ap-single__title {
	font-size: 21px;
	font-weight: 900;
	line-height: 1.4;
	color: var(--ap-text);
	margin-bottom: 10px;
}

.ap-single__meta {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 12px;
	color: var(--ap-text-muted);
}

.ap-meta__cat-tag {
	background: var(--ap-primary-light);
	color: var(--ap-primary);
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 4px;
}

/* Post Body Content */
.ap-single__content {
	font-size: 15.5px;
	line-height: 1.85;
	color: var(--ap-text);
	word-break: break-word;
	overflow-wrap: break-word;
}

.ap-single__content p {
	margin-bottom: 18px;
}

.ap-single__content h2,
.ap-single__content h3,
.ap-single__content h4 {
	font-weight: 800;
	margin: 24px 0 12px;
	color: var(--ap-text);
	line-height: 1.4;
}

.ap-single__content h2 { font-size: 19px; }
.ap-single__content h3 { font-size: 17px; }

.ap-single__content blockquote {
	margin: 20px 0;
	padding: 12px 16px;
	background: var(--ap-bg);
	border-right: 4px solid var(--ap-primary);
	border-radius: 0 var(--ap-radius-sm) var(--ap-radius-sm) 0;
	font-style: normal;
	color: var(--ap-text);
	font-weight: 600;
}

.ap-single__content img {
	border-radius: var(--ap-radius-sm);
	margin: 18px auto;
}

/* Video & Media Embeds (YouTube, Vimeo, etc.) */
.ap-single__content video {
	max-width: 100%;
	height: auto;
	border-radius: var(--ap-radius-sm);
	margin: 18px 0;
}

/* 16:9 Responsive Video Wrapper (Bulletproof for all mobile screens) */
.ap-video-responsive {
	position: relative;
	width: 100% !important;
	max-width: 100% !important;
	padding-bottom: 56.25% !important; /* 16:9 Aspect Ratio */
	height: 0 !important;
	overflow: hidden !important;
	margin: 20px 0 !important;
	border-radius: var(--ap-radius-sm);
	background-color: #000;
}

.ap-video-responsive iframe,
.ap-video-responsive object,
.ap-video-responsive embed {
	position: absolute !important;
	top: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	border: 0 !important;
	margin: 0 !important;
}

/* Direct Standalone Iframes & Embeds */
.ap-single__content iframe,
.entry-content iframe {
	max-width: 100% !important;
	box-sizing: border-box;
}

.ap-single__content iframe:not(.ap-video-responsive iframe):not(.wp-block-embed__wrapper iframe),
.entry-content iframe:not(.ap-video-responsive iframe):not(.wp-block-embed__wrapper iframe) {
	width: 100% !important;
	aspect-ratio: 16 / 9;
	height: auto;
	display: block;
	margin: 20px auto;
	border: 0;
	border-radius: var(--ap-radius-sm);
}

/* WordPress Gutenberg & Core Embed Blocks */
.wp-block-embed {
	margin: 20px 0;
	max-width: 100% !important;
	width: 100%;
	overflow: hidden;
}

.wp-block-embed figcaption {
	font-size: 13px;
	color: var(--ap-text-muted);
	text-align: center;
	margin-top: 8px;
}

.wp-block-embed .wp-block-embed__wrapper {
	position: relative;
	width: 100% !important;
	max-width: 100% !important;
}

.wp-block-embed.wp-has-aspect-ratio .wp-block-embed__wrapper::before {
	content: "";
	display: block;
	padding-top: 56.25%;
}

.wp-block-embed.wp-embed-aspect-16-9 .wp-block-embed__wrapper::before {
	padding-top: 56.25%;
}

.wp-block-embed.wp-embed-aspect-4-3 .wp-block-embed__wrapper::before {
	padding-top: 75%;
}

.wp-block-embed.wp-embed-aspect-1-1 .wp-block-embed__wrapper::before {
	padding-top: 100%;
}

.wp-block-embed.wp-embed-aspect-9-16 .wp-block-embed__wrapper::before {
	padding-top: 177.77%;
}

.wp-block-embed.wp-has-aspect-ratio iframe,
.wp-block-embed.wp-has-aspect-ratio embed,
.wp-block-embed.wp-has-aspect-ratio object {
	position: absolute !important;
	top: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
	border: 0 !important;
}

.wp-embed-responsive .wp-has-aspect-ratio iframe,
.wp-embed-responsive .wp-has-aspect-ratio video {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	height: 100%;
	width: 100%;
}

.ap-single__content ul, 
.ap-single__content ol {
	padding-inline-start: 24px;
	margin-bottom: 18px;
}

.ap-single__content li {
	margin-bottom: 6px;
}

/* Tags List */
.ap-single__tags {
	margin: 24px 0 20px;
	padding-top: 14px;
	border-top: 1px solid var(--ap-border-subtle);
}

.ap-tags-label {
	font-size: 12px;
	font-weight: 700;
	color: var(--ap-text-muted);
	display: block;
	margin-bottom: 8px;
}

.ap-tags-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.ap-tag-pill {
	background: var(--ap-bg);
	border: 1px solid var(--ap-border);
	color: var(--ap-text-muted);
	font-size: 12px;
	font-weight: 600;
	padding: 4px 10px;
	border-radius: 14px;
	transition: all 0.2s ease;
}

.ap-tag-pill:hover {
	background: var(--ap-primary);
	color: #ffffff;
	border-color: var(--ap-primary);
}

/* Social Share Bar (Colored buttons matching Screenshot 2) */
.ap-share-bar {
	margin: 20px 0 28px;
	padding: 14px;
	background: var(--ap-bg);
	border: 1px solid var(--ap-border);
	border-radius: var(--ap-radius-md);
}

.ap-share-label {
	font-size: 12.5px;
	font-weight: 700;
	color: var(--ap-text);
	display: block;
	margin-bottom: 10px;
}

.ap-share-buttons {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
}

.ap-share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	color: #ffffff;
	font-size: 12px;
	font-weight: 700;
	padding: 8px 6px;
	border-radius: 6px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.12);
	transition: opacity 0.2s ease, transform 0.15s ease;
}

.ap-share-btn:active {
	transform: scale(0.96);
}

.ap-share-btn--wa { background-color: #25d366; }
.ap-share-btn--fb { background-color: #1877f2; }
.ap-share-btn--x  { background-color: #000000; }
.ap-share-btn--tg { background-color: #229ed9; }

/* -------------------------------------------------------------
 * 7. Related Articles Section (Matching Screenshot 2)
 * ----------------------------------------------------------- */
.ap-related-section,
.ap-comments-section {
	margin-top: 28px;
	padding-top: 18px;
	border-top: 2px solid var(--ap-border);
}

.ap-section-head {
	margin-bottom: 16px;
}

.ap-section-title {
	font-size: 17px;
	font-weight: 800;
	color: var(--ap-text);
	position: relative;
	display: inline-block;
}

.ap-section-title span::after {
	content: "";
	display: block;
	width: 100%;
	height: 3px;
	background: var(--ap-primary);
	border-radius: 2px;
	margin-top: 4px;
}

.ap-related-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ap-related-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--ap-border-subtle);
}

.ap-related-item:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.ap-related-item__info {
	flex: 1;
	min-width: 0;
}

.ap-related-item__title {
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.45;
	margin-bottom: 6px;
}

.ap-related-item__title a {
	color: var(--ap-text);
}

.ap-related-item__title a:hover {
	color: var(--ap-primary);
}

.ap-related-item__meta {
	font-size: 11px;
	color: var(--ap-text-muted);
	font-weight: 600;
}

.ap-related-item__media {
	width: 78px;
	height: 60px;
	flex-shrink: 0;
	border-radius: var(--ap-radius-sm);
	overflow: hidden;
	background: #eee;
}

.ap-related-item__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* -------------------------------------------------------------
 * 8. Comment Form & List (Matching Screenshot 2)
 * ----------------------------------------------------------- */
.ap-comment-form-wrap {
	background: var(--ap-bg);
	border: 1px solid var(--ap-border);
	border-radius: var(--ap-radius-md);
	padding: 16px;
	margin-bottom: 24px;
}

.ap-form-group {
	margin-bottom: 12px;
}

.ap-form-group input,
.ap-form-group textarea {
	width: 100%;
	background: var(--ap-card-bg);
	border: 1px solid var(--ap-border);
	border-radius: var(--ap-radius-sm);
	padding: 10px 12px;
	color: var(--ap-text);
	outline: none;
	transition: border-color 0.2s ease;
	font-size: 14px;
}

.ap-form-group input:focus,
.ap-form-group textarea:focus {
	border-color: var(--ap-primary);
}

.ap-btn-submit-comment {
	width: 100%;
	background-color: var(--ap-primary);
	color: #ffffff;
	font-weight: 800;
	font-size: 15px;
	border: none;
	border-radius: 6px;
	padding: 11px 18px;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(232, 27, 92, 0.3);
	transition: background-color 0.2s ease;
}

.ap-btn-submit-comment:hover {
	background-color: var(--ap-primary-dark);
}

.ap-comments-subtitle {
	font-size: 15px;
	font-weight: 800;
	margin-bottom: 14px;
}

.ap-comments-list {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.ap-comments-list .comment {
	background: var(--ap-bg);
	border: 1px solid var(--ap-border);
	border-radius: var(--ap-radius-sm);
	padding: 12px;
}

.comment-author {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 700;
}

.comment-author img {
	border-radius: 50%;
}

.comment-content {
	font-size: 13.5px;
	line-height: 1.6;
}

/* -------------------------------------------------------------
 * 9. Drawer (Off-Canvas Menu)
 * ----------------------------------------------------------- */
.ap-drawer {
	position: fixed;
	top: 0;
	right: 0; /* Slides from right in RTL */
	width: 82%;
	max-width: 320px;
	height: 100vh;
	background: var(--ap-card-bg);
	z-index: 10000;
	transform: translateX(100%);
	transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	box-shadow: -4px 0 20px rgba(0, 0, 0, 0.2);
}

.ap-drawer.is-open {
	transform: translateX(0);
}

.ap-drawer__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	background: var(--ap-primary);
	color: #ffffff;
}

.ap-drawer__logo .ap-logo {
	color: #ffffff;
}

.ap-drawer__close {
	background: none;
	border: none;
	color: #ffffff;
	font-size: 18px;
	font-weight: bold;
	cursor: pointer;
	padding: 6px 10px;
}

.ap-drawer__search {
	padding: 12px 14px;
	border-bottom: 1px solid var(--ap-border);
}

.ap-drawer__search form {
	display: flex;
	align-items: center;
	background: var(--ap-bg);
	border: 1px solid var(--ap-border);
	border-radius: 20px;
	padding: 0 10px;
}

.ap-drawer__search-input {
	flex: 1;
	border: none;
	background: transparent;
	padding: 8px;
	font-size: 13px;
	color: var(--ap-text);
	outline: none;
}

.ap-drawer__search-btn {
	background: none;
	border: none;
	color: var(--ap-text-muted);
	display: flex;
	align-items: center;
	cursor: pointer;
}

.ap-drawer__nav {
	flex: 1;
	padding: 10px 0;
}

.ap-drawer__menu {
	list-style: none;
}

.ap-menu-item a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 11px 16px;
	font-size: 14px;
	font-weight: 700;
	color: var(--ap-text);
	border-bottom: 1px solid var(--ap-border-subtle);
	transition: background-color 0.15s ease;
}

.ap-menu-item a:active {
	background-color: var(--ap-bg);
}

.ap-menu-item.current-menu-item a {
	color: var(--ap-primary);
	background-color: var(--ap-primary-light);
}

.ap-menu-icon {
	margin-inline-end: 10px;
	font-size: 16px;
}

.ap-menu-count {
	font-size: 11px;
	background: var(--ap-bg);
	border: 1px solid var(--ap-border);
	color: var(--ap-text-muted);
	padding: 2px 8px;
	border-radius: 12px;
	font-weight: 600;
}

/* Settings Row in Drawer */
.ap-drawer__settings {
	padding: 16px;
	background: var(--ap-bg);
	border-top: 1px solid var(--ap-border);
}

.ap-settings-title {
	font-size: 12px;
	font-weight: 800;
	color: var(--ap-text-muted);
	text-transform: uppercase;
	margin-bottom: 12px;
}

.ap-setting-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.ap-setting-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	font-weight: 700;
	color: var(--ap-text);
}

/* Toggle Switch */
.ap-toggle-switch {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
}

.ap-toggle-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.ap-slider {
	position: absolute;
	cursor: pointer;
	top: 0; left: 0; right: 0; bottom: 0;
	background-color: #cbd5e1;
	transition: 0.25s;
	border-radius: 24px;
}

.ap-slider::before {
	position: absolute;
	content: "";
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	transition: 0.25s;
	border-radius: 50%;
}

input:checked + .ap-slider {
	background-color: var(--ap-primary);
}

input:checked + .ap-slider::before {
	transform: translateX(20px);
}

.ap-btn-desktop-switch {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	background: var(--ap-card-bg);
	border: 1px solid var(--ap-border);
	padding: 10px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 700;
	color: var(--ap-text);
	box-shadow: var(--ap-shadow-sm);
}

/* Backdrop */
.ap-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.5);
	z-index: 9999;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
	backdrop-filter: blur(2px);
}

.ap-backdrop.is-active {
	opacity: 1;
	visibility: visible;
}

/* -------------------------------------------------------------
 * 10. Archive / Search Headers
 * ----------------------------------------------------------- */
.ap-archive-header {
	margin-bottom: 14px;
	padding: 12px 14px;
	background: var(--ap-card-bg);
	border: 1px solid var(--ap-border);
	border-radius: var(--ap-radius-md);
}

.ap-archive-title {
	font-size: 17px;
	font-weight: 800;
	color: var(--ap-text);
}

.ap-no-posts {
	padding: 40px 14px;
	text-align: center;
	color: var(--ap-text-muted);
	font-weight: 600;
}

/* -------------------------------------------------------------
 * 11. Footer
 * ----------------------------------------------------------- */
.ap-footer {
	background: var(--ap-card-bg);
	border-top: 1px solid var(--ap-border);
	padding: 24px 14px 30px;
	text-align: center;
	margin-top: auto;
}

.ap-footer__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
}

.ap-footer__logo .ap-logo {
	color: var(--ap-primary);
}

.ap-footer__logo .ap-logo svg {
	stroke: var(--ap-primary);
}

.ap-footer__copy {
	font-size: 12px;
	color: var(--ap-text-muted);
}

.ap-footer__links {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-size: 12px;
	font-weight: 700;
}

.ap-footer-link {
	color: var(--ap-text-muted);
	background: none;
	border: none;
	cursor: pointer;
	font-family: inherit;
}

.ap-footer-link:hover {
	color: var(--ap-primary);
}

.ap-btn-dark-footer {
	color: var(--ap-text);
	display: inline-flex;
	align-items: center;
	gap: 4px;
	background: var(--ap-bg);
	border: 1px solid var(--ap-border);
	padding: 3px 10px;
	border-radius: 12px;
	font-weight: 700;
	transition: all 0.2s ease;
}

.ap-btn-dark-footer:hover {
	color: var(--ap-primary);
	border-color: var(--ap-primary);
}

.ap-footer-sep {
	color: var(--ap-border);
}

/* -------------------------------------------------------------
 * 12. Mobile Reading Progress Bar & Tools
 * ----------------------------------------------------------- */
.ap-reading-progress {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	width: 0%;
	background: linear-gradient(90deg, var(--ap-primary), #3b82f6);
	z-index: 99999;
	transition: width 0.1s ease;
	pointer-events: none;
}

.ap-article-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--ap-bg);
	border: 1px solid var(--ap-border);
	border-radius: var(--ap-radius-sm);
	padding: 8px 12px;
	margin: 12px 0 16px;
}

.ap-tts-box {
	display: flex;
	align-items: center;
	gap: 6px;
}

.ap-tts-btn {
	background: var(--ap-card-bg);
	border: 1px solid var(--ap-border);
	color: var(--ap-text);
	padding: 5px 12px;
	border-radius: 16px;
	font-size: 12.5px;
	font-weight: 700;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.ap-tts-btn.is-playing {
	background: var(--ap-primary);
	color: #ffffff;
	border-color: var(--ap-primary);
}

.ap-tts-wave {
	display: inline-flex;
	align-items: flex-end;
	gap: 2px;
	height: 12px;
}

.ap-tts-wave span {
	width: 2.5px;
	background: var(--ap-primary);
	border-radius: 2px;
	animation: ap-wave 0.8s ease-in-out infinite alternate;
}
.ap-tts-wave span:nth-child(1) { height: 4px; animation-delay: 0.1s; }
.ap-tts-wave span:nth-child(2) { height: 10px; animation-delay: 0.25s; }
.ap-tts-wave span:nth-child(3) { height: 6px; animation-delay: 0.15s; }

@keyframes ap-wave {
	0% { transform: scaleY(0.4); }
	100% { transform: scaleY(1); }
}

.ap-font-resizer {
	display: flex;
	align-items: center;
	gap: 4px;
}

.ap-font-btn {
	width: 28px;
	height: 28px;
	border-radius: 6px;
	background: var(--ap-card-bg);
	border: 1px solid var(--ap-border);
	color: var(--ap-text);
	font-size: 12px;
	font-weight: 800;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.ap-font-btn.font-active {
	background: var(--ap-primary);
	color: #ffffff;
	border-color: var(--ap-primary);
}

/* Mobile Sticky Bottom Ad Bar */
.ap-sticky-ad-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: var(--ap-card-bg);
	border-top: 1px solid var(--ap-border);
	box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
	z-index: 99990;
	padding: 6px 10px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.ap-sticky-ad-close {
	position: absolute;
	top: -10px;
	right: 8px;
	width: 22px;
	height: 22px;
	background: #1e293b;
	color: #ffffff;
	border: 2px solid #ffffff;
	border-radius: 50%;
	font-size: 10px;
	font-weight: 900;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.ap-sticky-ad-content {
	width: 100%;
	text-align: center;
}

.ap-sticky-ad-content img {
	max-width: 100%;
	height: auto;
	display: block;
	margin: 0 auto;
}

