/* ==========================================
   AIbaba Corporate Website - Styles
   ========================================== */

/* CSS Variables */
:root {
    --primary-dark: #0A2540;
    --primary-blue: #1A6FE8;
    --secondary-gray: #F5F7FA;
    --white: #FFFFFF;
    --accent-teal: #00C9A7;
    --text-dark: #1a1a2e;
    --text-muted: #5a6677;
    --text-light: #8892a4;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(10, 37, 64, 0.08);
    --shadow-md: 0 4px 16px rgba(10, 37, 64, 0.1);
    --shadow-lg: 0 12px 40px rgba(10, 37, 64, 0.12);
    --shadow-xl: 0 20px 60px rgba(10, 37, 64, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================
   Navigation
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
    padding: 12px 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-ai {
    color: var(--primary-blue);
}

.logo-baba {
    color: var(--primary-dark);
}

.navbar:not(.scrolled) .logo-baba {
    color: var(--white);
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
}

.navbar:not(.scrolled) .nav-links a {
    color: rgba(255, 255, 255, 0.85);
}

.nav-links a:hover {
    color: var(--primary-blue);
}

.navbar:not(.scrolled) .nav-links a:hover {
    color: var(--white);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-cta {
    padding: 10px 24px;
    font-size: 0.875rem;
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--primary-dark);
    transition: var(--transition);
}

.navbar:not(.scrolled) .mobile-toggle span {
    background: var(--white);
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

.btn-primary:hover {
    background: #1559c0;
    border-color: #1559c0;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 111, 232, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
}

.btn-white {
    background: var(--white);
    color: var(--primary-dark);
    border-color: var(--white);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

.btn-outline-white {
    background: transparent;
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--white);
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1rem;
    border-radius: var(--radius-md);
}

/* ==========================================
   Hero Section
   ========================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, #0d3158 50%, #0f3d6e 100%);
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(26, 111, 232, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 111, 232, 0.05) 1px, transparent 1px);
    background-size: 60px 60px;
}

.hero-glow {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(26, 111, 232, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse 6s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.1); }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.gradient-text {
    background: linear-gradient(135deg, var(--accent-teal), #4db8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 60px;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-teal);
    margin-bottom: 4px;
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

/* ==========================================
   Section Base Styles
   ========================================== */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(26, 111, 232, 0.08);
    color: var(--primary-blue);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 16px;
    letter-spacing: -0.5px;
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ==========================================
   About Section
   ========================================== */
.about {
    background: var(--secondary-gray);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.about-card {
    background: var(--white);
    padding: 36px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.about-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 111, 232, 0.08);
    color: var(--primary-blue);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.about-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary-dark);
}

.about-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ==========================================
   Capabilities Section
   ========================================== */
.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.capability-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.capability-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-blue);
}

.capability-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-teal));
    opacity: 0;
    transition: var(--transition);
}

.capability-card:hover::before {
    opacity: 1;
}

.capability-number {
    font-size: 3rem;
    font-weight: 900;
    color: rgba(26, 111, 232, 0.08);
    margin-bottom: 16px;
    line-height: 1;
}

.capability-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.capability-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 20px;
}

.capability-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.capability-tags span {
    padding: 4px 12px;
    background: var(--secondary-gray);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 500;
    border-radius: 20px;
}

/* ==========================================
   Solutions Section
   ========================================== */
.solutions {
    background: var(--secondary-gray);
}

.solution-block {
    margin-bottom: 48px;
}

.solution-block:last-child {
    margin-bottom: 0;
}

.solution-header {
    margin-bottom: 24px;
}

.solution-number {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--primary-blue);
    margin-bottom: 8px;
}

.solution-header h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.solution-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 24px;
}

.solution-card {
    background: var(--white);
    padding: 36px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.solution-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.solution-card-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(26, 111, 232, 0.08), rgba(0, 201, 167, 0.08));
    color: var(--primary-blue);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.solution-card h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.solution-what {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 16px;
}

.solution-value {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.6;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.solution-value strong {
    color: var(--accent-teal);
}

/* ==========================================
   Industries Section
   ========================================== */
.industries-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.industry-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 28px;
    background: var(--secondary-gray);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    color: var(--primary-blue);
}

.industry-item:hover {
    background: var(--white);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.industry-item span {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-dark);
}

/* ==========================================
   Values Section
   ========================================== */
.values {
    background: var(--secondary-gray);
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.value-card {
    background: var(--white);
    padding: 36px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.value-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.value-icon {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 201, 167, 0.08);
    color: var(--accent-teal);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.value-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.value-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* ==========================================
   Team Section
   ========================================== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.team-card {
    text-align: center;
    padding: 40px 32px;
    background: var(--secondary-gray);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.team-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    background: var(--white);
}

.team-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(26, 111, 232, 0.08);
    color: var(--primary-blue);
    border-radius: 50%;
    margin: 0 auto 20px;
}

.team-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: 12px;
}

.team-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ==========================================
   CTA Section
   ========================================== */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark), #0d3158, var(--primary-blue));
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 201, 167, 0.15), transparent 70%);
    border-radius: 50%;
}

.cta-content {
    position: relative;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 16px;
    line-height: 1.3;
}

.cta-content p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 36px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    background: var(--primary-dark);
    padding: 80px 0 40px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-brand p {
    margin-top: 16px;
    font-size: 0.9rem;
    line-height: 1.7;
    max-width: 280px;
}

.footer-links h4 {
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-links a:hover {
    color: var(--accent-teal);
}

.footer-bottom {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ==========================================
   Thai Font Support
   ========================================== */
body.lang-th {
    font-family: 'Noto Sans Thai', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ==========================================
   Language Switcher
   ========================================== */
.flag-icon {
    display: block;
    width: 22px;
    height: 16px;
    border-radius: 2px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.lang-switcher {
    position: relative;
    z-index: 1001;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--white);
    transition: var(--transition);
    font-family: inherit;
}

.navbar.scrolled .lang-btn {
    background: var(--secondary-gray);
    border-color: var(--border-color);
    color: var(--text-dark);
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.navbar.scrolled .lang-btn:hover {
    background: var(--border-color);
}

.lang-flag {
    display: flex;
    align-items: center;
    line-height: 1;
}

.lang-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.lang-chevron {
    transition: transform 0.2s ease;
}

.lang-btn.open .lang-chevron {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    overflow: hidden;
}

.lang-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown li {
    list-style: none;
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: background 0.15s ease;
    font-family: inherit;
    text-align: left;
}

.lang-option:hover {
    background: var(--secondary-gray);
}

.lang-option-flag {
    display: flex;
    align-items: center;
    line-height: 1;
    flex-shrink: 0;
}

.lang-option-flag .flag-icon {
    width: 24px;
    height: 17px;
}

/* ==========================================
   Animations
   ========================================== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.75rem;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .about-grid,
    .capabilities-grid,
    .values-grid {
        grid-template-columns: 1fr;
    }

    .industries-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .nav-links,
    .nav-cta {
        display: none;
    }

    .lang-switcher {
        order: -1;
    }

    .lang-btn {
        background: rgba(255, 255, 255, 0.1);
        border-color: rgba(255, 255, 255, 0.2);
        color: var(--white);
    }

    .navbar.scrolled .lang-btn {
        background: var(--secondary-gray);
        border-color: var(--border-color);
        color: var(--text-dark);
    }

    .nav-links.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 24px;
        gap: 16px;
        box-shadow: var(--shadow-lg);
        border-radius: 0 0 var(--radius-md) var(--radius-md);
    }

    .nav-links.active a {
        color: var(--text-dark) !important;
        font-size: 1rem;
        padding: 8px 0;
    }

    .mobile-toggle {
        display: flex;
    }

    .hero {
        min-height: auto;
        padding: 140px 0 80px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .solution-cards {
        grid-template-columns: 1fr;
    }

    .industries-grid {
        grid-template-columns: 1fr;
    }

    .cta-content h2 {
        font-size: 1.75rem;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-stats {
        grid-template-columns: 1fr 1fr;
    }

    .btn-lg {
        padding: 14px 28px;
        font-size: 0.9rem;
    }
}
