@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Thai:wght@300;400;500;700&display=swap');

html {
  scroll-behavior: smooth;
}

:root {
  --topbar-h: 55px;
  --service-card-width: 90%
}

.body {
  margin: 0;
  background-color: white;
  font-family: "Poppins", "Noto Sans Thai", Arial, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  width: 100%;
  max-width: 100%;
}

.body img, body video {
  pointer-events: none;
}

.site-wrapper{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-top: var(--topbar-h); /* moved here */
}

.page-content {
  flex: 1;
  display: block;
}


/* ----------------------------------------------------------- Mobile 1st. Override for desktop later. ----------------------------------------------------------- */

/* @media (max-width: 980px) { */

/* Override for desktop */
@media (min-width: 981px) {
    .site-wrapper {
        max-width: 100%;
        margin: 0 auto;
    }
}

.logo {
    max-width: 100%;
    max-height: 2rem;
    height: auto;
    width: auto;
    pointer-events: none;
    padding: 1rem;
}

.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: white;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.top-bar.shadow {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.3s ease-in-out;
}

.top_buttons {
    background-color: rgb(255, 255, 255);
    color: rgb(57,65,91);
    border: none;
    border-radius: 3px;
    cursor: pointer;
    padding: 1rem 1rem 1rem 1rem;
    font-size: 1rem;
    margin: 0 0;
    transition: background-color 0.3s;
}

.top_buttons:hover {
    background-color: rgb(243, 243, 243);
}

.top-center-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
}

.wallpaper_1 {
    width: 100%;
    margin-top: 0;
    height: 32rem;
    overflow: hidden; /* This clips the overflow caused by image scaling */
    position: relative; /* Needed if we use positioning (not used here but good practice) */
}

.wallpaper_1 img {
    width: 100%; /* Makes it match container width before scaling */
    height: auto;
    display: block;
    transform: scale(1.3);
    transform-origin: left top; /* Keeps image scaled from top-left corner */
    pointer-events: none;
}

/* Center the video */
.wallpaper_1 video {
    position: absolute;
    top: 60%;
    left: 50%;

    min-width: 100%;
    min-height: 100%;

    width: auto;
    height: auto;

    transform: translate(-50%, -50%);
    object-fit: cover;

    pointer-events: none;

    filter: brightness(30%) opacity(0.8);
}

.Slogan {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
}

.Slogan-header {
    font-size: 2.5rem;
    font-weight: 500;
    color: white;
}

.Slogan-content {
    font-size: 1.4rem;
    font-weight: 500;
    color: white;
}

.Hero-1 {
    /* background-color: #f1f4f8; */
    background: linear-gradient(-40deg, #f1f4f8, #e8e8e8);
    color: #606060;
    margin: 0 0 0 0;
    padding: 2rem 0 3.5rem 0;
    height: fit-content;
}

.Hero-1_content {
    max-width: clamp(740px, 45vw, 1600px);
    margin: 0 auto 0 auto;     /* centers horizontally */
    text-align: left;          /* text stays left */
    transform-origin: center;
    transform: scale(1);
    transition: transform 250ms ease;
}

@media (min-width: 981px) {
  .Hero-1_content:hover {
    transform: scale(1.05);
  }
}

.Hero-1_header {
    font-size: 2.0rem;
    font-weight: 500;
    color: #2c3347;
    width: fit-content;
    margin: 2vh auto 0 6vw;
}

.Hero-1_paragraph_box {
    max-width: 1200px;
    font-size: 1.2rem;
    font-weight: 300;
    text-align: left;
    margin: 0 10vw 0 6vw;
}

.Hero-2 {
    background: linear-gradient(40deg, #2d364a, #657682);
    padding: 2.5rem 0 3rem 0;
    margin: 0 0 0 0;
}

.Hero-2_content {
    max-width: clamp(740px, 45vw, 1600px);
    margin: 0 auto 0 auto;     /* centers horizontally */
    text-align: left;          /* text stays left */
    transform-origin: center;
    transform: scale(1);
    transition: transform 250ms ease;
}

@media (min-width: 981px) {
  .Hero-2_content:hover {
    transform: scale(1.05);
  }
}

.Hero-2_header {
    font-size: 1.9rem;
    font-weight: 300;
    color: rgb(255, 255, 255);
    overflow: hidden;
    margin: 2vh auto 0 6vw;
}

.Hero-2_paragraph_box {
    max-width: 730px;
    font-size: 1.2rem;
    color: white;
    font-weight: 300;
    text-align: left;
    margin: 0 10vw 0 6vw;
}

.Hero-3 {
    color: #606060;
    margin: 0 0 0 0;
    padding: 2rem 0 3.5rem 0;
    height: fit-content;
}

.Hero-3_header {
    font-size: 1.7rem;
    font-weight: 300;
    color: #2c3347;
    overflow: hidden;
    text-align: center;
}

.Hero-3_paragraph_box {
    max-width: 20rem;
    font-size: 1.2rem;
    font-weight: 300;
    text-align: center;
    margin: 0 auto 0 auto;
}

.financial-metrics {
    box-sizing: border-box;
    display: grid;
    justify-content: center;
    grid-template-columns: repeat(auto-fit, minmax(130px, max-content));
    margin-inline: auto;
    grid-auto-rows: var(--row-height);
    padding: 0 10vw 4rem 10vw;
    width: clamp(200px, 60vw, 1340px);
    color: #606060;
    column-gap: 5rem;
}

.num {
    font-size: 5rem;
}

.unit {
    font-size: 2rem;
}

.text {
    font-size: 1.5rem;
}

.ROI {
    height: auto;
    display: block;
    margin: 0 auto 0 auto;
    text-align: center;    
}

.Payback {
    height: auto;
    display: block;
    margin: 0 auto 0 auto;
    text-align: center;    
}

.highlight-red {
    color: red;
}

.underline_1 {
    width: 100%;
    height: 3px;
    background-color: #bfe50056;
    margin-top: 3px;
    border-radius: 36px;
    position: relative; 
}

.underline_1 span {
    width: 80%;
    background-color: #bfe500;
    position: absolute;
    border-radius: 36px;
    height: 100%;
    left: 0%;
    transform: TranslateX(-50%);
    animation: moving 4.5s linear infinite;
}

@keyframes moving {
    0%{
        left: -50%;
    }
    100%{
        left: 150%
    }
}

.bold {
    font-weight: 500;
}

.techStack {
    padding: 30px 10px 60px 10px;
    color: #3c4257;
    margin: 0 0 0 0;
}

.techHeader {
    font-size: 28px;
    font-weight: 400;
    text-align: center;
    width: fit-content;
    margin: 0 auto 0 auto;
    overflow: hidden;
    background: -webkit-linear-gradient(#54627f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: float 3s ease-in-out infinite;
    text-shadow: 2px 2px 12px rgba(37, 37, 37, 0.148);
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0px); }
}

.onGrid_concept {
    color: #4b536ee0;
    margin: 3rem 0 1rem 0;
}

.onGrid_concept_heading {
    font-size: 1.7rem;
    font-weight: 400;
    text-align: center;
    width: fit-content;
    margin: 0 auto 0 auto;
    overflow: hidden;
    animation: float_2 3s ease-in-out infinite;
    text-shadow: 2px 2px 12px rgba(37, 37, 37, 0.148);
}

@keyframes float_2 {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
    100% { transform: translateY(0px); }
}

.PVsystem {
    width: 25rem;
    border: 1px solid white;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: auto auto auto auto;
    position: relative;
}

.PVsystem img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    pointer-events: none;
}

.flow-line {
    position: absolute;
    pointer-events: none;
    background-color: #33dc00;
    overflow: hidden;
}

.flow-line.h.h1 { 
    border-radius: 999px 0 0 999px;
    height: 4px; }
.flow-line.h.h2 { 
    border-radius: 0 999px 999px 0;
    height: 4px; }
.flow-line.v {
    border-radius: 999px; 
    width: 4px; 
}

.flow-line::before {
    content: "";
    position: absolute;
    inset: 0;
    background-repeat: no-repeat;
    background-size: 200% 200%;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    animation-duration: 1.8s;
}   

.flow-line.flow-right.h1::before {
    background-image: linear-gradient(90deg, transparent, white, transparent);
    animation-name: flow-right-1;
}
.flow-line.flow-right.h2::before {
    background-image: linear-gradient(90deg, transparent, white, transparent);
    animation-name: flow-right-2;
}

.flow-line.v.flow-down::before {
    background-image: linear-gradient(0deg, transparent, white, transparent);
    animation-name: flow-down;
}

.flow-line.v.flow-up::before {
    background-image: linear-gradient(180deg, transparent, white, transparent);
    animation-name: flow-up;
}

@keyframes flow-right-1 {
    0%   { background-position: 200% 0; }
    100% { background-position: -400% 0; }
}

@keyframes flow-right-2 {
    0%   { background-position: 235% 0; }
    100% { background-position: -150% 0; }
}

@keyframes flow-down {
    0%   { background-position: 0 200%; }
    100% { background-position: 0 -200%; }
}

@keyframes flow-up {
    0%   { background-position: 0 -100%; }
    100% { background-position: 0 500%; }
}

/* Default gray, no animation */
body.day-nopower .flow-line,
body.night-nopower .flow-line {
    background-color: #bfbfbf;
}
body.day-nopower .flow-line::before,
body.night-nopower .flow-line::before {
    animation-name: none !important;
    opacity: 0;
}

/* ---------- Day + Power ON ---------- */
body.day-power .flow-line {
    background-color: #33dc00;
}
body.day-power .flow-line.flow-right.h1::before {
    animation-name: flow-right-1;
}
body.day-power .flow-line.flow-right.h2::before {
    animation-name: flow-right-2;
}
body.day-power .flow-line.v.flow-down::before {
    animation-name: flow-down;
}
body.day-power .flow-line.v.flow-up::before {
    animation-name: flow-up;
}

/* ---------- Night + Power ON ---------- */
body.night-power .flow-line {
    background-color: #33dc00;
}
body.night-power .flow-line.flow-right.h2::before {
    animation-name: flow-right-2;
}
body.night-power .flow-line.v.flow-up::before {
    animation-name: flow-up;
}

/* Gray out the inactive lines during night+power */
body.night-power .flow-line.flow-right.h1,
body.night-power .flow-line.v.flow-down {
    background-color: #bfbfbf;
}
body.night-power .flow-line.flow-right.h1::before,
body.night-power .flow-line.v.flow-down::before {
    animation-name: none !important;
    opacity: 0.3;
}

.game_buttons {
    display: grid;
    box-sizing: border-box;
    justify-content: center;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), max-content));
    margin-inline: auto;
    width: 100%;
}

.gameNo1, .gameNo2 {
    display: flex;
    justify-content: center;
}


.remark {
    width: 90%;              
    margin: 4vh auto 3rem auto; 
    padding: 1vh auto 1vh auto;
    text-align: center;
    color: #606060;
    font-size: clamp(1rem, 1.2vw, 1.2rem); 
    font-weight: 300;
}

:root {
    --width-of-switch: 3.5em;
    --height-of-switch: 2em;
    --size-of-icon: 1.4em;
    --slider_1-offset: 0.3em;
    --slider_2-offset: 0.3em;
}

.daytime_toggle input {
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap; 
    border: 0;
}

.daytime_toggle input:focus + .slider_1,
.daytime_toggle input:active + .slider_1,
.daytime_toggle .slider_1:focus,
.daytime_toggle .slider_1:active,
.daytime_toggle:focus-within {
    outline: none !important;
    box-shadow: none !important;
}

.daytime_toggle:focus {
    outline: none !important;
    box-shadow: none !important;
}

.daytime_toggle {
    display: inline-block;
    position: relative;
    width: var(--width-of-switch);
    height: var(--height-of-switch);
    /* margin: 0 auto; */
}

.slider_1 {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f5f5f5;
    transition: 0.4s;
    border-radius: 30px;
}

.slider_1::before {
    position: absolute;
    content: "";
    height: var(--size-of-icon, 1.4em);
    width: var(--size-of-icon, 1.4em);
    border-radius: 20px;
    left: var(--slider-offset, 0.3em);
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(40deg, #ff3c00, #ffbb69 70%);
    transition: 0.4s;
}

input:checked + .slider_1 {
    background: #3c3d46;
}

input:checked + .slider_1::before {
    left: calc(100% - (var(--size-of-icon, 1.4em) + var(--slider_1-offset, 0.3em)));
    background: #3c3d46;
    box-shadow: inset -3px -2px 5px -2px #8983f7, inset -10px -4px 0 0 #ffe600;
}

.switch_toggle input {
    /* position: absolute; */
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap; 
    border: 0;
}

.switch_toggle input:focus + .slider_2,
.switch_toggle input:active + .slider_2,
.switch_toggle .slider_2:focus,
.switch_toggle .slider_2:active,
.switch_toggle:focus-within {
    outline: none !important;
    box-shadow: none !important;
}

.switch_toggle:focus {
    outline: none !important;
    box-shadow: none !important;
}

.switch_toggle {
    display: block;
    position: relative;
    width: var(--width-of-switch);
    height: var(--height-of-switch);
    margin: 0 auto;
}

.slider_2 {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #f4f4f5;
    transition: 0.4s;
    border-radius: 30px;
}

.slider_2::before {
    position: absolute;
    content: "";
    height: var(--size-of-icon, 1.4em);
    width: var(--size-of-icon, 1.4em);
    border-radius: 20px;
    left: var(--slider-offset, 0.3em);
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(40deg, #ffffff, #ffffff 70%);
    transition: 0.4s;
}

input:checked + .slider_2 {
    background: linear-gradient(40deg, #11c52979, #11c529a3 70%);;
}

input:checked + .slider_2::before {
    left: calc(100% - (var(--size-of-icon, 1.4em) + var(--slider_1-offset, 0.3em)));
    background: linear-gradient(40deg, #c7c7c7, #ffffff 70%);
}

.ourServices {
    height: fit-content;
    padding: 0 0 4rem 0;
    width: 100%;
    background: #f1f4f8;
}

.ourServices_heading {
    font-size: 1.8rem;
    font-weight: 400;
    text-align: center;
    width: fit-content;
    margin: 0 auto 0 auto;
    padding: 2rem 0 2rem 0;
    overflow: hidden;
    color: #41485f;
}

.serviceCards{
    display: grid;
    margin-inline: auto;
    place-items: center;
    height: fit-content;
    width: min(1200px, 92%);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 600px), max-content));
    gap: 1rem;
    background: #f1f4f8;
}

.serviceNo1,
.serviceNo2,
.serviceNo3,
.serviceNo4 {
    width: 100%;
    height: auto;
    background-color: white;
    border-radius: 3px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.serviceNo1_img,
.serviceNo2_img,
.serviceNo3_img,
.serviceNo4_img {
    width: 100%;           /* image column */
}

.serviceNo1_img img,
.serviceNo2_img img,
.serviceNo3_img img,
.serviceNo4_img img {
    width: 100%;
    height: auto;
    object-fit: cover;    /* fills nicely */
    display: block;
}

.serviceNo1_content,
.serviceNo2_content,
.serviceNo3_content,
.serviceNo4_content {
    width: 100%;
    padding: 2rem 10%;
    box-sizing: border-box;
}

.serviceNo1_heading h2,
.serviceNo2_heading h2,
.serviceNo3_heading h2,
.serviceNo4_heading h2 {
    color: #41485f;
    font-weight: 500;
    margin-top: 0;
}

.serviceNo1_text p,
.serviceNo2_text p,
.serviceNo3_text p,
.serviceNo4_text p {
    color: grey;
    font-size: 1.2rem;
    font-weight: 300;
}

/* Override for desktop */
@media (min-width: 981px) {
    .serviceNo1,
    .serviceNo2,
    .serviceNo3,
    .serviceNo4 {
        width: 100%;
        height: auto;
        background-color: white;
        border-radius: 3px;
        box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
        overflow: hidden;
        display: flex;
        align-items: stretch;
    }

    .serviceNo1_content,
    .serviceNo2_content,
    .serviceNo3_content,
    .serviceNo4_content {
        width: 100%;
        padding: 2.5rem 5%;
        box-sizing: border-box;
    }
}

.underline_services {
    width: 60%;
    height: 3px;
    background-color: #ff9a3b;
    border-radius: 36px;
    margin: 5px auto 0 auto;
    position: relative;
    overflow: hidden;
}

.ourServices_heading p {
    margin: 20px 0 0 0;
    padding: 0;
}

.underline_services span {
    width: 15%;
    background-color: #f1f4f8;
    position: absolute;
    margin: 0 auto 0 auto;
    height: 100%;
    left: 0%;
    border-radius: 36px;
    transform: TranslateX(0%);
    animation: moving_services 3s linear infinite alternate;
}

@keyframes moving_services {
    0%{
        left: 0%;
    }
    100%{
        left: 85%
    }
}

.global_footer {
    margin: 0 auto 0 auto;
    width: 100%;
    height: auto;
    padding: 3rem 0 5rem;
    background-color: #303134;
}

.footer_overall_content {
    box-sizing: border-box;
    display: grid;
    place-items: left;
    align-items: left;
    grid-template-columns: 1fr;
    max-width: clamp(600px, 100%, 1200px);
    width: 90%;
    margin: 0 auto 0 auto;
}

.footer_heading,
.footer_content {
  margin: 0 auto;
  width: clamp(100%, 60%, 720px);
}

.underline_footer_heading,
.underline_footer_content{
  width: clamp(100%, 60%, 720px);
  height: 1px;
  background: #ff9a3b;
}

.footer_heading h2 {
    color: white;
    font-size: 1.2rem;
    font-weight: 300;
}

.footer_content p {
    color: white;
    font-size: clamp(1.1rem, 1.0vw, 1.2rem);
    font-weight: 200;
}

.underline_footer_heading {
    width: 100%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.486);
    margin: 0 auto 0 auto;
    position: relative;
    overflow: hidden;
}

.underline_footer_content {
    width: 100%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.486);
    margin: 0 auto 0 auto;
    position: relative;
    overflow: hidden;
}

.footer_socialMedia {
    display: flex;
    justify-content: left;
    align-items: left;
    gap: 0.75rem;
    margin: 2rem 0 0 0.2rem;
}

.footer_socialMedia a {
    width: 2.5rem;
    height: 2.5rem;
    justify-content: center;
    align-items: center;
    text-decoration: none;
}

.footer_socialMedia img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.line_copyrights {
    width: 100%;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.486);
    margin: 0 auto 0 auto;
    position: relative;
    overflow: hidden;
    margin-top: 2rem;
}

.copyrights p {
    color: white;
    font-size: 1.0rem;
    font-weight: 200;
}

/* Helper class to stop animations during reset */
.flow-line.resetting::before {
    animation: none !important;
}