/* GFOS Premium v7.2 - Visual Density Upgrade */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&family=Sarabun:wght@300;400;500;600&display=swap');

:root {
    /* Palette - Deep & Vibrant */
    --primary: #4338ca;
    /* Indigo 700 - Deep Brand Color */
    --primary-light: #6366f1;
    /* Indigo 500 - Highlight */
    --primary-dark: #312e81;
    /* Indigo 900 - Text/Borders */
    --accent: #f59e0b;
    /* Amber 500 - Buttons/Tags */
    --accent-glow: rgba(245, 158, 11, 0.4);

    --success: #10b981;
    --danger: #ef4444;
    --dark: #1e293b;
    /* Slate 800 */
    --gray: #64748b;
    /* Slate 500 */
    --light: #f8fafc;
    /* Slate 50 */
    --white: #ffffff;

    /* Gradients - Richer */
    --grad-primary: linear-gradient(135deg, #4338ca 0%, #3b82f6 100%);
    --grad-glow: linear-gradient(135deg, rgba(67, 56, 202, 0.1) 0%, rgba(59, 130, 246, 0.1) 100%);
    --grad-text: linear-gradient(to right, #4338ca, #2563eb);

    /* Shadows - Deep & Soft */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-blue: 0 10px 30px -10px rgba(67, 56, 202, 0.5);

    /* Radius */
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

/* Base Reset */
html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Sarabun', sans-serif;
    color: var(--dark);
    background-color: #f1f5f9;
    background-image: radial-gradient(#cbd5e1 1px, transparent 1px);
    background-size: 30px 30px;
    line-height: 1.6;
    padding-top: 80px;
    position: relative;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Prompt', sans-serif;
    color: var(--dark);
    line-height: 1.25;
}

/* Utilities */
/* .container handled by Bootstrap */
.section-padding {
    padding: 100px 0;
    position: relative;
}

.text-gradient {
    background: var(--grad-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.text-primary {
    color: var(--primary) !important;
}

.text-red {
    color: var(--danger) !important;
}

.bg-white {
    background-color: var(--white);
}

.bg-light {
    background-color: #f8fafc;
}

.shadow-soft {
    box-shadow: var(--shadow-md);
}

.rounded-3xl {
    border-radius: var(--radius-2xl);
}

.rounded-2xl {
    border-radius: var(--radius-xl);
}

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

/* Background Shapes (Fixed) */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.6;
    pointer-events: none;
}

.shape-1 {
    width: 500px;
    height: 500px;
    background: rgba(99, 102, 241, 0.25);
    top: -150px;
    right: -100px;
}

.shape-2 {
    width: 400px;
    height: 400px;
    background: rgba(245, 158, 11, 0.2);
    bottom: 50px;
    left: -100px;
}

/* Header */
.glass-header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    height: 90px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
}

.logo img {
    height: 55px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Navigation Fix (Aggressive) */
.custom-nav {
    display: block;
}

.nav-list {
    display: flex !important;
    flex-direction: row !important;
    list-style: none !important;
    gap: 5px;
    /* Reduce gap */
    padding: 0;
    margin: 0;
    align-items: center;
    flex-wrap: nowrap;
    /* Force single line */
}

.nav-list li {
    list-style: none !important;
    margin: 0;
}

/* Safety net */
.menu-link {
    font-family: 'Prompt';
    font-weight: 500;
    font-size: 0.9rem;
    /* Slightly smaller */
    color: var(--gray);
    text-decoration: none !important;
    padding: 8px 12px;
    /* More compact */
    border-radius: 50px;
    transition: all 0.2s ease;
    display: block;
    white-space: nowrap;
    /* Prevent text wrap */
}

.menu-link:hover,
.menu-link.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
    font-weight: 600;
}

/* Hero Section */
.hero-modern {
    padding: 80px 0 120px;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: white;
    color: var(--primary);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
    margin-bottom: 24px;
}

.dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 24px;
    line-height: 1.1;
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--gray);
    margin-bottom: 40px;
    max-width: 550px;
}

.hero-btns {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    /* Force single line */
}

.hero-btns .btn-premium,
.hero-btns .btn-glass {
    padding: 12px 20px;
    /* even more compact */
    white-space: nowrap;
    font-size: 0.95rem;
    /* ensure text isn't too huge */
}

/* Floating Elements */
.hero-img-wrapper {
    position: relative;
    margin-top: 20px;
}

/* Wider Container for Hero */
.hero-modern .container,
#documents .container {
    max-width: 1400px;
    /* Expand layout width */
}

.hero-main-img {
    width: 100%;
    /* Natural fit */
    max-width: none;
    margin-right: 0;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
    z-index: 10;
    position: relative;
    margin-left: auto;
    display: block;
}

.float-card {
    position: absolute;
    background: white;
    padding: 15px 25px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 20;
    border: 1px solid rgba(255, 255, 255, 0.6);
    animation: float 6s ease-in-out infinite;
}

.card-1 {
    top: 15%;
    left: 0%;
    animation-delay: 0s;
}

.card-2 {
    bottom: 10%;
    right: 2px;
    /* Align to edge with slight overlap */
    animation-delay: 2.5s;
}

/* Buttons */
.btn-premium {
    background: var(--grad-primary);
    color: white;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: var(--shadow-blue);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
}

.btn-premium:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px rgba(67, 56, 202, 0.6);
    color: white;
}

.btn-glass {
    background: white;
    border: 1px solid #cbd5e1;
    padding: 14px 32px;
    border-radius: 50px;
    color: var(--dark);
    font-weight: 600;
    transition: 0.3s;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
}

.btn-glass:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: #f8fafc;
}

.btn-text {
    color: var(--gray);
    font-weight: 600;
    margin-right: 20px;
    transition: 0.2s;
    text-decoration: none !important;
}

.btn-text:hover {
    color: var(--primary);
}

/* Glass Panel */
.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-lg);
}

/* Feature Grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 40px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    padding: 15px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f1f5f9;
    transition: 0.3s;
}

.feature-item:hover {
    transform: translateY(-3px);
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
}

.icon-box {
    min-width: 48px;
    height: 48px;
    background: #e0e7ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.25rem;
}

/* Tabs */
.tab-pill-container {
    background: white;
    padding: 8px;
    border-radius: 60px;
    box-shadow: var(--shadow-md);
    border: 1px solid #e2e8f0;
    display: inline-flex;
    gap: 5px;
}

.tab-pill {
    background: transparent;
    border: none;
    padding: 12px 35px;
    border-radius: 50px;
    font-family: 'Prompt';
    font-weight: 600;
    color: var(--gray);
    cursor: pointer;
    transition: 0.3s;
}

.tab-pill:hover {
    color: var(--primary);
}

.tab-pill.active {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-blue);
}

.tab-content {
    display: none;
    margin-top: 40px;
}

.tab-content.active {
    display: block;
    animation: activeTab 0.5s ease;
}

@keyframes activeTab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cards (Services) */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

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

.premium-card {
    background: white;
    border-radius: 24px;
    padding: 0;
    box-shadow: var(--shadow-md);
    border: 1px solid #f1f5f9;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.premium-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.card-icon {
    width: 70px;
    height: 70px;
    background: var(--primary);
    color: white;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin: -20px 24px 0;
    box-shadow: 0 10px 20px rgba(67, 56, 202, 0.3);
}

.card-icon.env {
    background: var(--success);
    box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.card-body {
    padding: 24px 30px 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.premium-card h4 {
    margin-top: 10px;
    font-weight: 700;
}

.btn-card-action {
    margin-top: auto;
    display: block;
    width: 100%;
    background: #f8fafc;
    color: var(--dark);
    padding: 12px;
    text-align: center;
    border-radius: 12px;
    font-weight: 600;
    transition: 0.3s;
    border: 1px solid #e2e8f0;
    text-decoration: none !important;
}

.premium-card:hover .btn-card-action {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Track Input */
.form-floating-modern {
    position: relative;
    background: white;
    border-radius: 16px;
    border: 1px solid #cbd5e1;
    transition: 0.3s;
}

.form-floating-modern:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.form-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 25px 20px 10px 50px;
    font-size: 1.1rem;
    height: 64px;
    outline: none;
    font-weight: 500;
}

.form-floating-modern .icon {
    position: absolute;
    left: 20px;
    top: 22px;
    font-size: 1.2rem;
    color: var(--gray);
}

.form-floating-modern label {
    position: absolute;
    left: 50px;
    top: 20px;
    color: var(--gray);
    pointer-events: none;
    transition: 0.2s;
    font-size: 1rem;
}

.form-input:focus+label,
.form-input:not(:placeholder-shown)+label {
    top: 8px;
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 600;
}

/* Video & Chat */
.bg-dark-blue {
    background: #0f172a;
    position: relative;
    overflow: hidden;
}

.video-frame {
    border-radius: 24px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    background: black;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.chat-phone-mockup {
    max-width: 320px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.phone-screen {
    background: white;
    border-radius: 35px;
    border: 10px solid #1e293b;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

/* Chat Section Utilities */
.section-relative {
    position: relative;
}

.z-10 {
    z-index: 10;
}

.icon-list-grid {
    display: grid;
    gap: 15px;
    margin-top: 25px;
}

.icon-list-item {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    color: var(--dark);
    font-weight: 500;
}

.check-circle {
    width: 32px;
    height: 32px;
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

/* Chat Mockup Internal */
.chat-header-modern {
    background: var(--grad-primary);
    padding: 15px;
    color: white;
    display: flex;
    align-items: center;
}

.chat-body-modern {
    padding: 20px;
    background: #f0f2f5;
    height: 320px;
    display: flex;
    flex-direction: column;
}

.msg-balloon {
    background: white;
    padding: 12px 16px;
    border-radius: 16px;
    border-top-left-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    font-size: 0.95rem;
    max-width: 85%;
    margin-bottom: 15px;
    position: relative;
}

.bot-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.bot-tags span {
    background: #eef2ff;
    color: var(--primary);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.chat-actions-group {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.action-pill {
    background: white;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.2s;
    text-align: left;
}

.action-pill:hover {
    background: var(--primary);
    color: white;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid white;
}

.status-online {
    font-size: 0.75rem;
    color: #ccfbf1;
    display: block;
}

/* Knowledge Cards */
.grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.knowledge-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: 0.3s;
    height: 100%;
    border: 1px solid #f1f5f9;
    display: block;
    text-decoration: none !important;
    color: var(--dark);
}

.knowledge-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.img-wrap {
    height: 180px;
    /* Increased height slightly */
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.knowledge-card:hover img {
    transform: scale(1.1);
}

.k-body {
    padding: 20px;
    text-align: center;
}

.k-body h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

/* Partners */
/* Partners Premium */
.partner-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.p-item {
    background: white;
    padding: 20px 30px;
    border-radius: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    border: 1px solid #f1f5f9;
    width: 200px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Changed from center to fix image alignment */
    padding-top: 35px;
    /* Fixed top offset */
}

.p-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--primary-light);
}

.p-item img {
    height: 64px;
    object-fit: contain;
    margin-bottom: 15px;
    transition: 0.4s;
    /* Color enabled by default */
}

.p-item:hover img {
    transform: scale(1.1);
}

.p-item p {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray);
    margin: 0;
    transition: 0.3s;
}

/* Footer */
.btn-social {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: white;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-right: 10px;
    transition: 0.3s;
}

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

.footer-modern a {
    text-decoration: none;
    transition: 0.3s;
}

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

.copyright-text {
    font-size: 0.9rem;
    color: #9ca3af;
    margin-top: 60px;
    border-top: 1px solid #e2e8f0;
    padding-top: 30px;
}

/* Chat Toggle Widget */
/* Chat Widget Floating (Enhanced & Resized 60px) */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000;
}

.chat-toggle-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.chat-toggle-btn:hover {
    transform: scale(1.1);
}

.chat-icon-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 10px 25px rgba(67, 56, 202, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #fff;
    animation: floating 3s ease-in-out infinite;
}

.chat-icon-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: scale(1.0);
}

/* Call to Action Label */
.chat-label {
    background: var(--primary);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: slideUpFade 0.5s 0.5s backwards;
    white-space: nowrap;
}

.chat-label::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 0 6px 6px 6px;
    border-style: solid;
    border-color: transparent transparent var(--primary) transparent;
}

.online-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 16px;
    height: 16px;
    background: #10b981;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Pulse Animation Ring */
.chat-icon-wrapper::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    border: 2px solid rgba(99, 102, 241, 0.6);
    animation: pulseRing 2s infinite;
    z-index: -1;
}

@keyframes pulseRing {
    0% {
        transform: scale(0.9);
        opacity: 1;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

@keyframes floating {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Chat Window */
.chat-window-glass {
    position: absolute;
    bottom: 110px;
    right: 0;
    width: 360px;
    height: 500px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid white;
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: slideUp 0.3s;
}

.chat-window-glass.active {
    display: flex;
}

/* Chat Header */
.cw-header {
    background: var(--grad-primary);
    padding: 15px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cw-avatar {
    width: 32px;
    height: 32px;
    background: white;
    border-radius: 50%;
    padding: 2px;
    margin-right: 10px;
}

.cw-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.cw-name {
    font-size: 0.9rem;
    font-weight: 600;
    display: block;
}

.cw-status {
    font-size: 0.75rem;
    color: #ccfbf1;
}

.cw-close {
    cursor: pointer;
    font-size: 1.5rem;
    line-height: 0.5;
    opacity: 0.8;
}

.cw-close:hover {
    opacity: 1;
}

/* Chat Body */
.cw-body {
    flex: 1;
    background: #f9fafb;
    padding: 15px;
    overflow-y: auto;
}

.chat-message {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
}

.chat-message.user {
    align-items: flex-end;
}

.chat-message.agent {
    align-items: flex-start;
}

.message-content {
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 0.9rem;
    max-width: 80%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.chat-message.user .message-content {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 2px;
}

.chat-message.agent .message-content {
    background: white;
    color: var(--dark);
    border-bottom-left-radius: 2px;
    border: 1px solid #e5e7eb;
}

.message-time {
    font-size: 0.7rem;
    color: #9ca3af;
    margin-top: 4px;
}

/* Chat Footer */
.cw-footer {
    padding: 12px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 8px;
    background: white;
}

.cw-footer input {
    flex: 1;
    border: 1px solid #ddd;
    padding: 10px 15px;
    border-radius: 20px;
    outline: none;
    font-size: 0.9rem;
}

.cw-footer button {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cw-footer button:hover {
    background: var(--primary-dark);
}

/* Keyframes */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Global Mobile Menu State */
.mobile-menu {
    display: none;
}

/* Mobile */
@media (max-width: 991px) {
    .header-container {
        padding: 0 15px;
    }

    /* Hide desktop nav */
    .custom-nav {
        display: none;
    }

    /* Adjust Header Actions for Mobile */
    .header-actions .btn-text {
        display: none;
        /* Hide text login */
    }

    .header-actions .btn-premium {
        display: inline-flex;
        /* Show register button */
        padding: 6px 14px;
        font-size: 0.8rem;
        margin-right: 15px;
        /* Spacing from hamburger */
        white-space: nowrap;
    }

    .header-actions {
        margin-left: auto;
        display: flex;
        align-items: center;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        gap: 6px;
        cursor: pointer;
    }

    .hamburger span {
        width: 30px;
        height: 3px;
        background: var(--dark);
        border-radius: 3px;
    }

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

    .hero-modern {
        padding-top: 40px;
        text-align: center;
    }

    .hero-main-img {
        margin: 40px auto 0;
    }

    .float-card {
        display: none;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }

    .mobile-menu {
        display: none;
        position: fixed;
        top: 90px;
        left: 0;
        width: 100%;
        background: white;
        padding: 20px;
        box-shadow: var(--shadow-lg);
        z-index: 1000;
        border-bottom: 1px solid #eee;
    }

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

    .mobile-nav-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .mobile-nav-list li a {
        display: block;
        padding: 15px;
        border-bottom: 1px solid #f1f5f9;
        font-weight: 600;
        color: var(--dark);
        text-decoration: none;
    }
}

/* Fixed Syntax Error */

/* Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Welcome Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    animation: fadeIn 0.4s;
}

.modal-content-glass {
    background: rgba(255, 255, 255, 0.95);
    width: 90%;
    max-width: 750px;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.8);
    animation: slideUpFade 0.5s;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #aaa;
    transition: 0.2s;
}

.close-modal:hover {
    color: var(--danger);
}

/* Animation Keyframes */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Track Status Premium */
.glass-panel-premium {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 20px 60px -10px rgba(67, 56, 202, 0.15);
    position: relative;
    overflow: hidden;
}

.status-icon-float {
    width: 60px;
    height: 60px;
    background: var(--grad-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin: 0 auto 20px;
    box-shadow: 0 10px 20px rgba(67, 56, 202, 0.3);
}

.blob-anim {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    z-index: 0;
    opacity: 0.6;
}

.blob-1 {
    width: 300px;
    height: 300px;
    background: #e0e7ff;
    top: -100px;
    left: -100px;
    animation: float 6s infinite ease-in-out;
}

.blob-2 {
    width: 400px;
    height: 400px;
    background: #fff7ed;
    bottom: -100px;
    right: -100px;
    animation: float 8s infinite ease-in-out reverse;
}

.form-floating-modern input:focus {
    background: #fff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.shadow-blue-lg {
    box-shadow: 0 10px 25px -5px rgba(67, 56, 202, 0.4);
}

.shadow-blue-lg:hover {
    box-shadow: 0 15px 35px -5px rgba(67, 56, 202, 0.5);
    transform: translateY(-2px);
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Track Status Ultra Modern (Floating Bar) */
.search-bar-floating {
    background: white;
    border-radius: 100px;
    padding: 10px;
    display: flex;
    align-items: center;
    box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.1);
    border: 1px solid #f1f5f9;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 20;
}

.search-bar-floating:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px -12px rgba(67, 56, 202, 0.15);
}

.absolute-bg-tech {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)),
        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='%236366f1' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 0;
}

.sb-item {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 10px 20px;
}

.sb-icon {
    font-size: 1.2rem;
    color: var(--primary-light);
    margin-right: 15px;
    width: 40px;
    height: 40px;
    background: #eef2ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sb-input {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.sb-input label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sb-input input {
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--gray);
    padding: 0;
    width: 100%;
    background: transparent;
}

.sb-input input::placeholder {
    color: #cbd5e1;
}

.sb-divider {
    width: 1px;
    height: 40px;
    background: #e2e8f0;
    margin: 0 10px;
}

.sb-action {
    padding-left: 10px;
}

.btn-search-glow {
    background: var(--grad-primary);
    color: white !important;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(67, 56, 202, 0.4);
    transition: 0.3s;
    white-space: nowrap;
}

.btn-search-glow:hover {
    box-shadow: 0 15px 30px rgba(67, 56, 202, 0.6);
    transform: scale(1.05);
}

/* Grand Hero Upgrade - Image Background Theme */
.hero-modern {
    /* padding-top: 60px; */
    padding-bottom: 60px;
    /* Use the uploaded asset or the existing hero-bg.png */
    background-image: url('../assets/hero-bg.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100vw;
}

/* White Overlay for Readability */
.hero-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Gradient overlay: Solid white at top fading to slightly transparent at bottom */
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(241, 245, 249, 0.95) 100%);
    backdrop-filter: blur(1px);
    /* Key for premium feel */
    z-index: 0;
    pointer-events: none;
}

/* Floating Blurred Spheres (Subtle) */
.hero-modern::after {
    content: '';
    position: absolute;
    top: 10%;
    right: 5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    filter: blur(60px);
    z-index: 0;
    pointer-events: none;
    animation: float 10s ease-in-out infinite;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 2rem;
    letter-spacing: -1.5px;
    position: relative;
    z-index: 1;
    color: var(--dark);
}

/* Glowing text gradient */
.hero-title .text-gradient {
    background: linear-gradient(135deg, #4338ca 0%, #3b82f6 50%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 10px rgba(99, 102, 241, 0.3));
    display: inline-block;
}

.hero-btns {
    margin-top: 40px;
}

.hero-img-wrapper {
    position: relative;
    z-index: 10;
}

.hero-img-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140%;
    height: 140%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
    filter: blur(50px);
    z-index: -1;
    animation: pulseGlow 5s infinite alternate;
}

@keyframes pulseGlow {
    0% {
        opacity: 0.5;
        transform: translate(-50%, -50%) scale(0.9);
    }

    100% {
        opacity: 0.8;
        transform: translate(-50%, -50%) scale(1.05);
    }
}

/*
   ========================================================================
   FOOTER MODERN UPGRADE
   ========================================================================
*/
.footer-modern {
    background: linear-gradient(to bottom, #f8fafc 0%, #eff6ff 100%);
    /* Light Slate to Light Indigo */
    color: var(--dark);
    border-top: 1px solid #e2e8f0;
    font-size: 0.95rem;
    position: relative;
    padding-top: 60px;
}

.footer-modern::before {
    display: none;
}

/* Remove glowing border */

.footer-modern h5 {
    color: var(--primary-dark);
    /* Indigo 900 */
    font-size: 1.1rem;
    letter-spacing: -0.5px;
    margin-bottom: 25px;
    font-weight: 700;
}

.footer-modern p {
    color: var(--gray);
}

.footer-modern p.text-muted {
    color: var(--gray) !important;
}

.footer-modern a {
    color: var(--gray);
    transition: all 0.2s ease;
    text-decoration: none;
}

.footer-modern a:hover {
    color: var(--primary);
    transform: translateX(3px);
    display: inline-block;
}

.footer-modern .social-links {
    display: flex;
    gap: 10px;
}

.btn-social {
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    /* Indigo Brand Color */
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.btn-social:hover {
    background: var(--grad-primary);
    color: white !important;
    border-color: transparent;
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 20px rgba(67, 56, 202, 0.3);
}

.copyright-text {
    font-size: 0.85rem;
    color: #64748b;
    border-top: 1px solid #e2e8f0;
    padding-top: 30px;
    margin-top: 30px;
}

/*
   ========================================================================
   CONSOLIDATED MOBILE RESPONSIVENESS (Applying Final Overrides)
   ========================================================================
*/
@media (max-width: 991px) {
    .hero-modern {
        text-align: center;
    }

    .hero-title {
        font-size: 3rem;
        line-height: 1.2;
    }

    .hero-text-col {
        margin-bottom: 60px;
    }

    .hero-btns {
        display: flex;
        flex-direction: row;
        /* Force side-by-side */
        gap: 10px;
        padding: 0;
        justify-content: center;
        flex-wrap: nowrap;
    }

    .hero-btns .btn-premium,
    .hero-btns .btn-glass {
        width: auto;
        /* Allow side-by-side */
        margin-right: 0;
        flex: 1;
        /* Distribute space evenly */
        justify-content: center;
    }

    /* Floating Search Bar Mobile Stack */
    .search-bar-floating {
        flex-direction: column;
        border-radius: 24px;
        padding: 25px;
        align-items: flex-start;
        height: auto;
    }

    .sb-item {
        width: 100%;
        padding: 15px 0;
        border-bottom: 1px solid #f1f5f9;
        justify-content: flex-start;
    }

    .sb-item:last-child {
        border-bottom: none;
    }

    .sb-divider {
        display: none;
    }

    .sb-action {
        width: 100%;
        padding: 25px 0 0 0;
    }

    .btn-search-glow {
        width: 100%;
        border-radius: 16px;
        font-size: 1.1rem;
        padding: 18px;
    }
}

/* Typing Indicator Animation */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 8px;
    background: #f3f4f6;
    border-radius: 12px;
    width: fit-content;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: #6b7280;
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.typing-indicator span:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator span:nth-child(2) {
    animation-delay: -0.16s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0s;
}

@keyframes bounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Markdown Styles in Chat */
.message-content.markdown-body p {
    margin-bottom: 8px;
}

.message-content.markdown-body p:last-child {
    margin-bottom: 0;
}

.message-content.markdown-body ul,
.message-content.markdown-body ol {
    padding-left: 20px;
    margin-bottom: 8px;
}

.message-content.markdown-body li {
    margin-bottom: 4px;
}

.message-content.markdown-body strong {
    font-weight: 700;
}

.message-content.markdown-body code {
    background: rgba(0, 0, 0, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
    font-size: 0.85em;
    font-family: monospace;
}

.chat-message.user .message-content.markdown-body code {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.message-content.markdown-body pre {
    background: #1e1e1e;
    color: #f8f8f2;
    padding: 10px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.85em;
    margin-bottom: 8px;
}

.message-content.markdown-body pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

/* Documents Section Refinement */
.acc-head span {
    font-size: 1.25rem !important;
    /* Larger Header */
    font-weight: 700;
}

.acc-content ul li {
    font-size: 1.1rem !important;
    /* Larger Content */
    line-height: 1.6;
}

.icon-toggle {
    display: none !important;
    /* Remove + icon */
}