/* =========================================================
   Airtrust — Foreign Partners (archive + single)
   Matches the site: dark surfaces, thin borders, blue accent.
   Change the tokens below if your theme colors differ.
   ========================================================= */

.atp {
	--atp-bg: #0b0b0c;
	--atp-surface: #121214;
	--atp-border: #2a2a2e;
	--atp-text: #f2f2f2;
	--atp-muted: #a3a3a8;
	--atp-accent: #1f4b8f;
	--atp-accent-hover: #2a5fb0;
	--atp-radius: 6px;
	--atp-gap: 24px;
	--atp-max: 1440px;

	background: var(--atp-bg);
	color: var(--atp-text);
	direction: rtl;
	text-align: right;
	font-family: inherit;
}

.atp *,
.atp *::before,
.atp *::after { box-sizing: border-box; }

.atp img { max-width: 100%; height: auto; display: block; }
.atp a { color: inherit; text-decoration: none; }

.atp-container {
	width: 100%;
	max-width: var(--atp-max);
	margin-inline: auto;
	padding-inline: 32px;
}

/* ---------- Hero ---------- */
.atp-hero {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 460px;
	overflow: hidden;
	background: var(--atp-surface);
	border-bottom: 1px solid var(--atp-border);
}
.atp-hero--single { min-height: 560px; }
.atp-hero--plain { min-height: 300px; }

.atp-hero__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100% !important;
	object-fit: cover;
}
.atp-hero__overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(to left, rgba(0, 0, 0, .72) 0%, rgba(0, 0, 0, .35) 60%, rgba(0, 0, 0, .15) 100%);
}
.atp-hero--single .atp-hero__overlay { background: rgba(0, 0, 0, .55); }

.atp-hero__inner {
	position: relative;
	z-index: 1;
	padding-block: 64px;
}
.atp-hero__inner--center {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.atp-hero__title {
	margin: 0;
	max-width: 760px;
	font-size: clamp(28px, 4vw, 46px);
	font-weight: 700;
	line-height: 1.5;
	color: #fff;
}
.atp-hero__subtitle {
	margin: 16px 0 0;
	max-width: 620px;
	font-size: clamp(15px, 1.4vw, 18px);
	line-height: 1.9;
	color: rgba(255, 255, 255, .85);
}
.atp-hero__logo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 20px;
	padding: 12px 20px;
	background: rgba(255, 255, 255, .92);
	border-radius: var(--atp-radius);
}
.atp-hero__logo img { max-height: 44px; width: auto; }

/* ---------- Section + heading (same as "پر فروش های ایرتراست") ---------- */
.atp-section { padding-block: 64px 0; }
.atp-section:last-child { padding-bottom: 80px; }

.atp-heading {
	display: flex;
	align-items: center;
	gap: 24px;
	margin-bottom: 32px;
}
.atp-heading__title {
	margin: 0;
	flex-shrink: 0;
	font-size: 18px;
	font-weight: 700;
	color: var(--atp-text);
}
.atp-heading__line {
	flex: 1;
	height: 1px;
	background: var(--atp-border);
}

/* ---------- Archive grid: 3 / 2 / 1 ---------- */
.atp-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--atp-gap);
}

.atp-card {
	display: flex;
	flex-direction: column;
	background: var(--atp-surface);
	border: 1px solid var(--atp-border);
	border-radius: var(--atp-radius);
	overflow: hidden;
	transition: border-color .25s ease, transform .25s ease;
}
.atp-card:hover {
	border-color: #3d3d44;
	transform: translateY(-3px);
}

.atp-card__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: #18181b;
}
.atp-card__img {
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	transition: transform .5s ease;
}
.atp-card:hover .atp-card__img { transform: scale(1.04); }
.atp-card__placeholder { position: absolute; inset: 0; background: #18181b; }

.atp-card__logo {
	position: absolute;
	top: 14px;
	right: 14px;
	display: flex;
	align-items: center;
	padding: 6px 10px;
	background: rgba(255, 255, 255, .92);
	border-radius: 4px;
}
.atp-card__logo img { max-height: 26px; width: auto; }

.atp-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 8px;
	padding: 22px;
}
.atp-card__meta { font-size: 13px; color: var(--atp-muted); }
.atp-card__title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.6;
}
.atp-card__title a:hover { color: #8fb4ec; }
.atp-card__excerpt {
	margin: 0;
	font-size: 14px;
	line-height: 1.9;
	color: var(--atp-muted);
}
.atp-card .atp-btn { margin-top: auto; align-self: stretch; }
.atp-card__body > :nth-last-child(2) { margin-bottom: 12px; }

/* ---------- Buttons (same as "مشاهده محصول") ---------- */
.atp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 42px;
	padding: 8px 22px;
	font-size: 14px;
	font-weight: 500;
	color: #fff !important;
	background: var(--atp-accent);
	border: 1px solid var(--atp-accent);
	border-radius: var(--atp-radius);
	transition: background-color .2s ease, border-color .2s ease;
}
.atp-btn:hover {
	background: var(--atp-accent-hover);
	border-color: var(--atp-accent-hover);
}
.atp-btn--outline {
	background: transparent;
	border-color: #5a5a60;
}
.atp-btn--outline:hover {
	background: rgba(255, 255, 255, .06);
	border-color: #8a8a90;
}

/* ---------- Pagination ---------- */
.atp-pagination {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 48px;
}
.atp-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding-inline: 10px;
	font-size: 14px;
	border: 1px solid var(--atp-border);
	border-radius: var(--atp-radius);
	color: var(--atp-muted);
	transition: all .2s ease;
}
.atp-pagination .page-numbers:hover { color: #fff; border-color: #5a5a60; }
.atp-pagination .page-numbers.current {
	color: #fff;
	background: var(--atp-accent);
	border-color: var(--atp-accent);
}
.atp-empty { color: var(--atp-muted); text-align: center; padding-block: 40px; }

/* ---------- Single: description ---------- */
.atp-content {
	max-width: 860px;
	font-size: 16px;
	line-height: 2.1;
	color: #d6d6da;
}
.atp-content > *:first-child { margin-top: 0; }
.atp-content h2,
.atp-content h3,
.atp-content h4 { color: #fff; line-height: 1.6; margin: 32px 0 12px; }
.atp-content p { margin: 0 0 18px; }
.atp-content ul,
.atp-content ol { padding-right: 22px; padding-left: 0; margin: 0 0 18px; }
.atp-content a { color: #8fb4ec; text-decoration: underline; text-underline-offset: 4px; }
.atp-content img { border-radius: var(--atp-radius); margin-block: 16px; }
.atp-content__cta { margin-top: 28px !important; }
.atp-content__cta a { text-decoration: none; color: #fff; }

/* ---------- Single: gallery ---------- */
.atp-gallery {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 16px;
}
.atp-gallery__item {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	border: 1px solid var(--atp-border);
	border-radius: var(--atp-radius);
	background: var(--atp-surface);
	cursor: zoom-in;
}
.atp-gallery__item img {
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	transition: transform .5s ease, opacity .3s ease;
}
.atp-gallery__item:hover img { transform: scale(1.05); opacity: .9; }

/* ---------- Single: video (iframe) ---------- */
.atp-video {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border: 1px solid var(--atp-border);
	border-radius: var(--atp-radius);
	background: #000;
}
.atp-video > *,
.atp-video iframe,
.atp-video span,
.atp-video div {
	position: absolute !important;
	inset: 0 !important;
	width: 100% !important;
	height: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
}
.atp-video iframe { border: 0; }

.atp-section--back .atp-container { display: flex; justify-content: center; }

/* ---------- Lightbox ---------- */
.atp-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 56px 72px;
	background: rgba(0, 0, 0, .92);
}
.atp-lightbox[hidden] { display: none; }
.atp-lightbox__img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 4px;
}
.atp-lightbox button {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	font-size: 28px;
	line-height: 1;
	color: #fff;
	background: rgba(255, 255, 255, .08);
	border: 1px solid rgba(255, 255, 255, .2);
	border-radius: 50%;
	cursor: pointer;
	transition: background-color .2s ease;
}
.atp-lightbox button:hover { background: rgba(255, 255, 255, .18); }
.atp-lightbox__close { top: 16px; left: 16px; }
.atp-lightbox__nav--prev { right: 16px; top: 50%; transform: translateY(-50%); }
.atp-lightbox__nav--next { left: 16px; top: 50%; transform: translateY(-50%); }
body.atp-no-scroll { overflow: hidden; }

/* ---------- Hero slider (archive page) ---------- */
.atp-slider {
	display: block;
	min-height: 0;
	padding: 0;
}
.atp-slider__track {
	position: relative;
	display: grid;
	min-height: 520px;
}
.atp-slide {
	grid-area: 1 / 1;
	position: relative;
	display: flex;
	align-items: center;
	opacity: 0;
	visibility: hidden;
	transition: opacity .8s ease, visibility 0s linear .8s;
}
.atp-slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 1;
	transition: opacity .8s ease, visibility 0s;
}
.atp-slide .atp-hero__bg { transform: scale(1.04); transition: transform 7s ease-out; }
.atp-slide.is-active .atp-hero__bg { transform: scale(1); }
.atp-slide:not(:has(.atp-hero__bg)) { background: var(--atp-surface); }

.atp-slide .atp-hero__inner > * {
	opacity: 0;
	transform: translateY(14px);
	transition: opacity .6s ease, transform .6s ease;
}
.atp-slide.is-active .atp-hero__inner > * { opacity: 1; transform: none; }
.atp-slide.is-active .atp-hero__inner > *:nth-child(2) { transition-delay: .12s; }
.atp-slide.is-active .atp-hero__inner > *:nth-child(3) { transition-delay: .24s; }
.atp-hero__btn { margin-top: 28px; }

/* Dots — same as the home slider */
.atp-slider__dots {
	position: absolute;
	bottom: 24px;
	left: 50%;
	z-index: 3;
	display: flex;
	gap: 10px;
	transform: translateX(-50%);
}
.atp-slider__dot {
	width: 10px;
	height: 10px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, .45);
	cursor: pointer;
	transition: width .3s ease, background-color .3s ease;
}
.atp-slider__dot.is-active { width: 26px; background: #fff; }

/* Arrows — small round buttons on the right edge */
.atp-slider__arrows {
	position: absolute;
  bottom: 0;
  right: 24px;
  z-index: 3;
  display: flex;
  flex-direction: row;
  gap: 10px;
  transform: translateY(-50%);
}
.atp-slider__arrow {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	color: #111;
	background: rgba(255, 255, 255, .88);
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color .2s ease;
}
.atp-slider__arrow:hover { background: #fff; }
.atp-slider.is-multi .atp-hero__inner { padding-right: 88px; }

@media (max-width: 1024px) {
	.atp-slider__track { min-height: 420px; }
}
@media (max-width: 767px) {
	.atp-slider__track { min-height: 380px; }
	.atp-slider.is-multi .atp-hero__inner { padding-right: 16px; padding-bottom: 64px; }
	.atp-slider__arrows {
		top: auto;
		right: 16px;
		bottom: 14px;
		flex-direction: row;
		transform: none;
	}
	.atp-slider__arrow { width: 34px; height: 34px; }
	.atp-slider__dots { bottom: 26px; left: 16px; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
	.atp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.atp-hero { min-height: 380px; }
	.atp-hero--single { min-height: 440px; }
}

@media (max-width: 767px) {
	.atp-container { padding-inline: 16px; }
	.atp-grid { grid-template-columns: 1fr; gap: 16px; }
	.atp-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
	.atp-hero { min-height: 300px; }
	.atp-hero--single { min-height: 340px; }
	.atp-hero__inner { padding-block: 40px; }
	.atp-hero__overlay { background: rgba(0, 0, 0, .58); }
	.atp-section { padding-top: 44px; }
	.atp-section:last-child { padding-bottom: 56px; }
	.atp-heading { gap: 16px; margin-bottom: 22px; }
	.atp-heading__title { font-size: 16px; }
	.atp-card__body { padding: 18px; }
	.atp-content { font-size: 15px; line-height: 2; }
	.atp-lightbox { padding: 64px 12px; }
	.atp-lightbox__nav { top: auto !important; bottom: 12px; transform: none !important; }
}

@media (prefers-reduced-motion: reduce) {
	.atp * { transition: none !important; }
}
