/* Root Variables */
:root {
    --background: #ffffff;
    --foreground: #0a0a0a;
    --card: #ffffff;
    --card-foreground: #0a0a0a;
    --primary: #3b82f6;
    --teal-accent: #06b6d4;
    --gold-accent: #f59e0b;
    --accent: #f3f4f6;
    --accent-foreground: #0a0a0a;
    --muted: #f3f4f6;
    --muted-foreground: #6b7280;
    --border: #e5e7eb;
    --ring: #3b82f6;
    --radius: 0.5rem;
}

.dark {
    --background: #0a0a0a;
    --foreground: #fafafa;
    --card: #1a1a1a;
    --card-foreground: #fafafa;
    --accent: #262626;
    --accent-foreground: #fafafa;
    --muted: #262626;
    --muted-foreground: #a3a3a3;
    --border: #262626;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-weight: 700;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background-color: var(--background);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.logo img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.2;
}

.logo p {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    line-height: 1.2;
}

.desktop-nav {
    display: none;
    gap: 0.25rem;
}

.desktop-nav a {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
    text-decoration: none;
    transition: all 0.2s;
}

.desktop-nav a:hover {
    color: var(--foreground);
    background-color: var(--accent);
}

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

#theme-toggle {
    padding: 0.5rem;
    border-radius: 0.5rem;
    background-color: var(--accent);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-center;
    transition: all 0.2s;
}

#theme-toggle:hover {
    background-color: var(--muted);
}

.sun-icon {
    display: none;
}

.dark .sun-icon {
    display: block;
}

.moon-icon {
    display: block;
}

.dark .moon-icon {
    display: none;
}

.cta-btn {
    display: none;
    padding: 0.625rem 1.5rem;
    background: linear-gradient(to right, var(--primary), var(--teal-accent));
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.cta-btn:hover {
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background-color: var(--foreground);
    transition: all 0.3s;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    padding: 1rem;
    gap: 0.5rem;
    border-top: 1px solid var(--border);
}

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

.mobile-menu a {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
    text-decoration: none;
    transition: all 0.2s;
}

.mobile-menu a:hover {
    color: var(--foreground);
    background-color: var(--accent);
}

/* Main Content */
main {
    padding-top: 80px;
    min-height: 100vh;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem 1rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 25%;
    width: 384px;
    height: 384px;
    background: var(--teal-accent);
    opacity: 0.1;
    filter: blur(120px);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 25%;
    width: 384px;
    height: 384px;
    background: var(--gold-accent);
    opacity: 0.1;
    filter: blur(120px);
    border-radius: 50%;
    animation: pulse 3s ease-in-out infinite 1s;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1120px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    background-color: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    margin-bottom: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(to right, var(--teal-accent), var(--primary), var(--gold-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--muted-foreground);
    margin-bottom: 3rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.btn-primary {
    padding: 1rem 2rem;
    background: linear-gradient(to right, var(--primary), var(--teal-accent));
    color: white;
    border: none;
    border-radius: 0.75rem;
    font-size: 1.125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.4);
    transform: scale(1.05);
}

.btn-secondary {
    padding: 1rem 2rem;
    background: transparent;
    color: var(--foreground);
    border: 2px solid var(--primary);
    border-radius: 0.75rem;
    font-size: 1.125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

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

/* Section Styles */
section {
    padding: 5rem 1rem;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.125rem;
    color: var(--muted-foreground);
    max-width: 672px;
    margin: 0 auto;
}

/* Grid Layouts */
.grid {
    display: grid;
    gap: 1.5rem;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

/* Card Styles */
.card {
    background-color: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card-icon {
    width: 64px;
    height: 64px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.card p {
    color: var(--muted-foreground);
    line-height: 1.6;
}

/* Footer */
footer {
    background-color: var(--card);
    border-top: 1px solid var(--border);
    padding: 4rem 1rem 2rem;
}

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

.footer-col h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

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

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

.footer-col a {
    color: var(--muted-foreground);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: var(--foreground);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.footer-logo h3 {
    font-size: 1.125rem;
}

.footer-logo p {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

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

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    background-color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.social-links a:hover {
    background-color: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.contact-info p {
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    text-align: center;
}

.footer-bottom p {
    color: var(--muted-foreground);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--muted-foreground);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

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

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 0.1;
    }
    50% {
        opacity: 0.15;
    }
}

/* Responsive Design */
@media (min-width: 640px) {
    .cta-btn {
        display: inline-flex;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

@media (min-width: 768px) {
    .grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .desktop-nav {
        display: flex;
    }
    
    .mobile-menu-btn {
        display: none;
    }
    
    .grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    
    .grid-cols-4 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
    
    .footer-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background-color: var(--accent);
    color: var(--foreground);
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

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

/* Loading State */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Chat Widget Styles */
#chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

#chat-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--teal-accent));
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

#chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(59, 130, 246, 0.4);
}

#chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 450px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    flex-direction: column;
    overflow: hidden;
}

#chat-header {
    background: linear-gradient(135deg, var(--primary), var(--teal-accent));
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#chat-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

#chat-header button {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

#chat-header button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

#chat-body {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.4;
}

.chat-message.bot {
    background: var(--accent);
    color: var(--foreground);
    align-self: flex-start;
    border-bottom-left-radius: 6px;
}

.chat-message.user {
    background: linear-gradient(135deg, var(--primary), var(--teal-accent));
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 6px;
}

.chat-message p {
    margin: 0;
}

.chat-message a {
    color: var(--primary);
    text-decoration: underline;
}

.chat-message.bot a {
    color: var(--primary);
}

.chat-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.chat-options button {
    padding: 10px 16px;
    background: var(--accent);
    border: 1px solid var(--border);
    border-radius: 20px;
    color: var(--foreground);
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
    text-align: left;
}

.chat-options button:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Mobile responsiveness for chat */
@media (max-width: 480px) {
    #chat-widget {
        bottom: 15px;
        right: 15px;
    }
    
    #chat-window {
        width: calc(100vw - 30px);
        right: -15px;
        height: 400px;
    }
    
    #chat-button {
        width: 55px;
        height: 55px;
    }
}

/* Additional page styles */
.page-content {
    padding-top: 80px;
    min-height: 100vh;
}

/* Legal pages styling */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

.legal-content h3 {
    color: var(--foreground);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.legal-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--muted-foreground);
}

.legal-content ul {
    margin-bottom: 1.5rem;
    color: var(--muted-foreground);
}

.legal-content li {
    margin-bottom: 0.5rem;
}

/* Service page enhancements */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.service-card h3 {
    color: var(--foreground);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.service-card p {
    color: var(--muted-foreground);
    line-height: 1.6;
}

/* Improved button styles */
.btn-primary:hover {
    transform: translateY(-2px);
}

.btn-secondary:hover {
    transform: translateY(-2px);
}

/* Loading animation for dynamic content */
.loading-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}