/* ==========================================================================
   Base & Layout Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

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

/* Header */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 60px;
    width: auto;         /* Maintains aspect ratio */
    object-fit: contain;
}

/* If logo is still too big on mobile */
@media (max-width: 768px) {
    .logo-img {
        height: 30px;
        max-width: 150px;
    }
}

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

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #ff6b35;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 107, 53, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #575859;
    border: 2px solid #ff6b35;
}

.btn-secondary:hover {
    background: #ff6b35;
    color: white;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: float 20s infinite ease-in-out;
}

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

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-text p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

.dashboard-mockup {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 500px;
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    animation: levitate 6s ease-in-out infinite;
}

@keyframes levitate {
    0%, 100% { transform: perspective(1000px) rotateY(-5deg) rotateX(5deg) translateY(0px); }
    50% { transform: perspective(1000px) rotateY(-5deg) rotateX(5deg) translateY(-10px); }
}

.mockup-header {
    display: flex;
    gap: 8px;
    margin-bottom: 1rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot:nth-child(1) { background: #ff5f56; }
.dot:nth-child(2) { background: #ffbd2e; }
.dot:nth-child(3) { background: #27ca3f; }

.mockup-content {
    color: #333;
}

.chart-placeholder {
    height: 200px;
    background: linear-gradient(135deg, #ff6b3520 0%, #f7931e20 100%);
    border-radius: 12px;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.chart-bars {
    display: flex;
    gap: 8px;
    align-items: end;
    height: 80px;
}

.bar {
    width: 20px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border-radius: 4px 4px 0 0;
    animation: growBar 2s ease-out infinite alternate;
}

.bar:nth-child(1) { height: 40%; animation-delay: 0s; }
.bar:nth-child(2) { height: 70%; animation-delay: 0.2s; }
.bar:nth-child(3) { height: 50%; animation-delay: 0.4s; }
.bar:nth-child(4) { height: 90%; animation-delay: 0.6s; }
.bar:nth-child(5) { height: 60%; animation-delay: 0.8s; }

@keyframes growBar {
    0% { transform: scaleY(0.8); }
    100% { transform: scaleY(1.1); }
}

/* Features Section */
.features {
    padding: 100px 0;
    background: #f7f8fc;
}

.features h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 3rem;
    color: #4a5568;
}

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

.feature-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(255, 107, 53, 0.2);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
    font-size: 1.5rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #4a5568;
}

.feature-card p {
    color: #718096;
    line-height: 1.8;
}

/* Stats Section */
.stats {
    background: linear-gradient(135deg, #4a5568 0%, #718096 100%);
    color: white;
    padding: 80px 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item h3 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-item p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #ff6b35 0%, #f7931e 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.cta-content p {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    opacity: 0.9;
}

/* Footer */
footer {
    background: #4a5568;
    color: white;
    padding: 60px 0 30px;
}

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

.footer-section h3 {
    margin-bottom: 1.5rem;
    color: #ff6b35;
}

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

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

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

.footer-section ul li a:hover {
    color: #ff6b35;
}

.footer-bottom {
    border-top: 1px solid #718096;
    padding-top: 2rem;
    text-align: center;
    color: #cbd5e0;
}

.desktop-only {
    display: flex;
}
/* Mobile Menu */
.mobile-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 1.5rem;
    z-index: 1000;
    border-top: 1px solid #e2e8f0;
}

.mobile-menu.active {
    display: flex !important;
}

.mobile-menu a {
    padding: 1rem 0;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 1.1rem;
    border-bottom: 1px solid #f7f8fc;
}

.mobile-menu a:hover {
    color: #ff6b35;
}

.mobile-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f7f8fc;
}

.mobile-btn {
    text-align: center;
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.mobile-menu .btn {
    margin: 0.5rem 0;
    text-align: center;
}

/* Mobile Menu Styles */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* Hamburger animation when active */
.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}


/* Contact Form Mobile */
.contact-section {
    padding: 60px 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}


/* Responsive Design */
@media (max-width: 768px) {
    .nav-links,
    .desktop-only {
        display: none;
    }

    .hamburger {
        display: flex;
    }

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

    .hero-text h1 {
        font-size: 2.5rem;
    }

    /* Hide desktop buttons on mobile */
    .cta-buttons:not(.mobile-buttons) {
        display: none;
    }
    .form-row {
        grid-template-columns: 1fr;
    }

}

@media (min-width: 769px) {
    .hamburger {
        display: none;
    }

    .mobile-menu {
        display: none;
    }


    .mobile-menu.active {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 0 60px;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-text p {
        font-size: 1.1rem;
    }

    .features,
    .stats,
    .cta-section {
        padding: 60px 0;
    }

    .logo-img {
        height: 30px;
    }
}

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

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

/* Portal Modal */
.portal-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.portal-content {
    background: white;
    border-radius: 20px;
    padding: 3rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.portal-form {
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #ff6b35;
}

/* Contact Section */
.contact-section {
    padding: 100px 0;
    background: #f7f8fc;
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-content h2 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #4a5568;
}

.contact-form {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    margin-top: 3rem;
    text-align: left;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #4a5568;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ff6b35;
}


/* Language Switcher Styles */
.language-switcher {
    margin-right: 15px;
}

.language-select {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-select:hover {
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
}

.language-select option {
    background: #1a1a1a;
    color: white;
    padding: 8px;
}

/* Mobile Language Switcher */
.mobile-language-switcher {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
}

.language-select.mobile {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px;
    border-radius: 6px;
    font-size: 16px;
}

/* Floating Language Switcher */
.floating-language-switcher {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    z-index: 1000;
}

.lang-btn {
    background: linear-gradient(135deg, #7b94ad 0%, #3a6da1 100%);
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.lang-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

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

/* Thai Font Support */
.thai-font {
    font-family: 'Sarabun', 'Noto Sans Thai', sans-serif;
}

/* RTL Support for Thai (if needed) */
[dir="rtl"] {
    text-align: right;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .language-switcher {
        display: none; /* Hide desktop version on mobile */
    }

    .mobile-language-switcher {
        display: block;
    }

    .floating-language-switcher {
        right: 10px;
        top: auto;
        bottom: 20px;
        transform: none;
    }

    .lang-btn {
        padding: 10px 14px;
        font-size: 13px;
    }
}

@media (min-width: 769px) {
    .mobile-language-switcher {
        display: none; /* Hide mobile version on desktop */
    }
}