/* ==========================================================================
   ANVA & Co Co.,Ltd — Solar Cell Engineering Website
   Brand: Navy + Gold • Font: Kanit (Google Fonts)
   ========================================================================== */

/* Reset & Base ============================================================ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Sunrise-over-emerald palette: emerald #1db837 + banana-leaf accent + warm sunrise (no yellow-green) */
    --green:        #1db837;            /* primary emerald */
    --green-deep:   #0b5c1d;            /* deep emerald — for dark surfaces */
    --green-darker: #073d12;            /* darkest emerald — header / footer */
    --green-soft:   #2bd44a;            /* banana-leaf brighter accent */
    --green-leaf:   #41e066;            /* banana-leaf hover/glow */

    /* Sunrise warm accents (orange→coral, never yellow-green) */
    --sunrise-1:    #ff6b35;            /* hot sunrise orange */
    --sunrise-2:    #ff8e53;            /* peachy sunrise */
    --sunrise-3:    #ffb347;            /* warm amber */

    /* Gold — warm/orange-leaning, not yellow */
    --gold:         #f59e0b;
    --gold-soft:    #fbbf24;

    /* Coral red */
    --red:          #e63946;
    --red-soft:     #ef476f;

    --cream:        #fdf6e3;            /* card/surface cream */
    --cream-2:      #fbf0d2;            /* deeper cream */
    --bg:           #fffcf5;            /* very light warm bg */
    --white:        #ffffff;

    /* Stronger, darker text for readability */
    --text:         #0f172a;            /* near-black slate */
    --text-soft:    #1e293b;            /* dark slate */
    --muted:        #475569;
    --line:         #e2e8f0;

    /* Aliases — keep legacy class names working */
    --navy:         var(--green-deep);
    --navy-deep:    var(--green-darker);
    --navy-soft:    var(--green);

    --shadow-sm: 0 2px 8px rgba(7, 61, 18, 0.10);
    --shadow-md: 0 10px 28px rgba(7, 61, 18, 0.14);
    --shadow-lg: 0 20px 56px rgba(7, 61, 18, 0.20);
    --shadow-glow: 0 0 0 1px rgba(29, 184, 55, 0.22), 0 12px 32px rgba(29, 184, 55, 0.18);
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --container: 1200px;
    --transition: 0.25s ease;

    /* Signature sunrise gradient */
    --gradient-sunrise: linear-gradient(135deg, var(--green-darker) 0%, var(--green-deep) 30%, var(--green) 55%, var(--sunrise-3) 82%, var(--sunrise-1) 100%);
    --gradient-leaf:    linear-gradient(135deg, var(--green-deep), var(--green) 60%, var(--green-soft));
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Kanit', system-ui, -apple-system, "Segoe UI", sans-serif;
    font-weight: 400;
    color: var(--text);
    background: var(--bg);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

p {
    color: var(--text-soft);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--green-deep);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--sunrise-1);
}

h1, h2, h3, h4, h5 {
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
    letter-spacing: -0.01em;
}

ul {
    list-style: none;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* Icons (inline SVG sized via currentColor) ================================ */
.icon {
    width: 22px;
    height: 22px;
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.icon-lg {
    width: 32px;
    height: 32px;
}

.icon-sm {
    width: 16px;
    height: 16px;
}

/* Header / Navigation ==================================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    gap: 32px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--navy);
}

.brand-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    flex-shrink: 0;
    display: block;
}

/* Footer logo on dark background — slight glow */
.footer-brand .brand-logo {
    filter: drop-shadow(0 2px 8px rgba(245, 181, 36, 0.25));
}

.brand-text {
    line-height: 1.1;
}

.brand-name {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: 0.02em;
}

.brand-tagline {
    display: block;
    font-size: 12px;
    color: var(--muted);
    font-weight: 400;
}

.nav-links {
    display: flex;
    gap: 6px;
    align-items: center;
}

.nav-links a {
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 400;
    color: var(--text-soft);
    transition: all var(--transition);
}

.nav-links a {
    color: var(--text);
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    background: var(--cream);
    color: var(--green-deep);
    font-weight: 600;
}

.nav-cta {
    background: linear-gradient(135deg, var(--sunrise-1) 0%, var(--sunrise-3) 100%);
    color: #fff !important;
    padding: 10px 18px !important;
    border-radius: 999px !important;
    font-weight: 600 !important;
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.35);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.nav-cta:hover {
    background: linear-gradient(135deg, var(--sunrise-1) 0%, var(--sunrise-3) 100%) !important;
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.35);
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--navy);
    cursor: pointer;
    padding: 6px;
}

/* Hero — full-bleed video bg with brand overlay ========================== */
.hero {
    position: relative;
    padding: 80px 0 100px;
    /* Fallback color shown until video loads / if video fails */
    background: var(--green-darker);
    color: var(--white);
    overflow: hidden;
    isolation: isolate;
}

/* Animated Image / Video layer (absolute, behind content) */
.hero-bg-image,
.hero-bg-video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    pointer-events: none;
    /* Crisp video without color tint */
    filter: contrast(1.05) saturate(1.05) brightness(0.95);
    transform-origin: center;
    image-rendering: high-quality;
}

/* Image gets the slow zoom animation */
.hero-bg-image {
    animation: hero-slow-zoom 15s linear infinite alternate;
}

/* Video plays naturally — no zoom needed */
.hero-bg-video {
    transform: scale(1.02);
}

@keyframes hero-slow-zoom {
    0%   { transform: scale(1); }
    100% { transform: scale(1.12); }
}

/* Dark readability overlay — left side darker so text on left reads clearly */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        linear-gradient(90deg,
            rgba(0, 0, 0, 0.70) 0%,
            rgba(0, 0, 0, 0.55) 35%,
            rgba(0, 0, 0, 0.30) 65%,
            rgba(0, 0, 0, 0.20) 100%),
        linear-gradient(180deg,
            rgba(0, 0, 0, 0.20) 0%,
            rgba(0, 0, 0, 0)    40%,
            rgba(0, 0, 0, 0.30) 100%);
    pointer-events: none;
}

/* Removed second decorative overlay layer */
.hero::after { content: none; }

/* Container content sits above the overlay */
.hero > .container {
    position: relative;
    z-index: 2;
}

/* Respect reduced-motion: pause the image animation */
@media (prefers-reduced-motion: reduce) {
    .hero-bg-image { animation: none; transform: scale(1.05); }
    .hero-bg-video { animation: none; }
}

.hero-content {
    position: relative;
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
    background: transparent;
    padding: 40px 32px;
    border-radius: var(--radius-lg);
    border: none;
    box-shadow: none;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.45);
    color: #fff7e6;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    border: 1px solid rgba(255, 179, 71, 0.55);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

.hero-title {
    font-size: clamp(28px, 4vw, 46px);
    font-weight: 800;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 18px;
    text-shadow:
        0 2px 4px rgba(0, 0, 0, 0.5),
        0 4px 14px rgba(0, 0, 0, 0.6);
}

.hero-title .accent {
    color: var(--sunrise-3);
    display: block;
    background: linear-gradient(90deg, var(--sunrise-3) 0%, var(--sunrise-1) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 4px 24px rgba(255, 142, 83, 0.30);
}

/* Red text utilities */
.text-red { color: var(--red); }
.text-gold { color: var(--gold); }
.text-green { color: var(--green); }

/* Inline emphasis (used inside paragraphs/headings) */
strong.hl, .hl {
    color: var(--red);
    font-weight: 600;
}

/* Hot/Promo badge — red chip */
.badge-hot {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--red);
    color: var(--white);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(192, 57, 43, 0.3);
    margin-left: 8px;
    vertical-align: middle;
}

.hero-subtitle {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 auto 24px;
    max-width: 500px;
    font-weight: 400;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-bottom: 28px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 26px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--sunrise-1) 0%, var(--sunrise-3) 100%);
    color: #fff;
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.35);
    font-weight: 600;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--sunrise-2) 0%, var(--sunrise-3) 100%);
    transform: translateY(-2px);
    color: #fff;
    box-shadow: 0 12px 32px rgba(255, 107, 53, 0.45);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 1.5px solid rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--white);
    color: var(--white);
}

.btn-dark {
    background: linear-gradient(135deg, var(--sunrise-1) 0%, var(--sunrise-3) 100%);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(255, 107, 53, 0.35);
    border: none;
}

.btn-dark:hover {
    background: linear-gradient(135deg, var(--sunrise-2) 0%, var(--sunrise-3) 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(255, 107, 53, 0.45);
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 28px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.hero-stat .num {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--sunrise-3);
    line-height: 1;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
}
.hero-stat:nth-child(2) .num { color: var(--green-leaf); }
.hero-stat:nth-child(3) .num { color: var(--sunrise-2); }

.hero-stat .label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.92);
    margin-top: 4px;
    display: block;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.hero-visual {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transform: rotate(0.5deg);
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-badge {
    position: absolute;
    bottom: 18px;
    left: 18px;
    background: var(--white);
    padding: 12px 18px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--green-darker);
    font-weight: 600;
    font-size: 14px;
    box-shadow: var(--shadow-md);
    border-left: 3px solid var(--sunrise-1);
}

/* Sections (general) ====================================================== */
.section {
    padding: 90px 0;
}

.section-tight {
    padding: 60px 0;
}

.section-dark {
    background: var(--navy-deep);
    color: var(--white);
}

.section-dark h1, .section-dark h2, .section-dark h3 {
    color: var(--white);
}

.section-dark p {
    color: rgba(255, 255, 255, 0.78);
}

.section-cream {
    background: var(--cream);
}

.section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 60px;
}

.section-eyebrow {
    display: inline-block;
    color: var(--sunrise-1);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
    position: relative;
}
.section-eyebrow::after {
    content: '';
    display: inline-block;
    width: 28px;
    height: 2px;
    background: linear-gradient(90deg, var(--sunrise-1), var(--green));
    margin-left: 10px;
    vertical-align: middle;
    border-radius: 2px;
}
.section-eyebrow.is-red { color: var(--red); }

/* Section title supports inline red emphasis */
.section-title .hl,
h1 .hl,
h2 .hl {
    color: var(--red);
    font-weight: inherit;
}

/* Footer brand top accent */
.site-footer {
    border-top: 4px solid var(--red);
}

.section-title {
    font-size: clamp(28px, 3.4vw, 40px);
    margin-bottom: 14px;
    font-weight: 700;
    color: var(--text);
}

.section-subtitle {
    color: var(--text-soft);
    font-size: 17px;
    font-weight: 400;
}

/* USP Cards =============================================================== */
.usp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.usp-card {
    background: var(--white);
    padding: 36px 28px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.usp-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(29, 184, 55, 0.06), transparent 70%);
    opacity: 0;
    transition: opacity var(--transition);
    pointer-events: none;
}

.usp-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--green);
}

.usp-card:hover::after {
    opacity: 1;
}

.usp-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--sunrise-1) 0%, var(--sunrise-3) 100%);
    color: #fff;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
    box-shadow: 0 8px 18px rgba(255, 107, 53, 0.32);
}

.usp-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text);
    font-weight: 700;
}

.usp-card p {
    color: var(--text-soft);
    font-size: 15px;
}

/* Two-column generic ====================================================== */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 56px;
    align-items: center;
    position: relative;
}

.split-image img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    aspect-ratio: 4/3;
    object-fit: cover;
    width: 100%;
}

.split-text h2 {
    font-size: clamp(26px, 3vw, 36px);
    margin-bottom: 16px;
    color: var(--text);
    font-weight: 700;
}

.split-text p {
    color: var(--text-soft);
    margin-bottom: 14px;
    font-size: 16px;
}

/* Split row motion — motion.dev inspired ================================= */
/* Block-level state: parent fades + lifts gently (no horizontal drift, so
   text never visually overlaps the image during animation) */
.split .split-text,
.split .split-image {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 0.75s cubic-bezier(.2,.7,.2,1),
        transform 0.75s cubic-bezier(.2,.7,.2,1);
    will-change: opacity, transform;
}

/* Image slides up slightly later than the text block */
.split .split-image {
    transform: translateY(20px) scale(0.97);
    transition-delay: 0.08s;
}

/* Children of split-text stagger in from the OUTSIDE edge of the column,
   never crossing over the image. (.feature-list is excluded — its <li>
   items animate individually below, so we don't double-translate). */
.split .split-text > *:not(.feature-list) {
    opacity: 0;
    transform: translateX(-32px);
    transition:
        opacity 0.6s cubic-bezier(.2,.7,.2,1),
        transform 0.6s cubic-bezier(.2,.7,.2,1);
}

/* When image is on LEFT in DOM, text is on RIGHT — emerge from RIGHT edge */
.split .split-image:first-child + .split-text > *:not(.feature-list) {
    transform: translateX(32px);
}

/* Feature list items: smaller, snappier stagger */
.split .feature-list li {
    opacity: 0;
    transform: translateX(-20px);
    transition:
        opacity 0.5s cubic-bezier(.2,.7,.2,1),
        transform 0.5s cubic-bezier(.2,.7,.2,1);
}
.split .split-image:first-child + .split-text .feature-list li {
    transform: translateX(20px);
}

/* Reveal state */
.split.is-visible .split-text,
.split.is-visible .split-image {
    opacity: 1;
    transform: none;
}

.split.is-visible .split-text > *:not(.feature-list) {
    opacity: 1;
    transform: none;
}

/* Stagger delays for split-text direct children (excluding .feature-list) */
.split.is-visible .split-text > *:nth-child(1):not(.feature-list) { transition-delay: 0.20s; }
.split.is-visible .split-text > *:nth-child(2):not(.feature-list) { transition-delay: 0.30s; }
.split.is-visible .split-text > *:nth-child(3):not(.feature-list) { transition-delay: 0.40s; }
.split.is-visible .split-text > *:nth-child(4):not(.feature-list) { transition-delay: 0.50s; }
.split.is-visible .split-text > *:nth-child(5):not(.feature-list) { transition-delay: 0.60s; }
.split.is-visible .split-text > *:nth-child(6):not(.feature-list) { transition-delay: 0.70s; }
.split.is-visible .split-text > *:nth-child(7):not(.feature-list) { transition-delay: 0.80s; }

/* Stagger feature-list items individually */
.split.is-visible .feature-list li {
    opacity: 1;
    transform: none;
}
.split.is-visible .feature-list li:nth-child(1) { transition-delay: 0.55s; }
.split.is-visible .feature-list li:nth-child(2) { transition-delay: 0.65s; }
.split.is-visible .feature-list li:nth-child(3) { transition-delay: 0.75s; }
.split.is-visible .feature-list li:nth-child(4) { transition-delay: 0.85s; }
.split.is-visible .feature-list li:nth-child(5) { transition-delay: 0.95s; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .split .split-text,
    .split .split-image,
    .split .split-text > *,
    .split .feature-list li {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ========== Generic reveal system: [data-reveal] ========== */
/* Add to any element to animate on scroll. JS toggles .is-revealed.        */
/*   data-reveal="up"     → slide up + fade (default)                       */
/*   data-reveal="left"   → slide in from left + fade                       */
/*   data-reveal="right"  → slide in from right + fade                      */
/*   data-reveal="fade"   → fade only                                       */
/*   data-reveal="scale"  → scale up + fade                                 */
/* Stagger via:  style="--reveal-delay: 0.2s"                               */
[data-reveal] {
    opacity: 0;
    transition:
        opacity 0.7s cubic-bezier(.2,.7,.2,1),
        transform 0.7s cubic-bezier(.2,.7,.2,1);
    transition-delay: var(--reveal-delay, 0s);
    will-change: opacity, transform;
}
[data-reveal="up"], [data-reveal=""] { transform: translateY(24px); }
[data-reveal="down"]   { transform: translateY(-24px); }
[data-reveal="left"]   { transform: translateX(-32px); }
[data-reveal="right"]  { transform: translateX(32px); }
[data-reveal="fade"]   { transform: none; }
[data-reveal="scale"]  { transform: scale(0.92); }

[data-reveal].is-revealed {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    [data-reveal] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

.feature-list {
    margin-top: 24px;
    display: grid;
    gap: 14px;
}

.feature-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: var(--text);
    font-size: 15px;
}

.feature-list .icon-check {
    color: var(--gold);
    flex-shrink: 0;
    margin-top: 3px;
}

/* Service cards =========================================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.service-card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    padding: 36px;
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.service-card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.service-head {
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.service-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: var(--cream);
    color: var(--gold);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.service-card h3 {
    font-size: 22px;
    margin-bottom: 4px;
}

.service-card .tag {
    display: inline-block;
    padding: 3px 10px;
    background: var(--cream);
    color: var(--navy);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 10px;
}

.service-card ul {
    display: grid;
    gap: 10px;
    margin-top: 4px;
}

.service-card li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--text-soft);
    font-size: 15px;
}

.service-card li .icon-sm {
    color: var(--gold);
    margin-top: 4px;
    flex-shrink: 0;
}

/* Portfolio gallery ======================================================= */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.project-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.project-image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    position: relative;
    background: var(--navy);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.06);
}

.project-size {
    position: absolute;
    top: 14px;
    right: 14px;
    background: var(--red);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(192, 57, 43, 0.35);
}

.project-body {
    padding: 22px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-body h3 {
    font-size: 17px;
    margin-bottom: 6px;
    color: var(--navy);
    line-height: 1.3;
}

.project-location {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 8px;
}

.project-type {
    display: inline-block;
    padding: 3px 10px;
    background: var(--cream);
    color: var(--navy);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    align-self: flex-start;
    margin-top: auto;
}

/* Business Partners logos ================================================= */
.partners {
    background: var(--white);
    padding: 40px 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
}

.partners-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: center;
}

.partner-logo {
    flex: 0 0 calc((100% - 20px * 5) / 6);
    aspect-ratio: 3 / 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    transition: border-color .25s ease, box-shadow .25s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.partner-logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 1;
    transition: opacity .25s ease, transform .35s cubic-bezier(.34,1.56,.64,1);
    will-change: transform;
}

.partner-logo:hover {
    border-color: var(--green);
    box-shadow: 0 8px 18px rgba(29, 184, 55, 0.18);
}

.partner-logo:hover img {
    transform: translateY(-3px);
}

/* Bounce animation when tapped/clicked */
@keyframes partner-bounce {
      0% { transform: translateY(0)    scale(1); }
     20% { transform: translateY(-14px) scale(1.10); }
     40% { transform: translateY(0)    scale(0.94); }
     60% { transform: translateY(-7px) scale(1.05); }
     80% { transform: translateY(0)    scale(0.98); }
    100% { transform: translateY(0)    scale(1); }
}

.partner-logo.is-bouncing img {
    animation: partner-bounce 0.7s cubic-bezier(.34,1.56,.64,1);
    opacity: 1;
}

.partner-logo:active img {
    transform: scale(0.94);
}

@media (prefers-reduced-motion: reduce) {
    .partner-logo.is-bouncing img { animation: none; }
}

@media (max-width: 1024px) {
    .partner-logo { flex: 0 0 calc((100% - 20px * 3) / 4); }
}

@media (max-width: 640px) {
    .partners { padding: 24px 16px; }
    .partners-grid { gap: 12px; }
    .partner-logo {
        flex: 0 0 calc((100% - 12px * 2) / 3);
        padding: 10px;
        border-radius: 10px;
    }
}

/* Vision/Mission cards ==================================================== */
.vision-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.vision-card {
    background: var(--white);
    padding: 36px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--gold);
    position: relative;
}

.vision-card .vision-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--gold);
    color: var(--navy);
    padding: 6px 14px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 16px;
}

.vision-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.vision-card p,
.vision-card li {
    color: var(--text-soft);
    font-size: 15px;
}

.vision-card ul {
    display: grid;
    gap: 10px;
}

.vision-card li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.vision-card li::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
    margin-top: 9px;
    flex-shrink: 0;
}

/* Knowledge / blog cards ================================================== */
.kb-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.kb-card {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    transition: all var(--transition);
}

.kb-card:hover {
    border-color: var(--gold);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.kb-card .kb-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--navy);
    color: var(--gold);
    display: grid;
    place-items: center;
    margin-bottom: 18px;
}

.kb-card h3 {
    font-size: 19px;
    margin-bottom: 10px;
}

.kb-card p {
    color: var(--text-soft);
    font-size: 15px;
    margin-bottom: 14px;
}

.kb-card .read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--navy);
    font-weight: 500;
    font-size: 14px;
}

.kb-card .read-more:hover {
    color: var(--gold);
    gap: 10px;
}

.kb-article {
    background: var(--white);
    padding: 36px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
}

.kb-article h3 {
    font-size: 22px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--navy);
}

.kb-article p {
    color: var(--text-soft);
    font-size: 15px;
    margin-bottom: 12px;
    font-weight: 300;
}

.kb-article ul {
    margin: 12px 0;
    display: grid;
    gap: 8px;
}

.kb-article ul li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: var(--text-soft);
    font-size: 15px;
}

.kb-article ul li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--gold);
    margin-top: 9px;
    flex-shrink: 0;
}

.kb-article .formula {
    background: var(--cream);
    border-left: 4px solid var(--red);
    padding: 14px 18px;
    border-radius: 8px;
    font-family: 'Kanit', monospace;
    color: var(--green-deep);
    font-weight: 500;
    margin: 14px 0;
    font-size: 15px;
}

/* Stats strip ============================================================= */
.stats-strip {
    background: linear-gradient(135deg, var(--navy-deep), var(--navy));
    padding: 60px 0;
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    text-align: center;
}

.stat-block .stat-num {
    font-size: 40px;
    font-weight: 700;
    color: var(--gold);
    line-height: 1;
    display: block;
}
.stats-grid .stat-block:nth-child(2) .stat-num,
.stats-grid .stat-block:nth-child(4) .stat-num {
    color: var(--red-soft);
}

.stat-block .stat-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 8px;
    display: block;
}

/* Contact ================================================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 48px;
}

.contact-info-card {
    background: var(--navy);
    color: var(--white);
    padding: 36px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.contact-info-card h3 {
    color: var(--white);
    font-size: 22px;
    margin-bottom: 8px;
}

.contact-info-card .lead {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 26px;
    font-size: 15px;
}

.contact-list {
    display: grid;
    gap: 22px;
}

.contact-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.contact-item .icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--navy);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.contact-item .label {
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
    margin-bottom: 2px;
    display: block;
}

.contact-item .value {
    color: var(--white);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
}

.contact-item .value a {
    color: var(--white);
}

.contact-item .value a:hover {
    color: var(--gold);
}

.social-row {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    gap: 12px;
}

.social-row a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    display: grid;
    place-items: center;
    transition: all var(--transition);
}

.social-row a:hover {
    background: var(--gold);
    color: var(--navy);
    transform: translateY(-2px);
}

/* Form */
.form-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--line);
}

.form-card h3 {
    font-size: 22px;
    margin-bottom: 6px;
}

.form-card .form-lead {
    color: var(--text-soft);
    font-size: 15px;
    margin-bottom: 26px;
}

.form-row {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
}

.form-row.cols-2 {
    grid-template-columns: 1fr 1fr;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--navy);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    font-family: 'Kanit', sans-serif;
    font-size: 15px;
    font-weight: 300;
    padding: 12px 14px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: var(--white);
    color: var(--text);
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(245, 181, 36, 0.15);
}

.form-group textarea {
    min-height: 110px;
    resize: vertical;
}

.form-card .btn {
    margin-top: 8px;
    width: 100%;
    justify-content: center;
}

/* Map / address */
.map-wrap {
    margin-top: 36px;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
}

.map-wrap iframe {
    width: 100%;
    height: 360px;
    display: block;
    border: 0;
}

/* CTA banner ============================================================== */
.cta-banner {
    background: linear-gradient(135deg, #1db837 0%, #0b5c1d 100%);
    padding: 56px 32px;
    color: #fff;
    text-align: center;
    border-radius: var(--radius-lg);
    margin: 60px auto;
    max-width: var(--container);
    position: relative;
    overflow: hidden;
}

.cta-banner h2 {
    color: #fff;
    font-size: clamp(24px, 3vw, 34px);
    margin-bottom: 12px;
}

.cta-banner p {
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 26px;
    font-size: 17px;
}

.cta-banner .btn-dark,
.cta-banner .btn-primary {
    background: linear-gradient(135deg, var(--sunrise-1) 0%, var(--sunrise-3) 100%);
    color: #fff;
    box-shadow: 0 8px 24px rgba(255, 107, 53, 0.45);
    border: none;
}

.cta-banner .btn-dark:hover,
.cta-banner .btn-primary:hover {
    background: linear-gradient(135deg, var(--sunrise-2) 0%, var(--sunrise-3) 100%);
    transform: translateY(-2px);
    color: #fff;
}

/* Footer ================================================================== */
.site-footer {
    background: var(--navy-deep);
    color: rgba(255, 255, 255, 0.75);
    padding: 56px 0 28px;
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--white);
    font-size: 15px;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-col ul {
    display: grid;
    gap: 8px;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.footer-col a:hover {
    color: var(--gold);
}

.footer-brand .brand-name {
    color: var(--white);
    font-size: 20px;
}

.footer-brand .brand-tagline {
    color: rgba(255, 255, 255, 0.5);
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.6);
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.7;
}

.footer-bottom {
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    flex-wrap: wrap;
    gap: 12px;
}

/* Page hero (smaller, for inner pages) ==================================== */
.page-hero {
    background: linear-gradient(135deg, var(--navy-deep), var(--navy));
    color: var(--white);
    padding: 90px 0 70px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 100%, rgba(29, 184, 55, 0.18), transparent 60%);
}

.page-hero .container {
    position: relative;
}

.page-hero h1 {
    color: var(--white);
    font-size: clamp(32px, 4vw, 46px);
    margin-bottom: 12px;
}

.page-hero p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 18px;
    max-width: 640px;
    margin: 0 auto;
}

.page-hero .breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--gold-soft);
    font-size: 13px;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Certifications / trust — dimensional cream cards ======================== */
.trust-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.trust-card {
    background: linear-gradient(160deg, var(--cream) 0%, var(--cream-2) 100%);
    padding: 26px 22px 24px;
    border-radius: 18px;
    border: 1px solid rgba(11, 92, 29, 0.10);
    text-align: center;
    transition: transform .35s cubic-bezier(.2,.7,.2,1.2), box-shadow .35s ease, border-color .35s ease;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.85) inset,
        0 14px 30px rgba(11, 92, 29, 0.08),
        0 2px 6px rgba(11, 92, 29, 0.06);
}

/* green glow that emerges on hover */
.trust-card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -30%;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(29, 184, 55, 0.55), rgba(43, 212, 74, 0.18) 50%, transparent 75%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity .35s ease, transform .5s ease;
    pointer-events: none;
}

.trust-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(180deg, transparent 60%, rgba(29, 184, 55, 0.05) 100%);
}

.trust-card:hover {
    transform: translateY(-6px) rotate(-0.4deg);
    border-color: rgba(29, 184, 55, 0.30);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 24px 48px rgba(11, 92, 29, 0.18),
        0 4px 10px rgba(11, 92, 29, 0.10);
}

.trust-card:hover::before {
    opacity: 1;
    transform: translate(-10px, 10px);
}

/* Image frame — multi-layer shadow + tilt for 3D feel */
.trust-card .trust-img-wrap {
    position: relative;
    margin: -8px -6px 16px;
    padding: 10px;
    border-radius: 14px;
    background: linear-gradient(135deg, #fff 0%, #fffdf3 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 1) inset,
        0 10px 24px rgba(11, 92, 29, 0.14),
        0 2px 6px rgba(11, 92, 29, 0.08);
    transition: transform .4s cubic-bezier(.2,.7,.2,1.2);
}

.trust-card:hover .trust-img-wrap {
    transform: translateY(-3px) rotate(0.6deg) scale(1.02);
}

.trust-card img {
    border-radius: 10px;
    aspect-ratio: 4/3;
    object-fit: cover;
    width: 100%;
    display: block;
    box-shadow: 0 4px 14px rgba(11, 92, 29, 0.16);
}

/* legacy markup fallback (img not wrapped) */
.trust-card > img {
    margin: -4px -2px 14px;
    padding: 8px;
    background: linear-gradient(135deg, #fff 0%, #fffdf3 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 1) inset,
        0 10px 24px rgba(11, 92, 29, 0.14),
        0 2px 6px rgba(11, 92, 29, 0.08);
    border-radius: 14px;
}

.trust-card h4 {
    font-size: 17px;
    color: var(--green-darker);
    font-weight: 700;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.trust-card p {
    font-size: 14px;
    color: var(--text-soft);
    font-weight: 400;
    position: relative;
    z-index: 1;
}

/* Multi-page certificate (2 images side by side, A4 portrait ratio) */
.trust-card .trust-img-multi {
    display: flex;
    gap: 8px;
    padding: 8px;
    align-items: center;
    justify-content: center;
}

.trust-card .trust-img-multi img {
    aspect-ratio: 1 / 1.414;        /* A4 portrait */
    object-fit: contain;
    object-position: center;
    background: #fff;
    width: 50%;
    flex: 1 1 0;
    min-width: 0;
    margin: 0 auto;
    border-radius: 8px;
    padding: 4px;
    box-shadow: 0 4px 12px rgba(11, 92, 29, 0.14);
    transition: transform .25s ease, box-shadow .25s ease;
}

.trust-card .trust-img-multi img:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 18px rgba(11, 92, 29, 0.22);
}

.trust-zoomable { cursor: zoom-in; }

/* Lightbox overlay */
.trust-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(8, 16, 12, 0.88);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 24px;
    opacity: 0;
    transition: opacity .2s ease;
    overscroll-behavior: contain;
    -webkit-tap-highlight-color: transparent;
}

.trust-lightbox.is-open {
    display: flex;
    opacity: 1;
    animation: trustLbFade .25s ease;
}

@keyframes trustLbFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.trust-lightbox-img {
    max-width: min(92vw, 1100px);
    max-height: 92vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    background: #fff;
}

.trust-lightbox-close {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: #111;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
    transition: transform .2s ease, background .2s ease;
}

.trust-lightbox-close:hover {
    transform: rotate(90deg);
    background: #fff;
}

/* ===== Trust card responsive breakpoints ===== */

/* Large desktop (1280px+): keep 3 cols, slightly bigger gaps */
@media (min-width: 1280px) {
    .trust-row { gap: 32px; }
    .trust-card .trust-img-multi { gap: 10px; padding: 10px; }
}

/* Tablet landscape (980-1279px): 3 cols stays */
/* Tablet portrait (720-980px): falls to 2 cols (rule already in main breakpoint) */
@media (max-width: 980px) and (min-width: 721px) {
    .trust-card { padding: 22px 18px 20px; }
    .trust-card .trust-img-multi { gap: 8px; padding: 6px; }
    .trust-card .trust-img-multi img { padding: 3px; border-radius: 7px; }
}

/* Mobile (≤720px): 1 col, full-width card — make multi-images bigger */
@media (max-width: 720px) {
    .trust-card { padding: 22px 18px 20px; }
    .trust-card .trust-img-multi { gap: 10px; padding: 8px; }
    .trust-card .trust-img-multi img { padding: 5px; border-radius: 9px; }
    .trust-card h4 { font-size: 16px; }
    .trust-card p { font-size: 13.5px; }
}

/* Small mobile (≤480px) */
@media (max-width: 480px) {
    .trust-card { padding: 18px 14px 18px; border-radius: 14px; }
    .trust-card .trust-img-wrap { margin: -6px -4px 12px; padding: 8px; }
    .trust-card .trust-img-multi { gap: 6px; padding: 6px; }
    .trust-card .trust-img-multi img { padding: 3px; border-radius: 7px; }
    .trust-card h4 { font-size: 15.5px; }
    .trust-card p { font-size: 13px; line-height: 1.55; }
    .trust-lightbox { padding: 12px; }
    .trust-lightbox-close { top: 10px; right: 10px; width: 38px; height: 38px; font-size: 22px; }
    .trust-lightbox-img { max-width: 96vw; max-height: 88vh; }
}

/* Very small mobile (≤360px): stack the 2 certificate pages vertically */
@media (max-width: 360px) {
    .trust-card .trust-img-multi {
        flex-direction: column;
        gap: 8px;
    }
    .trust-card .trust-img-multi img {
        width: 100%;
        aspect-ratio: 4 / 3;
    }
}

/* Solar Calculator ======================================================== */
.calc-section {
    background: linear-gradient(135deg, var(--navy-deep), var(--navy));
    color: var(--white);
    padding: 90px 0;
    position: relative;
    overflow: hidden;
}

.calc-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 25%, rgba(29, 184, 55, 0.22), transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(43, 212, 74, 0.16), transparent 50%);
    pointer-events: none;
}

.calc-section .container {
    position: relative;
}

.calc-section .section-eyebrow {
    color: var(--gold);
}

.calc-section .section-title {
    color: var(--white);
}

.calc-section .section-subtitle {
    color: rgba(255, 255, 255, 0.78);
}

.calc-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 32px;
    margin-top: 40px;
}

.calc-panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--radius-lg);
    padding: 36px;
    position: relative;
}

.calc-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(245, 181, 36, 0.18);
    color: var(--gold-soft);
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 400;
    margin-bottom: 16px;
    border: 1px solid rgba(245, 181, 36, 0.25);
}

.calc-panel h3 {
    color: var(--white);
    font-size: 24px;
    margin-bottom: 6px;
}

.calc-panel .calc-lead {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 28px;
}

.calc-field {
    margin-bottom: 22px;
}

.calc-label {
    display: block;
    font-size: 14px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 10px;
}

.calc-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: rgba(0, 0, 0, 0.25);
    padding: 5px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* 3-option toggle (CL-049 — กลางวัน/กลางคืน/ทั้งกลางวัน-กลางคืน) */
.calc-toggle.calc-toggle-3 {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
}
.calc-toggle.calc-toggle-3 button {
    padding: 11px 8px;
    font-size: 13px;
}
@media (max-width: 540px) {
    .calc-toggle.calc-toggle-3 {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

.calc-toggle button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.55);
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    padding: 11px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition);
}

.calc-toggle button:hover {
    color: rgba(255, 255, 255, 0.85);
}

.calc-toggle button.is-active {
    background: linear-gradient(135deg, var(--gold), var(--gold-soft));
    color: var(--navy-deep);
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(245, 181, 36, 0.3);
}

.calc-bill-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
}

.calc-bill-value {
    color: var(--gold);
    font-size: 22px;
    font-weight: 600;
}

input[type="range"].calc-slider {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(
        to right,
        var(--gold) 0%, var(--gold) var(--fill, 0%),
        rgba(255, 255, 255, 0.12) var(--fill, 0%), rgba(255, 255, 255, 0.12) 100%
    );
    outline: none;
    cursor: pointer;
}

input[type="range"].calc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gold);
    border: 3px solid var(--white);
    box-shadow: 0 0 0 4px rgba(245, 181, 36, 0.25), 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: transform 0.15s ease;
}

input[type="range"].calc-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

input[type="range"].calc-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--gold);
    border: 3px solid var(--white);
    box-shadow: 0 0 0 4px rgba(245, 181, 36, 0.25);
    cursor: pointer;
}

.calc-range-label {
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    margin-top: 8px;
}

/* Result panel */
.calc-result {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px 32px;
    margin-bottom: 28px;
}

.calc-stat-label {
    display: block;
    color: var(--gold);
    font-size: 13px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.calc-stat-value {
    display: block;
    color: var(--white);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
}

.calc-stat-value .calc-stat-suffix {
    font-size: 16px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    margin-left: 4px;
}

.calc-cta-row {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    margin-top: 12px;
}

.calc-cta-btn {
    width: 100%;
    background: var(--white);
    color: var(--navy-deep);
    border: none;
    padding: 18px 24px;
    border-radius: 999px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all var(--transition);
    text-decoration: none;
}

.calc-cta-btn:hover {
    background: var(--gold);
    color: var(--navy-deep);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(245, 181, 36, 0.35);
}

.calc-disclaimer {
    color: rgba(255, 255, 255, 0.45);
    font-size: 12px;
    text-align: center;
    margin-top: 16px;
    line-height: 1.6;
}

@media (max-width: 980px) {
    .calc-grid {
        grid-template-columns: 1fr;
    }
    .calc-result {
        grid-template-columns: 1fr 1fr;
    }
    .calc-stat-value {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .calc-panel {
        padding: 28px 22px;
    }
    .calc-stat-value {
        font-size: 22px;
    }
}

/* Portfolio collapse/expand =============================================== */
.portfolio-grid.is-collapsed > .project-card:nth-child(n+13) {
    display: none !important;
}

.portfolio-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 40px;
}

.portfolio-count {
    font-size: 14px;
    color: var(--text-soft);
    margin: 0;
    font-weight: 500;
}

.portfolio-count #portfolio-count-shown,
.portfolio-count #portfolio-count-total {
    color: var(--green-darker);
    font-weight: 700;
}

.portfolio-actions .btn-lg {
    padding: 14px 32px;
    font-size: 15px;
    gap: 10px;
}

/* show/hide labels & icons inside the toggle button */
.portfolio-actions .btn .hide-text { display: none; }
.portfolio-actions .btn.is-expanded .show-text { display: none; }
.portfolio-actions .btn.is-expanded .hide-text {
    display: inline-flex;
    align-items: center;
}

/* Filter tabs (portfolio) ================================================= */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 36px;
}

.filter-tab {
    padding: 8px 18px;
    border-radius: 999px;
    border: 1.5px solid var(--line);
    background: var(--white);
    color: var(--text-soft);
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all var(--transition);
}

.filter-tab:hover {
    border-color: var(--gold);
    color: var(--navy);
}

.filter-tab.active {
    background: var(--navy);
    border-color: var(--navy);
    color: var(--white);
    font-weight: 500;
}

/* Animated background — Aurora flow ====================================== */
.hero,
.calc-section,
.page-hero,
.section-dark,
.stats-strip {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* Override any existing ::before on these sections with animated version
   (.hero excluded — it has a video bg with its own dark readability overlay) */
.calc-section::before,
.page-hero::before,
.section-dark::before,
.stats-strip::before {
    content: '';
    position: absolute;
    inset: -10%;
    z-index: -1;
    background:
        radial-gradient(circle at 20% 80%, rgba(29, 184, 55, 0.32), transparent 38%),
        radial-gradient(circle at 80% 20%, rgba(43, 212, 74, 0.24), transparent 42%),
        radial-gradient(circle at 50% 50%, rgba(11, 92, 29, 0.28), transparent 48%),
        radial-gradient(circle at 70% 90%, rgba(29, 184, 55, 0.20), transparent 40%);
    background-repeat: no-repeat;
    background-size: 220% 220%, 200% 200%, 240% 240%, 200% 200%;
    animation: aurora-flow 22s ease-in-out infinite alternate;
    pointer-events: none;
    will-change: background-position, transform;
}

/* Floating sparkles layer (small twinkles) — .hero excluded (has video bg) */
.calc-section::after,
.page-hero::after,
.section-dark::after,
.stats-strip::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.55) 0.5px, transparent 1.5px),
        radial-gradient(circle at 35% 70%, rgba(109, 212, 122, 0.7) 0.5px, transparent 1.5px),
        radial-gradient(circle at 55% 35%, rgba(255, 255, 255, 0.4) 0.5px, transparent 1.5px),
        radial-gradient(circle at 75% 80%, rgba(29, 184, 55, 0.6) 0.5px, transparent 1.5px),
        radial-gradient(circle at 90% 30%, rgba(109, 212, 122, 0.6) 0.5px, transparent 1.5px),
        radial-gradient(circle at 25% 85%, rgba(255, 255, 255, 0.5) 0.5px, transparent 1.5px),
        radial-gradient(circle at 65% 15%, rgba(255, 255, 255, 0.45) 0.5px, transparent 1.5px),
        radial-gradient(circle at 5% 55%, rgba(109, 212, 122, 0.5) 0.5px, transparent 1.5px);
    background-size: 280px 280px;
    animation: sparkle-rise 18s linear infinite;
    pointer-events: none;
    opacity: 0.85;
}

@keyframes aurora-flow {
    0% {
        background-position: 0% 50%, 100% 50%, 50% 0%, 30% 70%;
    }
    25% {
        background-position: 100% 50%, 0% 50%, 50% 100%, 70% 30%;
    }
    50% {
        background-position: 100% 100%, 0% 0%, 100% 50%, 0% 100%;
    }
    75% {
        background-position: 0% 100%, 100% 0%, 0% 50%, 100% 0%;
    }
    100% {
        background-position: 50% 0%, 50% 100%, 100% 100%, 50% 50%;
    }
}

@keyframes sparkle-rise {
    0% {
        background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0, 0 0;
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    100% {
        background-position: 0 -280px, 0 -280px, 0 -280px, 0 -280px, 0 -280px, 0 -280px, 0 -280px, 0 -280px;
        opacity: 0.6;
    }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .calc-section::before,
    .page-hero::before,
    .section-dark::before,
    .stats-strip::before,
    .calc-section::after,
    .page-hero::after,
    .section-dark::after,
    .stats-strip::after {
        animation: none;
    }
}

/* Ensure inner content stays above animated layers */
.hero > .container,
.calc-section > .container,
.page-hero > .container,
.section-dark > .container,
.stats-strip > .container {
    position: relative;
    z-index: 1;
}

/* Responsive ============================================================== */
@media (max-width: 980px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .hero {
        padding: 60px 0 80px;
    }

    .split,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .usp-grid,
    .services-grid,
    .portfolio-grid,
    .vision-grid,
    .kb-grid,
    .stats-grid,
    .trust-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 720px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 4px;
        background: var(--white);
        padding: 16px;
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-md);
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        width: 100%;
    }

    .nav-toggle {
        display: block;
    }

    .section {
        padding: 60px 0;
    }

    .usp-grid,
    .services-grid,
    .portfolio-grid,
    .vision-grid,
    .kb-grid,
    .trust-row {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .form-row.cols-2 {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .hero-stats {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .hero-stats .hero-stat:last-child {
        grid-column: 1 / -1;
    }
}

/* Loan service scrollable box ============================================== */
.loan-scroll {
    scrollbar-width: thin;
    scrollbar-color: var(--sunrise-1) var(--cream-2);
}
.loan-scroll::-webkit-scrollbar {
    width: 8px;
}
.loan-scroll::-webkit-scrollbar-track {
    background: var(--cream-2);
    border-radius: 8px;
}
.loan-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--sunrise-1), var(--sunrise-3));
    border-radius: 8px;
}
.loan-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--sunrise-1);
}
.loan-scroll h4 {
    font-size: 1.05rem;
    margin-top: 4px;
}
.loan-scroll ul.feature-list li {
    margin-bottom: 8px;
    line-height: 1.55;
}
/* === Override kb-icon to orange sunrise gradient === */
.kb-card .kb-icon,
.kb-grid .kb-icon {
    background: linear-gradient(135deg, #ff6b35 0%, #ffb347 100%) !important;
    background-color: #ff6b35 !important;
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(255, 107, 53, 0.35) !important;
}
.kb-card .kb-icon svg,
.kb-card .kb-icon svg *,
.kb-card .kb-icon i {
    color: #ffffff !important;
    stroke: #ffffff !important;
    fill: none !important;
}
.kb-card:hover .kb-icon {
    box-shadow: 0 10px 22px rgba(255, 107, 53, 0.45) !important;
}