/* ==========================================================================
   GLOBAL STYLES & COMMON COMPONENTS - PROSYS ENTERPRISE
   ========================================================================== */

/* 1. Global Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 2. Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
}

h3 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

/* Lucide Icon Defaults */
svg.lucide {
    width: 20px;
    height: 20px;
    stroke-width: 2;
    display: inline-block;
    vertical-align: middle;
}

/* 3. Layout Containers */
.container {
    width: 100%;
    max-width: var(--container-max-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.section {
    padding: 7rem 0;
    position: relative;
}

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

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

/* Grid Utilities */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .section { padding: 4.5rem 0; }
}

/* Flex Utilities */
.flex {
    display: flex;
    gap: 1rem;
}

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

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 4. Common Components */

/* Page Header (Global) */
.page-header {
    margin-top: var(--header-height); /* Starts exactly below the fixed navbar */
    padding: 3.5rem 0; /* Snug, professional vertical padding */
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.page-header-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.page-header h1 {
    font-size: 3.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.page-header p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 0;
}

@media (max-width: 1024px) {
    .page-header {
        padding: 3rem 0;
    }
    .page-header h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 2.5rem 0;
    }
    .page-header h1 {
        font-size: 2rem;
    }
    .page-header p {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 2rem 0;
    }
    .page-header h1 {
        font-size: 1.75rem;
    }
}

/* Section Headers */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4.5rem auto;
}

.section-pretitle {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--primary-accent);
    margin-bottom: 0.75rem;
    background-color: var(--primary-accent-light);
    padding: 0.35rem 1rem;
    border-radius: var(--radius-full);
}

.section-title {
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    gap: 0.5rem;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--primary-accent);
    color: var(--text-on-accent);
    box-shadow: var(--shadow-accent);
}

.btn-primary:hover {
    background-color: var(--primary-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -6px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-accent);
    color: var(--text-on-accent);
}

.btn-secondary:hover {
    background-color: var(--secondary-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -6px rgba(13, 148, 136, 0.3);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

.btn-text {
    padding: 0;
    background-color: transparent;
    color: var(--primary-accent);
    font-weight: 700;
    gap: 0.25rem;
    border-radius: 0;
}

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

.btn-text svg {
    transition: transform var(--transition-fast);
}

.btn-text:hover svg {
    transform: translateX(4px);
}

/* Glassmorphism Cards */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-normal);
}

.glass-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(37, 99, 235, 0.2);
}

/* 5. Header / Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: rgba(248, 250, 252, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: all var(--transition-normal);
}

.header.scrolled {
    height: 70px;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-md);
    border-bottom-color: var(--border-color);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--primary-accent) 0%, var(--secondary-accent) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    list-style: none;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    position: relative;
    padding: 0.5rem 0;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-accent);
    transition: width var(--transition-normal);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    z-index: 1001;
}

.hamburger span {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: all var(--transition-normal);
}

@media (max-width: 1024px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background-color: var(--bg-secondary);
        box-shadow: var(--shadow-xl);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 8rem 3rem 3rem 3rem;
        gap: 2rem;
        transition: right var(--transition-normal);
        z-index: 999;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-link {
        font-size: 1.15rem;
        width: 100%;
    }
    
    .nav-actions {
        display: none;
    }
    
    .nav-menu .nav-actions-mobile {
        display: block;
        margin-top: 1rem;
        width: 100%;
    }
    
    /* Hamburger Active Animation */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 6px);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -6px);
    }
}

/* 6. Footer Section */
.footer {
    background-color: var(--primary-color);
    color: rgba(255, 255, 255, 0.7);
    padding: 5rem 0 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer h1, .footer h2, .footer h3, .footer h4 {
    color: #ffffff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 4rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: #ffffff;
}

.footer-description {
    font-size: 0.95rem;
    line-height: 1.6;
    max-width: 320px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: all var(--transition-normal);
}

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

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    list-style: none;
}

.footer-link {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
}

.footer-link:hover {
    color: #ffffff;
    padding-left: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

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

.footer-bottom-link {
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom-link:hover {
    color: #ffffff;
}

@media (max-width: 991px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    .footer-bottom-links {
        justify-content: center;
    }
}

/* 7. Scroll Animations & Reveal System */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.15s; }
.reveal-delay-2 { transition-delay: 0.3s; }
.reveal-delay-3 { transition-delay: 0.45s; }

/* Interactive Hover Glow Background (Subtle background blobs) */
.bg-glow-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.4;
    transition: transform var(--transition-slow);
}

.bg-glow-primary {
    background-color: var(--accent-glow);
    top: -200px;
    right: -100px;
}

.bg-glow-secondary {
    background-color: var(--secondary-glow);
    bottom: -200px;
    left: -100px;
}

/* Input Fields & Form Styling */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.85rem 1.25rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all var(--transition-normal);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* ==========================================================================
   FLOATING ENTERPRISE AI WIDGET
   ========================================================================== */
.ai-widget-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 2000;
    font-family: var(--font-body);
}

.ai-widget-bubble {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-accent) 0%, var(--secondary-accent) 100%);
    color: #ffffff;
    border: none;
    box-shadow: 0 10px 25px -5px rgba(37, 99, 235, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-bounce);
    position: relative;
}

.ai-widget-bubble:hover {
    transform: scale(1.08) rotate(5deg);
    box-shadow: 0 15px 30px -5px rgba(37, 99, 235, 0.5);
}

.ai-widget-bubble svg {
    width: 26px;
    height: 26px;
    transition: transform var(--transition-normal);
}

.ai-widget-container.active .ai-widget-bubble {
    transform: scale(0.9) rotate(-90deg);
    background: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

/* Chat Panel */
.ai-widget-panel {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 4rem);
    height: 480px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all var(--transition-bounce);
    transform-origin: bottom right;
}

.ai-widget-container.active .ai-widget-panel {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Chat Header */
.ai-panel-header {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e293b 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ai-panel-header-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--secondary-accent);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-panel-header-info h4 {
    color: #ffffff;
    font-size: 0.95rem;
    margin: 0;
    font-weight: 700;
}

.ai-panel-status {
    font-size: 0.7rem;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
}

.ai-panel-status::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
}

/* Chat Messages */
.ai-panel-messages {
    flex-grow: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: rgba(248, 250, 252, 0.5);
}

.msg-bubble {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.4;
}

.msg-bubble-ai {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    align-self: flex-start;
    border-top-left-radius: var(--radius-xs);
}

.msg-bubble-user {
    background-color: var(--primary-accent);
    color: #ffffff;
    align-self: flex-end;
    border-top-right-radius: var(--radius-xs);
    box-shadow: 0 4px 10px -4px rgba(37, 99, 235, 0.3);
}

/* Typing Indicator */
.typing-indicator {
    display: flex;
    gap: 0.25rem;
    padding: 0.25rem 0;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background-color: var(--text-muted);
    border-radius: 50%;
    animation: bounce-typing 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; }

@keyframes bounce-typing {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Chat Input */
.ai-panel-input-box {
    padding: 1rem 1.25rem;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 0.75rem;
}

.ai-panel-input {
    flex-grow: 1;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.6rem 1rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: all var(--transition-normal);
}

.ai-panel-input:focus {
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.ai-panel-send-btn {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
    background-color: var(--primary-accent);
    color: #ffffff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.ai-panel-send-btn:hover {
    background-color: var(--primary-accent-hover);
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .ai-widget-container {
        bottom: 1rem;
        right: 1rem;
    }
    .ai-widget-panel {
        width: 320px;
        max-width: calc(100vw - 2rem);
        height: 420px;
    }
}

/* Light-Themed Premium CTA Banner */
.cta-light {
    background: linear-gradient(135deg, var(--primary-accent-light) 0%, var(--secondary-accent-light) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 5rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.cta-light::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.cta-light h2 {
    color: var(--text-primary);
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.cta-light h2 span {
    background: linear-gradient(135deg, var(--primary-accent) 0%, var(--secondary-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cta-light p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 2.5rem auto;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .cta-light {
        padding: 3.5rem 2rem;
    }
    .cta-light h2 {
        font-size: 2rem;
    }
    .cta-light p {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .cta-light .hero-cta {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }
    .cta-light .hero-cta .btn {
        width: 100%;
    }
}


