/* ==========================================================================
   ABB News — Component styles (header, nav, ticker, footer, cards, widgets)
   Loaded after style.css (tokens) and fonts.css.
   ========================================================================== */

/* =========================================================================
 * HEADER — utility bar
 * ========================================================================= */
.abb-utility {
	background: var(--abb-white);
	border-bottom: 1px solid var(--abb-border-light);
	font-family: var(--abb-font-latin);
	font-size: var(--abb-fs-xs);
}
.abb-utility__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--abb-space-4);
	min-height: 38px;
}
.abb-utility__right,
.abb-utility__left {
	display: flex;
	align-items: center;
	gap: var(--abb-space-4);
}
.abb-utility__date {
	font-family: var(--abb-font-body);
	color: var(--abb-text-muted);
}
.abb-utility__live {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: var(--abb-text);
}
.abb-live-dot {
	width: 8px; height: 8px;
	border-radius: 50%;
	background: var(--abb-live);
	animation: abb-pulse 1.6s ease-in-out infinite;
}
@keyframes abb-pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.4; transform: scale(0.8); }
}
.abb-utility__weather {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-family: var(--abb-font-body);
	color: var(--abb-text-muted);
}
.abb-weather__temp { font-family: var(--abb-font-latin); font-weight: 600; color: var(--abb-text); }
.abb-utility__lang {
	font-family: var(--abb-font-body);
	font-weight: 700;
	color: var(--abb-red);
}

/* =========================================================================
 * HEADER — masthead
 * ========================================================================= */
.abb-masthead {
	background: var(--abb-white);
	box-shadow: var(--abb-shadow-header);
}
.abb-masthead__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--abb-space-4);
	padding-block: var(--abb-space-4);
}
.abb-masthead__logo {
	flex: 1;
	display: flex;
	justify-content: center;
}
.abb-logo img { height: 52px; width: auto; }
.abb-logo--footer img { height: 46px; }

.abb-nav-toggle,
.abb-search-toggle {
	background: none;
	border: none;
	padding: 8px;
	color: var(--abb-text);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--abb-radius-sm);
}
.abb-nav-toggle { flex-direction: column; gap: 4px; width: 42px; }
.abb-nav-toggle span {
	display: block; width: 22px; height: 2px;
	background: currentColor; border-radius: 2px;
	transition: transform var(--abb-transition), opacity var(--abb-transition);
}
.abb-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.abb-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.abb-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Show hamburger only on mobile */
.abb-nav-toggle { display: none; }

/* =========================================================================
 * HEADER — search panel
 * ========================================================================= */
.abb-search-panel {
	background: var(--abb-white);
	border-top: 1px solid var(--abb-border-light);
	border-bottom: 1px solid var(--abb-border);
	padding-block: var(--abb-space-3);
}
.abb-search-form { display: flex; gap: var(--abb-space-2); }
.abb-search-form__input {
	flex: 1;
	padding: 0.7rem 1rem;
	border: 1px solid var(--abb-border);
	border-radius: var(--abb-radius);
	font-family: var(--abb-font-body);
	font-size: var(--abb-fs-base);
	background: var(--abb-offwhite);
}
.abb-search-form__input:focus { outline: none; border-color: var(--abb-red); background: #fff; }
.abb-search-form__submit {
	padding-inline: 1rem;
	background: var(--abb-red);
	color: #fff;
	border: none;
	border-radius: var(--abb-radius);
	display: inline-flex;
	align-items: center;
}
.abb-search-form__submit:hover { background: var(--abb-red-dark); }

/* =========================================================================
 * HEADER — primary nav
 * ========================================================================= */
.abb-primary-nav {
	background: var(--abb-white);
	border-top: 1px solid var(--abb-border-light);
	border-bottom: 2px solid var(--abb-red);
}
.abb-menu {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 0;
}
.abb-menu li { position: relative; }
.abb-menu a {
	display: block;
	padding: 0.85rem 1rem;
	font-family: var(--abb-font-heading);
	font-size: var(--abb-fs-md);
	line-height: 1.4;
	color: var(--abb-text);
	white-space: nowrap;
	transition: color var(--abb-transition), background var(--abb-transition);
}
.abb-menu > li > a:hover { color: var(--abb-red); }
.abb-menu > li.current-cat > a,
.abb-menu > li.current-menu-item > a {
	color: var(--abb-red);
	box-shadow: inset 0 -3px 0 var(--abb-red);
}
/* First item ("اہم خبریں") often highlighted red in mockups */
.abb-menu > li:first-child > a {
	background: var(--abb-red);
	color: #fff;
}
.abb-menu > li:first-child > a:hover { background: var(--abb-red-dark); color: #fff; }

/* Submenu */
.abb-menu .sub-menu {
	position: absolute;
	top: 100%; right: 0;
	min-width: 200px;
	background: #fff;
	border: 1px solid var(--abb-border);
	box-shadow: var(--abb-shadow-card-hover);
	z-index: 50;
	display: none;
	padding: var(--abb-space-2) 0;
}
.abb-menu li:hover > .sub-menu { display: block; }
.abb-menu .sub-menu a { padding: 0.5rem 1.2rem; font-size: var(--abb-fs-base); }

/* =========================================================================
 * HEADER — breaking ticker
 * ========================================================================= */
.abb-ticker {
	background: var(--abb-red);
	color: #fff;
	overflow: hidden;
}
.abb-ticker__inner { display: flex; align-items: center; gap: 0; min-height: 44px; }
.abb-ticker__label {
	flex: none;
	background: var(--abb-red-dark);
	font-family: var(--abb-font-heading);
	font-weight: 700;
	padding: 0.6rem 1.2rem;
	margin-inline-start: calc(-1 * var(--abb-space-4));
	font-size: var(--abb-fs-base);
}
.abb-ticker__viewport { flex: 1; overflow: hidden; position: relative; }
.abb-ticker__track {
	display: flex;
	gap: var(--abb-space-6);
	white-space: nowrap;
	padding-inline-start: var(--abb-space-4);
	animation: abb-ticker-scroll 40s linear infinite;
}
.abb-ticker:hover .abb-ticker__track { animation-play-state: paused; }
.abb-ticker__item { display: inline-flex; align-items: center; }
.abb-ticker__item::before {
	content: "•";
	margin-inline-end: var(--abb-space-6);
	opacity: 0.5;
}
.abb-ticker__item:first-child::before { content: none; }
.abb-ticker__item a, .abb-ticker__item span { color: #fff; font-size: var(--abb-fs-base); }
.abb-ticker__item a:hover { text-decoration: underline; }
@keyframes abb-ticker-scroll {
	from { transform: translateX(100%); }
	to { transform: translateX(-100%); }
}
/* RTL: content should flow from right; flip the scroll direction */
[dir="rtl"] .abb-ticker__track { animation-name: abb-ticker-scroll-rtl; }
@keyframes abb-ticker-scroll-rtl {
	from { transform: translateX(-100%); }
	to { transform: translateX(100%); }
}

/* =========================================================================
 * SHARED — cards
 * ========================================================================= */
.abb-card {
	background: #fff;
	border: 1px solid var(--abb-border);
	border-radius: var(--abb-radius);
	overflow: hidden;
	transition: box-shadow var(--abb-transition), transform var(--abb-transition);
	display: flex;
	flex-direction: column;
}
.abb-card:hover { box-shadow: var(--abb-shadow-card-hover); }
.abb-card__thumb { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--abb-border-light); }
.abb-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.abb-card:hover .abb-card__thumb img { transform: scale(1.04); }
.abb-card__cat {
	position: absolute; top: 0; inset-inline-start: 0;
	background: var(--abb-red); color: #fff;
	font-family: var(--abb-font-heading);
	font-size: var(--abb-fs-xs);
	padding: 0.25rem 0.7rem;
}
.abb-card__body { padding: var(--abb-space-3) var(--abb-space-4) var(--abb-space-4); flex: 1; display: flex; flex-direction: column; }
.abb-card__title {
	font-family: var(--abb-font-heading);
	font-size: var(--abb-fs-md);
	line-height: var(--abb-lh-nastaliq);
	margin: 0 0 var(--abb-space-2);
}
.abb-card__title a { color: var(--abb-text); }
.abb-card__title a:hover { color: var(--abb-red); }
.abb-card__excerpt { font-size: var(--abb-fs-sm); color: var(--abb-text-muted); margin: 0 0 var(--abb-space-3); }
.abb-card__meta {
	margin-top: auto;
	font-family: var(--abb-font-latin);
	font-size: var(--abb-fs-xs);
	color: var(--abb-text-soft);
	display: flex; gap: var(--abb-space-3); align-items: center;
}
.abb-card__meta .abb-num { color: var(--abb-text-soft); }

/* List item (numbered "most read" style) */
.abb-list { display: flex; flex-direction: column; }
.abb-list__item {
	display: flex; gap: var(--abb-space-3);
	padding: var(--abb-space-3) 0;
	border-bottom: 1px solid var(--abb-border-light);
}
.abb-list__item:last-child { border-bottom: none; }
.abb-list__rank {
	flex: none;
	width: 26px; height: 26px;
	background: var(--abb-red);
	color: #fff;
	border-radius: var(--abb-radius-sm);
	display: grid; place-items: center;
	font-family: var(--abb-font-latin);
	font-weight: 700;
	font-size: var(--abb-fs-sm);
}
.abb-list__title {
	font-family: var(--abb-font-heading);
	font-size: var(--abb-fs-base);
	line-height: 1.9;
	margin: 0;
}
.abb-list__title a { color: var(--abb-text); }
.abb-list__title a:hover { color: var(--abb-red); }
.abb-list__date { font-family: var(--abb-font-latin); font-size: var(--abb-fs-xs); color: var(--abb-text-soft); }

/* =========================================================================
 * WIDGETS (sidebar)
 * ========================================================================= */
.abb-widget {
	background: #fff;
	border: 1px solid var(--abb-border);
	border-radius: var(--abb-radius);
	padding: var(--abb-space-4);
	margin-bottom: var(--abb-space-5);
}
.abb-widget__title { margin-top: 0; }

/* =========================================================================
 * NEWSLETTER strip
 * ========================================================================= */
.abb-newsletter-strip {
	background: var(--abb-red-soft);
	border-block: 1px solid #F0D8D8;
}
.abb-newsletter-strip__inner {
	display: flex; align-items: center; justify-content: space-between;
	gap: var(--abb-space-5); padding-block: var(--abb-space-4);
	flex-wrap: wrap;
}
.abb-newsletter-strip__text {
	margin: 0; font-family: var(--abb-font-heading);
	font-size: var(--abb-fs-md); color: var(--abb-red-dark);
}
.abb-newsletter-strip__form { display: flex; gap: var(--abb-space-2); flex: 1; max-width: 460px; min-width: 280px; }
.abb-newsletter-strip__form input {
	flex: 1; padding: 0.7rem 1rem;
	border: 1px solid var(--abb-border); border-radius: var(--abb-radius);
	font-family: var(--abb-font-body); background: #fff;
}
.abb-newsletter-strip__form input:focus { outline: none; border-color: var(--abb-red); }
.abb-newsletter-strip__form button {
	padding: 0.7rem 1.5rem; background: var(--abb-red); color: #fff;
	border: none; border-radius: var(--abb-radius);
	font-family: var(--abb-font-heading); font-size: var(--abb-fs-base);
}
.abb-newsletter-strip__form button:hover { background: var(--abb-red-dark); }

/* =========================================================================
 * FOOTER
 * ========================================================================= */
.abb-footer {
	background: var(--abb-footer-bg);
	color: var(--abb-footer-text);
	font-size: var(--abb-fs-sm);
}
.abb-footer a { color: var(--abb-footer-text); }
.abb-footer a:hover { color: #fff; }
.abb-footer__inner {
	display: grid;
	grid-template-columns: 1.6fr 1fr 1fr 1fr 1.4fr;
	gap: var(--abb-space-6);
	padding-block: var(--abb-space-7);
}
.abb-footer__tagline { font-family: var(--abb-font-heading); color: #fff; margin: var(--abb-space-3) 0 var(--abb-space-2); }
.abb-footer__desc { color: var(--abb-footer-muted); font-size: var(--abb-fs-sm); }
.abb-footer__heading {
	font-family: var(--abb-font-heading);
	color: #fff;
	font-size: var(--abb-fs-md);
	margin: 0 0 var(--abb-space-4);
	padding-bottom: var(--abb-space-2);
	border-bottom: 1px solid var(--abb-footer-border);
}
.abb-footer__menu li { margin-bottom: var(--abb-space-2); }
.abb-footer__contact-list li { margin-bottom: var(--abb-space-2); color: var(--abb-footer-muted); }
.abb-footer__contact-list a { color: var(--abb-footer-text); }

.abb-footer__social { display: flex; gap: var(--abb-space-3); margin-top: var(--abb-space-4); }
.abb-social {
	display: inline-block; width: 34px; height: 34px;
	border: 1px solid var(--abb-footer-border); border-radius: 50%;
	background: rgba(255,255,255,0.05);
	transition: background var(--abb-transition);
}
.abb-footer__social a:hover .abb-social { background: var(--abb-red); border-color: var(--abb-red); }

.abb-footer__apps { display: flex; gap: var(--abb-space-2); margin-top: var(--abb-space-4); flex-wrap: wrap; }
.abb-app-badge {
	display: inline-block; width: 130px; height: 40px;
	border: 1px solid var(--abb-footer-border); border-radius: var(--abb-radius-sm);
	background: rgba(255,255,255,0.06);
}

.abb-footer__bar { border-top: 1px solid var(--abb-footer-border); }
.abb-footer__bar-inner {
	display: flex; align-items: center; justify-content: space-between;
	padding-block: var(--abb-space-4); flex-wrap: wrap; gap: var(--abb-space-2);
}
.abb-footer__copy, .abb-footer__made { margin: 0; color: var(--abb-footer-muted); font-size: var(--abb-fs-xs); }
.abb-footer__made { font-family: var(--abb-font-latin); }

/* =========================================================================
 * RESPONSIVE
 * ========================================================================= */
@media (max-width: 1024px) {
	.abb-footer__inner { grid-template-columns: 1fr 1fr 1fr; }
	.abb-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
	.abb-nav-toggle { display: inline-flex; }
	.abb-primary-nav { display: none; }
	.abb-primary-nav.is-open { display: block; }
	.abb-menu { flex-direction: column; }
	.abb-menu > li:first-child > a { background: transparent; color: var(--abb-text); }
	.abb-menu .sub-menu { position: static; border: none; box-shadow: none; padding-inline-start: var(--abb-space-4); }
	.abb-utility__date { display: none; }
	.abb-footer__inner { grid-template-columns: 1fr 1fr; }
	.abb-ticker__label { margin-inline-start: 0; }
}
@media (max-width: 480px) {
	.abb-footer__inner { grid-template-columns: 1fr; }
	.abb-logo img { height: 40px; }
	.abb-newsletter-strip__inner { flex-direction: column; align-items: stretch; }
}
