/* --- Basic Setup & Font Import --- */
:root {
    /* Define the new brand gradient as a variable */
    --brand-gradient: linear-gradient(to right, #4D28FF, #8A47FD, #C25CFF, #C82ED6, #CE00AE);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



body {
    font-family: 'IBM Plex Sans Thai', sans-serif;
    color: #ffffff;
    background-color: #0c0226;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

/* --- Container Class --- */
.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
}

/* --- Navigation Styles --- */
nav {
    position: fixed;
    /* Changed from absolute to fixed */
    width: 100%;
    top: 0;
    left: 0;
    z-index: 100;
    transition: background-color 0.3s ease-in-out;
    /* Add smooth transition */
}

/* --- ADD THIS NEW CLASS for the scrolled state --- */
nav.scrolled {
    background-color: rgba(19, 4, 60, .7);
    /* #13043c with 20% opacity */
    backdrop-filter: blur(10px);
    /* Adds a nice frosted glass effect */
    -webkit-backdrop-filter: blur(10px);
}


nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    padding-bottom: 30px;
}

.logo,
.nav-placeholder {
    flex: 1;
}

.logo {
    cursor: pointer;
}

.logo img {
    height: 40px;
    display: block;
}

.nav-placeholder {
    flex: 1;
}

.menu {
    flex: 2;
    display: flex;
    justify-content: center;
}

.menu ul {
    display: flex;
    list-style: none;
    gap: 60px;
}

.menu ul li {
    font-size: 18px;
}

.menu ul li a {
    color: white;
    text-decoration: none;
    font-weight: 400;
    transition: font-weight 0.2s ease-in-out, color 0.2s ease-in-out;
}

.menu ul li a:hover {
    font-weight: 700;
    color: #f3aeff;
}

.menu ul li a.active {
    font-weight: 700;
    color: white !important;
}

.hamburger-menu {
    display: none;
    width: 30px;
    height: 24px;
    flex-direction: column;
    justify-content: space-between;
    cursor: pointer;
    z-index: 110;
}

.hamburger-menu span {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* --- Mobile Menu Header (Logo) --- */
.mobile-menu-header {
    display: none;
    /* Hide on desktop */
}


/* --- Media Query for screens smaller than 920px --- */
@media (max-width: 920px) {

    /* Hide desktop menu items */
    .menu>ul,
    .nav-placeholder {
        display: none;
    }

    /* Show hamburger icon */
    .hamburger-menu {
        display: flex;
    }

    /* Style the mobile menu dropdown */
    .menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;

        /* --- THIS IS THE FIX for the background --- */
        /* Use the same background as the scrolled navbar */
        background-color: rgba(19, 4, 60, 0.7);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);

        /* Animation: Slide Down Effect */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-in-out, padding 0.5s ease-in-out;

        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
    }

    .menu.active {
        max-height: 500px;
        padding: 10px 0;
        /* Adjusted padding now that the logo is gone */
    }

    /* Show mobile header and menu list when active */
    .menu.active .mobile-menu-header,
    .menu.active ul {
        display: flex;
    }

    .mobile-menu-header {
        padding-bottom: 20px;
        margin-bottom: 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 90%;
        justify-content: center;
    }

    .mobile-menu-header img {
        height: 30px;
    }

    .menu ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 0;
    }

    .menu ul li {
        width: 100%;
        text-align: center;
    }

    .menu ul li a {
        padding: 15px;
        display: block;
        width: 100%;
    }
}


/* Animation for Hamburger to "X" */
.hamburger-menu.active span:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* --- Hero Section --- */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    background-image:
        linear-gradient(to right, rgba(19, 4, 60, 0.5), rgba(20, 5, 71, 0.2)),
        /* radial-gradient(ellipse at center, rgba(138, 71, 253, 0.3) 0%, rgba(138, 71, 253, 0) 70%), */
        url('assets/Frame 47.png');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
    overflow: hidden;
    /* Prevent horizontal scroll on small screens */
}

.hero .container {
    position: relative;
    z-index: 2;
    /* Allow the container to align its content to the start */
    display: flex;
    justify-content: flex-start;
}

.hero-content {
    /* Allow the content to take up more space on smaller screens */
    max-width: 55%;
    min-width: 300px;
    /* Ensure content doesn't get too squished */
}

.welcome-text {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--brand-gradient);
    padding: 8px 16px;
    border-radius: 25px;
    display: inline-block;
    border: none;
}

h1 {
    /* --- UPDATED: Using clamp() for responsive font size --- */
    font-size: clamp(2.5rem, 6vw, 4.875rem);
    /* ~40px to 78px */
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.description {
    /* --- UPDATED: Using clamp() for responsive font size --- */
    font-size: clamp(1rem, 2vw, 1.125rem);
    /* ~16px to 18px */
    line-height: 1.7;
    max-width: 600px;
    margin-bottom: 32px;
    opacity: 0.9;
}

/* --- Hero Image (ส่วนที่แก้ไข) --- */
.hero-image {
    position: fixed;
    /* ✅ อยู่คงที่ ไม่ขึ้นกับ parent */
    top: 50px !important;
    right: 0;
    z-index: 1;
    opacity: 0.4;

    /* ✅ ขนาดตายตัว ไม่ลดตามหน้าจอ */
    width: 900px;
    height: auto;

    /* กัน browser responsive */
    flex: none !important;
    min-width: 900px ;
    max-width: 900px ;
    
    
}

.hero-image img {
    display: block;
    width: 200px ;
    height: auto;
    max-width: none ;
    /* ✅ ปิดระบบ responsive */
    min-width: 200px ;
    object-fit: contain;
    overflow: hidden !important;
}

@media (max-width: 768px) {
    .hero-image {
        /* margin-right: -400px; */
        min-width: 500px;
        /* right: 0 !important; */
        /* รีเซ็ต */
        /* overflow: hidden !important; */
    }
}



/* --- Responsive adjustments for Hero section --- */
@media (max-width: 1200px) {
    .hero-content {
        max-width: 65%;
    }

    .hero-image {
        width: 55%;
    }
}

@media (max-width: 920px) {
    .hero-content {
        max-width: 80%;
        /* Allow content to overlap more */
        min-width: auto;
    }

    .hero-image {
        width: 65%;
        opacity: 0.2;
        /* Reduce opacity on mobile for better text readability */
    }
}

@media (max-width: 576px) {
    .hero-content {
        max-width: 100%;
        /* Content takes full width */
        padding-right: 20px;
        /* Add some padding so it doesn't touch the edge */
    }

    .hero-image {
        width: 80%;
    }
}

/* --- Button Styles --- */
.button-group {
    display: flex;
    gap: 30px;
}

.btn {
    padding: 12px 35px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: transparent;
    transform: skewX(-25deg);
    text-decoration: none;
    color: white;
}

.btn span {
    display: inline-block;
    transform: skewX(25deg);
}

.btn-primary {
    /* --- UPDATED GRADIENT --- */
    background: var(--brand-gradient);
}

.btn-primary:hover {
    transform: skewX(-25deg) translateY(-2px);
    box-shadow: 0 4px 20px rgba(138, 71, 253, 0.4);
}

.btn-secondary {
    position: relative;
    background: #1a0841;
    padding: 14px 37px;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    inset: 0;
    /* border-radius: 8px; */
    padding: 2px;
    /* --- UPDATED GRADIENT --- */
    background: var(--brand-gradient);
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.btn-secondary:hover {
    transform: skewX(-25deg) translateY(-2px);
}

@media (max-width: 430px) {
    .button-group {
        flex-direction: row;
        /* justify-content: center; */
        gap: 15px; /* Reduce the gap between buttons */
    }

    .btn {
        /* Reduce padding and font size to make the button smaller */
        padding: 10px 20px; /* Reduced horizontal padding */
        font-size: clamp(0.8rem, 1vw, 0.85rem); /* Made font slightly smaller */
    }

    .btn-secondary {
        /* Adjust padding for the secondary button specifically */
        padding: 12px 22px;
    }
}

/* --- Hero Image --- */
.hero-image {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 100%;
    position: absolute;
    top: 0;
    right: 0;
    width: 55%;
    z-index: 1;
    opacity: .4;
    /* filter: contrast(2.2); */


}

.hero-image img {
    width: 100%;
    height: auto;
}


/* ========== STYLES FOR NEW SECTIONS ========== */

/* --- Body Adjustment --- */
/* We need to allow scrolling now, so remove height and overflow */
body {
    overflow-y: auto;
    overflow-x: hidden;
}

/* --- Slider Bar Styles --- */
.slider-bar {
    background-image: url('assets/Slider Bar BG.svg');
    background-repeat: repeat-x;
    background-size: auto 100%;
    padding: 15px 0;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-transform: uppercase;
}

.slider-track {
    display: inline-flex;
    animation: scrollLoop 30s linear infinite;
    will-change: transform;
}

.slide-item {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 51px;
    /* Gap after star */
}

.slide-item p {
    font-size: 30px;
    font-weight: 700;
    margin-right: 51px;
    /* Gap from text to star */
}

.slide-item img {
    height: 30px;
}

/* --- Re-introduced @keyframes for seamless loop --- */
@keyframes scrollLoop {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}


/* --- Features Section Styles --- */
.features-section {
    background-color: #13043c;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

/* UPDATED Background decorations */
.features-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-30%);
    width: 900px;
    /* Container width for the pattern */
    height: 900px;
    /* Container height for the pattern */
    background-image:
        url('assets/Pattern 2.svg'),
        radial-gradient(ellipse at center, rgba(138, 71, 253, 0.25), transparent 60%);
    background-repeat: no-repeat, no-repeat;
    /* --- THIS IS THE FIX --- */
    /* Position the pattern to the left-center of its container */
    background-position: left center, center;
    background-size: auto, 100%;
    z-index: 1;
}

@media (max-width: 768px) {
    /* --- THIS IS THE FIX --- */
    .features-section::before {
        /* Adjust position to be near the top stacked image */
        top: 160px; 
        left: 42%;
        /* Scale it down even more and center it horizontally */
        transform: translateX(-50%) scale(0.7);
        opacity: 0.7; /* Make it more subtle on mobile */
    }
}

.features-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    /* Changed from right to left */
    right: 0;
    bottom: 0;
    width: 100%;
    /* Changed from 50% to 100% */
    background-image: url('assets/bg2.png');
    background-size: cover;
    background-position: center;
    /* Changed to center */
    background-repeat: no-repeat;
    opacity: 0.5;
    z-index: 1;
}

.features-section .container {
    position: relative;
    z-index: 2;
    text-align: center;
}


.section-title {
    font-size: clamp(2.5rem, 5vw, 3.75rem); /* ~40px to 60px */
    font-weight: 700;
}

.section-subtitle {
    font-size: clamp(1.25rem, 3vw, 2rem); /* ~20px to 32px */
    margin-top: 24px;
    margin-bottom: 60px;
    color: #e0e0e0;
}

/* Features Content Box */
.features-box {
    display: flex;
    align-items: center;
    gap: 60px;
    text-align: left;

    /* Simulating Box BG.svg */
    background: rgba(20, 5, 71, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 60px;
}

.features-box-left {
    flex: 0 0 40%;
}

.features-box-left img {
    width: 100%;
    height: auto;
}

.features-box-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
    /* Space between each feature item */
}

.feature-item h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem); /* ~20px to 24px */
    margin-bottom: 18px;
}

.feature-item p {
    font-size: clamp(1rem, 1.5vw, 1.125rem); /* ~16px to 18px */
    color: #d1d1d1;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .features-section .features-box {
        /* --- THIS IS THE FIX --- */
        /* Change layout from side-by-side to stacked */
        flex-direction: column;
        padding: 40px 20px; /* Adjust padding for mobile */
        gap: 40px;
    }

    .features-section .features-box-left {
        flex-basis: auto; /* Reset basis */
        width: 80%; /* Adjust image size on mobile */
        max-width: 300px;
    }

    .feature-item h3 {
        font-size: 22px; /* Slightly smaller title for mobile */
    }
}


/* ========== STYLES FOR PROMOTIONS SECTION ========== */

.promo-slider {
    z-index: 5;
    /* Ensure it's above the background patterns */
    position: relative;
}

.promotions-section {
    background-color: #13043c;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.promotions-section .section-title {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    /* By not adding 'display: inline-block', it respects the parent's 'text-align: center' */
}

/* Background decorations */
.promotions-section::before {
    content: '';
    position: absolute;
    top: -100px;
    right: 0;
    width: 500px;
    height: 500px;
    /* --- UPDATED: Added blur.png as the top layer --- */
    background-image:
        url('assets/blur.png'),
        /* Layer 1: Blur effect */
        url('assets/Pattern 3.svg');
    /* Layer 2: Original Pattern */

    background-repeat: no-repeat, no-repeat;
    background-size: contain, contain;
    background-position: top right, top right;
    z-index: 1;
}

.promotions-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 900px;
    height: 900px;
    background-image: url('assets/Pattern 4.svg');
    background-repeat: no-repeat;
    background-size: contain;
    background-position: bottom left;
    z-index: 1;
}

.promotions-section .container {
    position: relative;
    z-index: 2;
    text-align: center;
}

/* Promo Grid */
.promo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

.promo-card-link {
    text-decoration: none; /* Remove underline from link */
    display: block; /* Ensure it takes up the full grid space */
    transition: transform 0.3s ease-in-out;
}

.promo-card-link:hover {
    transform: translateY(-5px); /* Add a subtle lift effect on hover */
}

/* --- UPDATED: Promo Card using banner.png --- */
.promo-card {
    background-image: url('assets/banner.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    padding: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 250px;
    cursor: pointer; /* Add pointer cursor */
    height: 100%; /* Ensure card fills the link wrapper */
}

.promo-card-content {
    background: none;
    padding: 0 15px;
    height: auto;
    justify-content: center;
}

/* --- UPDATED: Text color to white --- */
.promo-card h4 {
    font-size: 16.48px;
    font-weight: 600;
    color: #ffffff;
}

.promo-subtext {
    font-size: 13.19px;
    color: #ffffff;
    margin-top: 5px;
    margin-bottom: 7px;
    opacity: 0.9;
}

/* --- THIS IS THE FIX for the main value text color --- */
.promo-main-value {
    font-size: 50px;
    font-weight: 700;
    line-height: 1.1;
    /* REMOVED GRADIENT STYLES */
    /* background: var(--brand-gradient); */
    /* -webkit-background-clip: text; */
    /* background-clip: text; */
    /* color: transparent; */

    /* ADDED white color */
    color: #ffffff;
}

/* --- Responsive Design for Promo Grid --- */
@media (max-width: 1200px) {
    .promo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .promo-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .promo-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 48px;
    }

    .section-subtitle {
        font-size: 24px;
    }
}



/* ========== STYLES FOR PROVIDERS SECTION ========== */

.providers-section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    background-image: 
        radial-gradient(ellipse at center, rgba(19, 4, 60, 0.5) 0%, transparent 70%),
        url('assets/Group 1000001757.png');
    background-size: cover, cover;
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    /* height: 100vh; */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.providers-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%; /* The width of the line */
    height: 2px; /* The thickness of the line */
    background: linear-gradient(to right, 
        transparent 0%, 
        rgba(255, 255, 255, 0.9) 50%, 
        transparent 100%
    );
}

.providers-section .section-title {
    margin-bottom: 24px;
}

.providers-section .container {
    text-align: center;
}

.provider-sliders {
    display: flex;
    flex-direction: column;
    gap: 20px;
    /* --- THIS IS THE FIX --- */
    margin-top: 120px;
    /* Changed from 60px to 120px */
}

.provider-track-wrapper {
    overflow: hidden;
    width: 100%;
}

.provider-track {
    display: flex;
    gap: 20px;
    width: max-content;
    flex-shrink: 0;
}

.provider-card {
    background-image: url('assets/banner2.png');
    background-size: cover;
    background-position: center;
    width: 190px;
    height: 90px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
    flex-shrink: 0;
}

.provider-card img {
    max-width: 80%;
    max-height: 60%;
    object-fit: contain;
}

/* --- Animations for Provider Sliders (CSS Based) --- */
.track-ltr {
    animation: slideLTR 40s linear infinite;
}

.track-rtl {
    animation: slideRTL 40s linear infinite;
}

@keyframes slideLTR {
    from {
        transform: translateX(-50%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes slideRTL {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}


/* ========== STYLES FOR FAQ SECTION ========== */

.faq-section {
    padding: 120px 0 60px;
    position: relative;
    background-color: #13043c;

    /* --- THIS IS THE FIX --- */
    background-image:
        linear-gradient(to right, rgba(28, 4, 77, 0.6), rgba(28, 4, 77, 0.6)),
        /* Layer 1: Color Overlay */
        radial-gradient(ellipse at center, rgba(138, 71, 253, 0.25) 0%, transparent 70%),
        /* Layer 2: Glow Effect */
        url('assets/Frame 50.png'),
        /* Layer 3: Frame */
        url('assets/bg5.png');
    /* Layer 4: Base BG */

    background-position: center, center, center, center;
    background-size: cover, cover, cover, cover;
    background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
    overflow: hidden;
}

/* --- REMOVED STYLES from .section-title and its ::before --- */
.faq-section .section-title {
    position: relative;
    z-index: 1;
    /* Ensure text is above the flare */
}

/* Create the lens flare effect behind the title */
.faq-section .section-title::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 100px;
    /* Create a purple radial gradient for the flare effect */
    /* background: radial-gradient(ellipse at center, */
            /* rgba(194, 92, 255, 0.6) 0%, */
            /* Bright purple center */
            /* rgba(138, 71, 253, 0.3) 40%, */
            /* Softer purple mid-ring */
            /* rgba(28, 4, 77, 0) 70% */
            /* Fades to transparent */
        /* ); */
    z-index: -1;
    /* Place it behind the text */
    filter: blur(20px);
    /* Add a soft blur to the flare */
}

.faq-section .container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.faq-accordion {
    max-width: 900px;
    margin: 60px auto 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.faq-item {
    background: rgba(20, 5, 71, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px 30px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.faq-item:hover {
    background: rgba(20, 5, 71, 0.6);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.faq-question p {
    font-size: 18px;
    font-weight: 500;
    text-align: left;
}

.faq-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out, padding-top 0.5s ease-in-out;
}

.faq-answer p {
    font-size: 16px;
    color: #e0e0e0;
    text-align: left;
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding-top: 20px;
}

/* --- NEW STYLE FOR FOOTER TEXT INSIDE THE SECTION --- */
.section-footer {
    margin-top: 100px;
    /* Space above the footer text */
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

h1 {
    font-size: clamp(1.5rem, 6vw, 1.8rem);
}

.section-title {
    font-size: clamp(1.3rem, 6vw, 1.7rem);
}

.description {
    font-size: clamp(0.85rem, 2vw, 0.9rem);
}

.section-subtitle {
    font-size: clamp(0.85rem, 3vw, 0.9rem);
    margin-top: 24px;
    margin-bottom: 60px;
    color: #e0e0e0;
}

.feature-item p {
    font-size: clamp(0.7rem, 1.5vw, 0.85rem);
}

.provider-sliders {
    margin-top: 0;
}