@font-face {
	font-family: 'main';
	src: url('../fonts/Adoria.otf');
}
body,
html {
	overscroll-behavior: none;
}

:root {
	/* Brand — Hawar Borsa */
	--primary: #1c3f8f; /* logo navy blue */
	--primary-dark: #162f6e; /* deeper navy */
	--primary-light: #d4dcf5; /* soft blue tint */
	--accent: #cc2222; /* logo crimson red */
	--accent-dark: #a51919; /* deeper red */

	--light: #f0f3fb; /* blue-white page bg */
	--secondary: #0f1e4a; /* near-black navy for headings */
	--dark: #0a1530;
	--darker: #060d20;
	--gray: #7a8aab; /* muted blue-gray */

	--ff-title: 'Poiret One', serif;
	--ff-base: Arial, Helvetica, sans-serif;
	--ff-sub: 'Poiret One', serif;
	--title-font: 50px;
	--mid-font: 30px;
	--normal-font: 20px;

	--fw-regular: 400;
	--fw-bold: 700;
	--fw-light: 300;
	scroll-behavior: smooth;

	/* Semantic surface tokens — light mode */
	--bg-page: #f0f3fb;
	--bg-card: #ffffff;
	--bg-card-border: rgba(0, 0, 0, 0.05);
	--bg-media: #e4e9f7;
	--text-heading: #0f1e4a;
	--text-muted: #7a8aab;
	--divider: rgba(0, 0, 0, 0.09);
	--shadow-card: 0 2px 16px rgba(0, 0, 0, 0.07);
	--shadow-card-hover: 0 16px 48px rgba(0, 0, 0, 0.11);
}

[data-theme='dark'] {
	--bg-page: #000000;
	--bg-card: #111111;
	--bg-card-border: rgba(255, 255, 255, 0.10);
	--bg-media: #1a1a1a;
	--text-heading: #ffffff;
	--text-muted: #888888;
	--divider: rgba(255, 255, 255, 0.10);
	--shadow-card: 0 2px 16px rgba(0, 0, 0, 0.6);
	--shadow-card-hover: 0 16px 48px rgba(0, 0, 0, 0.8);
	--light: #1a1a1a;
	--gray: #888888;
}

/*#region Common*/
*,
*::before,
*::after {
	box-sizing: border-box;
	user-select: none;
}

body {
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	background-color: var(--bg-page);
	color: var(--text-heading);
	transition: background-color 0.3s ease, color 0.3s ease;
}

p,
h4,
h5,
h6 {
	overflow-wrap: break-word;
	font-weight: bold;
	font-family: var(--ff-sub);
}

h1,
h2,
h3 {
	line-height: 1;
	font-family: 'main';
	text-transform: uppercase;
}

.mid-font {
	font-family: var(--ff-sub);
	font-size: var(--mid-font);
	font-weight: var(--fw-light);
}

.reg-font {
	font-family: var(--ff-base);
	font-size: var(--normal-font);
	font-weight: var(--fw-regular);
	margin-left: 0px !important;
}

.title-font {
	font-family: 'main';
	font-size: var(--title-font);
	font-weight: var(--fw-bold);
	text-transform: uppercase;
	margin-bottom: 30px;
}

.icon-mask {
	display: block;
	background-color: white;
	width: 25px;
	aspect-ratio: 1 / 1;
	mask-position: center;
	mask-repeat: no-repeat;
	mask-size: contain;
}

.icon-mask:hover {
	background-color: var(--primary);
}

/* =====================================================
   App Loader
   ===================================================== */

.app-loader {
	position: fixed;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--bg-page);
	z-index: 9999;
	transition: background-color 0.3s ease;
}

/* =====================================================
   First-visit Language Picker
   ===================================================== */

.lang-picker-overlay {
	position: fixed;
	inset: 0;
	z-index: 10000;
	background: var(--bg-page);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}

.lang-picker {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	max-width: 360px;
	width: 100%;
}

.lang-picker__globe {
	width: 52px;
	height: 52px;
	color: var(--primary);
	margin-bottom: 4px;
}

.lang-picker__title {
	font-family: 'main';
	font-size: 26px;
	color: var(--text-heading);
	text-align: center;
	margin: 0;
}

.lang-picker__hint {
	font-family: var(--ff-base);
	font-size: 13px;
	color: var(--text-muted);
	margin: 0;
	text-align: center;
}

.lang-picker__list {
	list-style: none;
	margin: 12px 0 0;
	padding: 0;
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.lang-picker__option {
	width: 100%;
	padding: 14px 20px;
	border-radius: 14px;
	border: 1px solid var(--bg-card-border);
	background: var(--bg-card);
	box-shadow: var(--shadow-card);
	color: var(--text-heading);
	font-family: var(--ff-base);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease, color 0.2s ease;
	text-align: center;
}

.lang-picker__option:hover {
	background: var(--primary);
	color: #fff;
	border-color: var(--primary);
	transform: translateY(-2px);
	box-shadow: var(--shadow-card-hover);
}

.app-loader__ring {
	width: 48px;
	height: 48px;
	border: 3px solid rgba(0, 0, 0, 0.08);
	border-top-color: var(--primary-dark);
	border-radius: 50%;
	animation: spin 0.75s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

/* =====================================================
   Rates Page — Layout
   ===================================================== */

.rates-page {
	min-height: 100vh;
	background: var(--bg-page);
	padding-bottom: 10px;
	transition: background-color 0.3s ease;
}

/* Page Header */

.page-header {
	text-align: center;
	padding: 72px 0 60px;
}

.page-logo {
	width: 90px;
	height: 90px;
	object-fit: contain;
	border-radius: 20px;
	display: block;
	margin: 0 auto 20px;
}

/* Live Clock */

.live-clock {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	margin-bottom: 15px;
}

.live-clock__time {
	font-family: 'main';
	font-size: clamp(36px, 5vw, 64px);
	letter-spacing: 6px;
	color: var(--primary);
	line-height: 1;
}

.live-clock__date {
	font-family: var(--ff-base);
	font-size: 12px;
	font-weight: var(--fw-bold);
	letter-spacing: 3px;
	text-transform: uppercase;
	color: var(--gray);
}

.page-header__eyebrow {
	display: inline-block;
	font-family: var(--ff-base);
	font-size: 11px;
	font-weight: var(--fw-bold);
	letter-spacing: 4px;
	text-transform: uppercase;
	color: var(--primary);
	background: rgba(28, 63, 143, 0.1);
	border-radius: 100px;
	padding: 5px 14px;
}

.page-header__title {
	font-size: clamp(44px, 6vw, 76px);
	color: var(--primary);
	letter-spacing: 10px;
	margin-bottom: 14px;
	line-height: 1;
}

.page-header__subtitle {
	font-family: var(--ff-base);
	font-size: 14px;
	color: var(--gray);
	font-weight: var(--fw-regular);
	letter-spacing: 0.5px;
	margin: 0;
}

/* =====================================================
   Currency Rate Cards
   ===================================================== */

.rates-section {
	margin-bottom: 80px;
}

.rates-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 10px;
}

.rate-card {
	background: var(--bg-card);
	border-radius: 14px;
	padding: 12px 16px 12px 20px;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 12px;
	box-shadow: var(--shadow-card);
	border: 1px solid var(--bg-card-border);
	position: relative;
	overflow: hidden;
	transition:
		transform 0.2s ease,
		box-shadow 0.2s ease,
		background-color 0.3s ease;
	animation: cardIn 0.4s ease both;
	animation-delay: calc(var(--i, 0) * 60ms);
}

@keyframes cardIn {
	from {
		opacity: 0;
		transform: translateY(18px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.rate-card::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0;
	width: 4px;
	height: 100%;
	background: linear-gradient(180deg, var(--primary) 50%, var(--accent) 50%);
	border-radius: 0 3px 3px 0;
}

.rate-card:hover {
	transform: translateY(-5px);
	box-shadow: var(--shadow-card-hover);
}

/* Card top row — now the full card row */

.rate-card__top {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	min-width: 0;
}

/* Card media */

.rate-card__media {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	flex-shrink: 0;
	overflow: hidden;
	background: var(--bg-media);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: inset 0 0 0 1px var(--bg-card-border);
	transition: background-color 0.3s ease;
}

.rate-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.rate-card__initials {
	font-family: 'main';
	font-size: 16px;
	color: var(--gray);
	text-transform: uppercase;
	line-height: 1;
}

/* Card body */

.rate-card__body {
	flex: 1;
	min-width: 0;
	display: flex;
	gap: 10px;
	align-items: center;
}

.rate-card__code {
	display: block;
	font-family: var(--ff-base);
	font-size: 9px;
	font-weight: var(--fw-bold);
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--text-muted);
}

.rate-card__name {
	font-family: var(--ff-sub);
	font-size: 14px;
	font-weight: var(--fw-bold);
	color: var(--text-heading);
	margin: 0;
	line-height: 1.2;
	text-transform: none;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Card bottom row — now a side panel */

.rate-card__bottom {
	display: flex;
	align-items: center;
	gap: 0;
	flex-shrink: 0;
	padding-left: 12px;
	border-left: 1px solid var(--divider);
}

.rate-card__divider {
	width: 1px;
	height: 24px;
	background: var(--divider);
	margin: 0 10px;
	flex-shrink: 0;
}

/* Card value */

.rate-card__price {
	text-align: center;
	min-width: 52px;
}

.rate-card__label {
	display: block;
	font-family: var(--ff-base);
	font-size: 9px;
	font-weight: var(--fw-bold);
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--text-muted);
	margin-bottom: 0px;
}

.rate-card__number {
	font-family: 'main';
	font-size: 17px;
	line-height: 1;
	letter-spacing: 0.5px;
	font-weight: normal;
}

.rate-card__number--buy {
	color: #1a9c3e;
}

.rate-card__number--sell {
	color: var(--accent);
}

/* =====================================================
   Contacts Section
   ===================================================== */

.contacts-section {
	border-top: 1px solid var(--divider);
	padding-top: 20px;
	transition: border-color 0.3s ease;
}

.contacts-header {
	text-align: center;
	margin-bottom: 44px;
}

.contacts-title {
	font-size: clamp(28px, 4vw, 46px);
	color: var(--primary);
	letter-spacing: 6px;
	margin-bottom: 10px;
	line-height: 1;
}

.contacts-subtitle {
	font-family: var(--ff-base);
	font-size: 14px;
	color: var(--gray);
	font-weight: var(--fw-regular);
	letter-spacing: 0.5px;
	margin: 0;
}

.contacts-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
	max-width: 520px;
	margin: 0 auto;
}

/* Contact card */

.contact-card {
	background: var(--bg-card);
	border-radius: 18px;
	padding: 20px 26px;
	display: flex;
	align-items: center;
	gap: 18px;
	text-decoration: none;
	color: inherit;
	box-shadow: var(--shadow-card);
	border: 1px solid var(--bg-card-border);
	transition:
		transform 0.25s ease,
		box-shadow 0.25s ease,
		background-color 0.3s ease;
	animation: cardIn 0.45s ease both;
}

.contact-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-card-hover);
	color: inherit;
	text-decoration: none;
}

.contact-card__icon {
	width: 54px;
	height: 54px;
	border-radius: 16px;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.contact-card__icon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.contact-card__initial {
	font-family: 'main';
	font-size: 24px;
	color: #ffffff;
	text-transform: uppercase;
	line-height: 1;
}

.contact-card__body {
	flex: 1;
	min-width: 0;
}

.contact-card__name {
	display: block;
	font-family: var(--ff-sub);
	font-size: 17px;
	font-weight: var(--fw-bold);
	color: var(--text-heading);
	margin-bottom: 2px;
	text-transform: none;
}

.contact-card__link {
	display: block;
	font-family: var(--ff-base);
	font-size: 13px;
	color: var(--text-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.contact-card__arrow {
	width: 20px;
	height: 20px;
	color: var(--accent, var(--gray));
	flex-shrink: 0;
	transition: transform 0.2s ease;
}

.contact-card:hover .contact-card__arrow {
	transform: translate(3px, -3px);
}

/* =====================================================
   Theme Toggle
   ===================================================== */

.theme-toggle {
	position: fixed;
	top: 16px;
	right: 16px;
	z-index: 100;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid var(--bg-card-border);
	background: var(--bg-card);
	box-shadow: var(--shadow-card);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background-color 0.3s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover {
	transform: scale(1.1);
	box-shadow: var(--shadow-card-hover);
}

.theme-toggle svg {
	width: 20px;
	height: 20px;
	color: var(--primary);
	transition: color 0.3s ease;
}

/* =====================================================
   Language Switcher
   ===================================================== */

.lang-switcher {
	position: fixed;
	top: 70px;
	right: 16px;
	z-index: 100;
	display: inline-flex;
	flex-direction: column;
	align-items: flex-end;
	direction: ltr;
}

.lang-icon-btn {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid var(--bg-card-border);
	background: var(--bg-card);
	box-shadow: var(--shadow-card);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background-color 0.3s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.lang-icon-btn:hover {
	transform: scale(1.1);
	box-shadow: var(--shadow-card-hover);
}

.lang-icon-btn svg {
	width: 20px;
	height: 20px;
	color: var(--primary);
}

.lang-menu {
	list-style: none;
	margin: 6px 0 0;
	padding: 6px 0;
	border-radius: 12px;
	border: 1px solid var(--bg-card-border);
	background: var(--bg-card);
	box-shadow: var(--shadow-card-hover);
	min-width: 160px;
	animation: langMenuIn 0.15s ease;
}

@keyframes langMenuIn {
	from { opacity: 0; transform: translateY(-6px) scale(0.97); }
	to   { opacity: 1; transform: translateY(0)   scale(1); }
}

.lang-menu__item {
	padding: 9px 16px;
	font-family: var(--ff-base);
	font-size: 13px;
	font-weight: 500;
	color: var(--text-heading);
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
	white-space: nowrap;
}

.lang-menu__item:hover {
	background: var(--bg-media);
	color: var(--primary);
}

.lang-menu__item--active {
	color: var(--primary);
	font-weight: 700;
}

/* =====================================================
   Responsive
   ===================================================== */

@media (max-width: 768px) {
	.page-header {
		padding: 30px 0 44px;
	}

	.rates-grid {
		grid-template-columns: 1fr;
	}

	.rate-card__number {
		font-size: 17px;
	}
}

@media (max-width: 480px) {
	.rate-card {
		padding: 10px 12px 10px 16px;
		gap: 10px;
	}

	.rate-card__media {
		width: 40px;
		height: 30px;
		border-radius: 8px;
	}

	.rate-card__name {
		font-size: 13px;
	}

	.rate-card__number {
		font-size: 15px;
	}

	.contact-card {
		padding: 5px 5px;
	}
}
