/* Фон gov.am остаётся читаемым: без blur и без scale */
body.soc-modal-open #header,
body.soc-modal-open #main-wrapper,
body.soc-modal-open #footer,
body.soc-modal-open #sliderWrap {
	filter: none;
	transform: none;
}

body.soc-modal-open {
	overflow: hidden;
}

@media (max-width: 768px) {
	body.soc-modal-open {
		position: fixed;
		inset: 0;
		width: 100%;
	}

	body.soc-modal-open #header .wrapper,
	body.soc-modal-open #main-wrapper .wrapper,
	body.soc-modal-open .wrapper,
	body.soc-modal-open .wrapper2 {
		width: 100% !important;
		max-width: 100vw !important;
		box-sizing: border-box;
	}

	/* Узкий экран: только шапка gov.am как фон, без «ломающегося» сайдбара */
	body.soc-modal-open #col1,
	body.soc-modal-open #col2,
	body.soc-modal-open #col3,
	body.soc-modal-open #footer,
	body.soc-modal-open #sliderWrap {
		display: none !important;
	}

	body.soc-modal-open #header {
		margin-bottom: 0;
	}

	.soc-overlay {
		align-items: center;
		justify-content: center;
		padding: max(10px, env(safe-area-inset-top, 10px)) 12px max(12px, env(safe-area-inset-bottom, 12px));
	}
}

.soc-overlay {
	position: fixed;
	inset: 0;
	z-index: 99990;
	/* лёгкая вуаль — виден сайт за карточкой */
	background: linear-gradient(
		180deg,
		rgba(255, 255, 255, 0.04) 0%,
		rgba(12, 45, 100, 0.1) 40%,
		rgba(12, 45, 100, 0.14) 100%
	);
	backdrop-filter: none;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 14px 18px 24px;
	padding-top: max(36px, calc(env(safe-area-inset-top, 0px) + 28px));
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.soc-card {
	position: relative;
	width: min(360px, calc(100% - 32px));
	max-width: 360px;
	margin: 0 auto;
	padding: 0;
	border-radius: 20px;
	font-family: "Noto Sans Armenian", "Arian AMU", Arial, sans-serif;
	color: #0c1f3f;
}

@media (max-width: 480px) {
	.soc-overlay {
		padding: 12px 16px 20px;
		padding-top: max(34px, calc(env(safe-area-inset-top, 0px) + 26px));
	}

	.soc-card {
		width: calc(100vw - 32px);
		max-width: 360px;
	}

	.soc-card .egov-card-brand__emblem {
		width: 24px;
		height: 24px;
	}

	.soc-card .egov-card-brand__gov {
		font-size: 7.5px;
	}

	.soc-card .egov-card-brand__gov--strong {
		font-size: 8.5px;
	}

	.soc-card .egov-card-brand__sub {
		font-size: 7px;
	}
}

/* Компактная шапка карточки — герб и текст в одну полосу */
.soc-card .egov-card-brand {
	align-items: center;
	padding: 6px 10px 7px;
	gap: 7px;
	min-height: 0;
}

.soc-card .egov-card-brand__text {
	min-width: 0;
	flex: 1;
	line-height: 1.12;
}

.soc-card .egov-card-brand__emblem {
	width: 28px;
	height: 28px;
}

.soc-card .egov-card-brand__gov {
	font-size: 8.5px;
	font-weight: 600;
	letter-spacing: 0;
}

.soc-card .egov-card-brand__gov--strong {
	font-size: 9.5px;
	font-weight: 800;
}

.soc-card .egov-card-brand__sub {
	margin: 1px 0 0;
	font-size: 7.5px;
	opacity: 0.88;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Жёлтая шапка gov.am за модалкой — влезает на узком экране */
@media (max-width: 520px) {
	body.soc-modal-open #header {
		height: 52px;
		margin-bottom: 10px;
	}

	body.soc-modal-open #header .wrapper {
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
		padding: 0 6px;
	}

	body.soc-modal-open h1#main_title {
		height: 52px;
		width: min(72vw, 280px);
		background-size: contain;
		background-position: 4px center;
	}

	body.soc-modal-open #lang_switch {
		padding: 22px 4px 0 0;
		font-size: 10px;
	}

	body.soc-modal-open #lang_switch ul li {
		padding-left: 8px;
	}
}

/* hero visuals — see /new_css/soc-hero.css */

.soc-card__close {
	position: absolute;
	top: 8px;
	right: 10px;
	border: 0;
	background: transparent;
	font-size: 26px;
	line-height: 1;
	color: #111;
	cursor: pointer;
	z-index: 2;
}

.soc-card__badge {
	position: relative;
	z-index: 6;
	width: 68px;
	height: 68px;
	margin: -34px auto 6px;
	border-radius: 50%;
	background: linear-gradient(180deg, #f0f6ff 0%, #e3effc 100%);
	border: 3px solid #ffffff;
	box-shadow:
		0 10px 22px rgba(12, 70, 160, 0.22),
		inset 0 1px 0 rgba(255, 255, 255, 0.9);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.soc-card__badge img,
.soc-card__badge svg {
	width: 38px;
	height: 38px;
	object-fit: contain;
}

.soc-card__title {
	text-align: center;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.25;
	margin: 0 6px 12px;
}

.soc-alert {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	background: #fff6cf;
	border: 1px solid #e7c35e;
	border-radius: 10px;
	padding: 8px 10px;
	font-size: 13px;
	line-height: 1.35;
	margin-bottom: 11px;
}

.soc-alert__icon {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #f0b429;
}

.soc-expand-btn {
	width: 100%;
	border: 0;
	border-radius: 999px;
	padding: 12px 14px;
	background: linear-gradient(180deg, #0c53b4 0%, #0a3f8e 100%);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	cursor: pointer;
	box-shadow: 0 8px 16px rgba(8, 63, 142, 0.35);
}

.soc-expand-btn__left,
.soc-expand-btn__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.soc-expand-btn svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
}

.soc-chevron {
	text-align: center;
	margin: 10px 0 6px;
	color: #0a3f8e;
	line-height: 1;
	transition: transform 0.25s ease;
}

.soc-chevron svg {
	width: 22px;
	height: 22px;
	display: inline-block;
	vertical-align: middle;
	stroke: currentColor;
	fill: none;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.soc-card.is-expanded .soc-chevron {
	transform: rotate(180deg);
}

.soc-panel-form {
	max-height: 0;
	overflow: hidden;
	opacity: 0;
	transition: max-height 0.35s ease, opacity 0.25s ease, margin 0.25s ease;
	margin-top: 0;
}

.soc-card.is-expanded .soc-panel-form {
	max-height: 520px;
	opacity: 1;
	margin-top: 6px;
}

.soc-form-wrap {
	background: linear-gradient(180deg, #f8fbff 0%, #eaf2fb 100%);
	border: 1px solid #d6e4f2;
	border-radius: 16px;
	padding: 16px 14px 14px;
}

.soc-form-wrap h3 {
	font-size: 15px;
	font-weight: 700;
	margin: 0 0 12px;
}

.soc-field {
	position: relative;
	margin-bottom: 10px;
}

.soc-field input,
.soc-card input,
.soc-card select,
.soc-card textarea {
	font-size: 16px; /* iOS: prevents focus zoom */
}

.soc-field input {
	width: 100%;
	border: 1px solid #cfd9e6;
	border-radius: 12px;
	padding: 13px 42px 13px 42px;
	background: #fff;
	outline: none;
}

.soc-field input:focus {
	border-color: #0c53b4;
	box-shadow: 0 0 0 3px rgba(12, 83, 180, 0.15);
}

.soc-field__icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	color: #6d7d93;
	pointer-events: none;
}

.soc-field .egov-field-card__body {
	position: relative;
	width: 100%;
}

.soc-field__toggle {
	position: absolute;
	right: 4px;
	top: 50%;
	transform: translateY(-50%);
	border: 0;
	background: transparent;
	color: #6d7d93;
	cursor: pointer;
	padding: 4px;
	line-height: 0;
}

.soc-field__toggle svg {
	stroke: currentColor;
	fill: none;
	stroke-width: 1.75;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.soc-submit {
	width: 100%;
	border: 0;
	border-radius: 999px;
	padding: 13px 16px;
	margin-top: 4px;
	background: linear-gradient(180deg, #0c53b4 0%, #0a3f8e 100%);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}

.soc-submit:disabled {
	opacity: 0.7;
	cursor: wait;
}

.soc-forgot {
	display: block;
	text-align: center;
	margin-top: 12px;
	font-size: 13px;
	color: #0a3f8e;
	text-decoration: underline;
}

.soc-msg {
	display: none;
	margin-top: 10px;
	padding: 10px 12px;
	border-radius: 10px;
	font-size: 13px;
	line-height: 1.35;
}

.soc-msg.is-error {
	display: block;
	background: #ffe8e8;
	border: 1px solid #f3b3b3;
	color: #8a1f1f;
}

.soc-msg.is-success {
	display: block;
	background: #e7f8eb;
	border: 1px solid #9ed5ab;
	color: #1d6b31;
}