@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@400;700&family=Noto+Sans+SC:wght@400;700&display=swap');

body {
    margin: 0;
    min-height: 100vh;
    background: #f3f4f6; /* keep body gray always */
    font-family: 'Kanit', Arial, sans-serif;
}
:root {
    --topbar-offset: 3rem;
    /* maximum hero height (can be overridden per-page or per-hero via CSS or data attribute)
       Examples: 900px, 80vh */
    --hero-max-height: 900px;
    /* minimum hero height (can be px or vh) */
    --hero-min-height: 320px;
}
.top-bar {
    /* use 100% instead of 100vw to avoid adding scrollbar when the viewport includes a scroll bar
       and to prevent the fixed bar from contributing to horizontal overflow */
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    z-index: 50;
    box-sizing: border-box;
}
.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1rem;
    background: #fff;
    color: #222;
    margin: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    width: calc(100% - 3rem);
    /* max-width: 1300px; */
}

/* Top actions group (language + get started) */
.top-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Adjusted nav positioning when placed inside .top-actions */
.top-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin: 0 0.5rem 0 0; /* small spacing to the left of lang switcher */
}
.top-nav a {
    color: #222;
    text-decoration: none;
    font-weight: 300;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
}

/* Mobile hamburger button */
.hamburger-btn {
    display: none; /* shown only on mobile via media query */
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 6px;
    /* stack lines vertically and center them inside the button */
    flex-direction: column;
    gap: 4px;
}
.hamburger-btn .hamburger-line {
    display: block;
    width: 20px;
    height: 2px;
    background: #222;
    margin: 0; /* spacing handled by parent gap for perfect centering */
    border-radius: 2px;
}

/* Mobile menu panel (dropdown) */
.mobile-menu-panel {
    display: none;
    position: absolute;
    right: 0.7rem;
    top: calc(100% - 7px);
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    padding: 12px;
    z-index: 400;
    min-width: 220px;
}
.mobile-menu-panel.open { display: block; }
.mobile-menu-panel .mobile-nav { display: flex; flex-direction: column; gap: 6px; }
.mobile-menu-panel .mobile-nav a { padding: 8px 10px; border-radius: 6px; color: #222; text-decoration: none; }
.mobile-menu-panel .mobile-lang { margin-top: 8px; display: flex; gap: 6px; }

/* Hide the desktop nav & lang-switcher on non-desktop screens (tablet+mobile); show hamburger instead */
@media (max-width: 1024px) {
    .top-nav { display: none !important; }
    .lang-switcher { display: none; }
    .hamburger-btn { display: inline-flex; }
}

/* Top navigation menu (between logo and actions) */
.top-nav {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    margin-left: 1.25rem;
    margin-right: auto; /* push actions to the right */
}
.top-nav a {
    color: #222;
    text-decoration: none;
    font-weight: 300;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    transition: background 140ms ease, color 140ms ease;
    font-size: 1.4rem;
}
.top-nav a:hover,
.top-nav a:focus {
    background: rgba(0,0,0,0.04);
    outline: none;
}

/* Hide the full menu on smaller screens (use existing top-actions / menu button) */
@media (max-width: 768px) {
    .top-nav { display: none; }
    .menu-btn {
        font-size: 1rem !important;
        font-weight: 300 !important;
        padding: 0.4rem 0.5rem;
    }
}

/* Language switcher */
.lang-switcher {
    position: relative;
    display: flex;
    align-items: center;
}
.lang-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.lang-btn:focus { outline: 2px solid rgba(0,0,0,0.08); }
.lang-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    padding: 6px;
    display: none;
    min-width: 120px;
    z-index: 200;
}
.lang-menu[aria-hidden="false"] { display: block; }
.lang-option {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 14px;
}
.lang-option:hover, .lang-option:focus {
    background: rgba(0,0,0,0.04);
}

/* Ensure flag images fully fill the circular language button */
.lang-btn {
    padding: 0; /* remove internal padding so image can reach edges */
    overflow: hidden; /* crop image to the circular shape */
}
.lang-btn .lang-flag {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover; /* fill and crop as necessary */
    border-radius: 50%;
}
/* small flag inside the menu option */
.lang-option {
    /* vertically center flag + text, but keep the label left-aligned.
       Use flex for vertical centering and spacing; text remains left.
       This gives a clean left-aligned menu while keeping the icon
       aligned vertically with the label. */
    display: flex;
    align-items: center; /* vertical centering */
    justify-content: flex-start; /* keep label left-aligned */
    gap: 8px;
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 14px;
}
.lang-option:hover, .lang-option:focus {
    background: rgba(0,0,0,0.04);
}

.lang-option .lang-flag-sm {
    /* make the small flag square and circular so it visually fills the
       little badge area instead of appearing letterboxed */
    width: 20px;
    height: 20px;
    display: inline-block;
    object-fit: cover;
    vertical-align: middle;
    border-radius: 50%;
    overflow: hidden; /* crop any extra whitespace inside SVG */
    margin-right: 8px; /* small gap between flag and label when left-aligned */
}
.logo img {
    /* base size: use a CSS variable for easier scaling */
    --logo-base-height: 40px; /* default base height */
    --logo-scale: 0.5; /* default scale for most screens (50%) */
    height: calc(var(--logo-base-height) * var(--logo-scale));
    width: auto;
    display: block;
}

/* Mobile screens: smaller logo */
@media (max-width: 600px) {
    .logo img {
        --logo-scale: 0.6;
    }
}

/* Tablet screens: medium logo */
@media (min-width: 601px) and (max-width: 992px) {
    .logo img {
        --logo-scale: 0.8;
    }
}

/* Desktop screens: default logo */
@media (min-width: 993px) and (max-width: 1399px) {
    .logo img {
        --logo-scale: 0.8;
    }
}

/* Large screens: biggest logo */
@media (min-width: 1400px) {
    .logo img {
        --logo-scale: 0.9;
    }
}
.logo {
    font-size: 1.5rem;
    font-weight: bold;
}
.menu-btn {
    /* site yellow theme */
    --mc-yellow: #FFF63B;
    background: var(--mc-yellow);
    color: #000;
    border: none;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1.4rem;
    font-weight: 500;
    font-family: 'Kanit', Arial, sans-serif;
    transition: background 160ms ease, transform 120ms ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-left: 10px;
}
.menu-btn:hover {
    /* background: #e6d42a; slightly darker yellow */
    transform: translateY(-1px);
}
.hero-bg {
    position: absolute;
    /* keep top offset for visual overlap but ensure the element spans the full container
       so background sizing doesn't push layout wider */
    top: -8%; right: 0; bottom: 0; left: 0;
    z-index: 1;
    /* kept for backward compatibility if JS not running */
    background-image: url('assets/images/power-bank-1.jpeg');
    background-position: left top;
    background-repeat: no-repeat;
    /* avoid vw values >100% which can create horizontal scroll; prefer cover as a safe default */
    background-size: cover;
    opacity: 0.95;
}

/* Ensure hero fills a predictable vertical area so content after it starts below */
.hero {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: var(--hero-max-height); /* ความสูงคงที่เท่ากันทุก slide */
    display: block;
    z-index: 1; /* base for slides */
    overflow-x: hidden;
    overflow-y: hidden;
    box-sizing: border-box;
}

/* Make sure slides are contained and do not overlap following sections */
.hero-slides,
.hero-slide .slide-base,

/* Slide layer stacking: base (bottom) -> mid (overlay, can be transparent) -> top (foreground image) */
.hero-slide .slide-base,
.hero-slide .slide-mid,
.hero-slide .slide-top {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
}
.hero-slide .slide-base { z-index: 1; }
.hero-slide .slide-mid { z-index: 2; pointer-events: none; }
.hero-slide .slide-top { z-index: 3; pointer-events: none; }

/* Rotation helpers for base/mid layers */
.rot-spin {
    transform-origin: center center;
    animation: hc-spin var(--rot-duration, 30s) linear infinite;
}
@keyframes hc-spin {
    to { transform: rotate(360deg); }
}
.rot-osc {
    transform-origin: center center;
    animation: hc-osc var(--rot-duration, 3s) ease-in-out infinite;
}
@keyframes hc-osc {
    0% { transform: rotate(calc(var(--rot-deg, 6deg) * -1)); }
    50% { transform: rotate(var(--rot-deg, 6deg)); }
    100% { transform: rotate(calc(var(--rot-deg, 6deg) * -1)); }
}
.hero-slide .slide-top,
.hero-bg {
    pointer-events: none;
}

/* Slides: position multiple full-bleed slides behind the title */
.hero-slides {
    position: absolute;
    inset: 0;
    z-index: 1;
    /* allow tilted/rotated slide elements to extend beyond the slide box */
    overflow: visible;
}
.hero-slide {
    position: absolute;
    inset: 0;
    background-position: left top;
    background-repeat: no-repeat;
    background-size: cover;
    opacity: 0;
    transform: translateX(0);
    transition: opacity 800ms ease, transform 800ms ease;
}
.hero-slide.active {
    opacity: 1;
    z-index: 1;
}

/* Two-layer slide contents */
.hero-slide .slide-base,
.hero-slide .slide-top {
    position: absolute;
    inset: 0;
    background-repeat: no-repeat;
}
.hero-slide .slide-base {
    z-index: 0; /* bottom layer */
    background-size: cover;
    filter: saturate(1.02) brightness(0.95);
}
.hero-slide .slide-top {
    z-index: 0.5; /* sits above base but below title */
    pointer-events: none;
    background-position: right top;
    background-repeat: no-repeat;
    /* make top image slightly less dominating so the base color shows through */
    opacity: 0.95;
}

/* Mid layer inner element: keeps image proportions while allowing rotation */
.hero-slide .slide-mid {
    z-index: 2; /* overlay layer */
    pointer-events: none;
    overflow: visible;
}
.hero-slide .slide-mid .mid-inner {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%,-50%);
    width: auto;
    height: auto;
    min-width: 10vw;
    min-height: 10vh;
    background-repeat: no-repeat;
    background-size: contain; /* default to contain to preserve aspect */
    background-position: center center;
    will-change: transform, opacity;
}

/* Title move-in animation */
.hero-title {
    position: absolute;
    top: var(--topbar-offset);
    left: 5rem;
    z-index: 2;
    color: #fff;
    max-width: 60vw;
    line-height: 1;
    /* text-shadow: 0 4px 24px rgba(0,0,0,0.5); */
    display: flex;
    flex-direction: column;
    gap: 0.2em;
    overflow: visible;
}
.hero-title .hero-title-line1,
.hero-title .hero-title-line2,
.hero-title .hero-title-line3,
.hero-title .hero-title-line4,
.hero-title .hero-title-line5 {
    transform: translateX(-40px);
    opacity: 0;
    transition: transform 600ms cubic-bezier(.2,.8,.2,1), opacity 600ms ease;
}
.hero-title.in-view .hero-title-line1,
.hero-title.in-view .hero-title-line2,
.hero-title.in-view .hero-title-line3,
.hero-title.in-view .hero-title-line4,
.hero-title.in-view .hero-title-line5 {
    transform: translateX(0);
    opacity: 1;
}
.hero-title-line1,
.hero-title-line2,
.hero-title-line3 {
    font-family: 'Kanit', Arial, sans-serif;
    font-size: 4.3rem;
    font-weight: 200;
    letter-spacing: 2px;
    margin-top: 0.5rem;
}
.hero-title-line4,
.hero-title-line5 {
    font-family: 'Kanit', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 100;
    letter-spacing: 1px;
    margin-top: 1rem;
    color: #FFF63B;
}
.contact-card { 
    background: #f0f0f0;
    color: #000;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    margin-top: 0.5rem;
    display: inline-block;
    max-width: 350px;
}
.contact-card-title {
    font-weight: 300;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    margin-left: 10px;
}
.contact-card-actions { 
    display: flex; 
    gap: 0.6rem; 
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-start;
}
.line-btn { 
    display: inline-block; 
    padding: 0; 
    background: transparent; 
    border-radius: 6px; 
    text-decoration: none;
    flex: 0 0 calc(50% - 0.3rem);
    max-width: calc(50% - 0.3rem);
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.line-btn:hover {
    transform: scale(1.05);
    opacity: 0.8;
}
.line-btn img { 
    height: 45px; 
    width: 100%; 
    display: block; 
    object-fit: contain; 
}
.line-btn:focus { outline: none; }
.line-btn:focus-visible { outline: 3px solid rgba(0,192,0,0.28); }
.hero-title-line4 {
    margin-top: 1rem;
}
.hero-title-coming {
    color: #FFF63B; /* show the line in yellow */
    font-size: 2.5rem;
    margin-top: 0.6rem;
}
.mc-bold-italic {
    font-weight: 500;
    font-style: italic;
    color: #FFF63B;
}
.hero-title-line3 {
    color: #000;
    display: inline-block;
    line-height: 1;
    text-shadow: none; /* sharper text */
}
.hero-title-coming {
    font-family: 'Kanit', Arial, sans-serif;
    font-size: 2.5rem;
    font-weight: 300;
    font-style: normal;
    margin-top: 1em;
}
.scroll-btn {
    background: #040404;
    color: #FFF63B;
    border: none;
    padding: 1rem 2rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 300;
    font-family: 'Kanit', Arial, sans-serif;
    cursor: pointer;
    margin-top: 1rem;
    transition: background 0.2s;
    max-width: 150px;
}
.scroll-btn:hover {
    background: #e68900;
}
.form-section {
    width: 100%;
    max-width: 100%;
    background: transparent; /* form card has its own white background */
    padding: 4rem 2rem;
    display: flex;
    justify-content: center;
    position: relative; /* ensure normal flow */
    z-index: 5; /* above hero if any overlap */
    box-sizing: border-box;
}
#google-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    /* max-width: 720px; */
    background: #ffffff;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    border: 2px solid #e0e0e0;
    box-sizing: border-box;
}
#google-form input, #google-form select, #google-form textarea {
    padding: 0.8rem 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    font-family: 'Kanit', Arial, sans-serif;
    box-sizing: border-box; /* ensure padding/border don't break width */
    background: #f3f4f6; /* match body gray */
}
#google-form .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
#google-form .form-field input {
    width: 100%;
    box-sizing: border-box;
}
#google-form textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1rem;
    resize: vertical;
    box-sizing: border-box;
    background: #f3f4f6; /* match body gray */
    min-height: 120px;
    overflow: auto;
}

/* make select full width as well */
#google-form select {
    width: 100%;
}
#google-form button[type="submit"] {
    background: #F2FC7F;
    color: #000000;
    border: none;
    padding: 0.8rem 2.5rem;
    border-radius: 6px;
    font-size: 1.3rem;
    font-weight: 500;
    font-family: 'Kanit', Arial, sans-serif;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    align-self: flex-start;
    max-width: 200px;
}
#google-form button[type="submit"]:hover {
    background: #e8f167;
    transform: translateY(-2px);
}

/* Contact links in the form */
.contact-link {
    font-weight: 300;
    color: #000000;
    text-decoration: none;
}
/* .contact-link:hover {
    text-decoration: underline;
} */

.form-title {
    font-size: 1.5rem;
    font-weight: 300;
    margin-top: 1rem;
}

@media (max-width: 1399px) {
    .hero {
        height: 570px; /* ความสูงคงที่สำหรับ tablet ใหญ่ */
    }
    .hero-title {
        top: var(--topbar-offset);
        left: 2rem;
        max-width: 60vw;
    }
    /* Reduce top-bar inner margin on smaller screens */
    .top-bar-inner {
        margin: 1rem;
        padding: 0.8rem 1rem;
        width: calc(100% - 2rem);
    }
    .hero-bg {
        top: 2vh; right: 0; bottom: 0; left: 3vh;
        /* avoid using oversized vw-based background sizes */
        background-size: cover;
    }
    .hero-title-line1,
    .hero-title-line2,
    .hero-title-line3 {
        font-size: 3rem;
    }
    .hero-title-coming {
        font-size: 1rem;
    }
}
@media (max-width: 768px) {
    .hero {
        height: 710px; /* ความสูงคงที่สำหรับ mobile */
    }
    .hero-title {
        top: 5rem;
        left: 6vw;
        max-width: 80vw;
    }
    .top-bar-inner {
        margin: 0.6rem;
        padding: 0.6rem 0.8rem;
        width: calc(100% - 1.2rem);
    }
    .hero-title-line1,
    .hero-title-line2,
    .hero-title-line3 {
        font-size: 1.7rem;
        margin-top: 0.2rem;
    }
    .hero-title-line4,
    .hero-title-line5 {
        font-size: 0.9rem;
        margin-top: 0.7rem;
    }
    .hero-title-coming {
        font-size: 0.9rem;
    }
    .hero-bg {
        display: block !important;
    }
    .hero-bg {
        top: 13rem; right: 0; bottom: 0; left: 5%;
        /* 200vw is intentionally huge and will cause overflow on many devices; use cover */
        background-size: cover;
        background-position: center top;
    }
}

@media (max-width: 768px) {
    .form-section { padding: 3rem 1.5rem; }
}

@media (max-width: 600px) {
    #google-form .form-grid {
        grid-template-columns: 1fr; /* stack fields to single column on small screens */
    }
}

/* How to rent section */
.how-to-rent {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding: 2rem 1rem;
    overflow: visible; /* allow decorative mid layer to overflow */
    box-sizing: border-box;
}
.how-to-bg {
    position: absolute;
    left: 0; right: 0; top: 0; bottom: 0;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center center;
    pointer-events: none;
}
.how-to-bg-base {
    z-index: 0;
    /* use the requested bg image for the How to rent section */
    background-image: url('assets/images/bg-how-to.png');
    opacity: 1;
}
.how-to-bg-mid {
    z-index: 1;
    background-image: url('assets/images/how-bg-mid.png');
    opacity: 0.45;
}
.how-to-inner {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}
.how-to-title {
    font-size: 2.4rem;
    margin-bottom: 2rem;
    font-weight: 500;
}
.how-to-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.how-card {
    position: relative;
    /* step image will fill the card as background */
    background-color: transparent;
    padding: 0;
    border-radius: 12px;
    /* box-shadow: 0 6px 20px rgba(0,0,0,0.08); */
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: contain; /* maintain aspect ratio */
    aspect-ratio: 644 / 733; /* exact ratio of background images */
    width: 100%;
    box-sizing: border-box;
}

/* Hover effect to match partner logos: subtle scale + shadow */
.how-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}
.how-card:hover {
    transform: scale(1.03);
    /* box-shadow: 0 10px 30px rgba(11,35,64,0.08); */
}

/* keep the numeric element for accessibility but visually hide it */
.how-step {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.how-card h3 { margin: 0 0 0.2rem 0; font-size: 1rem; }
.how-card p { margin: 0; color: #333; text-align: center; font-size: 0.8rem; line-height: rem; }

/* Per-card step images shown as the card background */
.how-to-grid .how-card:nth-child(1) { background-image: url('assets/images/step-1.png'); }
.how-to-grid .how-card:nth-child(2) { background-image: url('assets/images/step-2.png'); }
.how-to-grid .how-card:nth-child(3) { background-image: url('assets/images/step-3.png'); }
.how-to-grid .how-card:nth-child(4) { background-image: url('assets/images/step-4.png'); }

/* overlay to improve text contrast when background image is bright */
.how-card::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: 0; bottom: 0;
    /* background: linear-gradient(rgba(0,0,0,0.18), rgba(0,0,0,0.06)); */
    border-radius: 12px;
    z-index: 0;
}
/* ensure content sits above overlay */
.how-card > * { position: relative; z-index: 2; }

.how-to-text {
    position: absolute;
    bottom: -5px;
    padding: 1rem;
}

/* Tablets: 2 cards per row */
@media (max-width: 1100px) {
    .how-to-grid { grid-template-columns: repeat(2, 1fr); }
    .how-to-text { bottom: 15px; }
}

/* small tablets / large phones: give more vertical room */
@media (max-width: 768px) {
    .how-to-grid { grid-template-columns: repeat(2, 1fr); }
    .how-to-rent { padding: 3rem 1rem 4rem; }
    .how-to-title { font-size: 1.9rem; margin-bottom: 1rem; }
    .how-card { background-size: contain; aspect-ratio: 644 / 733; }
    .how-to-text { bottom: 5px; left: 1rem; right: 1rem; padding: 0.9rem; }
}

/* phones: maximize vertical space using viewport height */
@media (max-width: 600px) {
    .how-to-grid { grid-template-columns: 1fr; }
    .how-to-rent { padding: 3.2rem 1rem 4.5rem; }
    .how-to-title { font-size: 1.8rem; }
    /* use vh so cards scale with device height and won't feel cramped */
    .how-card { background-size: contain; aspect-ratio: 644 / 733; }
    .how-to-text { bottom: 5px; left: 1rem; right: 1rem; padding: 1rem; }
}

/* Payment methods */
.payment-section { width: 100%; max-width: 100%; padding: 2rem 1rem; background: transparent; box-sizing: border-box; }
.payment-inner { max-width: 1100px; margin: 0 auto; text-align: center; }
.payment-title { 
    font-size: 2.4rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
 }
.payment-row { display: flex; gap: 0.75rem; align-items: center; justify-content: center; flex-wrap: nowrap; }
.payment-item { height: 80px; width: auto; display: inline-block; opacity: 1; flex: 0 0 auto; }
/* Apply same hover behaviour as partner logos */
.payment-item {
    transition: transform 0.3s ease, filter 0.3s ease, opacity 0.3s ease;
}
.payment-item:hover {
    transform: scale(1.05);
    filter: none;
    opacity: 1;
}
/* When logos overflow, switch to wrapped layout so they flow into multiple rows centered */
.payment-row.wrapped {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

/* Improve wrapping behavior: allow items to shrink and fill rows nicely on small screens */
.payment-row.wrapped .payment-item {
    flex: 1 1 20%; /* try 5 items per row, but allow shrink/grow */
    max-width: 140px; /* avoid extremely large logos */
    min-width: 110px; /* keep logos legible */
    height: auto; /* allow image to scale naturally */
}

@media (max-width: 992px) and (min-width: 769px) {
    .payment-row.wrapped .payment-item { max-width: 120px; }
}

@media (max-width: 768px) {
    .payment-row.wrapped .payment-item { flex: 1 1 40%; min-width: 100px; max-width: 30%; }
}

/* When content overflows, enable horizontal scrolling on the row */
.payment-row.scrollable {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
}
.payment-row.scrollable .payment-item { display: inline-block; }

@keyframes scroll-logos {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

/* Certificate section */
.certificate-section { width: 100%; max-width: 100%; padding: 2rem 1rem; background: transparent; box-sizing: border-box; }
.certificate-inner { max-width: 1100px; margin: 0 auto; text-align: center; }
.certificate-title { 
    font-size: 2.4rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
 }
.certificate-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; align-items: stretch; }
.cert-card { background: #f8fafc; padding: 1rem; border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; min-height: 160px; height: 100%; }
.cert-logo { width: 88px; height: 88px; object-fit: contain; margin-bottom: 1.2rem; }
.cert-desc { margin: 0; color: #333; font-size: 0.95rem; text-align: center; }

@media (max-width: 1100px) {
    .certificate-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
    .certificate-grid { grid-template-columns: 1fr; }
    .certificate-title { font-size: 1.4rem; }
}

/* Calculation section styles */
.calculation-section { width: 100%; max-width: 100%; padding: 2.5rem 1rem; background: transparent; box-sizing: border-box; }
.calculation-inner { max-width: 1100px; margin: 0 auto; padding: 1rem; box-sizing: border-box; display: flex; gap: 1.25rem; align-items: flex-start; background: linear-gradient(180deg,#ffffff 0%, #f7fbff 100%); border-radius: 12px; box-shadow: 0 10px 24px rgba(11,35,64,0.04); }
.calc-left { flex: 0 0 40%; min-width: 220px; }
.calc-title { font-size: 1.8rem; color: #0b2340; margin: 0 0 0.6rem; }
.calc-desc { margin: 0; color: #334155; line-height: 1.6; }
.calc-right { flex: 1 1 60%; display: flex; flex-direction: column; gap: 1rem; }

.calc-numbers { display: flex; gap: 0.8rem; align-items: stretch; }
.calc-card { background: #fff; border-radius: 10px; padding: 0.9rem 1rem; box-shadow: 0 8px 20px rgba(2,6,23,0.04); display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 0; flex: 1 1 0; }
.calc-num { font-size: 2rem; font-weight: 300; color: #0b2340; }
.calc-label { font-size: 0.95rem; color: #334155; margin-top: 0.35rem; }

.calc-slider { display: flex; flex-direction: column; gap: 0.5rem; }
.calc-slider { background: transparent; padding: 0; border-radius: 10px; }
.calc-slider input[type="range"] { width: 100%; -webkit-appearance: none; appearance: none; height: 20px; background: transparent; border-radius: 999px; outline: none; cursor: pointer; border: 1px solid #C4E2EB; }
.calc-range-meta { font-size: 0.9rem; color: #64748b; }

/* We'll render the filled/empty parts via an inline background gradient updated by JS. */
/* WebKit track/thumb styling: render a transparent track (we use the input background) and style thumb with a 3-bar SVG icon */
.calc-slider input[type="range"]::-webkit-slider-runnable-track { height: 18px; background: transparent; border-radius: 999px; }
.calc-slider input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 28px; height: 28px; margin-top: -5px; border-radius: 6px; background-color: #ffffff; background-repeat: no-repeat; background-position: center; background-size: 16px 16px; border: 1px solid #C4E2EB; box-shadow: 0 6px 14px rgba(11,35,64,0.12); }

/* Firefox: use range-progress to color left portion; track will be right color */
.calc-slider input[type="range"]::-moz-range-track { height: 18px; background: #DFECF0; border-radius: 999px; }
.calc-slider input[type="range"]::-moz-range-progress { height: 18px; background: #ffffff; border-radius: 999px; }
.calc-slider input[type="range"]::-moz-range-thumb { width: 28px; height: 28px; border-radius: 6px; background-color: #ffffff; border: 1px solid #C4E2EB; background-repeat: no-repeat; background-position: center; background-size: 16px 16px; box-shadow: 0 6px 14px rgba(11,35,64,0.12); }

/* IE/Edge fallback */
.calc-slider input[type="range"]::-ms-fill-lower, .calc-slider input[type="range"]::-ms-fill-upper { background: transparent; border-radius: 999px; }

/* Thumb SVG icon: three vertical bars. We'll set this as the background-image on the thumb via JS (data URI) and CSS fallback using the same data URI */
/* Fallback CSS using data URI (encoded '#'= %23) */
.calc-slider input[type="range"]::-webkit-slider-thumb,
.calc-slider input[type="range"]::-moz-range-thumb {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'><rect x='1' y='1' width='2' height='14' rx='1' fill='%230b69d6'/><rect x='7' y='1' width='2' height='14' rx='1' fill='%230b69d6'/><rect x='13' y='1' width='2' height='14' rx='1' fill='%230b69d6'/></svg>");
}

.calc-price { background: linear-gradient(180deg, #e6f6ff 0%, #dff3ff 100%); border-radius: 10px; padding: 1rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; box-shadow: 0 8px 20px rgba(11,35,64,0.06); }
.calc-price-label { font-weight: 300; color: #0b2340; }
.calc-price-amount { background: none; color: #000; padding: 0.6rem 0.9rem; border-radius: 8px; font-weight: 300; font-size: 1.2rem; }

@media (max-width: 768px) {
    .calculation-inner { flex-direction: column; }
    .calc-left { order: 1; width: 100%; }
    .calc-right { order: 2; width: 100%; }
    .calc-numbers { gap: 0.6rem; }
    .calc-card { padding: 0.75rem; }
}

/* Partners Section */
.partners-section { position: relative; width: 100%; max-width: 100%; padding: 4rem 2rem; background: #f9fafb; overflow: hidden; box-sizing: border-box; }
.partners-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 3rem; }
.partners-title { font-size: 2.5rem; font-weight: 300; color: #0b2340; text-align: center; margin: 0; }
.partners-logos { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2rem; width: 100%; }
.partner-logo { height: 40px; width: auto; object-fit: contain; transition: all 0.3s ease; }
.partner-logo:hover { filter: grayscale(0%); opacity: 1; transform: scale(1.05); }

@media (max-width: 768px) {
    .partners-section { padding: 3rem 1.5rem; }
    .partners-title { font-size: 2rem; }
    .partners-logos { gap: 1.5rem; }
    .partner-logo { height: 50px; }
}

/* Gallery Section */
.gallery-section { position: relative; width: 100%; max-width: 100%; padding: 4rem 2rem; background-image: url('assets/images/bg-gallery.png'); background-repeat: no-repeat; background-size: cover; background-position: center center; overflow: hidden; box-sizing: border-box; }
.gallery-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.gallery-title { font-size: 2.5rem; font-weight: 300; color: #0b2340; text-align: center; margin: 0; }
.gallery-grid { 
    column-count: 4; 
    column-gap: 0rem; 
    width: 100%; 
}
.gallery-item { 
    position: relative; 
    overflow: hidden; 
    transition: transform 0.3s ease; 
    cursor: pointer; 
    break-inside: avoid; 
    margin-bottom: 0rem;
    display: inline-block;
    width: 100%;
}
.gallery-item:hover { transform: translateY(-4px); }
.gallery-item img { width: 100%; height: auto; object-fit: contain; display: block; transition: transform 0.3s ease; }
.gallery-item:hover img { transform: scale(1.05); }

@media (max-width: 1024px) {
    .gallery-grid { column-count: 3; }
}

@media (max-width: 768px) {
    .gallery-section { padding: 3rem 1.5rem; }
    .gallery-title { font-size: 2rem; }
    .gallery-grid { column-count: 2; column-gap: 1rem; }
    .gallery-item { margin-bottom: 1rem; }
}

@media (max-width: 480px) {
    .gallery-grid { column-count: 1; }
}

/* Promotions Section */
.promotions-section { position: relative; width: 100%; max-width: 100%; padding: 4rem 2rem; background: #f9fafb; overflow: hidden; box-sizing: border-box; }
.promotions-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 3rem; }
.promotions-title { font-size: 2.5rem; font-weight: 300; color: #0b2340; text-align: center; margin: 0; }
.promotions-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; width: 100%; }
.promo-card { background: #ffffff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 12px rgba(11,35,64,0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; height: 100%; }
.promo-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(11,35,64,0.12); }
.promo-image { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; }
.promo-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.promo-card:hover .promo-image img { transform: scale(1.05); }
.promo-content { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; flex: 1; }
.promo-card-title { font-size: 1.25rem; font-weight: 300; color: #0b2340; margin: 0; }
.promo-desc { font-size: 0.95rem; color: #64748b; line-height: 1.6; margin: 0; }

@media (max-width: 768px) {
    .promotions-section { padding: 3rem 1.5rem; }
    .promotions-title { font-size: 2rem; }
    .promotions-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* Announcements Section */
.announcements-section { position: relative; width: 100%; max-width: 100%; padding: 4rem 2rem; background: #ffffff; overflow: hidden; box-sizing: border-box; }
.announcements-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 3rem; }
.announcements-title { font-size: 2.5rem; font-weight: 300; color: #0b2340; text-align: center; margin: 0; }
.announcements-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; width: 100%; }
.announce-card { background: #ffffff; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 12px rgba(11,35,64,0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; height: 100%; }
.announce-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(11,35,64,0.12); }
.announce-image { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; }
.announce-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s ease; }
.announce-card:hover .announce-image img { transform: scale(1.05); }
.announce-content { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; flex: 1; }
.announce-card-title { font-size: 1.25rem; font-weight: 300; color: #0b2340; margin: 0; }
.announce-desc { font-size: 0.95rem; color: #64748b; line-height: 1.6; margin: 0; }

@media (max-width: 768px) {
    .announcements-section { padding: 3rem 1.5rem; }
    .announcements-title { font-size: 2rem; }
    .announcements-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* Video section: full-bleed responsive video */
.video-section {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 4rem 2rem;
    overflow: hidden;
    background: transparent; /* match surrounding sections */
    display: flex;
    justify-content: center; /* center the inner container */
    box-sizing: border-box;
}
.video-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}
.video-inner .mc-video {
    display: block;
    width: 100%;
    height: auto; /* auto height to maintain aspect ratio */
    max-height: none;
    object-fit: contain; /* show full video without cropping */
    border-radius: 8px; /* subtle rounding to match many inner containers */
}

@media (max-width: 768px) {
    .video-section { padding: 3rem 1.5rem; }
}

/* ensure video doesn't cause overflow */
.video-section, .video-section * { box-sizing: border-box; }

/* Custom Toastr Dark Theme */
.toast-dark {
    background-color: #1a1a1a !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
}
.toast-info-dark {
    background-color: #1a1a1a !important;
    color: #ffffff !important;
}
.toast-dark .toast-title {
    color: #ffffff !important;
    font-weight: 600 !important;
}
.toast-dark .toast-message {
    color: #e0e0e0 !important;
}
.toast-dark .toast-close-button {
    color: #ffffff !important;
    opacity: 0.8 !important;
}
.toast-dark .toast-close-button:hover {
    opacity: 1 !important;
}
.toast-dark .toast-progress {
    background-color: #4a9eff !important;
}

/* Image Showcase Section */
.image-showcase-section {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 4rem 2rem;
    overflow: hidden;
    background: transparent;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
}
.image-showcase-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}
.showcase-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
    .image-showcase-section { padding: 3rem 1.5rem; }
}

/* FAQ Section */
.faq-section { position: relative; width: 100%; max-width: 100%; padding: 4rem 2rem; background: #f9fafb; overflow: hidden; box-sizing: border-box; }
.faq-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-direction: column; gap: 2.5rem; }
.faq-title { font-size: 2.5rem; font-weight: 300; color: #0b2340; text-align: center; margin: 0; }
.faq-list { display: flex; flex-direction: column; gap: 1.25rem; }
.faq-item { background: #ffffff; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(11,35,64,0.06); transition: box-shadow 0.3s ease; }
.faq-item:hover { box-shadow: 0 4px 16px rgba(11,35,64,0.1); }
.faq-question { width: 100%; padding: 1.5rem 1.75rem; background: transparent; border: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; text-align: left; font-family: 'Kanit', Arial, sans-serif; transition: background-color 0.3s ease; }
.faq-question:hover { background-color: #f8fafc; }
.faq-q-text { font-size: 1.1rem; font-weight: 300; color: #0b2340; flex: 1; }
.faq-toggle { font-size: 1.75rem; font-weight: 300; color: #0b89ff; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: all 0.3s ease; }
.faq-toggle::before { content: '+'; }
.faq-question[aria-expanded="true"] .faq-toggle::before { content: '−'; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease, padding 0.4s ease; }
.faq-answer p { margin: 0; padding: 0 1.75rem 1.5rem; color: #64748b; line-height: 1.7; font-size: 0.98rem; }
.faq-item.active .faq-answer { max-height: 500px; }

@media (max-width: 768px) {
    .faq-section { padding: 3rem 1.5rem; }
    .faq-title { font-size: 2rem; }
    .faq-question { padding: 1.25rem 1.5rem; }
    .faq-q-text { font-size: 1rem; }
    .faq-answer p { padding: 0 1.5rem 1.25rem; font-size: 0.95rem; }
}

/* Get App Section */
.get-app-section { position: relative; width: 100%; max-width: 100%; padding: 4rem 2rem; background-image: url('assets/images/bg-get-app.png'); background-repeat: no-repeat; background-size: cover; background-position: center center; overflow: hidden; box-sizing: border-box; }
.get-app-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 4rem; }
.get-app-preview { flex: 0 0 auto; max-width: 400px; min-width: 0; }
.get-app-preview img { width: 100%; height: auto; display: block; border-radius: 16px;}
.get-app-content { flex: 1; display: flex; flex-direction: column; gap: 1.5rem; }
.get-app-title { font-size: 2.5rem; font-weight: 300; color: #000000; margin: 0; }
.get-app-desc { font-size: 1.1rem; color: #000000; line-height: 1.7; margin: 0; }
.get-app-buttons { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.app-btn { display: block; transition: transform 0.3s ease, opacity 0.3s ease; }
.app-btn:hover { transform: translateY(-2px); opacity: 0.9; }
.app-btn img { height: 50px; width: auto; display: block; }

@media (max-width: 992px) and (min-width: 769px) {
    .get-app-preview { max-width: 300px; }
}

@media (max-width: 768px) {
    .get-app-section { padding: 3rem 1.5rem; }
    .get-app-inner { flex-direction: column; gap: 2.5rem; text-align: center; }
    .get-app-preview { max-width: 300px; }
    .get-app-title { font-size: 2rem; }
    .get-app-desc { font-size: 1rem; }
    .get-app-buttons { justify-content: flex-start; }
    .app-btn img { height: 45px; }
}

@media (max-width: 600px) {
    .get-app-buttons {
        justify-content: flex-start;
    }
    .app-btn {
        /* take roughly half the row minus gap so two fit per row */
        flex: 0 0 calc(50% - 0.5rem);
        max-width: calc(50% - 0.5rem);
        display: flex;
        justify-content: center;
    }
    .app-btn img {
        height: 44px; /* slightly smaller on mobile */
    }
}

/* Vision & Impact section (full-width background with inner constrained content) */
.vision-section {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding: 4rem 2rem;
    /* use a decorative background image for the vision section */
    background-image: url('assets/images/bg-vision.png');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center top;
    box-sizing: border-box;
}
.vision-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    gap: 1.75rem;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap; /* allow the card to drop to the next line */
}
.vision-left { flex: 1 1 auto; min-width: 0; }
.vision-title { font-size: 2.2rem; margin: 0 0 0.6rem; }
.vision-desc { margin: 0; line-height: 1.5; }

.vision-icons { display: flex; gap: 1rem; justify-content: center; }
.icon-box { width: 110px; height: 110px; border-radius: 10px; display:flex; align-items:center; justify-content:center; }
.icon-box img { max-width: 100px; width: 100px; height: auto; display: block; margin: auto; object-fit: contain; }

.vision-card { background: #ffffff; padding: 1rem; border-radius: 10px; display:flex; gap: 1rem; align-items: center; box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    /* place the card on its own row (full width) on desktop */
    flex: 1 1 100%;
    width: 100%;
    margin-top: 1.5rem;
}

/* Hover effect for Vision & Impact card and icon boxes to match partner/logo behavior */
.vision-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    will-change: transform;
}
.vision-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 14px 36px rgba(11,35,64,0.12);
}
.vision-icons .icon-box {
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease;
    will-change: transform;
}
.vision-icons .icon-box:hover {
    transform: translateY(-6px) scale(1.04);
    /* box-shadow: 0 12px 30px rgba(11,35,64,0.10); */
}
.card-image img { width: 140px; height: auto; border-radius: 6px; display: block; }
.card-text h3 { margin: 0 0 0.5rem; color: #0b2340; }
.card-text p { margin: 0; color: #333; }

/* Mission title and list styling */
.mission-title {
    font-size: 2rem;
    font-weight: 600;
    color: #0b2340;
    margin: 0 0 1.5rem 0;
    line-height: 1.2;
}

.mission-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mission-list li {
    position: relative;
    padding-left: 1.5rem;
    color: #333;
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 200;
}

.mission-list li::before {
    content: '●';
    position: absolute;
    left: 0;
    top: 0;
    color: #070707;
    font-size: 1.5rem;
    line-height: 1;
}

/* Responsive: stack on small screens with ordering: icons -> vision -> card */
@media (max-width: 768px) {
    .vision-section { padding: 3rem 1.5rem; }
    .vision-inner { flex-direction: column; align-items: flex-start; text-align: left; }
    .vision-icons { order: 1; width: 100%; justify-content: center; }
    .vision-left { order: 2; width: 100%; }
    .vision-left .vision-desc { max-width: 720px; margin: 0; }
    .vision-card { order: 3; width: 100%; flex-direction: column; align-items: flex-start; }
    .vision-card .card-image img { width: 80%; max-width: 320px; }
    .icon-box { width: 88px; height: 88px; }
    .icon-box img { max-width: 70px; width: 70px; }
}

/* Tablet view: center vision-icons */
@media (max-width: 992px) and (min-width: 769px) {
    .vision-icons { justify-content: center; }
}

/* Desktop-specific: make vision-left and vision-icons share the first row 50/50 */
@media (min-width: 769px) {
    .vision-inner { align-items: center; }
    /* subtract half the gap so two columns + gap fit within 100% */
    .vision-left { flex: 0 0 calc(50% - 0.875rem); min-width: 0; }
    .vision-icons { flex: 0 0 calc(50% - 0.875rem); min-width: 0; justify-content: center; }

    /* Make icon boxes center their content (defensive) */
    .vision-icons .icon-box { display: flex; align-items: center; justify-content: center; }
    .vision-icons .icon-box img { max-width: 94px; width: auto; height: auto; display: block; margin: 0 auto; }

    /* Desktop: place the vision-card on its own row (full width) but split its internal content 50/50 */
    .vision-card { /* ensure card stays full width below the two columns */
        flex: 1 1 100%;
        width: 100%;
        margin-top: 1.5rem;
        display: flex; /* keep row layout */
        flex-direction: row;
        align-items: stretch;
    }
    .vision-card .card-image { flex: 0 0 50%; display: flex; align-items: center; justify-content: center; }
    .vision-card .card-image img { width: 100%; height: auto; object-fit: cover; border-radius: 6px; display: block; }
    .vision-card .card-text { flex: 0 0 50%; display: flex; flex-direction: column; justify-content: flex-start; padding: 10px 17px; }
}

    /* Prevent vision-section inner content from overflowing the viewport. */
    .vision-section {
        overflow-x: hidden; /* prevent horizontal scroll from overflowing children */
    }
    .vision-inner {
        box-sizing: border-box;
        width: 100%;
        max-width: 1200px; /* keep the existing max but ensure width never exceeds viewport */
        padding-left: 0rem;
        padding-right: 0rem;
        margin: 0 auto;
    }
    /* Allow flex children to shrink below intrinsic minimums so they don't force overflow */
    .vision-left, .vision-icons, .vision-card, .card-image, .card-text {
        min-width: 0;
        box-sizing: border-box;
    }
    .vision-icons {
        /* allow icon boxes to wrap onto the next line instead of forcing overflow */
        flex-wrap: wrap;
        gap: 1rem;
    }
    .vision-icons .icon-box img {
        /* max-width: 100%; */
        height: auto;
    }
    .vision-card .card-image {
        overflow: hidden;
    }
    .vision-card .card-image img { max-width: 100%; height: auto; display: block; object-fit: cover; }

    /* Small screens: make sure the card image doesn't exceed available width */
    @media (max-width: 768px) {
        .vision-card .card-image img { width: 100%; height: auto; }
    }

/* Product Showcase Section styles */
.product-section {
    position: relative;
    width: 100%;
    max-width: 100%;
    padding: 4rem 2rem;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    color: #0b2340;
    box-sizing: border-box;
}
.product-inner {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column; /* always place text first, visual on its own row */
    gap: 1.25rem;
    align-items: flex-start;
}
.product-text { width: 100%; }
.product-title { font-size: 1.9rem; margin: 0 0 0.75rem; color: #0b2340; }
.product-desc { margin: 0 0 0.75rem; color: #233043; line-height: 1.6; }
.product-visual { width: 100%; display: flex; align-items: center; justify-content: center; margin-top: 1rem;}
.powerbank-wrap { position: relative; display: block; width: 100%; max-width: 720px; margin: 0 auto; }
.powerbank-img { display: block; width: 520px; max-width: 100%; height: auto; z-index: 1; margin: 0 auto; }

/* Floating tags */
.pb-tag {
    position: absolute;
    background: #ffffff;
    color: #0b2340;
    padding: 1rem 1rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(16,24,40,0.08);
    font-weight: 300;
    font-size: 0.95rem;
    min-width: 260px;
    max-width: 300px;
    min-height: 110px;
    display: flex;
    gap: 0.6rem;
    align-items: center;
    z-index: 2;
    animation: jumpThree 5s infinite linear;
}

.pb-tag .pb-icon { flex: 0 0 80px; display: flex; align-items: center; justify-content: center; }
.pb-tag .pb-icon img { width: 80px; height: auto; display: block;}
.pb-tag .pb-body { flex: 1 1 auto; display: flex; flex-direction: column; word-wrap: break-word; overflow-wrap: break-word; }
.pb-tag .pb-title { font-weight: 300; font-size: 0.95rem; color: #0b2340; word-wrap: break-word; overflow-wrap: break-word; }
.pb-tag .pb-desc { font-weight: 400; font-size: 0.8rem; color: #334155; margin-top: 0.15rem; word-wrap: break-word; overflow-wrap: break-word; }

/* Left column tags (stacked) */
/* Left column tags (stacked) - spaced to avoid overlap */
.pb-left.pb-1 { left: -3%; top: 0%; }
.pb-left.pb-2 { left: -20%; top: 42%; }
.pb-left.pb-3 { left: -18%; top: 90%; }

/* Right column tags (stacked) */
.pb-right.pb-4 { right: -20%; top: 32%; }
.pb-right.pb-5 { right: -5%; top: 70%; }

/* Make tags smaller on smaller screens and convert to inline flow below image */
@media (max-width: 992px) {
    .product-inner { gap: 1rem; }
    .product-text { width: 100%; text-align: left; }
    .product-visual { order: 2; width: 100%; margin-top: 1rem; }
    .powerbank-img { width: 360px; max-width: 100%; }
    .pb-tag { position: relative; left: auto; right: auto; top: auto; display: inline-flex; margin: 0.5rem; min-width: 140px; }
    .powerbank-wrap { display: flex; flex-direction: column; align-items: center; }
}

@media (max-width: 768px) {
    .product-section { padding: 3rem 1.5rem; }
    .product-inner { flex-direction: column; align-items: flex-start; }
    .product-text { width: 100%; }
    .product-visual { width: 100%; }
    .powerbank-img { width: 80%; max-width: 320px; }
}

/* Product Details Section styles */
.product-details-section { width: 100%; max-width: 100%; background: transparent; padding: 2.5rem 0; box-sizing: border-box; }
.product-details-inner { max-width: 1100px; margin: 0 auto; padding: 0 1rem; box-sizing: border-box; }
.product-details-title { text-align: center; font-size: 1.8rem; color: #0b2340; margin-bottom: 1.5rem; }
.product-card { background: #ffffff; border-radius: 12px; box-shadow: 0 8px 30px rgba(2,6,23,0.06); display: flex; gap: 1.25rem; padding: 1rem; align-items: stretch; }
.product-media { flex: 0 0 50%; display: flex; align-items: center; justify-content: center; padding: 1rem; box-sizing: border-box; }
.product-main-img { width: 100%; max-width: 420px; height: auto; display: block; border-radius: 8px; }
.product-info { flex: 1 1 50%; padding: 0.75rem 1rem; box-sizing: border-box; }
.pd-title { margin: 0 0 0.6rem; color: #0b2340; font-size: 1.15rem; }
.pd-desc { margin: 0 0 1rem; color: #334155; line-height: 1.5; }
.pd-size, .pd-cables, .pd-colors { margin-bottom: 0.9rem; }
.pd-size-label, .pd-cables-label, .pd-colors-label { font-weight: 300; color: #0b2340; margin-bottom: 0.35rem; font-size: 0.9rem; }
.pd-size-box { border: 2px solid rgba(16,24,40,0.6); padding: 0.6rem; border-radius: 8px; display: inline-block; color: #102034; }
.pd-ports { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.pd-port-icon { width: auto; height: 25px; object-fit: contain; display: block; }
.pd-color-swatches { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.pd-color-swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(16,24,40,0.15); cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; position: relative; }
.pd-color-swatch:hover { transform: scale(1.1); box-shadow: 0 2px 8px rgba(0,0,0,0.15); }
.pd-color-swatch.selected { border-color: #0b2340; border-width: 3px; box-shadow: 0 0 0 3px rgba(52,73,94,0.3); }
.pd-thumbs { margin-top: 0.6rem; display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.pd-thumbs-title { font-weight: 300; color: #0b2340; margin-right: 0.75rem; font-size: 0.9rem; width: 100%;}
.pd-thumb { border: 2px solid transparent; padding: 4px; background: transparent; border-radius: 8px; cursor: pointer; }
.pd-thumb img { width: 64px; height: 64px; object-fit: cover; display: block; border-radius: 6px; }
.pd-thumb.active { border-color: #0b2340; box-shadow: 0 6px 16px rgba(11,35,64,0.12); }

@media (max-width: 900px) {
    .product-card { flex-direction: column; }
    .product-media, .product-info { flex: 1 1 100%; }
    .product-main-img { max-width: 320px; }
}

/* Grid wrapper for multiple product cards in the details area */
.product-cards-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 601px) {
    .product-cards-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .product-cards-grid { grid-template-columns: 1fr; }
}

/* Slight spacing inside each card when used in the grid */
.product-cards-grid .product-card { padding: 0.9rem; }

/* Product Grid styles */
.product-grid-section { background: transparent; padding: 2rem 0 3rem; }
.product-grid-inner { max-width: 1100px; margin: 0 auto; padding: 0 1rem; box-sizing: border-box; }
.product-grid-title { font-size: 1.6rem; color: #0b2340; margin-bottom: 1rem; text-align: left; }
.product-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
.product-info-card { background: #ffffff; border-radius: 10px; padding: 0.75rem; display: flex; gap: 1rem; align-items: center; box-shadow: 0 6px 20px rgba(2,6,23,0.04); }
.product-info-card .pic { flex: 0 0 140px; }
.product-info-card .pic img { width: 140px; height: auto; border-radius: 8px; object-fit: cover; display: block; }
.product-info-card .info { flex: 1 1 auto; }
.product-info-card h4 { margin: 0 0 0.35rem; color: #0b2340; font-size: 1.05rem; }
.product-info-card .short { margin: 0 0 0.5rem; color: #334155; }
.product-info-card .meta { font-size: 0.92rem; color: #102034; margin-top: 0.25rem; }
.product-info-card .meta-label { font-weight: 300; margin-right: 0.45rem; color: #0b2340; }

@media (min-width: 769px) {
    /* two columns on desktop */
    .product-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
    .product-item img { width: 88px; }
}


/* Site footer / final section */
.site-footer { position: relative; width: calc(100% - 2.4rem); max-width: 100%; margin: 1.2rem; margin-top: 3rem; padding: 0.6rem 0.25rem; overflow: visible; box-sizing: border-box; }
.site-footer-bg { position: absolute; left: 0; right: 0; top: 0; bottom: 0; background-repeat: no-repeat; background-size: cover; background-position: center top; pointer-events: none; border-radius: 15px;}
.site-footer-base { z-index: 0; background-image: url('assets/images/footer-bg.png'); }
.site-footer-mid { z-index: 1; background-image: url('assets/images/footer-mid.png'); opacity: 0.35; }
.site-footer-inner { position: relative; z-index: 2; max-width: none; margin: 0 auto; padding: 0.5rem 1rem; /* spacing overridden by margins below to match top-bar */ }
.site-footer-inner { margin: 0 0rem; width: calc(100% - 3rem); }
.site-footer-top { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; }
.footer-logo { flex: 0 0 auto; }
.footer-logo img { height: 25px; width: auto; display: block; }
.footer-art { flex: 1 1 auto; display: flex; justify-content: center; align-items: center; }
/* decorative art should match logo height and keep aspect ratio */
.footer-art img { height: 25px; width: 70vw; max-width: 70%; display: block; }

/* Footer Content Section */
.site-footer-content { display: flex; gap: 4rem; padding: 2.5rem 0; border-top: 1px solid rgba(0,0,0,0.1); border-bottom: 1px solid rgba(0,0,0,0.1); margin-top: 1.5rem; }
.footer-left { flex: 1; display: flex; flex-direction: column; gap: 1rem; }
.footer-address, .footer-phone { color: #334155; font-size: 0.95rem; line-height: 1.6; }
.footer-address p, .footer-phone p { margin: 0; }
.footer-phone a { color: #0b89ff; text-decoration: none; transition: color 0.3s ease; }
.footer-phone a:hover { color: #0b69d6; text-decoration: underline; }
    .footer-social { display: flex; gap: 1.25rem; align-items: center; flex-wrap: wrap; }
.social-icon { display: flex; flex-direction: column; align-items: center; gap: 0rem; transition: transform 0.3s ease, opacity 0.3s ease; text-decoration: none; }
.social-icon:hover { transform: translateY(-2px); opacity: 0.8; }
.social-icon-img { width: 70px; height: 70px; border-radius: 50%; overflow: hidden; }
.social-icon-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.social-icon-label { font-size: 0.75rem; color: #64748b; text-align: center; }
.footer-apps { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.footer-app-btn { display: block; transition: transform 0.3s ease, opacity 0.3s ease; }
.footer-app-btn:hover { transform: translateY(-2px); opacity: 0.9; }
.footer-app-btn img { height: 50px; width: auto; display: block; }

/* Responsive: ensure at least two app buttons per row on small screens */
@media (max-width: 600px) {
    .footer-apps {
        justify-content: center;
    }
    .footer-apps .footer-app-btn {
        /* take roughly half the row minus gap so two fit per row */
        flex: 0 0 calc(50% - 0.5rem);
        max-width: calc(50% - 0.5rem);
        display: flex;
        justify-content: center;
    }
    .footer-apps .footer-app-btn img {
        height: 44px; /* slightly smaller on mobile */
    }
}

.footer-right { flex: 1; }
.footer-nav-title { font-size: 1.1rem; font-weight: 300; color: #0b2340; margin: 0 0 1rem; }
.footer-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem 1.5rem; }
.footer-nav a { color: #334155; text-decoration: none; font-size: 0.95rem; transition: color 0.3s ease, padding-left 0.3s ease; }
.footer-nav a:hover { color: #0b89ff; padding-left: 0.5rem; }

.site-footer-bottom { margin-top: 1rem; text-align: center; }
.copyright { color: #222; font-size: 0.9rem; }

/* Tablet view: keep footer-apps horizontal and adjust footer layout */
@media (max-width: 992px) and (min-width: 769px) {
    .footer-apps { 
        flex-direction: row;
        justify-content: flex-start; 
    }
    .footer-left { flex: 6; }
    .footer-right { flex: 5; }
}

@media (max-width: 768px) {
    .site-footer-top { flex-direction: column; align-items: center; }
    .footer-art img { width: 80%; max-width: 400px; }
    .site-footer-content { flex-direction: column; gap: 2rem; padding: 2rem 0; }
    .footer-left { align-items: flex-start; }
    .footer-social { justify-content: flex-start; }
    .footer-apps { justify-content: flex-start; }
    .footer-nav { grid-template-columns: repeat(2, 1fr); gap: 0.8rem 1rem; }
    .copyright { color: #222; font-size: 0.8rem; }
}

@media (max-width: 1399px) {
    .site-footer-inner { margin: 0 1rem; width: calc(100% - 2rem); }
}
@media (max-width: 768px) {
    .site-footer-inner { margin: 0 0.6rem; width: calc(100% - 1.2rem); padding: 1rem 0rem; }
}

@keyframes jump {
  0% {
    transform: translate3d(0, 0, 0);
  }
  40% {
    transform: translate3d(0, 50%, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}
@keyframes jumpTwo {
  0% {
    transform: translate3d(0, 0, 0);
  }
  40% {
    transform: translate3d(0, 20px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}
@keyframes jumpThree {
  0% {
    transform: translate3d(0, 0, 0);
  }
  40% {
    transform: translate3d(0, -20px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}
@keyframes jumpFour {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -10px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}
@keyframes jumpFive {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, 10px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

/* Tablet and Mobile adjustments: display pb-tags in flex row with responsive wrapping */
@media (max-width: 992px) {
        /* Override absolute positioning and enable flex layout */
        .pb-tag {
                position: relative !important;
                left: auto !important;
                right: auto !important;
                top: auto !important;
                display: flex !important;
                margin: 0 !important;
                animation: none !important;
                transform: none !important;
                flex: 0 1 calc(50% - 2.75rem); /* 2 cards per row on tablet - account for gap */
                min-width: 0;
                max-width: calc(50% - 2.75rem);
        }

        /* Container displays tags in wrapped flex row */
        .powerbank-wrap {
                display: flex !important;
                flex-direction: row !important;
                flex-wrap: wrap !important;
                justify-content: center !important;
                align-items: flex-start !important;
                gap: 1rem; /* Increased gap for better spacing */
        }
        
        .powerbank-img {
                width: 100%;
                max-width: 400px;
                margin-bottom: 1.5rem;
        }
}

@media (max-width: 768px) {
        /* Mobile: 1 card per row */
        .pb-tag {
                flex: 0 1 100% !important; /* Full width - 1 card per row */
                min-width: 0 !important;
                max-width: 100% !important;
        }
        
        .pb-tag .pb-icon { 
                flex: 0 0 60px; 
        }
        
        .pb-tag .pb-icon img { 
                width: 60px; 
        }
        
        .pb-tag .pb-title { 
                font-size: 0.88rem; 
        }
        
        .pb-tag .pb-desc { 
                font-size: 0.78rem; 
        }
}

/* Ensure .lang-switcher is hidden on non-desktop widths. Placed at the
   end of the stylesheet to win over earlier rules that set display:flex. */
@media (max-width: 1024px) {
    .lang-switcher { display: none !important; }
}

/* ========================================
   STATION SECTION
   ======================================== */
.station-section {
    background: #f3f4f6;
    padding: 4rem 2rem;
}

.station-inner {
    max-width: 1300px;
    margin: 0 auto;
}

.station-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 300;
    color: #000;
    margin-bottom: 3rem;
}

/* Statistics Cards */
.station-stats {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border-radius: 1rem;
    padding: 2rem 2.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    flex: 1;
    min-width: 280px;
    max-width: 400px;
}

.stat-card.stat-stations {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.stat-card.stat-powerbanks {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 300;
    color: #000;
    line-height: 1;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 300;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Region Filter Menu */
.region-filter {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.region-btn {
    padding: 0.75rem 1.5rem;
    border: 2px solid #e5e7eb;
    background: #fff;
    color: #374151;
    font-weight: 300;
    font-size: 0.95rem;
    font-family: 'Kanit', Arial, sans-serif;
    border-radius: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    flex: 1 1 0;
    text-align: center;
}

.region-btn:hover {
    border-color: #FFF63B;
    background: #fffef0;
    color: #000;
}

.region-btn.active {
    background: #000;
    color: #FFF63B;
    border-color: #000;
}

/* Map Container */
.station-map-container {
    width: 100%;
    height: 600px;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    background: #fff;
    position: relative;
    z-index: 1;
}

.station-map {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
}

/* Custom Info Window Styles (injected into map) */
.station-info-window {
    padding: 0.5rem;
    min-width: 200px;
}

.station-info-window h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 300;
    color: #000;
}

.station-info-window p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
    color: #374151;
}

.station-info-window .station-available {
    font-weight: 300;
    color: #10b981;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .station-section {
        padding: 3rem 1rem;
    }
    
    .station-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .station-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .stat-card {
        min-width: auto;
        max-width: 100%;
        padding: 1.5rem 2rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-icon {
        width: 60px;
        height: 60px;
    }
    
    .region-filter {
        gap: 0.5rem;
    }
    
    .region-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }
    
    .station-map-container {
        height: 450px;
    }
}