/**
 * Homepage variant 3 — airy industrial with floating pill nav. Scoped to .home-v3 / .home-v3-active.
 */

/* ---- Faint vertical grid guides ---- */
.v3-grid {
	position: absolute; inset: 0; pointer-events: none; z-index: 1;
	background-image: repeating-linear-gradient(90deg, var(--v3-line, rgba(0,10,78,.06)) 0, var(--v3-line, rgba(0,10,78,.06)) 1px, transparent 1px, transparent 25%);
}

/* ---- Hero ---- */
.v3-hero { position: relative; min-height: 76vh; padding-bottom: 96px; display: flex; align-items: center; overflow: hidden; color: #fff; --v3-line: rgba(255,255,255,.10); }
.v3-hero .hero__slides { position: absolute; inset: 0; }
.v3-hero__overlay { position: absolute; inset: 0; background: linear-gradient(180deg, transparent, rgba(5,5,15,.68)); }
.v3-hero__inner { position: relative; z-index: 2; padding-top: var(--header-total); max-width: 940px; }
.v3-hero__title { font-weight: 600; line-height: 1.02; letter-spacing: -0.025em; text-wrap: balance; margin-bottom: 26px; }
.v3-accent { color: var(--yellow); }
.v3-hero__sub { font-weight: 300; max-width: 60ch; opacity: .94; margin: 0; }
.v3-hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

/* ---- Kicker ---- */
.v3-kicker { display: inline-flex; align-items: center; gap: 9px; font-size: 1rem; font-weight: 700; letter-spacing: .1em; color: var(--royal-600); margin-bottom: 14px; }
.v3-kicker__sq { width: 9px; height: 9px; background: var(--yellow); display: inline-block; flex: none; }

/* ---- Stats strip (floating card over hero) ---- */
.v3-stats { position: relative; z-index: 5; margin-top: -68px; }
.v3-stats__grid {
	background: #fff; border-radius: 1000px; box-shadow: 0 22px 54px rgba(0,10,78,.15);
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 30px 40px;
}
.v3-stat { display: flex; align-items: center; gap: 16px; }
.v3-stat + .v3-stat { border-left: 1px solid var(--line); padding-left: 20px; }
.v3-stat__icon { flex: none; width: 54px; height: 54px; border-radius: 50%; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; }
.v3-stat__icon img { width: 100%; height: 100%; object-fit: cover; }
.v3-stat__num { display: block; font-weight: 600; line-height: 1; background: var(--grad-primary); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.v3-stat__label { display: block; color: var(--muted); font-size: .9rem; margin-top: 4px; }

/* ---- What we do ---- */
.v3-what { position: relative; }
.v3-what__inner { position: relative; z-index: 2; }
.v3-what__top { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; margin-bottom: 48px; }
.v3-what__intro { max-width: 560px; }
.v3-what__intro--center { max-width: 620px; margin: 0 auto 40px; text-align: center; }
.v3-what__intro h2 { font-weight: 600; letter-spacing: -0.02em; }
.v3-what__intro p { color: #4b5563; }
.v3-what__media { border-radius: 16px; min-height: 340px; background-size: cover; background-position: center; box-shadow: 0 18px 44px rgba(0,10,78,.16); }
.v3-features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.v3-feature { display: flex; gap: 16px; }
.v3-feature__icon { flex: none; width: 48px; height: 48px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--grad-navy); color: var(--yellow); }
.v3-feature h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 4px; }
.v3-feature p { color: #4b5563; font-size: .95rem; margin: 0; }

/* ---- Range ---- */
/* One shared frame around the whole grid (not per-card) — a permanent,
   prominent blue glow (not a hover state); the cards keep their own zoom. */
.v3-range__frame { background: #fff; border-radius: 28px; padding: 28px; box-shadow: 0 0 50px rgb(5 27 103 / 75%); }
.v3-range__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.v3-range__card { display: block; background: #fff; border-radius: 14px; overflow: hidden; color: var(--ink); transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.v3-range__card:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0,10,78,.24); color: var(--ink); }
.v3-range__media { display: block; aspect-ratio: 1/1; background-size: cover; background-position: center; transition: transform .5s var(--ease); }
.v3-range__card:hover .v3-range__media { transform: scale(1.12); }
.v3-range__foot { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; font-weight: 300; }
.v3-range__arrow { color: var(--royal-600); transition: transform .25s var(--ease); }
.v3-range__card:hover .v3-range__arrow { transform: translateX(5px); }

/* ---- Projects metro mosaic (brief 3.1) ---- */
.v3-metro { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 178px; gap: 14px; grid-auto-flow: dense; }
.v3-metro__item { position: relative; overflow: hidden; border-radius: 12px; display: block; }
.v3-metro__media { position: absolute; inset: 0; background-size: cover; background-position: center; transition: transform .5s var(--ease); }
.v3-metro__item:hover .v3-metro__media { transform: scale(1.06); }
/* 4-item cycle tiles a clean 2-row rectangle with no dangling tile. */
.v3-metro__item:nth-child(4n+1) { grid-column: span 2; grid-row: span 2; }
.v3-metro__item:nth-child(4n) { grid-column: span 2; }
.br-mobile { display: none; }

/* ---- Parallax boxed CTA (brief 1.6) ---- */
.v3-parallax { position: relative; overflow: hidden; background-size: cover; background-position: center; padding-block: 120px; }
.v3-parallax__overlay { position: absolute; inset: 0; background: rgba(0,10,78,.4); }
.v3-parallax .container { position: relative; z-index: 2; }
.v3-parallax__box { background: #fff; border-radius: 18px; padding: 48px; max-width: 720px; margin-inline: auto; text-align: center; box-shadow: 0 28px 64px rgba(0,10,78,.3); }
.v3-parallax__box .v3-kicker { justify-content: center; }
.v3-parallax__box h2 { font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0; }
.v3-parallax__box p { color: #4b5563; max-width: 62ch; margin: 16px auto 0; }
.v3-parallax__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }

/* Split box: image left, content right */
.v3-parallax__box--split { max-width: 960px; padding: 0; overflow: hidden; text-align: left; display: grid; grid-template-columns: 0.82fr 1.18fr; align-items: stretch; }
.v3-parallax__media { background-size: cover; background-position: center; min-height: 340px; }
.v3-parallax__content { padding: 46px; }
.v3-parallax__box--split .v3-kicker { justify-content: flex-start; }
.v3-parallax__box--split p { margin-left: 0; margin-right: 0; max-width: none; }
.v3-parallax__box--split .v3-parallax__actions { justify-content: flex-start; }

.v3-center-cta { display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 40px; }

/* ---- Responsive ---- */
@media (max-width: 900px) {
	.v3-parallax__box { padding: 32px 22px; }
	.v3-stats { margin-top: -48px; }
	.v3-stats__grid { grid-template-columns: 1fr; gap: 0; padding: 12px 24px; }
	.v3-stat { padding-block: 16px; }
	.v3-stat + .v3-stat { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
	.v3-what__top { grid-template-columns: 1fr; gap: 26px; }
	.v3-what__media { min-height: 240px; }
	.v3-features { grid-template-columns: repeat(2, 1fr); gap: 26px; }
	.v3-range__frame { padding: 16px; border-radius: 20px; }
	.v3-range__grid { grid-template-columns: repeat(2, 1fr); }
	.v3-metro { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 148px; }
	.v3-grid { background-size: 50% 100%; }
	.v3-parallax__box--split { grid-template-columns: 1fr; }
	.v3-parallax__box--split .v3-parallax__media { min-height: 200px; border-radius: 16px; margin: 18px 18px 0; }
	.v3-parallax__content { padding: 22px 18px; }
}
@media (max-width: 767px) {
	.v3-hero { min-height: 70vh; padding-bottom: 0; }
	/* Extra clearance under the floating pill on mobile */
	.v3-hero__inner { padding-top: calc(var(--header-total) + 28px); }
	/* Counter: no overlap, white, no shadow on mobile */
	.v3-stats { margin-top: 0; padding-bottom: 0; }
	.v3-stats__grid { box-shadow: none; border-radius: 28px; }
	.br-mobile { display: inline; }
	/* Counter + "สินค้าและบริการ" read as one continuous section on mobile:
	   no gap between them, no vertical grid-line texture. */
	.v3-what { padding-top: 0; }
	.v3-grid { display: none; }
}
@media (max-width: 560px) {
	.v3-features { grid-template-columns: 1fr; }
	/* Category grid stays 2 columns down to phone width. */
	.v3-metro { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 128px; }
	.v3-metro__item:nth-child(4n+1) { grid-row: span 1; }
	.v3-metro__item:nth-child(4n) { grid-column: span 2; }
}
