/*
 * RE:SURE SkyGuard + Case Studies templates
 * eCommWeb, Nov 2026. Loaded only by templates/template-skyguard.php and
 * templates/template-case-studies.php. Uses the theme's 10px rem base.
 */

.sg-page {
	--sg-accent: #FDC109;
	--sg-accent-rgb: 253, 193, 9;
	--sg-accent-dark: #07A394;
	--sg-navy: #001D30;
	--sg-panel: #212D40;
	--sg-muted: #4A4E69;
	--sg-text: #E9E4E9;
	overflow: hidden;
}
/* Case studies page uses the main RE:SURE teal */
.cs-page {
	--sg-accent: #00DEBA;
	--sg-accent-rgb: 0, 222, 186;
}

/* ---------- Shared ---------- */
.sg-heading {
	font-size: 1.6rem;
	line-height: 1.4;
	margin: 0 auto 5rem;
	max-width: 80rem;
	text-align: center;
}
.sg-heading h2 {
	margin: 0 0 0.4em;
	text-transform: uppercase;
}
.sg-heading h2:last-child { margin-bottom: 0; }
.sg-heading h3 {
	color: var(--sg-accent);
	font-size: 1.8rem;
	font-weight: 500;
	letter-spacing: 0.04em;
	margin: 0 0 0.6em;
}
.sg-heading p { margin-left: auto; margin-right: auto; max-width: 40em; }
.sg-heading-left { margin: 0 0 3rem; text-align: left; }
.sg-heading-left p { margin-left: 0; }

.sg-page h2 span,
.sg-page h1 span,
.sg-hl { color: var(--sg-accent); }

.sg-eyebrow {
	color: var(--sg-accent);
	font-size: 1.5rem;
	font-weight: bold;
	letter-spacing: 0.25em;
	margin-bottom: 1.6rem;
	text-transform: uppercase;
}
.sg-eyebrow-line {
	align-items: center;
	display: flex;
	gap: 1.6rem;
}
.sg-eyebrow-line:after {
	background: var(--sg-accent);
	content: "";
	height: 2px;
	max-width: 12rem;
	flex: 1 1 auto;
}

.sg-ico {
	display: block;
	height: 100%;
	width: 100%;
}

.sg-btn {
	align-items: center;
	background: var(--sg-accent);
	color: var(--sg-navy);
	display: inline-flex;
	font-size: 1.5rem;
	font-weight: bold;
	gap: 1.2rem;
	letter-spacing: 0.05em;
	line-height: 1.2;
	padding: 1.6rem 2.6rem;
	position: relative;
	text-decoration: none;
	text-transform: uppercase;
}
.sg-btn svg {
	height: 1.4rem;
	transition: transform 0.2s linear;
	width: 1.4rem;
}
.sg-btn:hover,
.sg-btn:focus {
	background: var(--sg-text);
	color: var(--sg-navy);
}
.sg-btn:hover svg { transform: translateX(0.4rem); }

/* Corner brackets, echoing the RE:SURE logo */
.sg-frame {
	padding: 1.6rem;
	position: relative;
}
.sg-frame:before,
.sg-frame:after {
	border-color: var(--sg-accent);
	border-style: solid;
	content: "";
	height: 6rem;
	position: absolute;
	width: 6rem;
	z-index: 2;
}
.sg-frame:before { border-width: 0.6rem 0 0 0.6rem; left: 0; top: 0; }
.sg-frame:after { border-width: 0 0.6rem 0.6rem 0; bottom: 0; right: 0; }
.sg-frame img { display: block; width: 100%; }

/* SkyGuard logo in the hero */
.sg-hero-logo {
	display: block;
	height: auto;
	margin: 0 0 2.4rem;
	max-width: 42rem;
	width: 100%;
}

/* ---------- Hero ---------- */
.sg-hero {
	background-color: var(--sg-navy);
	background-position: center right;
	background-repeat: no-repeat;
	background-size: cover;
	position: relative;
}
.sg-hero-inner {
	align-items: flex-end;
	background: linear-gradient(90deg, rgba(0, 29, 48, 0.96) 0%, rgba(0, 29, 48, 0.85) 38%, rgba(0, 29, 48, 0.25) 75%, rgba(0, 29, 48, 0.1) 100%),
		linear-gradient(0deg, rgba(0, 29, 48, 0.9) 0%, rgba(0, 29, 48, 0) 35%);
	display: flex;
	min-height: 100vh;
	padding: 16rem 0 10rem;
}
.sg-hero-content { max-width: 66rem; }
.sg-hero-title {
	font-size: 6.4rem;
	letter-spacing: 0.06em;
	line-height: 1.1;
	margin: 0 0 0.3em;
	text-transform: uppercase;
}
.sg-hero-subtitle {
	color: var(--sg-text);
	font-size: 2.4rem;
	font-weight: 500;
	line-height: 1.3;
	margin: 0 0 1.4em;
}
.sg-hero-text {
	font-size: 1.7rem;
	line-height: 1.55;
	margin-bottom: 2.6rem;
}
.sg-hero-text p { margin-bottom: 1em; }
.sg-tagline {
	border-left: 0.4rem solid var(--sg-accent);
	color: var(--sg-accent);
	font-size: 2rem;
	font-weight: bold;
	line-height: 1.3;
	margin: 0 0 3rem;
	padding-left: 1.6rem;
}
.sg-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem 4rem;
	list-style: none;
	margin: 6rem 0 0;
	padding: 3rem 0 0;
	position: relative;
}
.sg-badges:before {
	background: var(--sg-accent);
	content: "";
	height: 2px;
	left: 0;
	position: absolute;
	top: 0;
	width: 10rem;
}
.sg-badge {
	align-items: center;
	display: flex;
	font-size: 1.6rem;
	font-weight: bold;
	gap: 1.4rem;
	line-height: 1.25;
	max-width: 26rem;
}
.sg-badge-icon {
	color: var(--sg-accent);
	flex: 0 0 4.4rem;
	height: 4.4rem;
	width: 4.4rem;
}
.sg-badge-icon img { display: block; height: 100%; object-fit: contain; width: 100%; }
.sg-scroll {
	border: 2px solid rgba(233, 228, 233, 0.6);
	border-radius: 1.4rem;
	bottom: 3rem;
	height: 4.4rem;
	left: 50%;
	position: absolute;
	transform: translateX(-50%);
	width: 2.6rem;
}
.sg-scroll span {
	animation: sg-scroll 1.8s infinite;
	background: var(--sg-accent);
	border-radius: 1px;
	height: 0.8rem;
	left: 50%;
	margin-left: -1px;
	position: absolute;
	top: 0.8rem;
	width: 2px;
}
@keyframes sg-scroll {
	0% { opacity: 0; transform: translateY(0); }
	30% { opacity: 1; }
	100% { opacity: 0; transform: translateY(1.6rem); }
}
.sg-hero-small .sg-hero-inner {
	align-items: center;
	min-height: 1px;
	padding: 20rem 0 10rem;
}
.sg-hero-small .sg-hero-title { font-size: 5rem; }

/* ---------- Intro ---------- */
.sg-intro { padding: 12rem 0; }
.sg-intro-row {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
}
.sg-intro-content { width: 48%; }
.sg-intro-media { width: 46%; }
.sg-intro-text {
	font-size: 1.7rem;
	line-height: 1.55;
}
.sg-intro-text p:first-child {
	color: var(--sg-text);
	font-size: 2rem;
	font-weight: 500;
	line-height: 1.45;
}
.sg-intro-content .sg-heading-left h2 { font-size: 3.4rem; }

/* ---------- Capabilities (hover-reveal cards) ---------- */
.sg-caps {
	background: var(--sg-panel);
	padding: 12rem 0 10rem;
}
.sg-caps-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin: 0 -1rem;
}
.sg-cap-wrap {
	padding: 0 1rem 2rem;
	width: 20%;
}
.sg-cap {
	background: var(--sg-navy);
	color: var(--sg-text);
	cursor: default;
	height: 100%;
	min-height: 32rem;
	outline: none;
	overflow: hidden;
	position: relative;
}
.sg-cap-front,
.sg-cap-back {
	display: flex;
	flex-direction: column;
	height: 100%;
	left: 0;
	padding: 3.4rem 2.4rem;
	position: absolute;
	top: 0;
	transition: transform 0.35s ease, opacity 0.35s ease;
	width: 100%;
}
.sg-cap-front {
	align-items: center;
	justify-content: center;
	text-align: center;
}
.sg-cap-icon {
	color: var(--sg-accent);
	display: block;
	height: 7.2rem;
	margin-bottom: 2.4rem;
	width: 7.2rem;
}
.sg-cap-icon img { display: block; height: 100%; object-fit: contain; width: 100%; }
.sg-cap-title {
	font-size: 1.9rem;
	line-height: 1.25;
	margin: 0;
}
.sg-cap-more {
	border: 2px solid var(--sg-accent);
	color: var(--sg-accent);
	display: block;
	font-size: 2.2rem;
	font-weight: bold;
	height: 3.4rem;
	line-height: 3rem;
	margin-top: 2.4rem;
	text-align: center;
	width: 3.4rem;
}
.sg-cap-back {
	background: var(--sg-accent);
	color: var(--sg-navy);
	justify-content: center;
	opacity: 0;
	transform: translateY(100%);
}
.sg-cap-back .sg-cap-title { margin-bottom: 1.2rem; }
.sg-cap-text {
	font-size: 1.5rem;
	font-weight: 500;
	line-height: 1.45;
}
.sg-cap:hover .sg-cap-back,
.sg-cap:focus .sg-cap-back,
.sg-cap:focus-within .sg-cap-back {
	opacity: 1;
	transform: translateY(0);
}
.sg-cap:hover .sg-cap-front,
.sg-cap:focus .sg-cap-front {
	opacity: 0;
	transform: translateY(-20%);
}
.sg-cap:before {
	border-left: 0.4rem solid var(--sg-accent);
	border-top: 0.4rem solid var(--sg-accent);
	content: "";
	height: 3rem;
	left: 0;
	position: absolute;
	top: 0;
	width: 3rem;
	z-index: 2;
}

/* ---------- Highlight band ---------- */
.sg-band {
	background: linear-gradient(115deg, #0b2235 0%, #062d43 55%, #04495a 100%);
	padding: 11rem 0;
	position: relative;
}
.sg-band-media {
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
	bottom: 0;
	clip-path: polygon(18% 0, 100% 0, 100% 100%, 0 100%);
	position: absolute;
	right: 0;
	top: 0;
	width: 50%;
}
.sg-band-media:after {
	background: linear-gradient(90deg, rgba(4, 34, 52, 0.75) 0%, rgba(4, 34, 52, 0) 45%);
	content: "";
	inset: 0;
	position: absolute;
}
.sg-band-content {
	max-width: 62rem;
	position: relative;
	z-index: 2;
}
.sg-band-heading h2 {
	font-size: 5rem;
	line-height: 1.1;
	margin: 0 0 0.5em;
}
.sg-band-text {
	font-size: 1.8rem;
	line-height: 1.5;
	margin-bottom: 4rem;
}
.sg-band-points {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0 0 4rem;
	padding: 0;
}
.sg-band-points li {
	align-items: center;
	border-left: 1px solid rgba(var(--sg-accent-rgb), 0.45);
	display: flex;
	flex-direction: column;
	font-size: 1.4rem;
	font-weight: 500;
	gap: 1.2rem;
	line-height: 1.25;
	padding: 0 1.6rem;
	text-align: center;
	width: 25%;
}
.sg-band-points li:first-child { border-left: 0; padding-left: 0; }
.sg-band-icon {
	color: var(--sg-accent);
	height: 5rem;
	transition: transform 0.25s ease;
	width: 5rem;
}
.sg-band-icon img { display: block; height: 100%; object-fit: contain; width: 100%; }
.sg-band-points li:hover .sg-band-icon { transform: translateY(-0.5rem); }

/* ---------- Benefits ---------- */
.sg-benefits { padding: 12rem 0 9rem; }
.sg-benefits-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin: 0 -1.5rem;
}
.sg-benefit-wrap {
	padding: 0 1.5rem 3rem;
	width: 33.33%;
}
.sg-benefit {
	border-bottom: 2px solid rgba(233, 228, 233, 0.12);
	display: flex;
	gap: 2.2rem;
	height: 100%;
	padding: 3rem 0;
	transition: border-color 0.25s ease;
}
.sg-benefit:hover { border-bottom-color: var(--sg-accent); }
.sg-benefit-icon {
	background: var(--sg-panel);
	color: var(--sg-accent);
	flex: 0 0 7rem;
	height: 7rem;
	padding: 1.6rem;
	transition: background 0.25s ease, color 0.25s ease;
	width: 7rem;
}
.sg-benefit-icon img { display: block; height: 100%; object-fit: contain; width: 100%; }
.sg-benefit:hover .sg-benefit-icon {
	background: var(--sg-accent);
	color: var(--sg-navy);
}
.sg-benefit-title {
	font-size: 1.9rem;
	margin: 0 0 0.6em;
}
.sg-benefit-text {
	font-size: 1.5rem;
	line-height: 1.5;
}

/* ---------- Sectors ---------- */
.sg-sectors {
	background: var(--sg-panel);
	padding: 12rem 0 10rem;
}
.sg-sectors-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	margin: 0 -1rem;
}
.sg-sector-wrap {
	padding: 0 1rem 2rem;
	width: 33.33%;
}
.sg-sector {
	background: var(--sg-navy);
	height: 100%;
	min-height: 38rem;
	outline: none;
	overflow: hidden;
	position: relative;
}
.sg-sector-img {
	display: block;
	height: 100%;
	left: 0;
	object-fit: cover;
	position: absolute;
	top: 0;
	transition: transform 0.6s ease;
	width: 100%;
}
.sg-sector-overlay {
	background: linear-gradient(0deg, rgba(0, 29, 48, 0.97) 0%, rgba(0, 29, 48, 0.75) 45%, rgba(0, 29, 48, 0.1) 100%);
	bottom: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	left: 0;
	padding: 3rem;
	position: absolute;
	right: 0;
	top: 0;
	transition: background 0.35s ease;
}
.sg-sector-icon {
	color: var(--sg-accent);
	display: block;
	height: 4.8rem;
	margin-bottom: 1.4rem;
	width: 4.8rem;
}
.sg-sector-icon:empty { display: none; }
.sg-sector-icon img { display: block; height: 100%; object-fit: contain; width: 100%; }
.sg-sector-title {
	font-size: 2.1rem;
	line-height: 1.25;
	margin: 0;
}
.sg-sector-text {
	font-size: 1.5rem;
	line-height: 1.5;
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	transition: max-height 0.45s ease, opacity 0.35s ease, margin 0.35s ease;
}
.sg-sector:hover .sg-sector-text,
.sg-sector:focus .sg-sector-text,
.sg-sector-noimg .sg-sector-text {
	margin-top: 1.4rem;
	max-height: 40rem;
	opacity: 1;
}
.sg-sector:hover .sg-sector-overlay,
.sg-sector:focus .sg-sector-overlay {
	background: linear-gradient(0deg, rgba(0, 29, 48, 0.98) 0%, rgba(0, 29, 48, 0.9) 60%, rgba(0, 29, 48, 0.55) 100%);
}
.sg-sector:hover .sg-sector-img { transform: scale(1.06); }
.sg-sector:after {
	border-bottom: 0.4rem solid var(--sg-accent);
	border-right: 0.4rem solid var(--sg-accent);
	bottom: 0;
	content: "";
	height: 3rem;
	position: absolute;
	right: 0;
	width: 3rem;
}

/* Sector cards without a photo: plain panels, text always visible */
.sg-sector-noimg {
	min-height: 0;
	transition: background 0.3s ease;
}
.sg-sector-noimg .sg-sector-overlay,
.sg-sector-noimg:hover .sg-sector-overlay,
.sg-sector-noimg:focus .sg-sector-overlay {
	background: none;
	height: 100%;
	justify-content: flex-start;
	padding: 3.4rem 3rem 4rem;
	position: relative;
}
.sg-sector-noimg:hover { background: #00263f; }
.sg-sector-noimg:hover .sg-sector-icon { transform: translateY(-0.4rem); }
.sg-sector-icon { transition: transform 0.25s ease; }

/* ---------- Closing CTA ---------- */
.sg-cta {
	background-color: var(--sg-navy);
	background-position: center;
	background-repeat: no-repeat;
	background-size: cover;
}
.sg-cta-inner {
	background: linear-gradient(90deg, rgba(0, 29, 48, 0.97) 0%, rgba(0, 29, 48, 0.85) 55%, rgba(0, 29, 48, 0.6) 100%);
	padding: 12rem 0;
}
.sg-cta-row {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
}
.sg-cta-content { width: 52%; }
.sg-cta-heading h2 {
	font-size: 4rem;
	line-height: 1.15;
	margin: 0 0 0.5em;
	text-transform: uppercase;
}
.sg-cta-text {
	font-size: 1.7rem;
	line-height: 1.55;
}
.sg-cta-box {
	background: rgba(33, 45, 64, 0.92);
	border-top: 0.6rem solid var(--sg-accent);
	padding: 4.4rem;
	width: 40%;
}
.sg-cta-box-heading {
	color: var(--sg-accent);
	font-size: 2.6rem;
	line-height: 1.2;
	margin: 0 0 0.6em;
}
.sg-cta-box-text {
	font-size: 1.6rem;
	line-height: 1.5;
	margin-bottom: 3rem;
}
.sg-cta-box .sg-btn {
	justify-content: center;
	width: 100%;
}

/* ---------- Case studies ---------- */
.cs-list { padding: 10rem 0; }
.cs-row {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -1.2rem;
}
.cs-item-wrap {
	padding: 0 1.2rem 3rem;
	width: 33.33%;
}
.cs-item {
	color: var(--sg-text);
	display: block;
	height: 100%;
	text-decoration: none;
}
a.cs-item:hover { color: var(--sg-text); }
.cs-item-img {
	background: var(--sg-panel);
	overflow: hidden;
	padding-top: 72%;
	position: relative;
}
.cs-item-img img {
	display: block;
	height: 100%;
	left: 0;
	object-fit: cover;
	position: absolute;
	top: 0;
	transition: transform 0.6s ease;
	width: 100%;
}
a.cs-item:hover .cs-item-img img { transform: scale(1.06); }
.cs-item-tag {
	background: var(--sg-accent);
	color: var(--sg-navy);
	font-size: 1.2rem;
	font-weight: bold;
	left: 0;
	letter-spacing: 0.1em;
	padding: 0.7rem 1.2rem;
	position: absolute;
	text-transform: uppercase;
	top: 0;
	z-index: 2;
}
.cs-item-caption {
	background: linear-gradient(0deg, rgba(0, 29, 48, 0.96) 0%, rgba(0, 29, 48, 0.7) 55%, rgba(0, 29, 48, 0) 100%);
	bottom: 0;
	left: 0;
	padding: 6rem 2.6rem 2.4rem;
	position: absolute;
	right: 0;
}
.cs-item-title {
	font-size: 2rem;
	line-height: 1.25;
	margin: 0 0 0.4em;
}
.cs-item-brief {
	font-size: 1.5rem;
	line-height: 1.4;
	margin: 0;
}
.cs-item-button {
	background: var(--sg-panel);
	display: block;
	font-size: 1.4rem;
	font-weight: bold;
	letter-spacing: 0.05em;
	padding: 1.3rem 2.6rem;
	text-transform: uppercase;
	transition: background 0.2s linear, color 0.2s linear;
}
a.cs-item:hover .cs-item-button {
	background: var(--sg-accent);
	color: var(--sg-navy);
}
.cs-item-pdf {
	color: var(--sg-accent);
	display: inline-block;
	font-size: 1.4rem;
	font-weight: 500;
	margin-top: 1.2rem;
}
.cs-item-pdf:hover { color: var(--sg-text); }
.cs-empty {
	border: 1px dashed rgba(var(--sg-accent-rgb), 0.5);
	font-size: 1.8rem;
	line-height: 1.5;
	margin: 0 auto;
	max-width: 70rem;
	padding: 6rem 4rem;
	text-align: center;
}

/* ---------- Responsive ---------- */
@media only screen and (max-width: 1199px) {
	.sg-cap-wrap { width: 33.33%; }
	.sg-band-media { opacity: 0.35; width: 100%; clip-path: none; }
}
@media only screen and (max-width: 991px) {
	.sg-hero-title { font-size: 5rem; }
	.sg-intro-content,
	.sg-intro-media { width: 100%; }
	.sg-intro-media { margin-top: 5rem; }
	.sg-benefit-wrap,
	.sg-sector-wrap,
	.cs-item-wrap { width: 50%; }
	.sg-cta-content,
	.sg-cta-box { width: 100%; }
	.sg-cta-box { margin-top: 5rem; }
}
@media only screen and (max-width: 767px) {
	.sg-heading { margin-bottom: 3rem; }
	.sg-hero-inner {
		background: linear-gradient(0deg, rgba(0, 29, 48, 0.97) 0%, rgba(0, 29, 48, 0.8) 60%, rgba(0, 29, 48, 0.5) 100%);
		min-height: 1px;
		padding: 13rem 0 8rem;
	}
	.sg-hero-title,
	.sg-hero-small .sg-hero-title { font-size: 3.4rem; }
	.sg-hero-subtitle { font-size: 1.9rem; }
	.sg-hero-text,
	.sg-intro-text,
	.sg-cta-text { font-size: 1.6rem; }
	.sg-badges { margin-top: 4rem; }
	.sg-scroll { display: none; }
	.sg-hero-small .sg-hero-inner { padding: 13rem 0 6rem; }
	.sg-intro,
	.sg-caps,
	.sg-benefits,
	.sg-sectors,
	.sg-band,
	.cs-list { padding: 5.5rem 0 4rem; }
	.sg-cta-inner { padding: 5.5rem 0; }
	.sg-cap-wrap { width: 100%; padding: 0 0.6rem 1.2rem; }
	.sg-caps-row { margin: 0 -0.6rem; }
	.sg-cap { min-height: 22rem; }
	.sg-cap-front, .sg-cap-back { padding: 2.4rem 1.6rem; }
	.sg-cap-icon { height: 5.6rem; width: 5.6rem; }
	.sg-cap-title { font-size: 1.8rem; }
	.sg-cap-text { font-size: 1.5rem; }
	.sg-band-heading h2 { font-size: 3.4rem; }
	.sg-band-text { font-size: 1.6rem; }
	.sg-band-points li { width: 50%; padding: 1.6rem 1rem; border-left: 0; }
	.sg-benefit-wrap,
	.sg-sector-wrap,
	.cs-item-wrap { width: 100%; }
	.sg-sector { min-height: 32rem; }
	/* no hover on touch screens, so show sector text */
	.sg-sector-text { margin-top: 1.4rem; max-height: 40rem; opacity: 1; }
	.sg-cta-heading h2 { font-size: 2.8rem; }
	.sg-cta-box { padding: 3rem 2.4rem; }
}
@media (hover: none) {
	.sg-sector-text { margin-top: 1.4rem; max-height: 40rem; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.sg-page * { animation: none !important; transition: none !important; }
}
