/*
 * plans-3 (template/plans/plans-3.php): every plan a row under one row of
 * column names, the navy box of the features beside them; on a phone every
 * plan is a card. The owner picked this design («پلن‌ها ۵») on 2026-11-05.
 * base.css comes first. Sizes are in rem, so they follow the root size the
 * theme gives each breakpoint: the design's pixels at 1440 are divided by its
 * 14px there, those of the phone cards by the 12px of a 390 screen. The
 * period switch is the theme's (.month-select, site.js), which shows the
 * .m-switch of the period chosen.
 */

.hd-p3 {
	padding: 5.71rem 0 6rem;
}

.hd-p3 .m-switch:not(.active) {
	display: none;
}

/* The title as the other new sections write theirs (the theme's header of
   plans, template/plans/parts/header.php). */
.hd-p3 .step-title h2 {
	font-size: 2.14rem;
	font-weight: 900;
}

.hd-p3-body {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 20.57rem;
	gap: 1.71rem;
	align-items: stretch;
}

.hd-p3-body.is-solo {
	grid-template-columns: minmax(0, 1fr);
}

.hd-p3-main {
	min-width: 0;
}

/* The columns: the name, one for each line of the plans (--hd-p3-n), the
   price and the button. */
.hd-p3-cols,
.hd-p3-row {
	display: grid;
	grid-template-columns: 9.71rem repeat(var(--hd-p3-n, 4), minmax(0, 1fr)) 10.71rem 8.43rem;
	column-gap: .71rem;
}

.hd-p3-cols {
	align-items: end;
	padding: 0 1.64rem .86rem;
}

.hd-p3-col {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: .43rem;
	font-size: .89rem;
	font-weight: 700;
	line-height: 1.45;
	color: #4A6D8C;
	white-space: nowrap;
}

.hd-p3-col svg {
	width: 1.36rem;
	height: 1.36rem;
	color: #5E8AB4;
}

.hd-p3-list {
	display: flex;
	flex-direction: column;
	gap: .57rem;
}

.hd-p3-row {
	align-items: center;
	min-height: 5rem;
	padding: 0 1.57rem;
	background: #fff;
	border: 1px solid #DCE8F3;
	border-radius: 1.14rem;
	box-shadow: 0 1.29rem 2.29rem -2.14rem rgba(16, 63, 99, .55);
}

/* Nothing rises on hover: the edge alone darkens. */
.hd-p3-row:hover {
	border-color: #B7D1EC;
}

.hd-p3-name {
	font-size: 1.14rem;
	font-weight: 800;
	line-height: 1.4;
	color: var(--hd-navy);
	white-space: nowrap;
}

.hd-p3-specs {
	display: contents;
}

.hd-p3-spec {
	min-width: 0;
}

/* Each value names its column for screen readers; the row of names above
   the plans is hidden from them. */
.hd-p3-spec dt {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

.hd-p3-spec dd {
	margin: 0;
	font-size: 1.11rem;
	font-weight: 800;
	line-height: 1.4;
	color: var(--hd-navy);
	white-space: nowrap;
}

.hd-p3-spec small,
.hd-p3-pv small {
	font-size: .86rem;
	font-weight: 700;
	color: #4A6D8C;
}

.hd-p3-plbl {
	display: none;
}

.hd-p3-pv {
	display: flex;
	align-items: baseline;
	gap: .36rem;
	white-space: nowrap;
}

.hd-p3-amt {
	font-size: 1.36rem;
	font-weight: 900;
	color: var(--hd-navy);
}

/* The order button: the theme's blue one (.button, main.css), smaller; a sold
   out plan shows the theme's grey «ناموجود» without the arrow. */
.hd-p3 .button.hd-p3-btn {
	justify-self: end;
	height: auto;
	min-height: 2.71rem;
	padding: 0 .93rem 0 .79rem;
	gap: .43rem;
	font-size: .96rem;
	font-weight: 800;
	box-shadow: 0 .57rem 1.29rem -.86rem rgba(2, 71, 174, .7);
}

.hd-p3 .hd-p3-btn.hd-go::after {
	width: 1.07rem;
	height: 1.07rem;
}

.hd-p3 .hd-p3-btn.button-disabled::after {
	display: none;
}

/* «نمایش پلن‌های بیشتر»: white, its ripple yellow. */
.hd-p3 .hd-more {
	display: flex;
	justify-content: center;
	padding-top: 1.71rem;
}

.hd-p3 .button.hd-p3-more {
	height: auto;
	min-height: 3.71rem;
	padding: 0 1.86rem 0 1.71rem;
	gap: .57rem;
	font-size: 1.07rem;
	font-weight: 800;
	color: var(--hd-blue);
	box-shadow: inset 0 0 0 1px #C7DBEE;
}

.hd-p3 .hd-p3-more .ripple {
	background: var(--hd-yellow);
}

.hd-p3 .hd-p3-more svg {
	width: 1.43rem;
	height: 1.43rem;
	padding: 0;
}

/* The box of the features: navy, yellow checks, two racks at its foot. */
.hd-p3-box {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 2.14rem 1.86rem 0;
	border-radius: 1.57rem;
	background: var(--hd-navy);
	color: #fff;
	overflow: hidden;
}

.hd-p3-bt {
	margin: 0 0 .57rem;
	font-size: 1.36rem;
	font-weight: 900;
	line-height: 1.5;
}

.hd-p3-feats li {
	display: flex;
	align-items: center;
	gap: .86rem;
	padding: .86rem 0;
	border-top: 1px solid rgba(255, 255, 255, .12);
	font-size: 1.04rem;
	font-weight: 700;
	line-height: 1.6;
	color: #EAF2FB;
}

.hd-p3-feats li:first-child {
	border-top: 0;
}

.hd-p3-ck {
	flex: none;
	display: grid;
	place-items: center;
	width: 1.71rem;
	height: 1.71rem;
	border-radius: 50%;
	background: var(--hd-yellow);
	color: var(--hd-navy);
}

.hd-p3-ck svg {
	width: 1.07rem;
	height: 1.07rem;
}

.hd-p3 .hd-p3-racks {
	align-self: flex-end;
	width: 100%;
	max-width: 21.43rem;
	height: auto;
	margin-block: auto 0;
	margin-inline-end: -.71rem;
	padding-top: 1.29rem;
}

@media (max-width: 1199.98px) {
	.hd-p3-body {
		grid-template-columns: minmax(0, 1fr);
	}

	.hd-p3-box {
		padding: 1.86rem;
	}

	.hd-p3-feats {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
		column-gap: 1.57rem;
	}

	.hd-p3-feats li:first-child {
		border-top: 1px solid rgba(255, 255, 255, .12);
	}

	.hd-p3 .hd-p3-racks {
		display: none;
	}
}

/* Tablets and phones: a card for each plan, the price beside its button. */
@media (max-width: 991.98px) {
	.hd-p3 {
		padding: 4rem 0 4.5rem;
	}

	.hd-p3 .step-title h2 {
		font-size: 1.75rem;
	}

	.hd-p3-cols {
		display: none;
	}

	.hd-p3-list {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.17rem;
	}

	.hd-p3-row {
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-areas: "name name" "specs specs" "price btn";
		row-gap: 1rem;
		column-gap: .83rem;
		padding: 1.25rem 1.17rem 1.17rem;
		border-radius: 1.67rem;
		box-shadow: 0 2rem 3.33rem -3rem rgba(16, 63, 99, .55);
	}

	.hd-p3-name {
		grid-area: name;
		font-size: 1.375rem;
	}

	.hd-p3-specs {
		grid-area: specs;
		display: grid;
		grid-template-columns: repeat(var(--hd-p3-n, 4), minmax(0, 1fr));
		gap: .5rem;
	}

	.hd-p3-spec {
		padding: .67rem .25rem .75rem;
		border-radius: 1rem;
		background: #F4F8FD;
		text-align: center;
	}

	.hd-p3-spec dt {
		position: static;
		width: auto;
		height: auto;
		overflow: visible;
		clip-path: none;
		margin: 0 0 .17rem;
		font-size: .92rem;
		font-weight: 700;
		line-height: 1.5;
		color: #4A6D8C;
		white-space: normal;
	}

	/* A long value («۱۰۵ گیگابایت NVMe») wraps in its tile rather than run
	   out of it. */
	.hd-p3-spec dd {
		font-size: 1.04rem;
		white-space: normal;
	}

	.hd-p3-spec small {
		font-size: .8rem;
	}

	.hd-p3-price {
		grid-area: price;
		display: flex;
		flex-direction: column;
		align-items: flex-start;
	}

	.hd-p3-plbl {
		display: block;
		font-size: .96rem;
		font-weight: 700;
		line-height: 1.5;
		color: #4A6D8C;
	}

	.hd-p3-amt {
		font-size: 1.5rem;
	}

	.hd-p3 .button.hd-p3-btn {
		grid-area: btn;
		min-height: 3.67rem;
		padding: 0 1.33rem 0 1.17rem;
		font-size: 1.17rem;
	}

	.hd-p3-feats {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 767.98px) {
	.hd-p3-list {
		grid-template-columns: minmax(0, 1fr);
		gap: 1rem;
	}
}

@media (max-width: 575.98px) {
	.hd-p3 .button.hd-p3-more {
		width: 100%;
	}

	.hd-p3-box {
		padding: 1.83rem 1.5rem 1.5rem;
	}

	.hd-p3-bt {
		font-size: 1.42rem;
		text-align: center;
	}

	.hd-p3-feats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 1rem;
	}

	.hd-p3-feats li {
		gap: .67rem;
		font-size: 1.08rem;
	}

	.hd-p3-ck {
		width: 1.83rem;
		height: 1.83rem;
	}
}

/* High contrast draws no backgrounds: the rows and the box keep an edge. */
@media (forced-colors: active) {
	.hd-p3-row,
	.hd-p3-box {
		border: 1px solid CanvasText;
	}
}
