/* ==================== ThinkWithAi Shared Design System ==================== */

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

/* ==================== CSS Variables ==================== */
:root {
    /* Brand Colors */
    --color-think: #015bd9;
    --color-ai: #6a0dad;
    --color-white: #ffffff;
    --color-black: #000000;
    --color-dark: #1a1a1a;
    --color-gray: #666666;
    --color-light-gray: #f5f5f5;
    --color-border: #e0e0e0;
    --color-footer-bg: #1a1a1a;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--color-think) 0%, var(--color-ai) 100%);
    --gradient-hero: linear-gradient(135deg, #015bd9 0%, #6a0dad 100%);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Layout */
    --max-width: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ==================== Base Typography ==================== */
body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--color-dark);
    background-color: var(--color-white);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.3;
    font-weight: 700;
}

.brand-think {
    color: var(--color-think);
}

.brand-ai {
    color: var(--color-ai);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== Navigation Bar ==================== */
.navbar {
    background-color: var(--color-white);
    padding: 0.75rem 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand .logo {
    height: 35px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    margin-left: auto;
    margin-right: 1.5rem;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    text-decoration: none;
    color: var(--color-dark);
    font-weight: 500;
    font-size: 0.813rem;
    letter-spacing: 0.5px;
    transition: color var(--transition-normal);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.nav-menu a:hover {
    color: var(--color-think);
}

/* Active Menu Item */
.nav-menu > li > a.active {
    color: var(--color-ai);
    font-weight: 600;
}

.dropdown-menu a.active {
    color: var(--color-ai);
    font-weight: 600;
}

.nav-dropdown.active > a {
    color: var(--color-ai);
    font-weight: 600;
}

.nav-dropdown.current > a {
    color: var(--color-ai);
    font-weight: 600;
}

.nav-menu a i {
    font-size: 0.65rem;
}

/* Dropdown Menu Styles */
.nav-dropdown {
    position: relative;
}

.nav-dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 15px;
    background: transparent;
    z-index: 999;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 15px);
    left: 0;
    background-color: var(--color-white);
    min-width: 320px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    padding: 0.75rem 0;
    margin-top: 0;
    list-style: none;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-15px);
    transition: all 0.25s ease;
    pointer-events: none;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    padding: 0.875rem 1.5rem;
    display: block;
    color: var(--color-dark);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all var(--transition-normal);
    border-radius: 6px;
    margin: 0 0.5rem;
    position: relative;
}

.dropdown-menu a::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, var(--color-think), var(--color-ai));
    transition: width var(--transition-normal);
}

.dropdown-menu a:hover {
    background-color: #f0f5f7;
    color: var(--color-think);
    padding-left: 2rem;
}

.dropdown-menu a:hover::before {
    width: 8px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 1002;
}

.mobile-menu-toggle:hover .hamburger-line {
    background-color: var(--color-ai);
}

/* Hamburger Lines */
.hamburger-line {
    width: 24px;
    height: 2px;
    background-color: var(--color-think);
    position: absolute;
    left: 8px;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.hamburger-line:nth-child(1) {
    top: 12px;
}

.hamburger-line:nth-child(2) {
    top: 19px;
}

.hamburger-line:nth-child(3) {
    top: 26px;
}

/* Hamburger to X Animation */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ==================== Footer Styles ==================== */
.footer-section {
    background-color: var(--color-footer-bg);
    color: var(--color-white);
    padding: 3rem 2rem 2rem;
}

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

.footer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    height: 40px;
    width: auto;
}

/* Social Media Icons - Currently Hidden */
.footer-social {
    display: none; /* Temporarily hidden */
    /* display: flex; */
    gap: 1rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--color-white);
    text-decoration: none;
    transition: all var(--transition-normal);
}

.social-icon:hover {
    background-color: var(--color-think);
    transform: translateY(-3px);
}

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

.footer-column h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-white);
}

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

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

.footer-list a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color var(--transition-normal);
}

.footer-list a:hover {
    color: var(--color-white);
    text-decoration: underline;
}

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

.copyright {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.5rem;
}

.registered-office {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ==================== Common Section Styles ==================== */
.content-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

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

.section-description {
    font-size: 1.125rem;
    text-align: center;
    color: var(--color-gray);
    max-width: 800px;
    margin: 0 auto 3rem;
    line-height: 1.7;
}

/* ==================== Button Styles ==================== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    background: var(--gradient-primary);
    color: var(--color-white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-normal);
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(1, 91, 217, 0.3);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--color-think);
    color: var(--color-think);
}

.btn-secondary:hover {
    background: var(--color-think);
    color: var(--color-white);
}

/* ==================== Card Styles ==================== */
.card {
    background: var(--color-white);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all var(--transition-normal);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* ==================== Hero Section Styles ==================== */
.hero-section {
    background: var(--gradient-hero);
    padding: 6rem 2rem 5rem;
    color: var(--color-white);
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    max-width: 800px;
    margin: 0 auto 2rem;
}

/* ==================== Responsive Design ==================== */
@media (max-width: 1024px) {
    .nav-menu {
        gap: 1.5rem;
    }

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

@media (max-width: 768px) {
    .navbar {
        padding: 1rem 1.5rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }

    .mobile-menu-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        max-width: 360px;
        height: 100vh;
        background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
        flex-direction: column;
        padding: 6rem 0 2rem;
        box-shadow: -8px 0 24px rgba(0, 0, 0, 0.12);
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        margin: 0;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        z-index: 1001;
        gap: 0.125rem;
    }

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

    /* Smooth scrollbar for mobile menu */
    .nav-menu::-webkit-scrollbar {
        width: 4px;
    }

    .nav-menu::-webkit-scrollbar-track {
        background: transparent;
    }

    .nav-menu::-webkit-scrollbar-thumb {
        background: rgba(1, 91, 217, 0.2);
        border-radius: 4px;
    }

    .nav-menu::-webkit-scrollbar-thumb:hover {
        background: rgba(1, 91, 217, 0.3);
    }

    .nav-menu > li {
        width: 100%;
        margin: 0;
    }

    /* Main menu links - improved hierarchy */
    .nav-menu > li > a {
        padding: 1rem 1.5rem;
        width: 100%;
        font-size: 0.875rem;
        font-weight: 600;
        letter-spacing: 0.8px;
        text-transform: uppercase;
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: all 0.25s ease;
        color: var(--color-dark);
        position: relative;
    }

    /* Left accent bar on hover */
    .nav-menu > li > a::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        width: 0;
        height: 60%;
        background: linear-gradient(135deg, var(--color-think), var(--color-ai));
        transition: width 0.3s ease;
    }

    .nav-menu > li > a:hover::before {
        width: 4px;
    }

    .nav-menu > li > a:hover {
        background-color: rgba(1, 91, 217, 0.03);
        padding-left: 1.75rem;
        color: var(--color-think);
    }

    /* Dropdown parent - active state */
    .nav-dropdown.active > a {
        background-color: rgba(1, 91, 217, 0.05);
        color: var(--color-think);
    }

    .nav-dropdown.active > a::before {
        width: 4px;
    }

    /* Current page parent styling */
    .nav-dropdown.current > a {
        color: var(--color-ai);
    }

    /* Chevron icon styling */
    .nav-dropdown > a i {
        font-size: 0.7rem;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        color: var(--color-gray);
    }

    .nav-dropdown.active > a i {
        transform: rotate(180deg);
        color: var(--color-think);
    }

    /* Dropdown menu container */
    .dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        background-color: #ffffff;
        margin: 0;
        padding: 0.375rem 0;
        border-radius: 0;
        transform: none;
        opacity: 1;
        pointer-events: auto;
        border-left: none;
        border-top: 1px solid rgba(0, 0, 0, 0.05);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .nav-dropdown.active .dropdown-menu {
        display: block;
        animation: slideDown 0.25s ease-out;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-8px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Dropdown menu items */
    .dropdown-menu li {
        margin: 0;
    }

    .dropdown-menu a {
        padding: 0.75rem 1.5rem 0.75rem 2.25rem !important;
        font-size: 0.813rem;
        font-weight: 500;
        letter-spacing: 0.2px;
        border-radius: 0;
        margin: 0;
        transition: all 0.2s ease;
        color: var(--color-gray);
        position: relative;
        text-transform: none;
    }

    /* Bullet point for dropdown items */
    .dropdown-menu a::before {
        content: '';
        position: absolute;
        left: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
        width: 4px;
        height: 4px;
        background-color: var(--color-think);
        border-radius: 50%;
        opacity: 0.4;
        transition: all 0.2s ease;
    }

    .dropdown-menu a:hover {
        background-color: rgba(1, 91, 217, 0.04);
        color: var(--color-dark);
        padding-left: 2.5rem !important;
    }

    .dropdown-menu a:hover::before {
        opacity: 1;
        transform: translateY(-50%) scale(1.5);
    }

    /* Active dropdown item */
    .dropdown-menu a.active {
        background-color: rgba(106, 13, 173, 0.06);
        color: var(--color-ai);
        font-weight: 600;
    }

    .dropdown-menu a.active::before {
        background: linear-gradient(135deg, var(--color-think), var(--color-ai));
        opacity: 1;
        transform: translateY(-50%) scale(1.8);
    }

    /* Direct navigation links (non-dropdown) */
    .nav-menu > li:not(.nav-dropdown) > a.active {
        background-color: rgba(106, 13, 173, 0.06);
        color: var(--color-ai);
        font-weight: 700;
    }

    .nav-menu > li:not(.nav-dropdown) > a.active::before {
        width: 4px;
        background: var(--color-ai);
    }

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

    .hero-subtitle {
        font-size: 1rem;
    }

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

    .footer-header {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

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

@media (max-width: 480px) {
    .navbar {
        padding: 0.875rem 1.25rem;
    }

    .nav-brand .logo {
        height: 32px;
    }

    .nav-menu {
        width: 90%;
        max-width: 320px;
    }

    .content-container {
        padding: 0 1rem;
    }

    .hero-section {
        padding: 4rem 1.5rem 3rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }
}

/* ==================== Mobile Overlay ==================== */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(2px);
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* ==================== Utility Classes ==================== */
.text-center {
    text-align: center;
}

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
.mt-5 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }
.mb-5 { margin-bottom: var(--spacing-xl); }

.p-1 { padding: var(--spacing-xs); }
.p-2 { padding: var(--spacing-sm); }
.p-3 { padding: var(--spacing-md); }
.p-4 { padding: var(--spacing-lg); }
.p-5 { padding: var(--spacing-xl); }

/* ==================== Back to Top Button ==================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-think), var(--color-ai));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    z-index: 999;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(79, 70, 229, 0.4);
}

.back-to-top:active {
    transform: translateY(-1px);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 1.125rem;
    }
}

/* ==================== FAQ Section Styles (Accordion) ==================== */
.faq-section {
    padding: 4rem 1rem;
    background: #f9f9f9;
}

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

.faq-container {
    max-width: 1400px;
    width: 95%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 580px 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* Questions List (Left Column) */
.faq-questions-list {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.faq-questions-list h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-dark);
    margin: 0 0 1rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-ai);
}

.faq-question-btn {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 0.75rem 0.875rem;
    margin-bottom: 0.4rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-dark);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    line-height: 1.4;
    border-left: 3px solid transparent;
}

.faq-question-btn:hover {
    background: #f9f9f9;
    color: var(--color-think);
    border-left-color: var(--color-think);
}

.faq-question-btn.active {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(147, 51, 234, 0.1));
    color: var(--color-ai);
    border-left-color: var(--color-ai);
    font-weight: 600;
}

/* Answer Display (Right Column) */
.faq-answer-display {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    min-height: 250px;
}

.faq-answer-display h4 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--color-ai);
    margin: 0 0 1.25rem 0;
    line-height: 1.3;
}

.faq-answer-display p {
    color: var(--color-gray);
    line-height: 1.8;
    font-size: 1.05rem;
    margin: 0;
}

.faq-answer-display a {
    color: var(--color-ai);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.faq-answer-display a:hover {
    color: var(--color-think);
    text-decoration: underline;
}

/* Legacy single-column support */
.faq-container.faq-legacy {
    display: block;
    max-width: 900px;
}

.faq-item {
    background: white;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    overflow: hidden;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-left-color: var(--color-think);
}

.faq-item.active {
    border-left-color: var(--color-ai);
}

.faq-item:last-child {
    margin-bottom: 0;
}

.faq-question {
    color: var(--color-dark);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    padding: 1.75rem 3.5rem 1.75rem 2rem;
    line-height: 1.4;
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq-question:hover {
    background: #f9f9f9;
    color: var(--color-think);
}

.faq-item.active .faq-question {
    color: var(--color-ai);
    padding-bottom: 1.5rem;
}

/* Accordion Icon */
.faq-question::after {
    content: '\002B';
    font-size: 1.75rem;
    font-weight: 300;
    color: var(--color-ai);
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease, color 0.3s ease;
    line-height: 1;
}

.faq-item.active .faq-question::after {
    content: '\2212';
    color: var(--color-ai);
}

/* Answer Content */
.faq-answer {
    color: var(--color-gray);
    line-height: 1.7;
    margin: 0;
    padding: 0 2rem 1.75rem 2rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 1000px;
    opacity: 1;
    padding: 0 2rem 2rem 2rem;
}

.faq-answer a {
    color: var(--color-ai);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.faq-answer a:hover {
    color: var(--color-think);
    text-decoration: underline;
}

/* Legacy h3/p support for existing markup */
.faq-item h3 {
    color: var(--color-dark);
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    padding: 1.75rem 3.5rem 1.75rem 2rem;
    line-height: 1.4;
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: all 0.3s ease;
}

.faq-item h3:hover {
    background: #f9f9f9;
    color: var(--color-think);
}

.faq-item.active h3 {
    color: var(--color-ai);
    padding-bottom: 1.5rem;
}

.faq-item h3::after {
    content: '\002B';
    font-size: 1.75rem;
    font-weight: 300;
    color: var(--color-ai);
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease, color 0.3s ease;
    line-height: 1;
}

.faq-item.active h3::after {
    content: '\2212';
}

.faq-item p {
    color: var(--color-gray);
    line-height: 1.7;
    margin: 0;
    padding: 0 2rem 1.75rem 2rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
}

.faq-item.active p {
    max-height: 1000px;
    opacity: 1;
    padding: 0 2rem 2rem 2rem;
}

.faq-item p a {
    color: var(--color-ai);
    text-decoration: none;
    font-weight: 500;
}

.faq-item p a:hover {
    color: var(--color-think);
    text-decoration: underline;
}

/* FAQ for blog pages - tighter spacing */
.blog-content .faq-section {
    padding: 3rem 0;
    margin-top: 3rem;
    border-top: 1px solid #e0e0e0;
    background: transparent;
}

.blog-content .faq-container {
    max-width: 100%;
}

.blog-content .faq-item {
    background: #f9f9f9;
    padding: 1.5rem;
}

/* Tablet responsive - medium screens */
@media (max-width: 1024px) and (min-width: 769px) {
    .faq-container {
        grid-template-columns: 400px 1fr;
        gap: 2rem;
    }

    .faq-section {
        padding: 4rem 1.5rem;
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .faq-section {
        padding: 3rem 1rem;
    }

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

    /* Convert to pure accordion on mobile - hide two-column layout */
    .faq-container {
        display: block;
    }

    .faq-questions-list {
        display: none !important;
    }

    .faq-answer-display {
        padding: 0;
        box-shadow: none;
        background: transparent;
        min-height: auto;
    }

    /* Show all FAQ items as accordion cards */
    .faq-answer-item {
        display: block !important;
        background: white;
        border-radius: 12px;
        margin-bottom: 1rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        overflow: hidden;
        padding: 0;
        border-left: 4px solid transparent;
        transition: all 0.3s ease;
    }

    .faq-answer-item:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    }

    .faq-answer-item.mobile-active {
        border-left-color: var(--color-ai);
    }

    .faq-answer-item h4 {
        font-size: 1.075rem;
        color: var(--color-dark);
        background: white;
        margin: 0;
        padding: 1.25rem 3rem 1.25rem 1.25rem;
        cursor: pointer;
        position: relative;
        transition: all 0.3s ease;
        line-height: 1.4;
        font-weight: 600;
        user-select: none;
    }

    .faq-answer-item h4:active {
        background: #f9f9f9;
    }

    .faq-answer-item h4::after {
        content: '\002B';
        font-size: 1.75rem;
        font-weight: 300;
        color: var(--color-ai);
        position: absolute;
        right: 1.25rem;
        top: 50%;
        transform: translateY(-50%);
        transition: all 0.3s ease;
        line-height: 1;
    }

    .faq-answer-item.mobile-active h4 {
        color: var(--color-ai);
        background: rgba(106, 13, 173, 0.02);
    }

    .faq-answer-item.mobile-active h4::after {
        content: '\2212';
        transform: translateY(-50%) rotate(180deg);
    }

    .faq-answer-item p {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        padding: 0 1.25rem;
        margin: 0;
        font-size: 1rem;
        line-height: 1.7;
        color: var(--color-gray);
        transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    }

    .faq-answer-item.mobile-active p {
        max-height: 1000px;
        opacity: 1;
        padding: 0 1.25rem 1.5rem 1.25rem;
    }

    .faq-answer-item p a {
        color: var(--color-ai);
        text-decoration: none;
        font-weight: 500;
    }

    .faq-answer-item p a:hover {
        color: var(--color-think);
        text-decoration: underline;
    }

    /* Legacy accordion styles for old format pages */
    .faq-item {
        padding: 1.5rem;
    }

    .faq-item h3,
    .faq-question {
        font-size: 1.125rem;
    }
}

/* ===== AI CHATBOT ===== */
.chatbot-container {
    position: fixed;
    bottom: 90px;
    right: 30px;
    z-index: 1000;
}

.chatbot-toggle-wrapper {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-think), var(--color-ai));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.chatbot-toggle-wrapper:hover {
    padding: 5px;
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.6);
    transform: translateY(-3px);
}

.chatbot-toggle-wrapper:active {
    transform: translateY(-1px);
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: none;
}

.chatbot-toggle:focus {
    outline: none;
}

.chatbot-icon-img {
    width: 36px;
    height: 36px;
}

.chatbot-header-icon {
    width: 28px;
    height: 28px;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-height: 550px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: none;
    flex-direction: column;
    overflow: hidden;
}

.chatbot-window.active {
    display: flex;
}

.chatbot-header {
    background: white;
    color: var(--color-dark);
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid transparent;
    border-image: linear-gradient(90deg, var(--color-think), var(--color-ai)) 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.chatbot-header-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.125rem;
}

.chatbot-header-content i {
    font-size: 1.5rem;
}

.chatbot-header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.chatbot-refresh {
    background: white;
    border: 2px solid #d1d5db;
    color: #6b7280;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.875rem;
}

.chatbot-refresh:hover {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1), rgba(147, 51, 234, 0.1));
    border-color: var(--color-ai);
    color: var(--color-ai);
    transform: rotate(360deg);
}

.chatbot-close {
    background: white;
    border: 2px solid #d1d5db;
    color: #6b7280;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: bold;
}

.chatbot-close:hover {
    background: #fee2e2;
    border-color: #ef4444;
    color: #dc2626;
    transform: rotate(90deg);
}

.chatbot-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    background: #f8f9fa;
    max-height: 400px;
}

.chatbot-message {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bot-message {
    align-items: flex-start;
}

.user-message {
    flex-direction: row-reverse;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.125rem;
    padding: 3px;
    position: relative;
}

.message-avatar::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-think), var(--color-ai));
    z-index: -1;
}

.message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.user-message .message-avatar {
    background: white;
    padding: 4px;
}

.user-message .message-avatar::before {
    background: linear-gradient(135deg, var(--color-think), var(--color-ai));
}

.user-message .message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    align-items: flex-start;
}

.typing-indicator .message-avatar {
    padding: 6px;
}

.typing-dots {
    background: white;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-ai);
    animation: typingDot 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingDot {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.message-content {
    background: white;
    padding: 0.875rem 1.125rem;
    border-radius: 12px;
    max-width: 75%;
    line-height: 1.5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.user-message .message-content {
    background: linear-gradient(135deg, var(--color-think), var(--color-ai));
    color: white;
}

.chatbot-input-area {
    padding: 1rem;
    background: white;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 0.75rem;
}

.chatbot-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 24px;
    font-size: 0.9375rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.chatbot-input:focus {
    border-color: var(--color-ai);
}

.chatbot-send {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-think), var(--color-ai));
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.chatbot-send:hover {
    transform: scale(1.1);
}

.chatbot-send:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Choice Buttons */
.chatbot-choices {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.choice-btn {
    background: white;
    border: 2px solid #e5e7eb;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9375rem;
    text-align: left;
    transition: all 0.3s ease;
    color: var(--color-dark);
}

.choice-btn:hover {
    border-color: var(--color-ai);
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.05), rgba(147, 51, 234, 0.05));
    transform: translateX(4px);
}

.choice-btn i {
    margin-right: 0.5rem;
    color: var(--color-ai);
}

/* Mobile touch optimization */
@media (hover: none) and (pointer: coarse) {
    .chatbot-toggle-wrapper:hover {
        transform: none;
        padding: 4px;
    }

    .chatbot-toggle-wrapper:active {
        transform: scale(0.95);
    }
}

@media (max-width: 768px) {
    .chatbot-container {
        bottom: 80px;
        right: 20px;
    }

    .chatbot-toggle-wrapper {
        width: 64px;
        height: 64px;
    }

    .chatbot-toggle {
        width: 56px;
        height: 56px;
    }

    .chatbot-icon-img {
        width: 32px;
        height: 32px;
    }

    .chatbot-window {
        width: calc(100vw - 40px);
        max-height: 500px;
        bottom: 70px;
        right: -10px;
    }
}
