/* -------------------------------------
   Modern Minimalist Reset & Vars 
-------------------------------------- */
:root {
    /* Colors */
    --bg-dark: #09090b;
    --bg-darker: #000000;
    --bg-alt: #121214;
    
    --primary: #3b82f6; /* Trust blue */
    --primary-hover: #2563eb;
    --secondary: #27272a;
    --accent: #f43f5e;
    
    --text-main: #f4f4f5;
    --text-muted: #a1a1aa;
    
    --glass-bg: rgba(39, 39, 42, 0.4);
    --glass-border: rgba(255, 255, 255, 0.08);
    
    /* Layout */
    --container-width: 1200px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    
    /* Animations */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

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

ul {
    list-style: none;
}

.text-center { text-align: center; }
.text-primary { color: var(--primary); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }

.mt-2 { margin-top: 0.5rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-10 { margin-top: 3rem; }

/* -------------------------------------
   Containers & Grids 
-------------------------------------- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 6rem 0;
}

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

.grid {
    display: grid;
    gap: 2rem;
}

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

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    @media(min-width: 900px) {
        grid-template-columns: repeat(3, 1fr);
    }
}

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

/* -------------------------------------
   Typography & Glassmorphism 
-------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
}

.card {
    padding: 2rem;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.card-icon {
    margin-bottom: 1.5rem;
}

/* -------------------------------------
   Buttons 
-------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: white;
    padding: 0.75rem 1.5rem;
}

.btn-outline:hover {
    border-color: var(--text-main);
}

/* -------------------------------------
   Header & Nav 
-------------------------------------- */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.25rem 0;
    transition: var(--transition);
    border-bottom: 1px solid transparent;
}

.site-header.scrolled {
    background: rgba(9, 9, 11, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
}

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

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.05em;
}

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

.main-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-main);
    transition: var(--transition);
}

/* Lang Switcher */
.lang-switcher {
    position: relative;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
    padding: 0.5rem;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-alt);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0;
    min-width: 120px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.lang-switcher:hover .lang-dropdown,
.lang-switcher:focus-within .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.lang-dropdown a:hover,
.lang-dropdown a.active {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
}

/* -------------------------------------
   Hero Section 
-------------------------------------- */
.hero {
    position: relative;
    padding: 12rem 0 6rem;
    min-height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Background Blobs for Visual Aesthetics */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    z-index: -1;
    opacity: 0.5;
}

.blob-1 {
    top: -10%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: rgba(59, 130, 246, 0.3); /* Primary */
    animation: float 20s infinite alternate;
}

.blob-2 {
    bottom: -10%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(244, 63, 94, 0.2); /* Accent */
    animation: float 15s infinite alternate-reverse;
}

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

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #a1a1aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

.hero-cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* -------------------------------------
   Services Highlights
-------------------------------------- */
.service-preview {
    align-items: center;
}

.service-preview h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.service-preview p {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.service-img {
    height: 300px;
}

/* Reverse grid visually but keeping DOM order */
@media(min-width: 900px) {
    .reverse {
        direction: rtl;
    }
    .reverse > * {
        direction: ltr;
    }
}

/* -------------------------------------
   Footer 
-------------------------------------- */
.site-footer {
    background: var(--bg-darker);
    padding: 5rem 0 2rem;
    border-top: 1px solid var(--glass-border);
}

.footer-container {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-desc {
    margin-top: 1rem;
    color: var(--text-muted);
    max-width: 300px;
}

.footer-links h4,
.footer-contact h4 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-muted);
}

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

.footer-contact p {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

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

.social-links a {
    color: var(--text-muted);
}
.social-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

/* -------------------------------------
   Chatbot Widget 
-------------------------------------- */
.chatbot-launcher {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.4);
    z-index: 999;
    transition: var(--transition);
}

.chatbot-launcher:hover {
    transform: scale(1.05);
}

.chatbot-widget {
    position: fixed;
    bottom: 6rem;
    right: 2rem;
    width: 350px;
    background: var(--bg-alt);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    
    /* Animation defaults */
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: var(--transition);
}

.chatbot-widget.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chatbot-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
}

.chatbot-title-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.bot-avatar {
    background: var(--primary);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}

.chatbot-close:hover {
    color: var(--text-main);
}

.chatbot-body {
    padding: 1.5rem;
    height: 300px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Scrollbar for chat */
.chatbot-body::-webkit-scrollbar {
    width: 6px;
}
.chatbot-body::-webkit-scrollbar-track {
    background: transparent;
}
.chatbot-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.chat-message {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    max-width: 85%;
    font-size: 0.9rem;
    line-height: 1.4;
}

.chat-message.bot {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    align-self: flex-start;
    border-bottom-left-radius: 0;
}

.chat-message.user {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 0;
}

.typing-indicator {
    padding: 0.75rem 1rem;
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    align-self: flex-start;
    border-radius: var(--radius-sm);
    border-bottom-left-radius: 0;
    width: max-content;
}

.typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

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

@keyframes typing {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.chatbot-input {
    padding: 1rem;
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 0.5rem;
}

.chatbot-input input {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    padding: 0.6rem 1rem;
    color: var(--text-main);
    outline: none;
    transition: var(--transition);
}

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

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

.chatbot-input button:hover {
    background: var(--primary-hover);
}

/* -------------------------------------
   Animations & Interactivity 
-------------------------------------- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* -------------------------------------
   Responsive Design 
-------------------------------------- */
@media (max-width: 768px) {
    .header-container { align-items: center; }
    
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--bg-alt);
        flex-direction: column;
        padding: 2rem;
        border-bottom: 1px solid var(--glass-border);
    }
    
    .main-nav.menu-active { display: flex; }
    
    .nav-links {
        flex-direction: column;
        width: 100%;
        text-align: center;
    }
    
    .mobile-toggle { display: flex; }
    
    .mobile-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .mobile-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    
    .hero-title { font-size: 2.5rem; }
    
    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    .footer-desc, .social-links { margin: 1rem auto 0; justify-content: center;}
    
    .chatbot-widget {
        width: calc(100% - 2rem);
        right: 1rem;
        left: 1rem;
        bottom: 5rem;
    }
}
