/* ==========================================================================
   SEOGIX — global design layer (tokens, buttons, header, footer)
   Loaded on every page. Home-only sections live in home.css.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
	/* Brand palette (from the theme) */
	--sg-orange: #FF5C35;          /* brand orange: accents, numbers on dark */
	--sg-orange-600: #E04020;      /* headline accent words on light */
	--sg-orange-700: #D13C1E;      /* button fill (AA with white text) */
	--sg-orange-800: #B3321A;      /* button hover */
	--sg-orange-soft: rgba(255, 92, 53, .12);
	--sg-teal: #0D6E6E;
	--sg-teal-700: #0A5252;
	--sg-teal-300: #5ABAB5;
	--sg-teal-50: #E1F5EE;
	--sg-deep: #0F2B2B;            /* dark teal sections */
	--sg-deep-900: #0A2222;
	--sg-cream: #F5F0E8;
	--sg-cream-200: #EDE6DA;
	--sg-white: #FFFFFF;
	--sg-ink: #1A1A1A;
	--sg-text: #3D3A36;
	--sg-muted: #6B6560;
	--sg-line: #E0D8CC;
	--sg-line-soft: #E8E2DA;
	--sg-on-dark: rgba(255, 255, 255, .78);
	--sg-on-dark-muted: rgba(255, 255, 255, .66);
	--sg-on-dark-line: rgba(255, 255, 255, .12);

	/* Type */
	--sg-font: 'Poppins', -apple-system, 'Segoe UI', Roboto, sans-serif;
	--sg-fs-h1: clamp(2.25rem, 1.3rem + 3.7vw, 4rem);
	--sg-fs-h2: clamp(1.85rem, 1.25rem + 2.3vw, 2.9rem);
	--sg-fs-h3: clamp(1.1rem, 1rem + .4vw, 1.3rem);
	--sg-fs-lead: clamp(1.02rem, .96rem + .3vw, 1.18rem);
	--sg-fs-body: 1rem;
	--sg-fs-small: .875rem;

	/* Space + shape */
	--sg-container: 1200px;
	--sg-gutter: clamp(16px, 4vw, 32px);
	--sg-section: clamp(64px, 9vw, 120px);
	--sg-r-sm: 12px;
	--sg-r-md: 20px;
	--sg-r-lg: 28px;
	--sg-shadow-sm: 0 1px 2px rgba(15, 43, 43, .05), 0 4px 12px rgba(15, 43, 43, .04);
	--sg-shadow-md: 0 18px 40px -18px rgba(15, 43, 43, .22);
	--sg-shadow-lg: 0 40px 80px -28px rgba(15, 43, 43, .35);
	--sg-ease: cubic-bezier(.22, .61, .36, 1);
	--sg-header-h: 76px;
}

/* ---------- 2. Base helpers ---------- */
html { scroll-padding-top: calc(var(--sg-header-h) + 16px); }

.sg-container {
	width: 100%;
	max-width: calc(var(--sg-container) + var(--sg-gutter) * 2);
	margin-inline: auto;
	padding-inline: var(--sg-gutter);
}

.sg-icon { flex: none; display: block; }

.sg-sr-only {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.sg-skip {
	position: absolute; left: 16px; top: -100px; z-index: 1000;
	background: var(--sg-deep); color: var(--sg-white);
	padding: 12px 18px; border-radius: var(--sg-r-sm); font-weight: 600;
	transition: top .2s var(--sg-ease);
}
.sg-skip:focus { top: 16px; color: var(--sg-white); }

:where(.sg-header, .sg-footer, .sg-home) :focus-visible {
	outline: 3px solid var(--sg-teal);
	outline-offset: 3px;
	border-radius: 6px;
}
:where(.sg-footer, .sg-dark) :focus-visible { outline-color: var(--sg-orange); }

/* ---------- 3. Buttons ---------- */
.sg-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
	min-height: 48px; padding: 0 1.4rem;
	font-family: var(--sg-font); font-size: .96rem; font-weight: 600; line-height: 1.2;
	border-radius: var(--sg-r-sm); border: 1.5px solid transparent;
	text-decoration: none; cursor: pointer; white-space: nowrap;
	transition: background-color .2s var(--sg-ease), color .2s var(--sg-ease), border-color .2s var(--sg-ease), transform .2s var(--sg-ease), box-shadow .2s var(--sg-ease);
}
.sg-btn .sg-icon { transition: transform .2s var(--sg-ease); }
.sg-btn:hover .sg-icon--nudge { transform: translateX(3px); }
.sg-btn--primary {
	background: var(--sg-orange-700); color: var(--sg-white);
	box-shadow: 0 1px 0 rgba(255, 255, 255, .22) inset, 0 12px 24px -10px rgba(255, 92, 53, .65);
}
.sg-btn--primary:hover { background: var(--sg-orange-800); color: var(--sg-white); transform: translateY(-1px); }
.sg-btn--outline { background: var(--sg-white); color: var(--sg-ink); border-color: var(--sg-line); }
.sg-btn--outline:hover { border-color: var(--sg-teal); color: var(--sg-teal); transform: translateY(-1px); }
.sg-btn--ghost { background: transparent; color: var(--sg-white); border-color: rgba(255, 255, 255, .32); }
.sg-btn--ghost:hover { background: rgba(255, 255, 255, .08); border-color: var(--sg-white); color: var(--sg-white); }
.sg-btn--teal { background: var(--sg-teal); color: var(--sg-white); }
.sg-btn--teal:hover { background: var(--sg-teal-700); color: var(--sg-white); }
.sg-btn--sm { min-height: 44px; padding: 0 1.1rem; font-size: .9rem; }
.sg-btn--lg { min-height: 56px; padding: 0 1.75rem; font-size: 1.02rem; }
.sg-btn--block { width: 100%; white-space: normal; text-align: center; }

/* ---------- 4. Header ---------- */
.sg-header {
	position: sticky; top: 0; z-index: 200;
	border-bottom: 1px solid transparent;
	transition: border-color .25s var(--sg-ease), box-shadow .25s var(--sg-ease);
}
/* Blur lives on a pseudo-element so the fixed mobile menu is not trapped inside the header. */
.sg-header::before {
	content: ""; position: absolute; inset: 0; z-index: -1;
	background: rgba(245, 240, 232, .8);
	-webkit-backdrop-filter: saturate(160%) blur(14px);
	backdrop-filter: saturate(160%) blur(14px);
	transition: background-color .25s var(--sg-ease);
}
.admin-bar .sg-header { top: 32px; }
.sg-header.is-scrolled::before { background: rgba(245, 240, 232, .92); }
.sg-header.is-scrolled {
	border-bottom-color: var(--sg-line);
	box-shadow: 0 10px 30px -22px rgba(15, 43, 43, .45);
}
.sg-header__inner {
	display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
	min-height: var(--sg-header-h);
}
.sg-header__brand { flex: none; display: flex; align-items: center; }
.sg-header__brand img,
.sg-header .custom-logo { display: block; height: 42px; width: auto; }
.sg-header__actions { display: flex; align-items: center; gap: .75rem; flex: none; }

/* Navigation (desktop) */
.sg-nav__head, .sg-nav__foot { display: none; }
.sg-nav__list { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.sg-nav__item { position: relative; }
.sg-nav__split { display: flex; align-items: center; }
.sg-nav__link {
	display: inline-flex; align-items: center; gap: .3rem;
	min-height: 44px; padding: 0 .85rem;
	font-family: var(--sg-font); font-size: .94rem; font-weight: 500; color: var(--sg-ink);
	background: none; border: 0; border-radius: 10px; cursor: pointer; text-decoration: none;
	transition: color .2s var(--sg-ease), background-color .2s var(--sg-ease);
}
.sg-nav__link:hover, .sg-nav__item.is-open > .sg-nav__link, .sg-nav__item.is-open .sg-nav__split .sg-nav__link { color: var(--sg-teal); background: rgba(13, 110, 110, .07); }
.sg-nav__item.is-current > .sg-nav__link,
.sg-nav__item.is-current > .sg-nav__split > .sg-nav__link { color: var(--sg-teal); font-weight: 600; }
.sg-nav__split .sg-nav__link { padding-right: .2rem; }
.sg-nav__caret {
	display: inline-flex; align-items: center; justify-content: center;
	width: 32px; min-height: 44px; padding: 0;
	background: none; border: 0; border-radius: 8px; color: var(--sg-ink); cursor: pointer;
}
.sg-nav__caret:hover { color: var(--sg-teal); }
.sg-nav__chev { transition: transform .25s var(--sg-ease); }
.sg-nav__item.is-open .sg-nav__chev { transform: rotate(180deg); }

.sg-nav__panel {
	position: absolute; top: calc(100% + 10px); left: 50%;
	width: min(580px, 92vw);
	padding: .6rem;
	background: var(--sg-white);
	border: 1px solid var(--sg-line-soft);
	border-radius: var(--sg-r-md);
	box-shadow: var(--sg-shadow-lg);
	opacity: 0; visibility: hidden;
	transform: translate(-50%, 8px);
	transition: opacity .2s var(--sg-ease), transform .2s var(--sg-ease), visibility 0s linear .2s;
}
.sg-nav__panel::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.sg-nav__panel:has(.sg-nav__subitem:only-child) { width: 300px; }
.sg-nav__item.has-sub:hover > .sg-nav__panel,
.sg-nav__item.has-sub:focus-within > .sg-nav__panel,
.sg-nav__item.is-open > .sg-nav__panel {
	opacity: 1; visibility: visible; transform: translate(-50%, 0);
	transition: opacity .2s var(--sg-ease), transform .2s var(--sg-ease), visibility 0s;
}
.sg-nav__item.is-closed > .sg-nav__panel { opacity: 0; visibility: hidden; }
.sg-nav__sub { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.sg-nav__panel:has(.sg-nav__subitem:only-child) .sg-nav__sub { grid-template-columns: 1fr; }
.sg-mega__link {
	display: flex; align-items: flex-start; gap: .85rem;
	padding: .8rem; border-radius: var(--sg-r-sm);
	color: var(--sg-ink); text-decoration: none;
	transition: background-color .2s var(--sg-ease);
}
.sg-mega__link:hover { background: var(--sg-cream); color: var(--sg-ink); }
.sg-mega__icon {
	display: grid; place-items: center; flex: none;
	width: 40px; height: 40px; border-radius: var(--sg-r-sm);
	background: var(--sg-teal-50); color: var(--sg-teal);
	transition: background-color .2s var(--sg-ease), color .2s var(--sg-ease);
}
.sg-mega__link:hover .sg-mega__icon { background: var(--sg-teal); color: var(--sg-white); }
.sg-mega__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sg-mega__title { font-size: .92rem; font-weight: 600; line-height: 1.35; }
.sg-mega__desc { font-size: .8rem; line-height: 1.45; color: var(--sg-muted); }

.sg-burger {
	display: none; align-items: center; justify-content: center;
	width: 46px; height: 46px; padding: 0;
	background: var(--sg-white); color: var(--sg-ink);
	border: 1px solid var(--sg-line); border-radius: var(--sg-r-sm); cursor: pointer;
}
.sg-nav__scrim { display: none; }

/* Navigation (tablet + mobile): full-screen slide-in sheet */
@media (max-width: 1080px) {
	:root { --sg-header-h: 68px; }
	.sg-burger { display: inline-flex; }
	.sg-header__brand img, .sg-header .custom-logo { height: 38px; }
	.sg-nav {
		position: fixed; inset: 0; z-index: 400;
		display: flex; flex-direction: column;
		background: var(--sg-cream);
		padding: 0 var(--sg-gutter) calc(20px + env(safe-area-inset-bottom));
		overflow-y: auto; overscroll-behavior: contain;
		transform: translateX(100%); visibility: hidden;
		transition: transform .35s var(--sg-ease), visibility 0s linear .35s;
	}
	.sg-nav.is-open { transform: none; visibility: visible; transition: transform .35s var(--sg-ease), visibility 0s; }
	.admin-bar .sg-nav { top: 46px; }
	.sg-nav__head {
		display: flex; align-items: center; justify-content: space-between;
		min-height: var(--sg-header-h); border-bottom: 1px solid var(--sg-line);
		margin-bottom: .75rem;
	}
	.sg-nav__head-title { font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--sg-muted); }
	.sg-nav__close {
		display: inline-flex; align-items: center; justify-content: center;
		width: 46px; height: 46px; padding: 0;
		background: var(--sg-white); color: var(--sg-ink);
		border: 1px solid var(--sg-line); border-radius: var(--sg-r-sm); cursor: pointer;
	}
	.sg-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
	.sg-nav__item { border-bottom: 1px solid var(--sg-line-soft); }
	.sg-nav__link { width: 100%; justify-content: space-between; min-height: 58px; padding: 0 .25rem; font-size: 1.08rem; font-weight: 600; border-radius: 0; }
	.sg-nav__link:hover { background: none; }
	.sg-nav__split .sg-nav__link { width: auto; flex: 1; }
	.sg-nav__caret { width: 52px; min-height: 58px; }
	.sg-nav__panel, .sg-nav__panel:has(.sg-nav__subitem:only-child) {
		position: static; width: auto; padding: 0 0 .75rem;
		border: 0; box-shadow: none; background: none; border-radius: 0;
		opacity: 1; visibility: visible; transform: none; display: none; transition: none;
	}
	.sg-nav__panel::before { display: none; }
	.sg-nav__item.has-sub:hover > .sg-nav__panel,
	.sg-nav__item.has-sub:focus-within > .sg-nav__panel,
	.sg-nav__item.is-open > .sg-nav__panel { transform: none; transition: none; }
	.sg-nav__item.is-open > .sg-nav__panel { display: block; }
	.sg-nav__sub { grid-template-columns: 1fr; }
	.sg-mega__link { padding: .7rem .5rem; }
	.sg-nav__foot { display: block; margin-top: auto; padding-top: 1.5rem; }
	.sg-nav__scrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 390; background: rgba(15, 43, 43, .4); }
	body.sg-nav-open { overflow: hidden; }
	body.sg-nav-open .sg-wa-float { display: none; }
}
@media (max-width: 782px) { .admin-bar .sg-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .sg-header { top: 0; } }
@media (max-width: 520px) {
	.sg-header__cta { display: none; }
	.sg-header__brand img, .sg-header .custom-logo { height: 34px; }
}

/* ---------- 5. Footer ---------- */
.sg-footer {
	background: var(--sg-deep);
	color: var(--sg-on-dark);
	font-size: .94rem;
	position: relative;
	overflow: hidden;
}
.sg-footer::before {
	content: ""; position: absolute; inset: -40% auto auto -10%;
	width: 620px; height: 620px; border-radius: 50%;
	background: radial-gradient(closest-side, rgba(13, 110, 110, .55), transparent);
	pointer-events: none;
}
.sg-footer > * { position: relative; }
.sg-footer a { color: var(--sg-on-dark); text-decoration: none; transition: color .2s var(--sg-ease); }
.sg-footer a:hover { color: var(--sg-white); }
.sg-footer p { margin: 0; }

.sg-footer__promise {
	display: flex; align-items: center; gap: 1.25rem;
	padding: 2.25rem 0;
	border-bottom: 1px solid var(--sg-on-dark-line);
}
.sg-footer__shield {
	display: grid; place-items: center; flex: none;
	width: 52px; height: 52px; border-radius: var(--sg-r-sm);
	background: rgba(255, 92, 53, .14); color: var(--sg-orange);
}
.sg-footer__promise-text { flex: 1; display: flex; flex-direction: column; gap: .15rem; }
.sg-footer__promise-text strong { color: var(--sg-white); font-size: 1.05rem; font-weight: 600; line-height: 1.4; }
.sg-footer__promise-text span { color: var(--sg-on-dark-muted); font-size: .9rem; }
.sg-footer .sg-btn--primary, .sg-footer .sg-btn--primary:hover { color: var(--sg-white); }

.sg-footer__grid {
	display: grid; grid-template-columns: 1.7fr 1fr 1fr 1.15fr; gap: 3rem;
	padding: 4rem 0 3rem;
}
.sg-footer__logo { display: inline-block; margin-bottom: 1.1rem; }
.sg-footer__logo img { display: block; height: 44px; width: auto; }
.sg-footer__brand > p { max-width: 36ch; line-height: 1.75; color: var(--sg-on-dark-muted); }
.sg-footer__contact { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: .55rem; }
.sg-footer__contact li { display: flex; align-items: center; gap: .6rem; }
.sg-footer__contact .sg-icon { color: var(--sg-teal-300); }
.sg-footer__contact a { color: var(--sg-white); font-weight: 500; }
.sg-footer__social { display: flex; gap: .5rem; margin-top: 1.25rem; }
.sg-footer__social a {
	display: grid; place-items: center; width: 44px; height: 44px;
	border-radius: var(--sg-r-sm); border: 1px solid var(--sg-on-dark-line);
	background: rgba(255, 255, 255, .04);
}
.sg-footer__social a:hover { background: var(--sg-orange-700); border-color: var(--sg-orange-700); color: var(--sg-white); }
.sg-footer__badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.25rem; }
.sg-footer__badges span {
	display: inline-flex; align-items: center; gap: .4rem;
	padding: .35rem .75rem; border-radius: 999px;
	background: rgba(255, 255, 255, .06); border: 1px solid var(--sg-on-dark-line);
	font-size: .8rem; font-weight: 500; color: var(--sg-white);
}
.sg-footer__badges .sg-icon { color: var(--sg-orange); }

.sg-footer__title {
	margin: 0 0 1.1rem; font-family: var(--sg-font);
	font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
	color: var(--sg-white); line-height: 1.4;
}
.sg-footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.sg-footer__col a { display: inline-flex; align-items: center; min-height: 36px; }

.sg-footer__locations { padding: 2rem 0 2.5rem; border-top: 1px solid var(--sg-on-dark-line); }
.sg-footer__locations .sg-footer__title { margin-bottom: .8rem; }
.sg-footer__cities { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem .4rem; }
.sg-footer__cities a {
	display: inline-flex; align-items: center; min-height: 36px; padding: 0 .8rem;
	border-radius: 999px; border: 1px solid var(--sg-on-dark-line); font-size: .86rem;
}
.sg-footer__cities a:hover { border-color: var(--sg-teal-300); }
.sg-footer__more { margin-top: .9rem; }
.sg-footer__more summary {
	display: inline-flex; align-items: center; gap: .35rem; min-height: 44px;
	cursor: pointer; list-style: none; color: var(--sg-orange); font-weight: 600; font-size: .9rem;
}
.sg-footer__more summary::-webkit-details-marker { display: none; }
.sg-footer__more summary .sg-icon { transition: transform .25s var(--sg-ease); }
.sg-footer__more[open] summary .sg-icon { transform: rotate(180deg); }
.sg-footer__more .sg-footer__cities { margin-top: .5rem; }

.sg-footer__bar { background: var(--sg-deep-900); font-size: .84rem; color: var(--sg-on-dark-muted); }
.sg-footer__bar-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-block: 1.2rem; }
.sg-footer__legal { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.25rem; }
.sg-footer__legal a { color: var(--sg-white); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .35); }
.sg-footer__legal a:hover { text-decoration-color: var(--sg-orange); }
.sg-footer__tags { display: flex; flex-wrap: wrap; gap: .35rem 1rem; }
.sg-footer__tags span + span::before { content: "\00B7"; margin-right: 1rem; color: var(--sg-teal-300); }

@media (max-width: 1024px) {
	.sg-footer__grid { grid-template-columns: 1fr 1fr 1fr; gap: 2.5rem; }
	.sg-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 767px) {
	.sg-footer__promise { flex-direction: column; align-items: flex-start; }
	.sg-footer__promise .sg-btn { width: 100%; white-space: normal; text-align: center; }
	.sg-footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; padding-top: 3rem; }
	.sg-footer__bar-inner { flex-direction: column; align-items: flex-start; padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}
@media (max-width: 420px) {
	.sg-footer__grid { grid-template-columns: 1fr; }
}

/* ---------- 6. Floating WhatsApp ---------- */
.sg-wa-float {
	position: fixed; z-index: 300;
	right: calc(20px + env(safe-area-inset-right));
	bottom: calc(20px + env(safe-area-inset-bottom));
	display: grid; place-items: center;
	width: 58px; height: 58px; border-radius: 50%;
	background: var(--sg-teal); color: var(--sg-white);
	box-shadow: 0 0 0 4px rgba(245, 240, 232, .85), 0 14px 30px -8px rgba(15, 43, 43, .55);
	transition: transform .2s var(--sg-ease), background-color .2s var(--sg-ease);
}
.sg-wa-float:hover { background: var(--sg-teal-700); color: var(--sg-white); transform: translateY(-2px) scale(1.04); }
.sg-wa-float::after {
	content: ""; position: absolute; top: 6px; right: 6px;
	width: 11px; height: 11px; border-radius: 50%;
	background: var(--sg-orange); border: 2px solid var(--sg-teal);
}
@media (max-width: 640px) {
	.sg-wa-float { width: 54px; height: 54px; right: calc(16px + env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); }
}

/* Exit popup close icon alignment (popup itself is styled in main.css) */
.exit-popup-close { display: inline-grid; place-items: center; }

/* ---------- 7. Scroll reveal ---------- */
.sg-js .sg-reveal {
	opacity: 0; transform: translateY(22px);
	transition: opacity .7s var(--sg-ease), transform .7s var(--sg-ease);
}
/* Failsafe: if sg.js never runs, show everything after 3s. */
.sg-js:not(.sg-ready) .sg-reveal { animation: sg-reveal-failsafe 0s linear 3s forwards; }
.sg-js .sg-reveal.is-in { opacity: 1; transform: none; }
@keyframes sg-reveal-failsafe { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.sg-js .sg-reveal { opacity: 1; transform: none; transition: none; animation: none; }
	.sg-header, .sg-nav, .sg-nav__panel, .sg-btn, .sg-wa-float { transition: none; }
}
