/* Base styles with theme variables */
:root {
    /* Light theme variables */
    --primary-color: #5468ff;
    --primary-hover: #4054e9;
    --secondary-color: #ff5454;
    --accent-color: #34d399;
    --bg-color: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-card: #ffffff;
    --text-color: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --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 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --header-bg: rgba(255, 255, 255, 0.95);
    --footer-bg: #1e293b;
    --footer-text: #e2e8f0;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --timeline-line: #5468ff;
    --timeline-dot: #34d399;
    --border-radius-sm: 0.25rem;
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    --transition: all 0.3s ease;
}

/* Dark theme variables */
[data-theme="dark"] {
    --primary-color: #6576ff;
    --primary-hover: #5468ff;
    --secondary-color: #ff6868;
    --accent-color: #2dd4bf;
    --bg-color: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --text-color: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: #334155;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.2), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
    --header-bg: rgba(15, 23, 42, 0.95);
    --footer-bg: #0f172a;
    --footer-text: #e2e8f0;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
}

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

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    transition: var(--transition);
}

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

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

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

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

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* Header */
header {
    background-color: var(--header-bg);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

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

.logo a {
    display: flex;
    align-items: center;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-icon {
    font-size: 1.5rem;
    margin-right: 1.15rem;
    display: inline-flex;
    align-items: center;
}

.logo-icon img {
    vertical-align: middle;
    display: block;
}

.logo-text {
    font-size: 1.5rem;
    letter-spacing: 0.5px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

.theme-toggle {
    margin-left: 1.5rem;
}

#theme-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-color);
    transition: var(--transition);
}

#theme-toggle-btn:hover {
    background-color: var(--bg-secondary);
}

[data-theme="light"] .sun-icon {
    display: none;
}

[data-theme="light"] .moon-icon {
    display: inline;
}

[data-theme="dark"] .sun-icon {
    display: inline;
}

[data-theme="dark"] .moon-icon {
    display: none;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    border: none;
    font-family: inherit;
}

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

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

.btn.primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn.secondary:hover {
    background-color: rgba(84, 104, 255, 0.1);
    transform: translateY(-2px);
}

.btn i {
    margin-left: 0.5rem;
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    background-color: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(84, 104, 255, 0.1), rgba(84, 104, 255, 0));
    z-index: 0;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

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

.cta-buttons {
    display: flex;
    gap: 1rem;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--border-radius-lg);
    transition: var(--transition);
    box-shadow: var(--shadow-xl);
}

.hero-image img {
    max-width: 100%;
    border-radius: var(--border-radius-lg);
    transition: var(--transition);
}

/* Features Section */
.features {
    padding: 6rem 0;
    background-color: var(--bg-color);
}

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

.feature-card {
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.feature-card p {
    color: var(--text-secondary);
}

/* Timeline Section */
.timeline-section {
    padding: 6rem 0;
    background-color: var(--bg-secondary);
}

.timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--timeline-line);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 4px;
}

.timeline-item {
    padding: 1rem 2.5rem;
    position: relative;
    width: 50%;
    margin-bottom: 2rem;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--timeline-dot);
    border: 4px solid var(--timeline-line);
    border-radius: 50%;
    top: 1.5rem;
    z-index: 1;
}

.timeline-item:nth-child(odd)::after {
    right: -12px;
}

.timeline-item:nth-child(even)::after {
    left: -12px;
}

.timeline-date {
    position: absolute;
    top: 1.1rem;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.timeline-item:nth-child(odd) .timeline-date {
    right: -6.5rem;
}

.timeline-item:nth-child(even) .timeline-date {
    left: -6.5rem;
}

.timeline-content {
    padding: 1.5rem;
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.timeline-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.timeline-content p {
    color: var(--text-secondary);
}

/* Demo Section */
.demo {
    padding: 6rem 0;
    background-color: var(--bg-color);
}

.demo-container {
    max-width: 800px;
    margin: 0 auto;
}

.demo-chat {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.chat-message {
    display: flex;
    margin-bottom: 1.5rem;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    flex-shrink: 0;
}

.chat-message.user .message-avatar {
    background-color: var(--primary-color);
    color: white;
}

.chat-message.sara .message-avatar {
    background-color: var(--accent-color);
    color: white;
}

.message-bubble {
    background-color: var(--bg-secondary);
    padding: 1rem;
    border-radius: var(--border-radius);
    position: relative;
    max-width: 80%;
}

.message-bubble::before {
    content: '';
    position: absolute;
    top: 14px;
    left: -8px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid var(--bg-secondary);
}

.chat-message.user .message-bubble {
    background-color: var(--primary-color);
    color: white;
}

.chat-message.user .message-bubble::before {
    border-right-color: var(--primary-color);
}

.chat-message.sara .message-bubble {
    background-color: var(--bg-secondary);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 5rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/static/images/pattern.svg');
    opacity: 0.1;
    z-index: 0;
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

/* News Section */
.news-section {
    padding: 5rem 0;
}

.news-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.news-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.news-meta span {
    color: var(--text-secondary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.news-meta i {
    margin-right: 0.5rem;
}

.news-card h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.news-card .summary {
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
}

.news-content {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 600;
}

.read-more i {
    margin-left: 0.5rem;
    transition: var(--transition);
}

.read-more:hover i {
    transform: translateX(5px);
}

/* About Section */
.about-content {
    padding: 5rem 0;
}

.about-section {
    margin-bottom: 4rem;
}

.about-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.about-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 3px;
}

.section-content {
    color: var(--text-secondary);
}

.section-content p {
    margin-bottom: 1rem;
}

/* Specs Section */
.specs-section {
    padding: 5rem 0;
    background-color: var(--bg-secondary);
}

.tech-specs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.spec {
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    text-align: center;
}

.spec:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.spec-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.spec h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.spec p {
    color: var(--text-secondary);
}

/* Contact Info Section */
.contact-info-section {
    padding: 5rem 0;
}

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

.info-item {
    background-color: var(--bg-card);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.info-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.info-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.info-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.info-item p {
    color: var(--text-secondary);
}

.social-connect {
    text-align: center;
    margin-top: 3rem;
}

.social-connect h3 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.social-grid {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.social-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--border-color);
    width: 120px;
}

.social-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background-color: var(--primary-color);
    color: white;
}

.social-item i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

/* Contact Form Section */
.contact-form-section {
    padding: 5rem 0;
    background-color: var(--bg-secondary);
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem;
    background-color: var(--bg-card);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.contact-form h2 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.form-subtitle {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-secondary);
}

.alert {
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
}

.alert.success {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: inherit;
    background-color: var(--bg-card);
    color: var(--text-color);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(84, 104, 255, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

/* Footer */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 5rem 0 2rem;
}

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

.footer-section h3 {
    color: var(--footer-text);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
}

.footer-section h3 i {
    margin-right: 0.75rem;
}

.footer-description {
    margin-top: 1rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

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

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

.footer-section a {
    color: var(--text-secondary);
    transition: var(--transition);
}

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

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

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--footer-text);
    transition: var(--transition);
}

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

.mt-2 {
    margin-top: 1rem;
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
        margin-bottom: 2rem;
    }
    
    .cta-buttons {
        justify-content: center;
    }
    
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        width: 100%;
        left: 0 !important;
        padding-left: 70px;
    }
    
    .timeline-item::after {
        left: 20px !important;
        right: auto !important;
    }
    
    .timeline-date {
        position: relative;
        left: 0 !important;
        right: auto !important;
        text-align: left;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 768px) {
    .section-header h2 {
        font-size: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    header .container {
        flex-direction: column;
        padding: 1rem;
    }
    
    .logo {
        margin-bottom: 1rem;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .theme-toggle {
        margin-top: 1rem;
        margin-left: 0;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .feature-grid,
    .tech-specs,
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feature-card,
.timeline-item,
.news-card,
.spec,
.info-item,
.social-item {
    animation: fadeIn 0.5s ease-out forwards;
}

.feature-card:nth-child(2),
.timeline-item:nth-child(2),
.news-card:nth-child(2),
.spec:nth-child(2),
.info-item:nth-child(2) {
    animation-delay: 0.1s;
}

.feature-card:nth-child(3),
.timeline-item:nth-child(3),
.news-card:nth-child(3),
.spec:nth-child(3),
.info-item:nth-child(3) {
    animation-delay: 0.2s;
}