/* =========================================================
   IAFF Skyline - Home Dashboard Design
   مطابق طرح جدید: هدر با ورود/ثبت‌نام، هیروی تلمتری‌دار،
   سایدبار پروازهای زنده/موضوعات داغ، نوار لینک سریع،
   اخبار+ویدیو، نوار ویجت‌های آماری
   ========================================================= */

/* ---------- Header additions ---------- */
.header-inner { justify-content: space-between; }
/* در RTL، مقدار order کمتر به سمت راست (ابتدای خط) قرار می‌گیرد */
.header-logo { order: 1; }
.iaff-mega-nav { order: 2; }
.header-actions-start { display: flex; align-items: center; gap: 8px; order: 3; }

.header-lang-switch { position: relative; }
.header-lang-btn {
	display: flex; align-items: center; gap: 6px;
	padding: 8px 12px; border-radius: 20px; background: var(--iaff-surface);
	font-size: 13px; font-weight: 600;
}
.header-lang-btn i { font-size: 9px; }
.header-lang-dropdown {
	position: absolute; top: calc(100% + 8px); right: 0; min-width: 130px;
	background: rgba(8, 17, 32, 0.95); backdrop-filter: blur(20px);
	border: 1px solid var(--iaff-border); border-radius: var(--iaff-radius-sm);
	padding: 6px; opacity: 0; visibility: hidden; transform: translateY(-8px);
	transition: all 0.25s ease; z-index: 40;
}
.header-lang-switch.open .header-lang-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.header-lang-dropdown .lang-item, .header-lang-dropdown a { display: block; padding: 8px 12px; border-radius: 6px; font-size: 13px; }
.header-lang-dropdown .lang-item.active, .header-lang-dropdown .lang-item:hover, .header-lang-dropdown a:hover { background: var(--iaff-surface-strong); color: var(--iaff-blue-2); }

.header-login-btn {
	display: flex; align-items: center; gap: 8px;
	padding: 10px 18px; border-radius: 22px; font-size: 13.5px; font-weight: 700;
	color: #fff; background: linear-gradient(135deg, var(--iaff-blue-1), var(--iaff-blue-2));
	box-shadow: 0 6px 20px rgba(79, 147, 255, 0.35);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.header-login-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(79, 147, 255, 0.45); }

.header-user-pill {
	display: flex; align-items: center; gap: 8px;
	padding: 6px 8px 6px 16px; border-radius: 22px; background: var(--iaff-surface);
	font-size: 13.5px; font-weight: 600;
}
.header-user-pill img { border-radius: 50%; }

/* active nav item underline */
.mega-menu-list > li.current-menu-item > a,
.mega-menu-list > li.current_page_item > a { color: var(--iaff-blue-2); position: relative; }
.mega-menu-list > li.current-menu-item > a::after,
.mega-menu-list > li.current_page_item > a::after {
	content: ''; position: absolute; bottom: -2px; right: 16px; left: 16px; height: 2px;
	background: var(--iaff-blue-2); border-radius: 2px;
}

/* =========================================================
   Dashboard Home wrapper
   ========================================================= */
.dashboard-home { padding-top: 24px; }
.dash-section-spacer { margin-top: 56px; margin-bottom: 40px; }

/* ---------- Top row: hero + sidebar ---------- */
.dash-top-row { display: grid; grid-template-columns: 1fr 300px; gap: 22px; align-items: start; }

/* ---------- Hero ---------- */
.dash-hero { position: relative; }
.iaff-hero-fade {
	position: relative; height: 400px; overflow: hidden;
	clip-path: url(#iaffHeroClip);
	-webkit-clip-path: url(#iaffHeroClip);
}
.iaff-hero-fade .splide__track,
.iaff-hero-fade .splide__list,
.iaff-hero-fade .splide__slide { border-radius: 0; }
.iaff-hero-fade .splide__track { height: 100%; overflow: hidden; }
.iaff-hero-fade .splide__list { height: 100%; }
.iaff-hero-fade .splide__slide { height: 100%; }
.dash-hero-slide { position: relative; height: 400px; overflow: hidden; }

/* پشتیبان امن: تا زمانی که Splide مقداردهی اولیه نشده (کلاس is-initialized اضافه نشده)،
   فقط اسلاید اول نمایش داده شود تا اسلایدها روی هم قرار نگیرند و فضای خالی بلند ایجاد نشود. */
.iaff-hero-fade:not(.is-initialized) { display: block; }
.iaff-hero-fade:not(.is-initialized) .splide__list { display: block; }
.iaff-hero-fade:not(.is-initialized) .splide__slide { display: none; height: 400px; }
.iaff-hero-fade:not(.is-initialized) .splide__slide:first-child { display: block; }

.dash-hero-media { position: absolute; inset: 0; }
.dash-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.dash-hero-overlay {
	position: absolute; inset: 0;
	background:
		linear-gradient(to top, rgba(3,7,15,0.96) 0%, rgba(3,7,15,0.55) 42%, rgba(3,7,15,0.15) 68%, rgba(3,7,15,0.35) 100%),
		linear-gradient(to left, rgba(3,7,15,0.5), transparent 55%);
}
.dash-hero-scanlines {
	position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
	background-image: repeating-linear-gradient(transparent, transparent 3px, rgba(255,255,255,0.015) 4px);
}

/* دکمه‌های ناوبری قبلی/بعدی */
.iaff-hero-fade .splide__arrow {
	background: rgba(3,7,15,0.55); backdrop-filter: blur(6px);
	width: 42px; height: 42px; border-radius: 50%; opacity: 0.85;
	border: 1px solid rgba(255,255,255,0.15);
	z-index: 5;
}
.iaff-hero-fade .splide__arrow:hover { opacity: 1; background: rgba(3,7,15,0.8); }
.iaff-hero-fade .splide__arrow svg { fill: #fff; width: 16px; height: 16px; }
.iaff-hero-fade .splide__arrow--prev { left: 16px; }
.iaff-hero-fade .splide__arrow--next { right: 16px; }

/* توجه: HUD تلمتری (ALT/SPD/HDG) و رادار تزئینی از قالب حذف شدند؛
   این نوع نماها اکنون بخشی از خود تصویر شاخص آپلودی هستند، نه یک المان ثابت قالب. */

.dash-hero-content { position: absolute; bottom: 40px; right: 0; left: 0; z-index: 3; max-width: 720px; }
.dash-hero-badge {
	display: inline-flex; align-items: center; gap: 6px;
	background: rgba(79, 147, 255, 0.14); border: 1px solid rgba(79, 147, 255, 0.4); color: var(--iaff-blue-2);
	font-size: 12px; font-weight: 700; padding: 5px 14px; border-radius: 20px; margin-bottom: 14px;
}
.dash-hero-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--iaff-muted); margin-bottom: 10px; }
.dash-hero-meta .dot { font-size: 8px; }
.dash-hero-title { font-size: 32px; font-weight: 800; line-height: 1.55; margin: 0 0 14px; }
.dash-hero-title a:hover { color: var(--iaff-blue-2); }
.dash-hero-excerpt { color: var(--iaff-muted); font-size: 14.5px; max-width: 600px; margin: 0 0 22px; line-height: 1.9; }

.dash-cta-btn {
	display: inline-flex; align-items: center; gap: 8px;
	background: linear-gradient(135deg, var(--iaff-blue-1), var(--iaff-blue-2)); color: #fff;
	font-weight: 700; font-size: 14px; padding: 12px 22px; border-radius: 24px;
	box-shadow: 0 8px 24px rgba(79, 147, 255, 0.35);
	transition: transform 0.2s ease;
}
.dash-cta-btn:hover { transform: translateX(-4px); color: #fff; }

/* Splide pagination -> pill dots */
.iaff-hero-fade .splide__pagination { bottom: 22px; right: 32px; left: auto; justify-content: flex-start; width: auto; gap: 6px; z-index: 4; }
.iaff-hero-fade .splide__pagination__page {
	width: 8px; height: 8px; border-radius: 4px; background: rgba(255,255,255,0.35); opacity: 1; margin: 0;
	transition: all 0.3s ease;
}
.iaff-hero-fade .splide__pagination__page.is-active { width: 26px; background: var(--iaff-blue-2); }

/* ---------- Sidebar widgets (shared card style) ---------- */
.dash-widget {
	background: var(--iaff-card-bg); border: 1px solid var(--iaff-border);
	border-radius: var(--iaff-radius-md); padding: 18px; margin-bottom: 18px;
}
.dash-widget-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dash-widget-header h3 { font-size: 15px; font-weight: 800; margin: 0; display: flex; align-items: center; gap: 8px; }
.dash-widget-header h3 i { color: var(--iaff-gold); }
.dash-widget-more { display: block; text-align: center; margin-top: 12px; font-size: 12.5px; color: var(--iaff-blue-2); padding-top: 12px; border-top: 1px solid var(--iaff-border); }
.dash-widget-more:hover { color: var(--iaff-secondary); }

/* Live flights */
.live-dot-indicator { width: 8px; height: 8px; border-radius: 50%; background: var(--iaff-green); box-shadow: 0 0 0 0 rgba(34,197,94,0.6); animation: iaff-pulse 1.8s infinite; }
@keyframes iaff-pulse {
	0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.55); }
	70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
	100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
.live-radar-wrap { border-radius: var(--iaff-radius-sm); overflow: hidden; background: radial-gradient(circle, rgba(0,212,255,0.06), transparent 70%); margin-bottom: 14px; }
#iaff-live-radar { width: 100%; height: 120px; display: block; }
.live-flights-list li {
	display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--iaff-border); font-size: 13px;
}
.live-flights-list li:last-child { border-bottom: none; }
.flight-code { font-weight: 800; color: var(--iaff-secondary); width: 40px; font-family: monospace; }
.flight-route { flex: 1; color: var(--iaff-muted); }
.flight-time { font-family: monospace; font-size: 12px; color: var(--iaff-text); }
.flight-status { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.flight-status.status-green { background: var(--iaff-green); }
.flight-status.status-amber { background: var(--iaff-amber); }

/* Hot topics */
.hot-topics-list li { border-bottom: 1px solid var(--iaff-border); }
.hot-topics-list li:last-child { border-bottom: none; }
.hot-topics-list a { display: flex; align-items: center; justify-content: space-between; padding: 10px 4px; font-size: 13.5px; }
.hot-topics-list a:hover .topic-name { color: var(--iaff-blue-2); }
.topic-count {
	background: var(--iaff-surface); color: var(--iaff-muted); font-size: 11px; font-weight: 700;
	width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.topic-name { display: flex; align-items: center; gap: 5px; flex-direction: row-reverse; }
.topic-name i { font-size: 10px; color: var(--iaff-muted); }

/* =========================================================
   Quicklinks bar + ticker
   ========================================================= */
.quicklinks-bar { margin: 0 0 0; background: rgba(255,255,255,0.03); border-top: 1px solid var(--iaff-border); border-bottom: 1px solid var(--iaff-border); }
.quicklinks-inner { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; }
.quicklinks-icons { display: flex; align-items: stretch; }
.quicklink-item {
	display: flex; align-items: center; gap: 10px; padding: 18px 22px; font-size: 13.5px; font-weight: 600;
	border-left: 1px solid var(--iaff-border); white-space: nowrap;
	transition: background 0.2s ease, color 0.2s ease;
}
.quicklink-item i { color: var(--iaff-blue-2); font-size: 16px; }
.quicklink-item:hover { background: var(--iaff-surface); color: var(--iaff-blue-2); }

.quicklinks-ticker { flex: 1; display: flex; align-items: center; min-width: 260px; gap: 16px; padding-inline-end: 4px; overflow: hidden; }
.quicklinks-ticker .ticker-track-wrap { flex: 1; overflow: hidden; display: flex; }
.quicklinks-ticker .ticker-track { display: flex; gap: 36px; white-space: nowrap; animation: iaff-ticker-scroll 38s linear infinite; padding-inline-start: 36px; }
.quicklinks-ticker:hover .ticker-track { animation-play-state: paused; }
.quicklinks-ticker .ticker-track a { font-size: 13px; color: var(--iaff-muted); }
.quicklinks-ticker .ticker-track a:hover { color: var(--iaff-text); }
.ticker-empty { font-size: 13px; color: var(--iaff-muted); white-space: nowrap; margin: 0; padding-inline-start: 8px; }
.ticker-cta {
	flex-shrink: 0; display: flex; align-items: center; gap: 6px;
	background: var(--iaff-secondary); color: #05141f; font-weight: 700; font-size: 12.5px;
	padding: 8px 16px; border-radius: 20px; margin: 10px 18px 10px 0;
}

/* =========================================================
   News grid + Videos
   ========================================================= */
.dash-news-row { display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: start; }
.news-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.dash-empty-note { color: var(--iaff-muted); font-size: 13.5px; padding: 30px 0; }

.news-card {
	background: var(--iaff-card-bg); border: 1px solid var(--iaff-border); border-radius: var(--iaff-radius-md);
	overflow: hidden; transition: transform 0.25s ease, border-color 0.25s ease;
}
.news-card:hover { transform: translateY(-5px); border-color: rgba(79,147,255,0.4); }
.news-card-media { position: relative; aspect-ratio: 16/11; overflow: hidden; }
.news-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.news-card:hover .news-card-media img { transform: scale(1.08); }
.news-card-badge {
	position: absolute; top: 10px; right: 10px; z-index: 2;
	background: rgba(3,7,15,0.65); backdrop-filter: blur(6px); color: var(--iaff-text);
	font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 6px;
}
.news-card-body { padding: 16px; }
.news-card-body h3 { font-size: 15px; font-weight: 700; line-height: 1.7; margin: 0 0 8px; }
.news-card:hover .news-card-body h3 { color: var(--iaff-blue-2); }
.news-card-body p { font-size: 12.5px; color: var(--iaff-muted); line-height: 1.8; margin: 0 0 12px; }
.news-card-meta { display: flex; gap: 14px; font-size: 12px; color: var(--iaff-muted); }

/* Videos sidebar */
.video-card-featured { position: relative; display: block; border-radius: var(--iaff-radius-md); overflow: hidden; aspect-ratio: 16/10; margin-bottom: 14px; }
.video-card-featured img { width: 100%; height: 100%; object-fit: cover; }
.video-play-btn {
	position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
	width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,0.15); backdrop-filter: blur(6px);
	display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px;
	border: 1px solid rgba(255,255,255,0.3);
}
.video-duration { position: absolute; bottom: 10px; left: 10px; background: rgba(0,0,0,0.65); color: #fff; font-size: 11px; padding: 3px 8px; border-radius: 5px; }
.video-card-title {
	position: absolute; bottom: 0; right: 0; left: 0; padding: 30px 14px 12px;
	background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
	font-size: 13px; font-weight: 700; color: #fff;
}
.video-card-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.video-row-thumb { position: relative; width: 76px; height: 52px; border-radius: 8px; overflow: hidden; flex-shrink: 0; }
.video-row-thumb img { width: 100%; height: 100%; object-fit: cover; }
.video-row-duration { position: absolute; bottom: 3px; left: 3px; background: rgba(0,0,0,0.7); color: #fff; font-size: 9px; padding: 1px 5px; border-radius: 4px; }
.video-row-info { display: flex; flex-direction: column; gap: 4px; }
.video-row-title { font-size: 12.5px; font-weight: 600; line-height: 1.6; }
.video-card-row:hover .video-row-title { color: var(--iaff-blue-2); }
.video-row-date { font-size: 11px; color: var(--iaff-muted); }
.videos-more { border-top: 1px solid var(--iaff-border); padding-top: 14px; }

/* =========================================================
   Bottom stats bar
   ========================================================= */
.stats-bar { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin: 50px auto 60px; }
.stat-widget {
	background: var(--iaff-card-bg-soft); border: 1px solid var(--iaff-border); border-radius: var(--iaff-radius-md);
	padding: 16px; position: relative; overflow: hidden;
}
.stat-widget-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.stat-city { font-size: 12px; color: var(--iaff-muted); display: flex; align-items: center; gap: 5px; }
.stat-city i { color: var(--iaff-blue-2); font-size: 11px; }
.stat-big-value { font-size: 22px; font-weight: 800; font-family: 'Courier New', monospace; }
.stat-big-value.small { font-size: 17px; display: block; margin: 6px 0 2px; }
.stat-sub { font-size: 11.5px; color: var(--iaff-muted); margin-top: 4px; }
.trend-up { color: var(--iaff-green); }

.weather-icon { font-size: 20px; color: var(--iaff-gold); }

.airport-numbers { display: flex; gap: 18px; margin-top: 6px; }
.airport-num { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.airport-num i { color: var(--iaff-blue-2); margin-bottom: 4px; }

.sparkline { width: 100%; height: 30px; margin-top: 10px; }
.sparkline polyline { fill: none; stroke: var(--iaff-secondary); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.gauge-dial { width: 100%; height: 55px; margin-top: 6px; }
.gauge-track { fill: none; stroke: var(--iaff-surface-strong); stroke-width: 8; }
.gauge-fill { fill: none; stroke: var(--iaff-blue-2); stroke-width: 8; stroke-linecap: round; stroke-dasharray: 0 138; transition: stroke-dasharray 1s ease; }

.compass-rose { width: 74px; height: 74px; margin: 4px auto 0; display: block; }
.compass-circle { fill: none; stroke: var(--iaff-surface-strong); stroke-width: 2; }
.compass-label { fill: var(--iaff-muted); font-size: 9px; text-anchor: middle; font-family: monospace; }
.compass-needle { fill: var(--iaff-accent); transform-origin: 50px 50px; transform: rotate(var(--hdg, 0deg)); transition: transform 1s ease; }

.routes-map { width: 100%; height: 46px; margin-top: 6px; }
.routes-map path { fill: none; stroke: var(--iaff-blue-2); stroke-width: 1.4; stroke-dasharray: 3 3; opacity: 0.8; }
.routes-map circle { fill: var(--iaff-secondary); }
.routes-widget .dash-widget-more { border-top: none; padding-top: 8px; margin-top: 4px; }
