/**
 * Tarbwy Event Manager — Institutional RTL Stylesheet (tarbwy-public.css)
 *
 * Designed for the official launch ceremony of:
 * «تربوي — الاتحاد العربي للقيادة التربوية» (tarbwy.org/launch)
 *
 * Features:
 * - Zero external CDN runtime dependencies.
 * - Full Arabic RTL typographic hierarchy, balanced headlines, and tabular numerals.
 * - Responsive Mobile-First architecture across 375px (Mobile), 768px (Tablet), and 1440px (Desktop).
 * - Smooth compositor-only transitions (transform, opacity) with prefers-reduced-motion support.
 * - Official printable QR ticket and high-contrast Check-in terminal styles.
 */

:root {
	--tarbwy-bg: #FBF9F5;
	--tarbwy-surface: #FFFFFF;
	--tarbwy-surface-alt: #F3EFE6;
	--tarbwy-border: #E2DDD3;
	--tarbwy-border-strong: #C9C1B4;
	--tarbwy-text: #171412;
	--tarbwy-muted: #57534E;
	--tarbwy-primary: #14532D;
	--tarbwy-primary-hover: #0F3F22;
	--tarbwy-accent: #9A3412;
	--tarbwy-success: #15803D;
	--tarbwy-warning: #B45309;
	--tarbwy-danger: #B91C1C;
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body.tarbwy-public-body {
	margin: 0;
	padding: 0;
	background-color: var(--tarbwy-bg);
	color: var(--tarbwy-text);
	font-family: 'Cairo', 'IBM Plex Sans Arabic', 'Segoe UI', Tahoma, Arial, sans-serif;
	direction: rtl;
	text-align: right;
	line-height: 1.75;
	-webkit-font-smoothing: antialiased;
}

.tarbwy-container {
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 20px;
}

.tarbwy-mt-16 {
	margin-top: 16px;
}

.tarbwy-mt-24 {
	margin-top: 24px;
}

.tarbwy-mb-24 {
	margin-bottom: 24px;
}

.tarbwy-muted {
	color: var(--tarbwy-muted);
}

.tarbwy-body-lg {
	font-size: 1.08rem;
	line-height: 1.85;
	color: var(--tarbwy-text);
	margin: 0;
}

/* ==========================================================================
   HEADER (Strict 3-Zone Top Bar Contract + Mobile Drawer)
   ========================================================================== */
.tarbwy-header {
	background-color: var(--tarbwy-surface);
	border-bottom: 1px solid var(--tarbwy-border);
	position: sticky;
	top: 0;
	z-index: 50;
}

.tarbwy-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 32px;
	min-height: 70px;
}

.tarbwy-brand-link {
	text-decoration: none;
	flex-shrink: 0;
}

.tarbwy-brand-title {
	font-weight: 800;
	font-size: 1.06rem;
	color: var(--tarbwy-primary);
	white-space: nowrap;
}

.tarbwy-nav {
	display: flex;
	align-items: center;
	gap: 24px;
}

.tarbwy-nav a {
	color: var(--tarbwy-muted);
	text-decoration: none;
	font-size: 0.92rem;
	font-weight: 600;
	white-space: nowrap;
	transition: color 0.16s ease;
}

.tarbwy-nav a:hover {
	color: var(--tarbwy-primary);
	text-decoration: underline;
	text-underline-offset: 6px;
}

.tarbwy-header-cta {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}

.tarbwy-mobile-toggle {
	display: none;
	background: var(--tarbwy-surface);
	border: 1px solid var(--tarbwy-border-strong);
	color: var(--tarbwy-text);
	padding: 8px 14px;
	min-height: 44px;
	font-family: inherit;
	font-size: 0.88rem;
	font-weight: 700;
	cursor: pointer;
}

.tarbwy-mobile-drawer {
	background: var(--tarbwy-surface);
	border-top: 1px solid var(--tarbwy-border);
	border-bottom: 1px solid var(--tarbwy-border);
	padding: 16px 0;
}

.tarbwy-mobile-drawer-links {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.tarbwy-mobile-nav-link {
	padding: 10px 12px;
	color: var(--tarbwy-text);
	text-decoration: none;
	font-weight: 700;
	border-bottom: 1px solid var(--tarbwy-surface-alt);
}

/* ==========================================================================
   1. HERO SECTION & GUEST JOURNEY STRIP
   ========================================================================== */
.tarbwy-hero {
	padding: 64px 0 56px;
	background: linear-gradient(180deg, #F3EFE6 0%, #FBF9F5 100%);
	border-bottom: 1px solid var(--tarbwy-border);
}

.tarbwy-hero-grid {
	display: grid;
	grid-template-columns: 1.55fr 1fr;
	gap: 32px;
	align-items: stretch;
	margin-bottom: 32px;
}

.tarbwy-hero-main {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.tarbwy-kicker {
	font-size: 0.84rem;
	color: var(--tarbwy-accent);
	font-weight: 700;
	margin: 0 0 12px;
}

.tarbwy-hero-title {
	font-size: clamp(2rem, 3.8vw, 3.2rem);
	line-height: 1.28;
	font-weight: 800;
	margin: 0 0 16px;
	color: var(--tarbwy-text);
	text-wrap: balance;
}

.tarbwy-hero-subtitle {
	font-size: 1.12rem;
	color: var(--tarbwy-muted);
	max-width: 68ch;
	margin: 0 0 28px;
	line-height: 1.8;
}

.tarbwy-hero-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.tarbwy-hero-emblem-card {
	background: var(--tarbwy-surface);
	border: 1px solid var(--tarbwy-border);
	padding: 28px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tarbwy-emblem-inner {
	text-align: center;
}

.tarbwy-emblem-svg {
	width: 124px;
	height: 124px;
	margin: 0 auto 16px;
	display: block;
}

.tarbwy-emblem-label {
	display: block;
	font-size: 0.78rem;
	font-weight: 700;
	color: var(--tarbwy-accent);
	margin-bottom: 4px;
}

.tarbwy-emblem-org {
	display: block;
	font-size: 1.05rem;
	font-weight: 800;
	color: var(--tarbwy-primary);
	margin-bottom: 6px;
}

.tarbwy-emblem-sub {
	display: block;
	font-size: 0.82rem;
	color: var(--tarbwy-muted);
	line-height: 1.6;
}

.tarbwy-hero-meta {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	padding: 22px 24px;
	background: var(--tarbwy-surface);
	border: 1px solid var(--tarbwy-border);
	margin-bottom: 24px;
}

.tarbwy-meta-label {
	display: block;
	font-size: 0.78rem;
	color: var(--tarbwy-muted);
	margin-bottom: 4px;
}

.tarbwy-meta-value {
	font-size: 0.96rem;
	font-weight: 700;
	color: var(--tarbwy-text);
}

/* 4-Step Digital Guest Journey */
.tarbwy-journey-strip {
	background: var(--tarbwy-surface);
	border: 1px solid var(--tarbwy-border);
	padding: 24px;
}

.tarbwy-journey-header {
	margin-bottom: 18px;
}

.tarbwy-journey-desc {
	margin: 4px 0 0;
	font-size: 0.9rem;
	color: var(--tarbwy-muted);
}

.tarbwy-journey-steps {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

.tarbwy-journey-step {
	padding: 16px;
	background: var(--tarbwy-bg);
	border: 1px solid var(--tarbwy-border);
}

.tarbwy-step-num {
	display: inline-block;
	font-family: monospace;
	font-size: 0.82rem;
	font-weight: 800;
	color: var(--tarbwy-accent);
	margin-bottom: 6px;
}

.tarbwy-journey-step strong {
	display: block;
	font-size: 0.95rem;
	color: var(--tarbwy-text);
	margin-bottom: 6px;
}

.tarbwy-journey-step p {
	margin: 0;
	font-size: 0.82rem;
	color: var(--tarbwy-muted);
	line-height: 1.65;
}

/* ==========================================================================
   SECTIONS, CARDS, SCHEDULE & SPEAKERS
   ========================================================================== */
.tarbwy-section {
	padding: 64px 0;
}

.tarbwy-section-alt {
	background-color: var(--tarbwy-surface-alt);
	border-top: 1px solid var(--tarbwy-border);
	border-bottom: 1px solid var(--tarbwy-border);
}

.tarbwy-section-header {
	margin-bottom: 28px;
}

.tarbwy-section-num {
	display: block;
	font-size: 0.8rem;
	font-weight: 700;
	color: var(--tarbwy-accent);
	margin-bottom: 6px;
}

.tarbwy-section-title {
	font-size: clamp(1.45rem, 2.5vw, 2rem);
	font-weight: 800;
	color: var(--tarbwy-text);
	margin: 0 0 8px;
}

.tarbwy-editorial-lead {
	background: var(--tarbwy-surface);
	border: 1px solid var(--tarbwy-border);
	padding: 28px 32px;
	font-size: 1.08rem;
	line-height: 1.85;
}

.tarbwy-editorial-lead p {
	margin: 0;
}

.tarbwy-grid-2 {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 24px;
}

.tarbwy-grid-3 {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}

.tarbwy-card,
.tarbwy-form-card {
	background: var(--tarbwy-surface);
	border: 1px solid var(--tarbwy-border);
	padding: 28px;
	transition: transform 0.16s cubic-bezier(0.16, 1, 0.3, 1);
}

.tarbwy-card h3 {
	margin: 0 0 10px;
	font-size: 1.12rem;
	color: var(--tarbwy-text);
}

.tarbwy-card p {
	margin: 0;
	font-size: 0.94rem;
	color: var(--tarbwy-muted);
}

.tarbwy-inline-cta-bar {
	margin-top: 28px;
	padding: 22px 28px;
	background: var(--tarbwy-surface);
	border: 1px solid var(--tarbwy-border-strong);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
}

.tarbwy-inline-cta-bar strong {
	display: block;
	font-size: 1rem;
	color: var(--tarbwy-text);
}

.tarbwy-inline-cta-bar span {
	font-size: 0.88rem;
	color: var(--tarbwy-muted);
}

/* Schedule List */
.tarbwy-schedule-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.tarbwy-schedule-row {
	display: grid;
	grid-template-columns: 200px 1fr;
	gap: 24px;
	background: var(--tarbwy-surface);
	border: 1px solid var(--tarbwy-border);
	padding: 22px 26px;
	align-items: center;
}

.tarbwy-schedule-time-col {
	border-left: 1px solid var(--tarbwy-border);
	padding-left: 16px;
}

.tarbwy-schedule-index {
	display: block;
	font-size: 0.76rem;
	font-weight: 700;
	color: var(--tarbwy-accent);
}

.tarbwy-schedule-time {
	font-size: 1rem;
	color: var(--tarbwy-primary);
	font-variant-numeric: tabular-nums;
}

.tarbwy-schedule-content h3 {
	margin: 0 0 6px;
	font-size: 1.06rem;
}

.tarbwy-schedule-content p {
	margin: 0;
	font-size: 0.9rem;
	color: var(--tarbwy-muted);
}

/* Speaker Cards (Photo/Monogram + Name + Short Professional Title Only) */
.tarbwy-speaker-card {
	display: flex;
	align-items: center;
	gap: 18px;
}

.tarbwy-speaker-avatar {
	width: 68px;
	height: 68px;
	flex-shrink: 0;
	background: var(--tarbwy-surface-alt);
	border: 1px solid var(--tarbwy-border-strong);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.tarbwy-speaker-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.tarbwy-speaker-monogram {
	font-size: 1.4rem;
	font-weight: 800;
	color: var(--tarbwy-primary);
}

.tarbwy-speaker-name {
	margin: 0 0 4px !important;
	font-size: 1.05rem !important;
}

.tarbwy-speaker-role {
	margin: 0 !important;
	font-size: 0.86rem !important;
	color: var(--tarbwy-muted);
}

.tarbwy-placeholder-notice {
	background: var(--tarbwy-surface);
	border: 1px dashed var(--tarbwy-border-strong);
	padding: 24px 28px;
	color: var(--tarbwy-muted);
}

.tarbwy-placeholder-notice strong {
	display: block;
	color: var(--tarbwy-text);
	margin-bottom: 6px;
}

.tarbwy-placeholder-notice p {
	margin: 0;
	font-size: 0.92rem;
}

/* ==========================================================================
   BUTTONS, INPUTS & REGISTRATION FORM
   ========================================================================== */
.tarbwy-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 22px;
	font-size: 0.94rem;
	font-weight: 700;
	text-decoration: none;
	border: 1px solid transparent;
	cursor: pointer;
	min-height: 44px;
	white-space: nowrap;
	font-family: inherit;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.tarbwy-btn-lg {
	padding: 13px 30px;
	font-size: 1.02rem;
}

.tarbwy-btn-primary {
	background-color: var(--tarbwy-primary);
	color: #FFFFFF;
}

.tarbwy-btn-primary:hover {
	background-color: var(--tarbwy-primary-hover);
}

.tarbwy-btn-outline {
	background-color: var(--tarbwy-surface);
	color: var(--tarbwy-text);
	border-color: var(--tarbwy-border-strong);
}

.tarbwy-btn-outline:hover {
	border-color: var(--tarbwy-primary);
	color: var(--tarbwy-primary);
}

.tarbwy-form-intro {
	font-size: 0.95rem;
	color: var(--tarbwy-muted);
	margin: 0 0 24px;
	line-height: 1.8;
}

.tarbwy-form-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 18px;
	margin-top: 20px;
}

.tarbwy-field label {
	display: block;
	font-weight: 700;
	font-size: 0.88rem;
	margin-bottom: 6px;
	color: var(--tarbwy-text);
}

.tarbwy-field .req {
	color: var(--tarbwy-accent);
}

.tarbwy-field input,
.tarbwy-field select,
.tarbwy-field textarea,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="search"] {
	width: 100%;
	min-height: 44px;
	padding: 10px 14px;
	border: 1px solid var(--tarbwy-border-strong);
	background: #FFFFFF;
	font-family: inherit;
	font-size: 0.95rem;
	color: var(--tarbwy-text);
}

.tarbwy-field input:focus,
.tarbwy-field select:focus,
.tarbwy-field textarea:focus {
	outline: 2px solid var(--tarbwy-primary);
	outline-offset: 1px;
	border-color: var(--tarbwy-primary);
}

.tarbwy-hp-field {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.tarbwy-companions-box {
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid var(--tarbwy-border);
}

.tarbwy-companions-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	flex-wrap: wrap;
}

.tarbwy-companions-header h3 {
	margin: 0 0 4px;
	font-size: 1rem;
}

.tarbwy-companions-header p {
	margin: 0;
	font-size: 0.85rem;
}

.tarbwy-form-submit {
	margin-top: 28px;
}

/* ==========================================================================
   CONTACT SECTION & FOOTER
   ========================================================================== */
.tarbwy-contact-section {
	padding-top: 16px;
}

.tarbwy-contact-card {
	background: var(--tarbwy-surface);
	border: 1px solid var(--tarbwy-border);
	padding: 32px;
	display: grid;
	grid-template-columns: 1.3fr 1fr;
	gap: 28px;
	align-items: center;
}

.tarbwy-contact-card h2 {
	margin: 0 0 8px;
	font-size: 1.4rem;
}

.tarbwy-contact-channels {
	display: flex;
	flex-direction: column;
	gap: 14px;
	background: var(--tarbwy-bg);
	border: 1px solid var(--tarbwy-border);
	padding: 20px;
}

.tarbwy-contact-value {
	font-size: 1.02rem;
	font-weight: 800;
	color: var(--tarbwy-primary);
	text-decoration: none;
}

.tarbwy-footer {
	background: var(--tarbwy-surface);
	border-top: 1px solid var(--tarbwy-border);
	padding: 32px 0;
	margin-top: 32px;
}

.tarbwy-footer-inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 20px;
}

.tarbwy-footer-links {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 0.88rem;
}

.tarbwy-footer-links a {
	color: var(--tarbwy-muted);
	text-decoration: none;
	font-weight: 600;
}

.tarbwy-footer-links a:hover {
	color: var(--tarbwy-primary);
}

/* ==========================================================================
   OFFICIAL PRINTABLE TICKET & CHECK-IN TERMINAL
   ========================================================================== */
.tarbwy-official-ticket {
	background: #FFFFFF;
	border: 2px solid var(--tarbwy-primary);
	padding: 32px;
}

.tarbwy-ticket-header {
	border-bottom: 1px solid var(--tarbwy-border);
	padding-bottom: 20px;
	margin-bottom: 24px;
}

.tarbwy-ticket-org {
	color: var(--tarbwy-primary);
	font-weight: 800;
	font-size: 0.95rem;
}

.tarbwy-ticket-title {
	margin: 8px 0;
	font-size: 1.5rem;
}

.tarbwy-ticket-body-grid {
	display: grid;
	grid-template-columns: 1fr 200px;
	gap: 24px;
	align-items: center;
}

.tarbwy-tkt-field {
	margin-bottom: 14px;
}

.tarbwy-tkt-label {
	display: block;
	font-size: 0.8rem;
	color: var(--tarbwy-muted);
}

.tarbwy-tkt-value-lg {
	font-size: 1.25rem;
	color: var(--tarbwy-text);
}

.tarbwy-ticket-qr-box {
	text-align: center;
	padding: 12px;
	border: 1px solid var(--tarbwy-border);
}

.tarbwy-stats-ribbon {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	background: var(--tarbwy-surface);
	border: 1px solid var(--tarbwy-border);
	padding: 16px;
}

.tarbwy-stat-num {
	display: block;
	font-size: 1.6rem;
	font-variant-numeric: tabular-nums;
}

.tarbwy-checkin-banner {
	padding: 20px;
	margin-top: 16px;
	border: 2px solid transparent;
	font-weight: 700;
}

.tarbwy-banner-valid {
	background: #ECFDF5;
	border-color: #15803D;
	color: #14532D;
}

.tarbwy-banner-duplicate,
.tarbwy-banner-warning {
	background: #FFFBEB;
	border-color: #B45309;
	color: #78350F;
}

.tarbwy-banner-error {
	background: #FEF2F2;
	border-color: #B91C1C;
	color: #7F1D1D;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (Tablet <= 992px & Mobile <= 768px)
   ========================================================================== */
@media (max-width: 992px) {
	.tarbwy-hero-grid,
	.tarbwy-contact-card {
		grid-template-columns: 1fr;
	}
	.tarbwy-hero-meta,
	.tarbwy-journey-steps {
		grid-template-columns: repeat(2, 1fr);
	}
	.tarbwy-grid-3 {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 768px) {
	.tarbwy-nav {
		display: none;
	}
	.tarbwy-mobile-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}
	.tarbwy-brand-title {
		font-size: 0.92rem;
	}
	.tarbwy-hero {
		padding: 40px 0;
	}
	.tarbwy-hero-meta,
	.tarbwy-journey-steps,
	.tarbwy-grid-2,
	.tarbwy-grid-3,
	.tarbwy-form-grid,
	.tarbwy-ticket-body-grid {
		grid-template-columns: 1fr;
	}
	.tarbwy-schedule-row {
		grid-template-columns: 1fr;
		gap: 8px;
	}
	.tarbwy-schedule-time-col {
		border-left: none;
		border-bottom: 1px solid var(--tarbwy-border);
		padding-left: 0;
		padding-bottom: 8px;
	}
	.tarbwy-stats-ribbon {
		grid-template-columns: repeat(2, 1fr);
	}
	.tarbwy-card,
	.tarbwy-form-card,
	.tarbwy-contact-card {
		padding: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
}

@media print {
	body.tarbwy-public-body {
		background: #FFFFFF;
	}
	.tarbwy-no-print,
	.tarbwy-header,
	.tarbwy-footer {
		display: none !important;
	}
	.tarbwy-official-ticket {
		border: 2px solid #000000;
		box-shadow: none;
	}
}
