/* ============================================================
   KGND — Kurdish (Sorani) RTL Stylesheet
   Activated via body.kgnd-rtl class set by inc/i18n.php
   ============================================================ */

/* Root direction */
html[dir="rtl"],
body.kgnd-rtl {
	direction: rtl;
	text-align: right;
}

/* ============================================================
   Typography baseline for Kurdish
   ============================================================ */
body.kgnd-rtl {
	/* Slightly relaxed leading and word spacing for Arabic-script readability */
	line-height: 1.85;
	letter-spacing: 0;
}

body.kgnd-rtl h1,
body.kgnd-rtl h2,
body.kgnd-rtl h3,
body.kgnd-rtl h4,
body.kgnd-rtl h5,
body.kgnd-rtl h6 {
	letter-spacing: 0;
	line-height: 1.55;
}

body.kgnd-rtl p {
	line-height: 1.95;
}

/* Avoid uppercase transformations on Kurdish (script has no case) */
body.kgnd-rtl .section-badge,
body.kgnd-rtl .stat-label,
body.kgnd-rtl .footer-bottom,
body.kgnd-rtl .topbar-contact-item,
body.kgnd-rtl [style*="text-transform"],
body.kgnd-rtl [style*="uppercase"] {
	text-transform: none !important;
	letter-spacing: 0 !important;
}

/* ============================================================
   Topbar (RTL)
   ============================================================ */
body.kgnd-rtl .kgnd-topbar .topbar-inner {
	direction: rtl;
}
body.kgnd-rtl .topbar-contact {
	flex-direction: row-reverse;
}
body.kgnd-rtl .topbar-contact-item {
	flex-direction: row-reverse;
}
body.kgnd-rtl .topbar-social {
	flex-direction: row-reverse;
}

/* Keep phone numbers, emails and Latin spans LTR even inside RTL flow */
body.kgnd-rtl .kgnd-ltr,
body.kgnd-rtl [dir="ltr"] {
	direction: ltr;
	unicode-bidi: embed;
}

/* ============================================================
   Header / Nav (RTL) — full row flips to right-to-left
   ============================================================ */

/* Whole nav bar flips: logo on RIGHT, menu in middle, actions on LEFT */
body.kgnd-rtl .kgnd-nav {
	flex-direction: row-reverse !important;
	direction: rtl;
}

/* The menu pill items flow right-to-left inside the pill */
body.kgnd-rtl .kgnd-menu {
	flex-direction: row-reverse !important;
	direction: rtl;
}

/* Logo: don't stretch with auto-margin (let space-between do its job) */
body.kgnd-rtl .kgnd-logo {
	margin-right: 0;
	margin-left: 0;
}

/* Action buttons (search, sign-in, join, hamburger) also flip */
body.kgnd-rtl .nav-actions {
	flex-direction: row-reverse !important;
}

body.kgnd-rtl .logo-tagline {
	text-align: right;
	border-left: none;
	border-right: 2px solid var(--color-teal);
	margin-left: 0;
	margin-right: 0.75rem;
	padding-left: 0;
	padding-right: 0.75rem;
}

/* Logo brand mark stays LTR (KGND is Latin) */
body.kgnd-rtl .logo-text,
body.kgnd-rtl .brand-name {
	direction: ltr;
	unicode-bidi: embed;
}

/* Dropdown caret in menu items — flip arrow */
body.kgnd-rtl .kgnd-menu li a .material-symbols-outlined {
	margin-left: 0;
	margin-right: 0.25rem;
}

/* ============================================================
   Mobile menu (RTL)
   The mobile menu is a full-screen overlay (top:0;left:0;right:0;
   bottom:0) so we should NOT change its positioning. We only flip
   its inner alignment and move the close button to the left.
   ============================================================ */
body.kgnd-rtl .mobile-menu {
	text-align: right;
	direction: rtl;
}
body.kgnd-rtl .mobile-menu ul {
	padding-right: 0;
	padding-left: 0;
	direction: rtl;
}
body.kgnd-rtl .mobile-menu ul li {
	text-align: right;
}
body.kgnd-rtl .mobile-menu-close {
	right: auto;
	left: 2rem;
}

/* ============================================================
   Hero (RTL)
   ============================================================ */
body.kgnd-rtl .hero-inner {
	direction: rtl;
}
body.kgnd-rtl .hero-content {
	text-align: right;
}
body.kgnd-rtl .hero-badge {
	flex-direction: row-reverse;
}
body.kgnd-rtl .hero-actions {
	flex-direction: row-reverse;
	justify-content: flex-end;
}
body.kgnd-rtl .btn-video {
	flex-direction: row-reverse;
}

/* Stats card sits on the LEFT in RTL (mirror of original right-side position) */
body.kgnd-rtl .hero-stats-card {
	right: auto !important;
	left: -1rem;
}
body.kgnd-rtl .stats-header {
	flex-direction: row-reverse;
	text-align: right;
}
body.kgnd-rtl .stats-bar {
	transform: scaleX(-1);
}

/* Numbers (100,000+ etc.) stay LTR */
body.kgnd-rtl .stats-value,
body.kgnd-rtl .stat-number {
	direction: ltr;
	unicode-bidi: embed;
}

/* ============================================================
   Section headers / generic content blocks
   ============================================================ */
body.kgnd-rtl .section-header {
	text-align: center;
}
body.kgnd-rtl .section-divider {
	margin-left: auto;
	margin-right: auto;
}

/* Two-column grids: reverse the column order so the image lands on the
   visually-correct side in RTL */
body.kgnd-rtl .kgnd-grid-2 {
	direction: rtl;
}

/* Inline icon-text rows — flip the icon to the right side */
body.kgnd-rtl [style*="display:flex"][style*="align-items:flex-start"][style*="gap:1rem"] {
	flex-direction: row-reverse;
	text-align: right;
}

/* Quote / testimonial card position — was bottom-right, now bottom-left */
body.kgnd-rtl [style*="bottom:-.5rem"][style*="right:-.5rem"] {
	right: auto !important;
	left: -.5rem;
}
body.kgnd-rtl [style*="top:-1rem"][style*="left:-1rem"] {
	left: auto !important;
	right: -1rem;
}

/* ============================================================
   Programs grid + cards
   ============================================================ */
body.kgnd-rtl .programs-grid {
	direction: rtl;
}
body.kgnd-rtl .program-card {
	text-align: right;
}
/* The badge in the program card is absolutely positioned at top-right; flip to top-left */
body.kgnd-rtl .program-card > span[style*="position:absolute"][style*="right:1.25rem"] {
	right: auto !important;
	left: 1.25rem;
}
body.kgnd-rtl .program-arrow .material-symbols-outlined {
	transform: scaleX(-1);
}

/* ============================================================
   Stats strip
   ============================================================ */
body.kgnd-rtl .kgnd-stats {
	direction: rtl;
}
body.kgnd-rtl .stats-inner {
	direction: rtl;
}
body.kgnd-rtl .stat-item {
	text-align: center;
}

/* ============================================================
   Roadmap rows
   ============================================================ */
body.kgnd-rtl .kgnd-roadmap-row,
body.kgnd-rtl section [style*="display:flex"][style*="gap:2rem"][style*="margin-bottom:2rem"] {
	flex-direction: row-reverse;
}
body.kgnd-rtl .kgnd-roadmap-row ul,
body.kgnd-rtl section ul[style*="grid-template-columns:1fr 1fr"] {
	direction: rtl;
}
body.kgnd-rtl .kgnd-roadmap-row li,
body.kgnd-rtl section li[style*="display:flex"][style*="align-items:center"][style*="gap:.5rem"] {
	flex-direction: row-reverse;
	text-align: right;
}
body.kgnd-rtl .kgnd-roadmap-row [style*="display:flex"][style*="align-items:center"][style*="gap:1rem"][style*="margin-bottom:1rem"] {
	flex-direction: row-reverse;
}

/* ============================================================
   Values + Governance grids
   ============================================================ */
body.kgnd-rtl .kgnd-fields-grid {
	direction: rtl;
}

/* ============================================================
   FAQ section
   ============================================================ */
body.kgnd-rtl .kgnd-faq {
	direction: rtl;
}
body.kgnd-rtl .faq-inner {
	direction: rtl;
}
body.kgnd-rtl .faq-content {
	text-align: right;
}
body.kgnd-rtl .faq-question {
	flex-direction: row-reverse;
	text-align: right;
}
body.kgnd-rtl .faq-icon {
	margin-left: 0;
	margin-right: auto;
}
body.kgnd-rtl .faq-answer {
	text-align: right;
}

/* ============================================================
   Final CTA
   ============================================================ */
body.kgnd-rtl section [style*="display:flex"][style*="gap:1rem"][style*="justify-content:center"] {
	flex-direction: row-reverse;
}

/* ============================================================
   Footer
   ============================================================ */
body.kgnd-rtl .kgnd-footer {
	direction: rtl;
	text-align: right;
}
body.kgnd-rtl .footer-grid {
	direction: rtl;
}
body.kgnd-rtl .footer-col,
body.kgnd-rtl .footer-brand {
	text-align: right;
}
body.kgnd-rtl .footer-col h4 {
	text-align: right;
}
body.kgnd-rtl .footer-contact-item {
	flex-direction: row-reverse;
}
body.kgnd-rtl .footer-social {
	flex-direction: row-reverse;
	justify-content: flex-end;
}
body.kgnd-rtl .footer-links {
	text-align: right;
}
body.kgnd-rtl .newsletter-form {
	flex-direction: row-reverse;
}
body.kgnd-rtl .newsletter-input {
	text-align: right;
}
body.kgnd-rtl .footer-bottom {
	flex-direction: row-reverse;
	text-align: right;
}
body.kgnd-rtl .footer-bottom-links {
	flex-direction: row-reverse;
}

/* Brand line — keep "KGND" Latin */
body.kgnd-rtl .brand-name,
body.kgnd-rtl .brand-dot {
	direction: ltr;
	unicode-bidi: embed;
}

/* ============================================================
   Buttons & arrows
   ============================================================ */
body.kgnd-rtl .play-icon,
body.kgnd-rtl [class*="arrow_forward"],
body.kgnd-rtl .program-arrow .material-symbols-outlined {
	transform: scaleX(-1);
}

body.kgnd-rtl .btn-primary,
body.kgnd-rtl .btn-video,
body.kgnd-rtl .nav-cta,
body.kgnd-rtl .newsletter-btn {
	letter-spacing: 0;
}

/* ============================================================
   Inline emoji icons (📍 📞 ✉) — keep them at the inline-start side
   ============================================================ */
body.kgnd-rtl .topbar-contact-item,
body.kgnd-rtl .footer-contact-item {
	gap: .5rem;
}

/* ============================================================
   Forms / inputs (RTL alignment)
   ============================================================ */
body.kgnd-rtl input[type="text"],
body.kgnd-rtl input[type="email"],
body.kgnd-rtl input[type="search"],
body.kgnd-rtl input[type="password"],
body.kgnd-rtl textarea,
body.kgnd-rtl select {
	text-align: right;
	direction: rtl;
}

body.kgnd-rtl input[type="email"]::placeholder,
body.kgnd-rtl input[type="text"]::placeholder,
body.kgnd-rtl textarea::placeholder {
	text-align: right;
}

/* ============================================================
   Search overlay
   ============================================================ */
body.kgnd-rtl .search-close {
	right: auto;
	left: 1.5rem;
}
body.kgnd-rtl .search-form input {
	text-align: right;
}

/* ============================================================
   Numbers, dates, brand tokens — always LTR
   ============================================================ */
body.kgnd-rtl .kgnd-ltr-force,
body.kgnd-rtl time,
body.kgnd-rtl [data-numeric] {
	direction: ltr;
	unicode-bidi: embed;
	display: inline-block;
}

/* Specific stats numbers (keep readable) */
body.kgnd-rtl .stats-value,
body.kgnd-rtl .stat-number,
body.kgnd-rtl .hero-stats-card p:nth-child(1) {
	direction: ltr;
	unicode-bidi: embed;
	text-align: right;
}

/* ============================================================
   Mobile fixes for RTL
   ============================================================ */
@media (max-width: 1023px) {
	body.kgnd-rtl .hero-inner {
		text-align: right;
	}
	body.kgnd-rtl .kgnd-grid-2 {
		grid-template-columns: 1fr !important;
	}
	body.kgnd-rtl .kgnd-roadmap-row,
	body.kgnd-rtl section [style*="display:flex"][style*="gap:2rem"][style*="margin-bottom:2rem"] {
		flex-direction: column;
	}
}
