/* Akhbar Homepage Builder — front styles for pro sections (RTL first). */

:root {
	--ahb-ink: #0e2a47;
	--ahb-ink-soft: #43617d;
	--ahb-accent: #c8102e;
	--ahb-gold: #ffd166;
	--ahb-line: #e3eaf2;
	--ahb-bg-soft: #f6f9fc;
}

/* =========================================================
 * hero-pro
 * ======================================================= */
.ahb-hero { margin-bottom: 34px; }
.ahb-hero-grid { display: grid; grid-template-columns: 1.9fr 1fr; gap: 14px; }
.ahb-hero-main { border-radius: 16px; overflow: hidden; background: var(--ahb-ink); }
.ahb-hero-media {
	position: relative; display: block; min-height: 380px; height: 100%;
	background-size: cover; background-position: center;
}
.ahb-hero-scrim {
	position: absolute; inset: 0;
	background: linear-gradient(to top, rgba(5, 16, 30, .92) 0%, rgba(5, 16, 30, .35) 55%, rgba(5, 16, 30, .1) 100%);
}
.ahb-chip {
	display: inline-block; background: var(--ahb-accent); color: #fff; font-size: 11px; font-weight: 700;
	padding: 4px 12px; border-radius: 20px; letter-spacing: .2px;
}
.ahb-chip--sm { font-size: 10px; padding: 3px 9px; }
.ahb-hero-media .ahb-chip--main { position: absolute; top: 16px; inset-inline-start: 16px; z-index: 2; }
.ahb-hero-body { position: absolute; inset-inline: 0; bottom: 0; padding: 22px; z-index: 2; }
.ahb-live {
	display: inline-flex; align-items: center; gap: 7px; color: #fff; font-size: 11.5px; font-weight: 700;
	background: rgba(200, 16, 46, .92); padding: 4px 12px; border-radius: 20px; margin-bottom: 12px;
}
.ahb-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #fff; animation: ahbBlink 1.1s infinite; }
@keyframes ahbBlink { 50% { opacity: .25; } }
.ahb-hero-title { color: #fff; font-size: clamp(20px, 2.6vw, 30px); line-height: 1.45; margin: 0 0 10px; font-weight: 800; }
.ahb-hero-title a { color: inherit; text-decoration: none; }
.ahb-hero-media:hover .ahb-hero-title { text-decoration: underline; text-decoration-color: var(--ahb-gold); text-underline-offset: 6px; }
.ahb-hero-meta { color: rgba(255, 255, 255, .75); font-size: 12px; }

.ahb-hero-side { display: flex; flex-direction: column; gap: 10px; }
.ahb-hero-item { flex: 1; background: #fff; border: 1px solid var(--ahb-line); border-radius: 14px; overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.ahb-hero-item:hover { box-shadow: 0 6px 18px rgba(14, 42, 71, .1); border-color: #c4d3e2; }
.ahb-hero-item-link { display: flex; gap: 12px; align-items: center; padding: 12px; text-decoration: none; height: 100%; }
.ahb-hero-item-thumb { flex: 0 0 96px; aspect-ratio: 16/10; border-radius: 9px; overflow: hidden; }
.ahb-hero-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ahb-hero-item-body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ahb-hero-item-title { color: var(--ahb-ink); font-weight: 700; font-size: 13.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ahb-hero-item-meta { color: #8598aa; font-size: 11px; display: inline-flex; align-items: center; gap: 5px; }

/* =========================================================
 * video-pro
 * ======================================================= */
.ahb-video { border-radius: 18px; padding: 26px; margin-bottom: 34px; }
.ahb-video--dark { background: linear-gradient(160deg, #0b1e33 0%, #10294a 100%); }
.ahb-video--dark .hb-title, .ahb-video--dark .hb-title a { color: #fff; }
.ahb-video--light { background: var(--ahb-bg-soft); border: 1px solid var(--ahb-line); }
.ahb-video-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.ahb-video-head .hb-title { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; }
.ahb-video-glyph { display: inline-flex; color: var(--ahb-gold); }
.ahb-video--light .ahb-video-glyph { color: #7b2cbf; }
.ahb-video-head .hb-more { color: var(--ahb-gold); display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; text-decoration: none; }
.ahb-video--light .hb-more { color: #7b2cbf; }
.ahb-video-head .hb-more:hover { text-decoration: underline; }

.ahb-video-shell { display: grid; grid-template-columns: 2fr 1fr; gap: 18px; align-items: start; }
.ahb-player { position: relative; border-radius: 14px; overflow: hidden; background: #000; aspect-ratio: 16/9; }
.ahb-player-face { position: absolute; inset: 0; display: block; background-size: cover; background-position: center; }
.ahb-player-scrim { position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(0,0,0,.08) 0%, rgba(0,0,0,.45) 100%); }
.ahb-player-badge {
	position: absolute; top: 14px; inset-inline-start: 14px; z-index: 2;
	background: rgba(200, 16, 46, .92); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 20px;
}
.ahb-player-btn {
	position: absolute; inset: 0; margin: auto; z-index: 2; width: 74px; height: 74px; border-radius: 50%;
	background: rgba(200, 16, 46, .95); color: #fff; display: flex; align-items: center; justify-content: center;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .45); transition: transform .18s, background .18s; cursor: pointer;
}
.ahb-player-btn svg { width: 30px; height: 30px; margin-inline-start: 4px; }
.ahb-player:hover .ahb-player-btn { transform: scale(1.09); background: var(--ahb-accent); }
.ahb-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.ahb-player-info { margin-top: 12px; }
.ahb-player-title { font-size: 16.5px; line-height: 1.55; margin: 0 0 6px; }
.ahb-player-title a { color: #fff; text-decoration: none; }
.ahb-video--light .ahb-player-title a { color: var(--ahb-ink); }
.ahb-player-meta { color: rgba(255, 255, 255, .6); font-size: 12px; }
.ahb-video--light .ahb-player-meta { color: #8598aa; }

.ahb-playlist { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; overflow: hidden; }
.ahb-video--light .ahb-playlist { background: #fff; border-color: var(--ahb-line); }
.ahb-playlist-head {
	display: flex; align-items: center; justify-content: space-between; gap: 8px;
	padding: 12px 16px; color: #fff; font-weight: 700; font-size: 13px;
	background: rgba(255, 255, 255, .07); border-bottom: 1px solid rgba(255, 255, 255, .09);
}
.ahb-video--light .ahb-playlist-head { color: var(--ahb-ink); background: var(--ahb-bg-soft); border-color: var(--ahb-line); }
.ahb-playlist-note { font-size: 10px; font-weight: 400; opacity: .65; }
.ahb-playlist-list { list-style: none; margin: 0; padding: 6px; max-height: 430px; overflow-y: auto; }
.ahb-pl-item {
	display: flex; gap: 10px; padding: 8px; border-radius: 10px; cursor: pointer;
	transition: background .13s;
}
.ahb-pl-item:hover { background: rgba(255, 255, 255, .08); }
.ahb-video--light .ahb-pl-item:hover { background: var(--ahb-bg-soft); }
.ahb-pl-item.is-active { background: rgba(200, 16, 46, .16); box-shadow: inset 3px 0 0 var(--ahb-accent); }
.ahb-pl-thumb { position: relative; flex: 0 0 108px; aspect-ratio: 16/10; border-radius: 8px; overflow: hidden; background: rgba(0,0,0,.3); }
.ahb-pl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ahb-pl-play {
	position: absolute; inset: 0; margin: auto; width: 30px; height: 30px; border-radius: 50%;
	background: rgba(200, 16, 46, .92); color: #fff; display: flex; align-items: center; justify-content: center;
}
.ahb-pl-play svg { width: 14px; height: 14px; margin-inline-start: 2px; }
.ahb-pl-body { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.ahb-pl-title {
	color: #fff; font-size: 12.5px; font-weight: 600; line-height: 1.55;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ahb-video--light .ahb-pl-title { color: var(--ahb-ink); }
.ahb-pl-meta { color: rgba(255, 255, 255, .5); font-size: 10.5px; }
.ahb-video--light .ahb-pl-meta { color: #8598aa; }

/* =========================================================
 * latest-pro
 * ======================================================= */
.ahb-latest { margin-bottom: 34px; background: #fff; border: 1px solid var(--ahb-line); border-radius: 18px; padding: 24px; }
.ahb-latest-head {
	display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
	margin-bottom: 18px; padding-bottom: 14px; border-bottom: 2px solid var(--ahb-ink);
}
.ahb-latest-title { display: flex; align-items: center; gap: 11px; }
.ahb-latest-title .hb-title { margin: 0; font-size: 19px; }
.ahb-pulse { position: relative; width: 11px; height: 11px; border-radius: 50%; background: var(--ahb-accent); }
.ahb-pulse::after {
	content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--ahb-accent);
	animation: ahbPing 1.4s ease-out infinite;
}
@keyframes ahbPing { 0% { transform: scale(.5); opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }
.ahb-chips { display: flex; gap: 7px; flex-wrap: wrap; }
.ahb-chip-btn, .ahb-chips .ahb-chip {
	background: var(--ahb-bg-soft); border: 1px solid var(--ahb-line); color: var(--ahb-ink-soft);
	font-size: 12px; padding: 6px 15px; border-radius: 20px; cursor: pointer; transition: all .14s;
	font-family: inherit;
}
.ahb-chips .ahb-chip:hover { border-color: var(--ahb-ink); color: var(--ahb-ink); }
.ahb-chips .ahb-chip.is-active { background: var(--ahb-ink); color: #fff; border-color: var(--ahb-ink); }

.ahb-latest-grid { display: grid; grid-template-columns: repeat(var(--ahb-cols, 3), 1fr); gap: 14px; }
.ahb-latest--split .ahb-latest-grid { grid-template-columns: repeat(2, 1fr); }

.ahb-card {
	background: #fff; border: 1px solid var(--ahb-line); border-radius: 13px; overflow: hidden;
	transition: box-shadow .15s, transform .15s; position: relative;
}
.ahb-card:hover { box-shadow: 0 8px 22px rgba(14, 42, 71, .11); transform: translateY(-2px); }
.ahb-card-link { display: flex; text-decoration: none; height: 100%; }

/* timeline card */
.ahb-latest--timeline .ahb-card-link { flex-direction: row; padding: 12px; gap: 12px; }
.ahb-card-time {
	flex: 0 0 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
	border-inline-end: 2px solid var(--ahb-bg-soft); padding-inline-end: 10px;
}
.ahb-card-date { color: var(--ahb-accent); font-weight: 800; font-size: 15px; }
.ahb-card-day { color: #8598aa; font-size: 10px; }
.ahb-card-thumb { flex: 0 0 92px; aspect-ratio: 16/11; border-radius: 9px; overflow: hidden; background: var(--ahb-bg-soft); display: block; }
.ahb-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.ahb-card:hover .ahb-card-thumb img { transform: scale(1.06); }
.ahb-card-noimg { display: block; width: 100%; height: 100%; background: linear-gradient(135deg, #dfe9f2 0%, #f2f6fa 100%); }
.ahb-card-body { display: flex; flex-direction: column; gap: 7px; min-width: 0; align-items: flex-start; }
.ahb-card-title { color: var(--ahb-ink); font-weight: 700; font-size: 13.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ahb-card:hover .ahb-card-title { color: var(--ahb-accent); }
.ahb-card-meta { display: inline-flex; align-items: center; gap: 5px; color: #8598aa; font-size: 11px; margin-top: auto; }
.ahb-card-meta svg { opacity: .7; }

/* grid card */
.ahb-latest--grid .ahb-card-link, .ahb-tabs .ahb-card-link { flex-direction: column; }
.ahb-latest--grid .ahb-card-thumb, .ahb-tabs .ahb-card-thumb { flex: 0 0 auto; width: 100%; aspect-ratio: 16/9; border-radius: 0; }
.ahb-latest--grid .ahb-card-body, .ahb-tabs .ahb-card-body { padding: 13px 14px 14px; }
.ahb-latest--grid .ahb-card-time { display: none; }

.ahb-latest-foot { display: flex; justify-content: center; margin-top: 18px; }
.ahb-more-btn {
	display: inline-flex; align-items: center; gap: 8px; background: var(--ahb-ink); color: #fff;
	border: none; border-radius: 30px; padding: 11px 30px; font-size: 13.5px; font-weight: 700; cursor: pointer;
	font-family: inherit; transition: background .15s, transform .1s;
}
.ahb-more-btn:hover { background: #163b63; }
.ahb-more-btn:active { transform: scale(.97); }
.ahb-more-btn[disabled] { opacity: .6; cursor: wait; }

.ahb-skeleton {
	background: #fff; border: 1px solid var(--ahb-line); border-radius: 13px; padding: 12px; display: flex; gap: 12px;
}
.ahb-skeleton span { display: block; background: linear-gradient(90deg, #edf2f7 25%, #f7fafc 50%, #edf2f7 75%); background-size: 200% 100%; animation: ahbShimmer 1.1s infinite; border-radius: 7px; }
.ahb-skeleton .sk-thumb { flex: 0 0 92px; height: 64px; }
.ahb-skeleton .sk-lines { flex: 1; display: flex; flex-direction: column; gap: 7px; justify-content: center; }
.ahb-skeleton .sk-l1 { height: 11px; width: 90%; }
.ahb-skeleton .sk-l2 { height: 9px; width: 60%; }
@keyframes ahbShimmer { to { background-position: -200% 0; } }

/* =========================================================
 * cats-tabs
 * ======================================================= */
.ahb-tabs { margin-bottom: 34px; }
.ahb-tabs-head { margin-bottom: 12px; }
.ahb-tabs-nav { display: flex; gap: 0; border-bottom: 2px solid var(--ahb-line); margin-bottom: 16px; flex-wrap: wrap; }
.ahb-tab {
	background: none; border: none; border-bottom: 3px solid transparent; margin-bottom: -2px;
	color: var(--ahb-ink-soft); font-size: 14px; font-weight: 700; padding: 10px 20px; cursor: pointer;
	font-family: inherit; transition: color .14s, border-color .14s;
}
.ahb-tab:hover { color: var(--ahb-ink); }
.ahb-tab.is-active { color: var(--ahb-accent); border-color: var(--ahb-accent); }
.ahb-tabs-panel .ahb-card { height: 100%; }
.ahb-tabs-panel .ahb-card-link { flex-direction: column; }
.ahb-tabs-panel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

/* =========================================================
 * Responsive
 * ======================================================= */
@media (max-width: 992px) {
	.ahb-hero-grid { grid-template-columns: 1fr; }
	.ahb-hero-media { min-height: 300px; }
	.ahb-hero-side { flex-direction: row; overflow-x: auto; }
	.ahb-hero-item { min-width: 240px; }
	.ahb-video-shell { grid-template-columns: 1fr; }
	.ahb-playlist-list { max-height: 260px; display: flex; overflow-x: auto; gap: 8px; }
	.ahb-pl-item { min-width: 230px; flex-direction: column; }
	.ahb-latest-grid { grid-template-columns: repeat(2, 1fr); }
	.ahb-tabs-panel { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
	.ahb-hero-media { min-height: 250px; }
	.ahb-hero-title { font-size: 19px; }
	.ahb-latest { padding: 16px; }
	.ahb-video { padding: 16px; }
	.ahb-latest-grid { grid-template-columns: 1fr; }
	.ahb-card-time { display: none; }
	.ahb-latest--timeline .ahb-card-thumb { flex: 0 0 78px; }
}
