/* Landing Page CSS - Fahsai BizChat */
:root {
    --primary-color: #0d6efd; /* Bootstrap Primary Blue */
    --primary-dark: #0a58ca;
    --secondary-color: #6c757d;
    --accent-color: #38b6ff; /* A lighter blue accent */
    --bg-light: #f8f9fa;
    --text-dark: #212529;
    --text-light: #ffffff;
    --font-heading: 'Prompt', sans-serif;
    --font-body: 'Sarabun', sans-serif;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

section, #features, #pricing {
    scroll-margin-top: 80px;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: #ffffff;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
}

/* Navbar */
.navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

.nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border: none;
    color: white;
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.3);
    color: white;
}

.btn-outline-custom {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
    padding: 8px 25px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-custom:hover {
    background-color: var(--primary-color);
    color: white;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 140px 0 100px;
    background: linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.4)), url('../images/hero_cloud_bg.png');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    overflow: hidden;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.5);
    padding-bottom: 5px; /* Prevent clipping of descenders with text-shadow */
}

.hero-content p {
    font-size: 1.35rem;
    color: #495057;
    margin-bottom: 30px;
    font-weight: 500;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.hero-image {
    position: relative;
    z-index: 1;
    animation: float 6s ease-in-out infinite;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1));
}

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

.hero-content .badge {
    background-color: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(13, 110, 253, 0.2);
    color: var(--primary-color) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
}

/* Features Section */
.features-section {
    padding: 80px 0;
    background-color: #ffffff;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-title p {
    color: #6c757d;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
}

.feature-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
    border-top: 5px solid transparent;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border-top-color: var(--primary-color);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Platform Section */
.platform-section {
    padding: 80px 0;
    background-color: #f8f9fa;
}

/* Pricing Section */
.pricing-section {
    padding: 80px 0;
    background-color: #ffffff;
}

.pricing-card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    background: #ffffff;
    overflow: hidden;
    position: relative;
}

.pricing-card:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.pricing-card.featured {
    border: 2px solid var(--primary-color);
}

.pricing-header {
    background-color: #f8f9fa;
    padding: 30px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.pricing-header h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.pricing-price {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.pricing-body {
    padding: 30px;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 20px;
}

.pricing-features li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.pricing-features li i {
    color: var(--success);
    margin-right: 10px;
}

/* CTA Section */
.cta-section {
    padding: 100px 0;
    background: linear-gradient(rgba(13, 110, 253, 0.85), rgba(56, 182, 255, 0.85)), url('../images/cta_bg_tech.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    text-align: center;
    position: relative;
}

.cta-section h2 {
    color: white;
    margin-bottom: 20px;
}

.cta-section .btn-light {
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 600;
    color: var(--primary-color);
}

/* Footer */
.footer {
    background-color: #f8f9fa;
    padding: 60px 0 20px;
    border-top: 1px solid #eee;
}

.footer-logo img {
    height: 40px;
    margin-bottom: 20px;
}

.footer h5 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.social-links a {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 50%;
    margin-right: 10px;
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

/* Dark Mode Support (Respecting User Preference) */
.dark-mode-toggle {
    cursor: pointer;
    font-size: 1.2rem;
    margin-left: 15px;
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }
    
    .hero-image {
        margin-top: 40px;
    }

    /* ปรับปุ่ม CTA ให้เรียงแนวตั้งบนมือถือ */
    .hero-content .d-flex.gap-3 {
        flex-direction: column;
        align-items: stretch;
    }

    .hero-content .d-flex.gap-3 .btn {
        text-align: center;
    }

    /* ปรับ badge ให้ wrap ข้อความได้ */
    .hero-content .badge {
        white-space: normal;
        text-align: center;
        line-height: 1.5;
        font-size: 0.8rem;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }
}

/* Trust Section */
.trust-section {
    background-color: #fcfcfc;
}

.trust-brand {
    transition: transform 0.3s ease;
}


.trust-brand:hover {
    transform: translateY(-3px);
}

/* Navigation Menu Adjustments */
@media (min-width: 992px) {
    .navbar-nav .nav-item {
        margin: 0 12px; /* Increased spacing */
        position: relative;
        display: flex;
        align-items: center;
    }

    /* Add | separator after Home, Feature, Plan (first 3 items) */
    .navbar-nav .nav-item:nth-child(-n+3)::after {
        content: "|";
        position: absolute;
        right: -15px;
        color: rgba(33, 37, 41, 0.3); /* Subtle dark color for light mode */
        font-weight: 300;
        font-size: 14px;
        pointer-events: none;
    }
}

/* Dark Mode Adaptation for Separator */
@media (prefers-color-scheme: dark) {
    .navbar-nav .nav-item:nth-child(-n+3)::after {
        color: rgba(255, 255, 255, 0.3);
    }
}

html.dark-mode .navbar-nav .nav-item:nth-child(-n+3)::after {
    color: rgba(255, 255, 255, 0.3);
}

/* Comparison Section */
.comparison-section {
    padding: 80px 0;
    background: linear-gradient(rgba(13, 110, 253, 0.85), rgba(56, 182, 255, 0.85)), url('../images/cta_bg_tech.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
}

.comparison-section .section-title h2,
.comparison-section .section-title p {
    color: white !important;
}

.comparison-section .section-title p {
    opacity: 0.9;
}

.comparison-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    margin-top: 30px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1); /* Increased shadow opacity for better contrast */
    background-color: #ffffff; /* Explicit bg for table */
}

.comparison-table thead th {
    background-color: #f8f9fa;
    padding: 20px;
    font-size: 1.1rem;
    border-bottom: 2px solid #dee2e6;
    vertical-align: middle;
    color: var(--text-dark); /* Ensure header text is dark */
}

.comparison-table thead th:nth-child(3) {
    background-color: rgba(13, 110, 253, 0.1);
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color); /* Highlight header bottom */
}

.comparison-table tbody td {
    padding: 18px 20px;
    vertical-align: middle;
    border-bottom: 1px solid #eee;
    color: var(--text-dark); /* Ensure body text is dark */
}

.comparison-table tbody tr:last-child td {
    border-bottom: none;
}

.comparison-table tbody tr:hover {
    background-color: #fcfcfc;
    transition: background-color 0.2s ease;
}

.comparison-table tbody td:nth-child(3) {
    background-color: rgba(13, 110, 253, 0.02);
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
}

.comparison-table tbody td:nth-child(2) {
    text-align: center;
    /* color: #6c757d; handled by class text-muted in HTML but good to have fallback */
}


/* Dark Mode Support for Comparison Table */
html.dark-mode .comparison-section {
    /* match CTA style in dark mode too */
    color: #e0e0e0;
}

html.dark-mode .comparison-table {
    background-color: #1e1e1e;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

html.dark-mode .comparison-table thead th {
    background-color: #252525;
    color: #e0e0e0;
    border-bottom-color: #333;
}

html.dark-mode .comparison-table thead th:nth-child(3) {
    background-color: rgba(13, 110, 253, 0.2);
    color: #4dabf7; /* Lighter blue for dark mode */
    border-bottom-color: #4dabf7;
}

html.dark-mode .comparison-table tbody td {
    border-bottom-color: #333;
    color: #cfcfcf;
}

html.dark-mode .comparison-table tbody tr:hover {
    background-color: #2a2a2a;
}

html.dark-mode .comparison-table tbody td:nth-child(3) {
    background-color: rgba(13, 110, 253, 0.1);
    color: #4dabf7;
}

/* Ensure icons in dark mode look good */
html.dark-mode .text-muted {
    color: #9aa0a6 !important;
}

/* Responsive adjustment - ปรับตารางเปรียบเทียบบนมือถือ */
@media (max-width: 768px) {
    .comparison-table {
        min-width: 600px; /* ลดขนาดลงเพื่อไม่ให้ล้นเกินไป */
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
}
