/* ============================================================
   Footer Styles - Responsive RTL Persian Layout
   ============================================================ */

.footer {
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	color: #ffffff;
	font-family: 'IRANYekanXFaNum', sans-serif;
	letter-spacing: 0;
	direction: rtl;
	text-align: right;
	background-color: #000c27;
	padding: 48px 40px 50px;
	box-sizing: border-box;
	overflow-x: hidden;
}

/* ------------------------------------------------------------
   Brand Header (Logo, Vertical Bar, Description)
   ------------------------------------------------------------ */
.footer-brand {
	width: 100%;
	max-width: 1340px;
	display: flex;
	align-items: center;
	gap: 16px;
	box-sizing: border-box;
}

.footer-logo {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-shrink: 0;
}

.footer-logo-link {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none;
	color: inherit;
}

.footer-logo .custom-logo-link {
	display: flex;
	align-items: center;
	text-decoration: none;
}

.footer-logo .custom-logo-link img {
	max-height: 58px;
	width: auto;
	height: auto;
}

.footer-subtitle {
	font-size: 32px;
	font-weight: 600;
	line-height: 1.2;
	color: #ffffff;
	white-space: nowrap;
	margin: 0;
}

.footer-subtitle .sub-text {
	color: #ffd305;
}

.footer-frame-right {
	--logo-h: 36px;
	--logo-w: calc(var(--logo-h) * 185 / 116);
	--mask-w: calc(var(--logo-h) * 413 / 116);
	--mask-left: calc(var(--logo-w) - var(--mask-w));
	position: relative;
	width: var(--logo-w);
	height: var(--logo-h);
	flex-shrink: 0;
	background: url(../images/footer/footer-frame.png) center / cover no-repeat;
	overflow: hidden;
}

.footer-mask-group {
	position: absolute;
	top: 0;
	left: var(--mask-left);
	width: var(--mask-w);
	height: 100%;
	max-width: none;
	pointer-events: none;
}

.footer-line1 {
	width: 5px;
	height: 44px;
	flex-shrink: 0;
	background-color: #ffd305;
	border-radius: 10px;
}

.footer-text-left {
	flex: 1;
	font-size: 18px;
	font-weight: 300;
	line-height: 1.7;
	text-align: justify;
	text-align-last: right;
	color: #ffffff;
	margin: 0;
}

.footer-line2 {
	width: 100%;
	max-width: 1340px;
	height: 1px;
	background-color: #ffd305;
	border: none;
	margin: 28px 0 36px 0;
	opacity: 0.85;
}

/* ------------------------------------------------------------
   Navigation Columns
   ------------------------------------------------------------ */
.footer-nav {
	position: relative;
	width: 100%;
	max-width: 1340px;
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 20px;
	padding-bottom: 30px;
	box-sizing: border-box;
}

.footer-news-links,
.footer-quick-links,
.footer-featured,
.footer-tools-links,
.footer-financial {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	min-width: 0;
}

.footer-frame-top,
.footer-frame-top1,
.footer-frame-top2,
.footer-frame-top3,
.footer-frame-top4,
.footer-frame-top5 {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 22px;
	font-weight: 600;
	line-height: 1.3;
	color: #ffffff;
	white-space: nowrap;
}

.footer-frame-top h2,
.footer-frame-top1 h2,
.footer-frame-top2 h2,
.footer-frame-top3 h2,
.footer-frame-top4 h2,
.footer-frame-top5 h2 {
	font-size: 20px;
	font-weight: 600;
	margin: 0;
	color: #ffffff;
}

.footer-frame {
	position: static;
	width: 16px;
	height: 16px;
	background-color: #ffd305;
	rotate: 45deg;
	transform: rotate(45deg);
	border-radius: 5px;
	box-shadow: inset 0px 3px 3px 0px rgba(0, 0, 0, 0.25);
	flex-shrink: 0;
}

.footer-menu-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.column-a,
.column-b {
	display: flex;
	flex-direction: column;
	gap: 14px;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.4;
	color: #ffffff;
	width: auto;
	margin: 0;
	padding: 0;
}

.column-a li,
.column-b li {
	list-style: none;
	margin: 0;
	padding: 0;
}

.text-symbol,
.column-text-symbol-a,
.footer-menu-list a {
	margin: 0;
	white-space: nowrap;
	color: #ffffff;
	transition: color 0.2s ease;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
}

.text-symbol:hover,
.text-symbol:focus,
.column-text-symbol-a:hover,
.column-text-symbol-a:focus,
.footer-menu-list a:hover,
.footer-menu-list a:focus {
	color: #ffd305;
}

/* First item highlighted in yellow */
.column-text1,
.column-text-symbol6,
.footer-menu-list li:first-child a {
	color: #ffd305;
}

/* ------------------------------------------------------------
   Show More Button & Bottom Gradient Overlay
   ------------------------------------------------------------ */
.footer-show-more {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 170px;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	background: linear-gradient(0deg, #000c27 38%, rgba(0, 12, 39, 0.85) 68%, rgba(0, 12, 39, 0) 100%);
	pointer-events: none;
	padding-bottom: 20px;
	box-sizing: border-box;
	transition: all 0.3s ease;
}

.btn-footer-show-more {
	pointer-events: auto;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: row-reverse;
	gap: 8px;
	background-color: rgba(255, 211, 5, 0.08);
	border: 1.2px solid #ffd305;
	border-radius: 12px;
	padding: 10px 24px;
	color: #ffd305;
	font-size: 15px;
	font-family: inherit;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
}

.btn-footer-show-more:hover {
	background-color: rgba(255, 211, 5, 0.2);
}

.btn-footer-show-more-icon-arrow-left {
	width: 16px;
	height: 16px;
	rotate: -90deg;
	transform: rotate(-90deg);
	flex-shrink: 0;
	pointer-events: none;
	transition: transform 0.2s ease, rotate 0.2s ease;
}

.btn-footer-show-more-label {
	margin: 0;
	color: #ffd305;
	font-size: 15px;
	line-height: 1;
}

/* Expanded state: remove gradient overlay and allow collapse */
.footer-nav.is-expanded .footer-show-more {
	position: static;
	height: auto;
	background: none;
	padding-top: 16px;
	padding-bottom: 0;
	grid-column: 1 / -1;
}

.footer-nav.is-expanded .btn-footer-show-more-icon-arrow-left {
	rotate: 90deg;
	transform: rotate(90deg);
}

/* No-JS fallback: hide overlay completely so all links are directly visible */
html:not(.js) .footer-show-more {
	display: none;
}

/* ------------------------------------------------------------
   Legal Bar (Copyright & Bottom Links)
   ------------------------------------------------------------ */
.footer-legal-bar {
	width: 100%;
	max-width: 1340px;
	display: flex;
	flex-direction: row-reverse;
	align-items: center;
	justify-content: space-between;
	background-color: #ffd305;
	color: #000c27;
	padding: 14px 36px;
	border-radius: 30px;
	margin-top: 16px;
	box-sizing: border-box;
}

.footer-links {
	display: flex;
	align-items: center;
	gap: 40px;
}

.footer-links a,
.footer-text-symbol {
	margin: 0;
	font-size: 15.5px;
	font-weight: 500;
	color: #000c27;
	cursor: pointer;
	white-space: nowrap;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.footer-links a:hover,
.footer-links a:focus,
.footer-text-symbol:hover,
.footer-text-symbol:focus {
	opacity: 0.75;
}

.footer-text-symbol1 {
	margin: 0;
	font-size: 15px;
	font-weight: 500;
	color: #000c27;
	text-align: left;
}

/* ------------------------------------------------------------
   Accessibility: Focus Outlines
   ------------------------------------------------------------ */
.footer a:focus-visible,
.footer button:focus-visible {
	outline: 2px solid #ffd305;
	outline-offset: 2px;
}

.footer-legal-bar a:focus-visible {
	outline: 2px solid #000c27;
	outline-offset: 2px;
}

/* ------------------------------------------------------------
   Responsive Breakpoints
   ------------------------------------------------------------ */

/* Tablet & Intermediate Screens (769px to 1100px) */
@media screen and (max-width: 1100px) {
	.footer {
		padding: 48px 24px 40px;
	}

	.footer-subtitle {
		font-size: 26px;
	}

	.footer-frame-right {
		--logo-h: 36px;
	}

	.footer-text-left {
		font-size: 14px;
	}

	.footer-frame-top h2,
	.footer-frame-top1 h2,
	.footer-frame-top2 h2,
	.footer-frame-top3 h2,
	.footer-frame-top4 h2,
	.footer-frame-top5 h2 {
		font-size: 18px;
	}

	.footer-frame {
		width: 15px;
		height: 15px;
	}

	.column-a,
	.column-b {
		font-size: 14px;
		gap: 12px;
	}

	.footer-legal-bar {
		padding: 12px 24px;
		font-size: 14px;
	}

	.footer-links a,
	.footer-text-symbol,
	.footer-text-symbol1 {
		font-size: 14px;
	}
}

/* Small Tablets / Large Phones (769px to 900px) */
@media screen and (max-width: 900px) {
	.footer-legal-bar {
		flex-direction: column;
		gap: 12px;
		text-align: center;
	}

	.footer-text-symbol1 {
		text-align: center;
	}
}

/* Mobile Screens (< 768px) */
@media screen and (max-width: 768px) {
	.footer {
		display: none; /* Hide footer on small screens */
		padding: 36px 14px 28px;
		gap: 16px;
	}

	/* Brand Header: Logo centered on top, paragraph below */
	.footer-brand {
		flex-direction: column;
		align-items: center;
		gap: 12px;
	}

	.footer-logo {
		justify-content: center;
		gap: 10px;
	}

	.footer-subtitle {
		font-size: 24px;
	}

	.footer-frame-right {
		--logo-h: 32px;
	}

	.footer-line1 {
		display: none;
	}

	.footer-text-left {
		font-size: 13.5px;
		line-height: 1.8;
		text-align: justify;
		text-align-last: right;
		padding: 0 4px;
	}

	.footer-line2 {
		display: none;
	}

	/* Navigation Columns: 12-column Grid (3 in Row 1, 2 in Row 2) */
	.footer-nav {
		display: grid;
		grid-template-columns: repeat(12, 1fr);
		column-gap: 8px;
		row-gap: 28px;
		padding-bottom: 24px;
	}

	/* Row 1: 3 columns (3 + 5 + 4 = 12) */
	.footer-news-links {
		order: 1;
		grid-column: span 3;
	}

	.footer-quick-links {
		order: 2;
		grid-column: span 5;
	}

	.footer-tools-links {
		order: 3;
		grid-column: span 4;
	}

	/* Row 2: 2 columns (6 + 6 = 12) */
	.footer-financial {
		order: 4;
		grid-column: span 6;
	}

	.footer-featured {
		order: 5;
		grid-column: span 6;
	}

	.footer-show-more {
		order: 6;
		grid-column: 1 / -1;
		height: 180px;
		padding-bottom: 22px;
		background: linear-gradient(0deg, #000c27 40%, rgba(0, 12, 39, 0.85) 70%, rgba(0, 12, 39, 0) 100%);
	}

	.footer-frame-top,
	.footer-frame-top1,
	.footer-frame-top2,
	.footer-frame-top3,
	.footer-frame-top4,
	.footer-frame-top5 {
		gap: 6px;
	}

	.footer-frame-top h2,
	.footer-frame-top1 h2,
	.footer-frame-top2 h2,
	.footer-frame-top3 h2,
	.footer-frame-top4 h2,
	.footer-frame-top5 h2 {
		font-size: 16px;
	}

	.footer-frame {
		width: 13px;
		height: 13px;
		border-radius: 4px;
	}

	.column-a,
	.column-b {
		gap: 12px;
		font-size: 13px;
	}

	.btn-footer-show-more {
		padding: 8px 20px;
		font-size: 13.5px;
	}

	.btn-footer-show-more-label {
		font-size: 13.5px;
	}

	/* Legal Bar: Links on top row, copyright on bottom row */
	.footer-legal-bar {
		flex-direction: column;
		align-items: center;
		gap: 10px;
		padding: 14px 16px;
		border-radius: 28px;
		margin-top: 14px;
	}

	.footer-links {
		justify-content: center;
		gap: 20px;
	}

	.footer-links a,
	.footer-text-symbol {
		font-size: 13.5px;
		font-weight: 500;
	}

	.footer-text-symbol1 {
		font-size: 11px;
		line-height: 1.7;
		text-align: center;
	}
}

/* Very Small Mobile (< 360px) */
@media screen and (max-width: 360px) {
	.footer {
		padding: 30px 10px 24px;
	}

	.footer-nav {
		column-gap: 4px;
	}

	.footer-frame-top h2,
	.footer-frame-top1 h2,
	.footer-frame-top2 h2,
	.footer-frame-top3 h2,
	.footer-frame-top4 h2,
	.footer-frame-top5 h2 {
		font-size: 14.5px;
	}

	.footer-frame {
		width: 11px;
		height: 11px;
	}

	.column-a,
	.column-b {
		font-size: 12px;
		gap: 10px;
	}

	.footer-links {
		gap: 14px;
	}

	.footer-links a,
	.footer-text-symbol {
		font-size: 12px;
	}

	.footer-text-symbol1 {
		font-size: 10.5px;
	}
}
