/* Kugan site extras. Page content and colors are edited in Elementor. */

html { scroll-behavior: smooth; }
/* Slide-in animations start off-screen; stop them causing sideways scrolling on phones. */
html, body { overflow-x: clip; }
[id] { scroll-margin-top: 96px; }

/* Sticky header */
#site-header.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: #fff;
	transition: box-shadow .25s ease;
}
.admin-bar #site-header.site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar #site-header.site-header { top: 0; } }
body.k-scrolled #site-header.site-header { box-shadow: 0 4px 20px rgba(15, 42, 63, .08); }
#site-header .site-navigation ul.menu li a { transition: color .2s ease; }
#site-header .site-navigation ul.menu li a:hover { color: #1D7BB0; }

/* Cards lift on hover */
.k-card { transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.k-card:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(15, 42, 63, .10); border-color: #BFDDEF !important; }

/* Seal gently floats */
.k-float img { animation: k-float 6s ease-in-out infinite; }
@keyframes k-float { 50% { transform: translateY(-10px); } }

/* Stats band separators */
.k-stats .elementor-counter { text-align: center; }

/* ---------- Flip cards ---------- */
.k-flip { perspective: 1200px; cursor: pointer; }
.k-flip:focus-visible { outline: 3px solid #2A9BD4; outline-offset: 4px; border-radius: 16px; }
.k-flip .k-flip-inner.e-con {
	--display: grid;
	display: grid;
	position: relative;
	min-height: 290px;
	transform-style: preserve-3d;
	transition: transform .7s cubic-bezier(.2, .7, .2, 1);
}
.k-flip .k-flip-front.e-con,
.k-flip .k-flip-back.e-con {
	grid-area: 1 / 1;
	width: 100%;
	-webkit-backface-visibility: hidden;
	backface-visibility: hidden;
}
.k-flip .k-flip-back.e-con { transform: rotateY(180deg); }
.k-flip-hint { margin-top: auto; color: #1D7BB0; font-size: 14px; font-weight: 600; }
.k-flip-hint p { margin: 0; }

@media (hover: hover) {
	.k-flip:hover .k-flip-inner { transform: rotateY(180deg); }
}
.k-flip.is-flipped .k-flip-inner,
.k-flip:has(a:focus-visible) .k-flip-inner { transform: rotateY(180deg); }

/* In the Elementor editor show both sides so they are easy to edit */
.elementor-editor-active .k-flip .k-flip-inner.e-con { --display: flex; display: flex; flex-direction: column; gap: 12px; transform: none !important; }
.elementor-editor-active .k-flip .k-flip-back.e-con { transform: none; }

/* ---------- Resource link lists ---------- */
.k-links ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.k-links li { margin: 0; }
.k-links li a {
	display: flex; align-items: center; gap: 12px; height: 100%;
	padding: 14px 16px; background: #fff; border: 1px solid #E4E7EB; border-radius: 12px;
	color: #16181C; text-decoration: none; font-weight: 500; line-height: 1.35;
	transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.k-links li a::before {
	content: ""; flex: 0 0 34px; height: 34px; border-radius: 8px; background: #E8F4FB
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231D7BB0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6M12 18v-6M9 15l3 3 3-3'/%3E%3C/svg%3E") center / 18px no-repeat;
}
.k-links li a:hover { border-color: #2A9BD4; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15, 42, 63, .08); color: #1D7BB0; }
@media (max-width: 767px) { .k-links ul { grid-template-columns: 1fr; } }

/* Policies */
.k-policies p { padding: 12px 0; margin: 0; border-bottom: 1px solid #E4E7EB; }
.k-policies p:last-child { border-bottom: 0; }

/* Mobile polish */
@media (max-width: 767px) {
	.elementor-button { width: 100%; justify-content: center; }
	.elementor-widget-button { width: 100%; }
	.k-flip .k-flip-inner.e-con { min-height: 260px; }
}

/* Respect "reduce motion" settings */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.k-float img { animation: none; }
	.k-flip .k-flip-inner.e-con { transition: none; }
	.elementor-invisible { visibility: visible !important; }
	.animated { animation: none !important; }
}

/* ================= GSAP scroll effects ================= */

/* Hide animated items until GSAP shows them (only when JS runs). */
.g-js .g-reveal { opacity: 0; visibility: hidden; }
.g-js .g-split .elementor-heading-title { visibility: hidden; }

/* Smooth scrolling: header stays fixed above the scrolling page. */
.g-smooth #site-header.site-header { position: fixed; top: 0; left: 0; right: 0; }
.g-smooth.admin-bar #site-header.site-header { top: 32px; }
.g-smooth #smooth-content { padding-top: var(--k-header-h, 80px); }
.g-smooth.admin-bar #smooth-wrapper { top: 32px !important; height: auto !important; }

/* Reading progress bar */
.g-progress {
	position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 101;
	background: linear-gradient(90deg, #2A9BD4, #F5B700);
	transform: scaleX(0); transform-origin: 0 50%; pointer-events: none;
}
.admin-bar .g-progress { top: 32px; }

/* Parallax / reveal images need a frame */
.g-parallax, .g-reveal-img { overflow: hidden; border-radius: 16px; }
.g-parallax img, .g-reveal-img img { display: block; width: 100%; will-change: transform; }

/* Background parallax: image must be taller than the box */
.g-bg-parallax, .g-hero { background-size: cover; background-repeat: no-repeat; }

/* Marquee band */
.g-marquee { overflow: hidden; }
.g-marquee .elementor-heading-title { white-space: nowrap; }
.g-mq-inner { display: inline-flex; will-change: transform; }
.g-mq-inner > span { padding-right: 0.6em; }

/* Pinned sideways steps */
.g-pin-steps .g-track > .e-con { flex: 0 0 auto; }
@media (min-width: 1025px) {
	.g-pin-steps .g-track.e-con { flex-wrap: nowrap !important; width: max-content; }
	.g-pin-steps .g-track > .e-con { width: 420px !important; }
}
.g-steps-line { height: 4px; background: #E4E7EB; border-radius: 4px; overflow: hidden; }
.g-steps-fill { height: 100%; background: linear-gradient(90deg, #2A9BD4, #F5B700); transform-origin: 0 50%; }

/* Lottie boxes */
.k-lottie { width: 100%; max-width: var(--k-lottie-size, 180px); aspect-ratio: 1; }
.k-lottie svg { display: block; }
.elementor-widget-html:has(.k-lottie.k-center) .k-lottie { margin: 0 auto; }

@media (prefers-reduced-motion: reduce) {
	.g-js .g-reveal, .g-js .g-split .elementor-heading-title { opacity: 1; visibility: visible; }
}

/* Big statement paragraph */
.k-statement, .k-statement p { font-weight: 700; letter-spacing: -0.01em; line-height: 1.3 !important; }
@media (max-width: 767px) { .k-statement, .k-statement p { font-size: 26px !important; } }

/* Seal on photo heroes: white disc so it stays readable */
.g-hero .k-float img { background: #fff; border-radius: 50%; padding: 14px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
