/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --accent-color: #f093fb;
    --text-dark: #2d3748;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.1);
}

body {
    font-family: 'Inter', 'Sarabun', 'Kanit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    position: relative;
}

main {
    position: relative;
    z-index: 1;
    margin-top: 70px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 1rem; /* ปรับระยะห่างระหว่างโลโก้และชื่อ */
}

.nav-logo img {
    width: 40px; /* ปรับขนาดโลโก้ */
    height: auto;
    max-width: 100%;  /* ให้โลโก้ยืดหยุ่นตามขนาดที่ต้องการ */
    opacity: 1;  /* ทำให้แสดงทันที */
    transition: opacity 0.3s ease;
}

.nav-logo h1 {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.8rem;
    font-weight: 800;
}


.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    margin: 3px 0;
    transition: 0.3s;
}

/* Language Toggle */
.language-toggle {
    display: flex;
    align-items: center;
}

.lang-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.lang-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.4);
}

.lang-btn:active {
    transform: translateY(0);
}

.lang-text {
    font-size: 0.9rem;
}

.lang-btn i {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Language switch animation */
.lang-btn.switching {
    animation: langSwitch 0.3s ease;
}

@keyframes langSwitch {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(0.9); }
    100% { transform: rotate(360deg) scale(1); }
}

/* Responsive language toggle */
@media (max-width: 768px) {
    .language-toggle {
        margin: 1rem 0;
        justify-content: center;
    }

    .nav-menu.active .language-toggle {
        order: 10;
        width: 100%;
    }
}

/* Hero Section */
.hero {
    min-height: calc(90vh - 70px);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,106.7C1248,96,1344,96,1392,96L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    opacity: 0.3;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(45deg, #f093fb, #f5576c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.floating-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 3rem;
    animation: float 6s ease-in-out infinite;
    text-align: center;
}

.logo-image {
    width: 150px; /* ปรับขนาดโลโก้ */
    height: auto;
	opacity: 1;  /* ทำให้แสดงทันที */
    transition: opacity 0.3s ease;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}


@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Buttons */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

/* Features Section */
.features {
    padding: 5rem 0;
    background: var(--bg-light);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: transform 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-icon i {
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* About Section */
.about {
    padding: 5rem 0;
    background: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat h3 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat p {
    color: var(--text-light);
    margin-top: 0.5rem;
}

.about-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 4rem;
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.about-card i {
    font-size: 5rem;
    color: white;
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* CTA Section */
.cta {
    padding: 5rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    text-align: center;
    color: white;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta .btn {
    background: white;
    color: var(--primary-color);
}

/* Footer */
.footer {
    background: #1a202c;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: #a0aec0;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #a0aec0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-section ul li i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #a0aec0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .stats {
        justify-content: center;
    }

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

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 200px;
    }
}

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 70px;
}

/* Fix for overlapping sections */
section {
    position: relative;
    z-index: 1;
}

/* Ensure proper stacking context */
.navbar {
    z-index: 1000;
}

.hero {
    z-index: 1;
}

.how-it-works, .features, .personas, .about, .cta, .footer {
    z-index: auto;
}

/* Loading Animation */
@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* How It Works Section */
.how-it-works {
    padding: 5rem 0;
    background: white;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.step-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
    z-index: 10;
}

.step-icon {
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.step-icon i {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.step-card h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.step-card p {
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
    flex-grow: 1;
}

.key-system {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 2.5rem;
    border-radius: 15px;
    color: white;
    text-align: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.key-system h3 {
    font-size: 1.6rem;
    margin-bottom: 2rem;
    font-weight: 600;
}

.key-features {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.key-feature {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem 1.5rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.key-feature:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.key-feature i {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.key-feature span {
    font-size: 1rem;
    font-weight: 500;
}

/* Personas Section */
.personas {
    padding: 5rem 0;
    background: var(--bg-light);
}

.persona-card {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: var(--shadow-lg);
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 3rem;
    align-items: start;
    margin-bottom: 3rem;
}

.persona-avatar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.persona-avatar i {
    font-size: 3rem;
    color: white;
}

.persona-content h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.persona-role {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.persona-section {
    margin-bottom: 2rem;
}

.persona-section h4 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.persona-section ul {
    list-style: none;
    padding-left: 0;
}

.persona-section li {
    color: var(--text-light);
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.persona-section li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.persona-quote {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 10px;
    position: relative;
    font-style: italic;
}

.persona-quote i {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.persona-quote p {
    color: var(--text-light);
    line-height: 1.6;
}

.solution-highlight {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
}

.solution-highlight h3 {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.solution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.solution-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 10px;
}

.solution-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

/* Mission & Vision */
.mission-vision {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.mission, .vision {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 10px;
}

.mission h3, .vision h3 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.mission p, .vision p {
    color: var(--text-light);
    line-height: 1.6;
}

/* CTA Updates */
.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.app-badges {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.app-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 10px;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
}

.app-badge:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.app-badge i {
    font-size: 1.5rem;
}

.badge-text {
    display: flex;
    flex-direction: column;
}

.badge-text small {
    font-size: 0.7rem;
    opacity: 0.8;
}

.badge-text strong {
    font-size: 0.9rem;
}

/* Responsive for new sections */
@media (max-width: 1024px) {
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .persona-card {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2rem;
    }

    .persona-avatar {
        margin: 0 auto 1rem;
    }

    .mission-vision {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .step-card {
        min-height: auto;
        padding: 1.5rem;
    }

    .key-features {
        flex-direction: column;
        align-items: center;
    }

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

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .app-badges {
        flex-direction: column;
        align-items: center;
    }

    .app-badge {
        width: 200px;
        justify-content: center;
    }
}