/*
 * Rules shared by the components of the categories text, cta, infra, free,
 * config and iran, by plans-7 to plans-13, the list of subpages and the header of the
 * home page with the map (core/components/ui.php). Printed with the
 * stylesheet of their category on the pages that use one of them
 * (hidata_component_stylesheets()). Sizes are in rem, so they follow the root
 * size MojoCSS gives each breakpoint, as the rest of the theme does.
 */

.hd-sec {
	--hd-navy: #103F63;
	--hd-ink: #124871;
	--hd-text: #447394;
	--hd-soft: #6E97B7;
	--hd-blue: #0247AE;
	--hd-yellow: #FFCC00;
	--hd-green: #239E40;
	--hd-dark: #133550;
	--hd-line: #DEE7EE;
	--hd-card: #FBFDFF;
	--hd-r: 2.15rem;
	--hd-shadow: inset 5rem 5rem 10rem -9rem #D9EBF9, 5rem 4rem 6.5rem -2.5rem rgba(182, 190, 208, .22);
	position: relative;
	padding: 4.5rem 0;
	color: var(--hd-navy);
}

/* Resets without weight (:where), so the rules of the components win. */
:where(.hd-sec) :where(h2, h3, h4, p, ul, ol, figure, blockquote) {
	margin: 0;
}

:where(.hd-sec) :where(ul, ol) {
	padding: 0;
	list-style: none;
}

.hd-sec [hidden] {
	display: none !important;
}

:where(.hd-sec) img {
	display: block;
	max-width: 100%;
	height: auto;
}

.hd-sec :focus-visible {
	outline: 2px solid var(--hd-blue);
	outline-offset: 2px;
}

/* A section that is off screen (assets/js/components.js) pauses its
   animations. */
[data-hd].is-off,
[data-hd].is-off *,
[data-hd].is-off ::before,
[data-hd].is-off ::after {
	animation-play-state: paused !important;
}

/* The text under the title of a section. */
.hd-lead {
	max-width: 52rem;
	margin: -1rem 0 2.75rem;
	font-size: 1.05rem;
	line-height: 2.1;
	font-weight: 500;
	color: var(--hd-text);
}

/* A card on the light background: matte, with a white edge and the soft
   shadow of the theme's boxes. */
.hd-card {
	position: relative;
	background: var(--hd-card);
	border: 1px solid #fff;
	border-radius: var(--hd-r);
	box-shadow: var(--hd-shadow);
}

/* The dashed frame behind the corner of a card (.hd-card.hd-dash). */
.hd-dash::before {
	content: "";
	position: absolute;
	inset: -1.25rem -1px 1.25rem 1.25rem;
	border: 1px dashed rgba(128, 166, 195, .32);
	border-radius: inherit;
	-webkit-mask-image: linear-gradient(to bottom right, #000, transparent 80%);
	mask-image: linear-gradient(to bottom right, #000, transparent 80%);
	pointer-events: none;
}

[dir=ltr] .hd-dash::before {
	inset: -1.25rem 1.25rem 1.25rem -1px;
	-webkit-mask-image: linear-gradient(to bottom left, #000, transparent 80%);
	mask-image: linear-gradient(to bottom left, #000, transparent 80%);
}

/* A navy box with the rings of the theme's dark blocks. */
.hd-dark {
	position: relative;
	overflow: hidden;
	background: var(--hd-dark) radial-gradient(circle at 0 100%, transparent 6rem, rgba(158, 191, 215, .09) 6rem 6.07rem, transparent 6.07rem 9.4rem, rgba(158, 191, 215, .12) 9.4rem 9.47rem, transparent 9.47rem 12.6rem, rgba(158, 191, 215, .14) 12.6rem 12.67rem, transparent 12.67rem);
	color: #fff;
	border-radius: var(--hd-r);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 2.5rem 4.3rem -2.9rem rgba(19, 53, 80, .65);
}

.hd-dark :focus-visible {
	outline-color: var(--hd-yellow);
}

/* The round icon of a card: navy with a yellow icon, or yellow (.is-y). */
.hd-ic {
	--s: 3.4rem;
	width: var(--s);
	height: var(--s);
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: var(--hd-dark);
	color: var(--hd-yellow);
}

.hd-ic.is-y {
	background: var(--hd-yellow);
	color: var(--hd-dark);
}

.hd-ic svg {
	width: 46%;
	height: 46%;
	display: block;
}

/* The small square tile of an icon. */
.hd-ic.is-sq {
	--s: 2.4rem;
	border-radius: .8rem;
	background: #EDF6FD;
	color: var(--hd-ink);
	box-shadow: inset 0 0 0 1px #DCE9F4;
}

.hd-h3 {
	font-size: 1.2rem;
	line-height: 1.7;
	font-weight: 700;
	color: var(--hd-ink);
}

.hd-p {
	margin-top: .5rem;
	font-size: .98rem;
	line-height: 2.05;
	font-weight: 500;
	color: var(--hd-text);
}

.hd-rich p + p,
.hd-rich p + ul,
.hd-rich ul + p {
	margin-top: .8rem;
}

.hd-p.hd-rich {
	text-align: justify;
}

.hd-p a,
.hd-lead a {
	color: #0163A9;
	font-weight: 700;
}

.hd-kicker {
	font-size: .95rem;
	font-weight: 600;
	color: var(--hd-text);
}

/* A label with its icon over a title, and that title (.hd-title2). */
.hd-kick {
	display: flex;
	align-items: center;
	gap: .85rem;
	font-size: 1.05rem;
	font-weight: 600;
	color: var(--hd-text);
}

.hd-kick .hd-ic {
	--s: 3.3rem;
}

.hd-dark .hd-kick {
	color: #9EBFD7;
}

.hd-title2 {
	margin-top: 1.4rem;
	font-size: 2rem;
	line-height: 1.6;
	font-weight: 700;
	color: var(--hd-navy);
	text-wrap: balance;
}

.hd-dark .hd-title2 {
	color: #fff;
}

/* The phrase of a title set apart, on a yellow line (hidata_ui_highlight()). */
.hd-hl {
	font-style: normal;
	color: var(--hd-blue);
	padding-bottom: .1em;
	background: linear-gradient(var(--hd-yellow), var(--hd-yellow)) bottom / 100% .2em no-repeat;
	-webkit-box-decoration-break: clone;
	box-decoration-break: clone;
}

.hd-chips {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}

.hd-chip {
	display: inline-flex;
	align-items: center;
	gap: .4rem;
	padding: .3rem .85rem;
	border-radius: 999px;
	background: #EDF6FD;
	color: #1C5B8A;
	font-size: .8rem;
	font-weight: 700;
	line-height: 1.6;
	white-space: nowrap;
}

/* The flag of Iran before a label: the site's 7:4 flag with the red emblem
   and the 22 takbir (assets/img/flag-ir-rect.svg). Until 2026-11-12 it was
   three bare stripes of CSS at 1.45:1, which the owner found wrong. */
.hd-flag-ir {
	display: inline-flex;
	align-items: center;
	gap: .55rem;
}

.hd-flag-ir::before {
	content: "";
	width: 1.75rem;
	height: 1rem;
	flex: none;
	border-radius: 2px;
	background: #fff url(../../img/flag-ir-rect.svg) center / 100% 100% no-repeat;
	box-shadow: 0 0 0 1px rgba(19, 53, 80, .12);
}

/* The blue label of the suggested plan or item. */
.hd-badge {
	display: inline-flex;
	align-items: center;
	padding: .2rem .9rem;
	border-radius: 999px;
	background: var(--hd-blue);
	color: #fff;
	font-size: .8rem;
	font-weight: 800;
	line-height: 1.8;
	white-space: nowrap;
	box-shadow: 0 .4rem 1rem -.4rem rgba(2, 71, 174, .55);
}

/* A list with the theme's green check before each item. */
.hd-checks li {
	position: relative;
	padding-inline-start: 1.9rem;
	line-height: 1.9;
}

.hd-checks li::before {
	content: "";
	position: absolute;
	inset-inline-start: 0;
	top: .2rem;
	width: 1.25rem;
	height: 1.25rem;
	background: var(--hd-green);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='m8 12.3 2.7 2.7L16 9.6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='m8 12.3 2.7 2.7L16 9.6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* On a navy box, yellow checks between dashed lines. */
.hd-checks.is-dark li {
	padding-block: .7rem;
	border-bottom: 1px dashed rgba(255, 255, 255, .12);
	font-size: 1rem;
	font-weight: 700;
}

.hd-checks.is-dark li::before {
	top: .85rem;
	background: var(--hd-yellow);
}

/* An item that is not included: a dash in a grey circle. */
.hd-checks li.hd-x {
	color: var(--hd-text);
	font-weight: 500;
}

.hd-checks li.hd-x::before {
	background: #A9C2D6;
	-webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M8.5 12h7'/%3E%3C/svg%3E");
	mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M8.5 12h7'/%3E%3C/svg%3E");
}

.hd-actions {
	display: flex;
	flex-wrap: wrap;
	gap: .85rem;
	margin-top: 2rem;
}

/* The arrow after the text of a button, pointing the way the text reads. */
.hd-go::after {
	content: "";
	width: 1.1rem;
	height: 1.1rem;
	flex: none;
	background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5'/%3E%3Cpath d='m11 6-6 6 6 6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12H5'/%3E%3Cpath d='m11 6-6 6 6 6'/%3E%3C/svg%3E") center / contain no-repeat;
}

[dir=ltr] .hd-go::after {
	transform: scaleX(-1);
}

/* High contrast draws no backgrounds, and the arrow is one (a mask over
   currentColor, which there still holds the colour of the design): it gets
   the system colour of its label, that of links, as every button with an
   arrow is one, and that of text elsewhere. */
@media (forced-colors: active) {
	.hd-go::after {
		forced-color-adjust: none;
		background: CanvasText;
	}

	a.hd-go::after,
	a .hd-go::after {
		background: LinkText;
	}
}

/* A price typed into a field: the amount and its smaller unit (hidata_ui_price()). */
.hd-price {
	display: inline-flex;
	align-items: baseline;
	gap: .35rem;
	white-space: nowrap;
}

.hd-price b {
	font-size: 1.6rem;
	font-weight: 800;
	line-height: 1.3;
}

.hd-unit {
	font-size: .82rem;
	font-weight: 600;
	color: var(--hd-text);
}

/* The dotted backdrop of the pictures, fading out from their middle. */
.hd-dots {
	position: absolute;
	inset: -.7rem 0;
	background-image: radial-gradient(#BBD8ED 1.3px, transparent 1.5px);
	background-size: .8rem .8rem;
	-webkit-mask-image: radial-gradient(circle at center, #000 30%, transparent 68%);
	mask-image: radial-gradient(circle at center, #000 30%, transparent 68%);
	pointer-events: none;
}

.hd-ltr {
	direction: ltr;
	unicode-bidi: isolate;
}

@media (max-width: 991.98px) {
	.hd-sec {
		padding: 3rem 0;
	}

	.hd-lead {
		margin: -.5rem auto 2rem;
		text-align: center;
	}

	.hd-title2 {
		font-size: 1.6rem;
	}
}

@keyframes hd-soft {
	from {
		opacity: 0;
		transform: translateY(.3rem);
	}
}

@keyframes hd-blink {
	50% {
		opacity: .25;
	}
}
