/* Home Security page (page-home-security.php / page-seguridad-para-el-hogar.php). Loaded conditionally. */

.sss-hs-hero {
	background: var(--sss-cloud);
	border-bottom: var(--sss-border-width) solid var(--sss-line);
}

.sss-hs-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
	gap: var(--sss-space-6);
	align-items: center;
	padding-block: 88px 80px;
}

.sss-hs-hero__text {
	max-width: 640px;
}

.sss-hs-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: var(--sss-space-3);
	margin-top: var(--sss-space-4);
}

.sss-hs-hero__media {
	position: relative;
	border-radius: var(--sss-radius-lg);
	overflow: hidden;
	box-shadow: var(--sss-shadow-md);
}

.sss-hs-hero__media img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.sss-hs-detail {
	padding-block: 88px;
	scroll-margin-top: 60px;
}

.sss-hs-detail--tint {
	background: var(--sss-cloud);
}

.sss-hs-detail--dark {
	background: var(--sss-navy);
}

.sss-hs-detail--dark h2,
.sss-hs-detail--dark p {
	color: var(--sss-white);
}

.sss-hs-detail--band .sss-hs-detail__band-inner {
	max-width: var(--sss-content-max);
	margin-bottom: var(--sss-space-6);
}

.sss-hs-detail--band .sss-hs-detail__band-inner p {
	margin-top: var(--sss-space-3);
}

.sss-hs-detail--band h2 {
	max-width: 32ch;
}

/* Monitoring — a 3x2 gallery of tiles (icon-top, centered), a deliberately
   bigger/more visual presentation than the standard feature-list chip row,
   since these 5 items are the page's headline monitoring capabilities. */
.sss-hs-monitoring-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--sss-space-4);
	list-style: none;
	margin: 0;
	padding: 0;
}

.sss-hs-monitoring-grid__item {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	gap: var(--sss-space-3);
	min-height: 200px;
	padding: var(--sss-space-5) var(--sss-space-4);
	background: var(--sss-white);
	border: 1px solid var(--sss-line);
	border-radius: var(--sss-radius-md);
	overflow: hidden;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.sss-hs-monitoring-grid__item:hover {
	border-color: var(--sss-blue);
	box-shadow: var(--sss-shadow-md);
	transform: translateY(-3px);
}

/* Image + scrim reveal on hover. The scrim is a fixed dark gradient (not
   dependent on how bright any given photo is) so the icon/text stay
   readable regardless of which stock photo is behind them. */
.sss-hs-monitoring-grid__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transform: scale(1.05);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.sss-hs-monitoring-grid__scrim {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(10, 20, 35, 0.68) 0%, rgba(10, 20, 35, 0.88) 100%);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.sss-hs-monitoring-grid__item:hover .sss-hs-monitoring-grid__image,
.sss-hs-monitoring-grid__item:hover .sss-hs-monitoring-grid__scrim {
	opacity: 1;
}

.sss-hs-monitoring-grid__item:hover .sss-hs-monitoring-grid__image {
	transform: scale(1);
}

.sss-hs-monitoring-grid__icon {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: rgba(23, 107, 255, 0.08);
	color: var(--sss-blue);
	transition: background-color 0.2s ease, color 0.2s ease;
}

.sss-hs-monitoring-grid__item:hover .sss-hs-monitoring-grid__icon {
	background: rgba(255, 255, 255, 0.16);
	color: var(--sss-white);
}

.sss-hs-monitoring-grid__icon .sss-icon {
	width: 28px;
	height: 28px;
}

.sss-hs-monitoring-grid__text {
	position: relative;
	z-index: 1;
	font-size: 0.9375rem;
	color: var(--sss-slate);
	line-height: 1.45;
	transition: color 0.2s ease;
}

.sss-hs-monitoring-grid__item:hover .sss-hs-monitoring-grid__text {
	color: var(--sss-white);
}

@media (prefers-reduced-motion: reduce) {
	.sss-hs-monitoring-grid__item,
	.sss-hs-monitoring-grid__item:hover,
	.sss-hs-monitoring-grid__image {
		transform: none;
		transition: border-color 0.01ms;
	}
}

/* Small cross-link to the ADT MySafety page, added under the Smart Home
   Automation feature list (see documentation/PAGE-SETUP.md). */
.sss-hs-detail__mysafety-note {
	margin-top: var(--sss-space-4);
}

.sss-hs-detail__inner--media {
	display: grid;
	grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
	gap: var(--sss-space-6);
	align-items: center;
}

.sss-hs-detail__inner--reverse .sss-hs-detail__media {
	order: -1;
}

.sss-hs-detail__media {
	position: relative;
	border-radius: var(--sss-radius-lg);
	overflow: hidden;
}

.sss-hs-detail__media img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

/* Product/category imagery (video, smart-home) — never stretched. */
.sss-hs-detail__media--contain {
	background: var(--sss-white);
	border: 1px solid var(--sss-line);
	padding: var(--sss-space-4);
}

.sss-hs-detail__media--contain img {
	aspect-ratio: 2 / 1;
	object-fit: contain;
}

/* Video section's feature list gets its own hover treatment — a filled
   background swap instead of the shared component's border/lift, so this
   capability list reads as highlighted rather than just lifted. */
#video .sss-feature-list__item:hover {
	background: rgba(23, 107, 255, 0.06);
	border-color: var(--sss-blue);
}

#video .sss-feature-list__item:hover .sss-feature-list__icon {
	background: var(--sss-blue);
	color: var(--sss-white);
}

/* Overview — a connected system shown through real property/device
   photography, not four equal icon-only cards: each node is a photo with
   an overlapping icon badge, tied together by one continuous top rule. */
.sss-hs-system {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: var(--sss-space-5);
	border-top: 1px solid var(--sss-line);
	padding-top: var(--sss-space-5);
}

.sss-hs-system__node {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--sss-space-3);
}

.sss-hs-system__media {
	position: relative;
	border-radius: var(--sss-radius-lg);
	overflow: hidden;
	box-shadow: var(--sss-shadow-sm);
	background: var(--sss-cloud);
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.sss-hs-system__node:hover .sss-hs-system__media {
	box-shadow: var(--sss-shadow-md);
	transform: translateY(-3px);
}

/* object-fit: contain (not cover) — the full photo/product shot stays
   visible instead of being cropped to fill the box; the padding plus the
   card's own cloud background fills the letterboxed space. */
.sss-hs-system__media img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: contain;
	padding: 18px;
	box-sizing: border-box;
}

.sss-hs-system__icon {
	position: absolute;
	left: 12px;
	bottom: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--sss-white);
	color: var(--sss-blue);
	box-shadow: var(--sss-shadow-sm);
}

.sss-hs-system__icon .sss-icon {
	width: 22px;
	height: 22px;
}

.sss-hs-system__label {
	font-family: var(--sss-font-heading);
	font-weight: 600;
	font-size: 1.0625rem;
	color: var(--sss-ink);
}

/* Protection — one supporting visual + two structured columns. */
.sss-hs-protection__inner {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--sss-space-6);
}

.sss-hs-protection__intro {
	grid-column: 1 / -1;
	max-width: var(--sss-content-max);
}

.sss-hs-protection__intro p {
	margin-top: var(--sss-space-3);
}

.sss-hs-protection__media {
	grid-column: span 1;
	border-radius: var(--sss-radius-lg);
	overflow: hidden;
}

.sss-hs-protection__media img {
	width: 100%;
	height: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	object-position: center;
}

/* One card, not two independent columns — a vertical divider between
   Intrusion Protection and Life-Safety reads as a side-by-side
   comparison rather than two unrelated lists. */
.sss-hs-protection__columns {
	grid-column: span 2;
	position: relative;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--sss-space-6);
	background: var(--sss-white);
	border: 1px solid var(--sss-line);
	border-radius: var(--sss-radius-lg);
	padding: var(--sss-space-6);
}

.sss-hs-protection__columns::before {
	content: "";
	position: absolute;
	top: var(--sss-space-6);
	bottom: var(--sss-space-6);
	left: 50%;
	width: 1px;
	background: var(--sss-line);
}

/* Life-Safety and Property Protection column removed (client direction) —
   center the remaining single Intrusion Protection column instead of
   stretching it across the old two-column grid, and drop the now-unneeded
   divider line. */
.sss-hs-protection__columns--single {
	grid-template-columns: 1fr;
	max-width: 480px;
	margin-inline: auto;
}

.sss-hs-protection__columns--single::before {
	display: none;
}

.sss-hs-protection__column h3 {
	font-size: 1.1875rem;
	margin-bottom: var(--sss-space-2);
}

/* Installation — a connected timeline (icon stops joined by one line),
   not a plain numbered list. */
.sss-hs-steps {
	position: relative;
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: var(--sss-space-4);
	padding-top: var(--sss-space-6);
}

.sss-hs-steps::before {
	content: "";
	position: absolute;
	top: calc(var(--sss-space-6) + 27px);
	left: 27px;
	right: 27px;
	height: 1px;
	background: rgba(255, 255, 255, 0.18);
}

.sss-hs-steps__step {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: var(--sss-space-3);
}

.sss-hs-steps__icon {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: var(--sss-navy);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: var(--sss-cyan);
	transition: border-color 0.2s ease, transform 0.2s ease;
}

.sss-hs-steps__step:hover .sss-hs-steps__icon {
	border-color: var(--sss-cyan);
	transform: translateY(-3px);
}

.sss-hs-steps__icon .sss-icon {
	width: 24px;
	height: 24px;
}

/* Stroke-only card — border, no fill, so the timeline (icon + connecting
   line) stays the visual focus and the card reads as an outline callout. */
.sss-hs-steps__card {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: var(--sss-radius-md);
	padding: var(--sss-space-4);
	transition: border-color 0.2s ease;
}

.sss-hs-steps__step:hover .sss-hs-steps__card {
	border-color: var(--sss-cyan);
}

.sss-hs-steps__number {
	display: block;
	font-family: var(--sss-font-mono);
	font-size: 1.375rem;
	font-weight: 600;
	color: var(--sss-cyan);
	opacity: 0.55;
	margin-bottom: var(--sss-space-2);
}

.sss-hs-steps__text {
	display: block;
	color: var(--sss-cloud);
	font-size: 1rem;
	line-height: 1.5;
}

.sss-hs-steps__note {
	margin-top: var(--sss-space-5);
	color: var(--sss-cloud);
	opacity: 0.8;
	font-size: 0.9375rem;
	max-width: 65ch;
}

.sss-hs-final-cta {
	background: var(--sss-ink);
	scroll-margin-top: 60px;
}

.sss-hs-final-cta__inner {
	max-width: var(--sss-content-max);
	margin-inline: auto;
	padding-block: 88px;
	color: var(--sss-white);
	text-align: center;
}

.sss-hs-final-cta__inner h2 {
	color: var(--sss-white);
}

.sss-hs-final-cta__inner p {
	color: var(--sss-cloud);
	font-size: 1.0625rem;
	margin-top: var(--sss-space-3);
}

.sss-hs-final-cta__inner .sss-btn {
	margin-top: var(--sss-space-4);
}

@media (max-width: 1023px) {
	.sss-hs-hero__inner {
		grid-template-columns: 1fr;
		padding-block: 64px 56px;
	}

	.sss-hs-hero__media img {
		aspect-ratio: 16 / 10;
	}

	.sss-hs-detail__inner--media {
		grid-template-columns: 1fr;
	}

	.sss-hs-system {
		grid-template-columns: repeat(2, 1fr);
		gap: var(--sss-space-4);
	}

	.sss-hs-protection__inner {
		grid-template-columns: 1fr;
	}

	.sss-hs-protection__media,
	.sss-hs-protection__columns {
		grid-column: auto;
	}

	.sss-hs-protection__media img {
		aspect-ratio: 16 / 9;
	}

	.sss-hs-steps {
		grid-template-columns: repeat(2, 1fr);
	}

	.sss-hs-monitoring-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.sss-hs-detail {
		padding-block: 64px;
	}

	.sss-hs-system {
		grid-template-columns: 1fr;
	}

	.sss-hs-monitoring-grid {
		grid-template-columns: 1fr;
	}

	.sss-hs-protection__columns {
		grid-template-columns: 1fr;
	}

	.sss-hs-protection__columns::before {
		display: none;
	}

	.sss-hs-protection__column + .sss-hs-protection__column {
		border-top: 1px solid var(--sss-line);
		padding-top: var(--sss-space-5);
	}

	.sss-hs-steps {
		grid-template-columns: 1fr;
	}

	.sss-hs-final-cta__inner {
		padding-block: 72px;
	}

	/* Center on mobile (client direction) — hero and the text side of every
	   text+image detail section (Smart Home Automation, Video, etc.), left-
	   aligned by default, plus their pill-style feature lists. */
	.sss-hs-hero__text,
	.sss-hs-detail__text,
	.sss-hs-protection__intro {
		text-align: center;
		margin-inline: auto;
	}

	.sss-hs-hero__actions {
		justify-content: center;
	}

	.sss-hs-detail__text .sss-feature-list {
		justify-content: center;
	}
}
