:root {
    /* Color Palette */
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #ec4899;
    --accent: #14b8a6;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border: #334155;
    --success: #10b981;
    --error: #ef4444;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    text-align: center;
    animation: fadeInUp 1s ease;
}

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

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

/* Hero Section */
.hero {
    position: relative;
    min-height: 36vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: var(--spacing-xl) 0;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(-45deg, #0f172a, #1e1b4b, #312e81, #4338ca);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    z-index: 0;
    opacity: 1;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, transparent 0%, #0f172a 100%);
    z-index: 1;
}

/* Floating particles/orbs effect */
.hero-background::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 10%),
        radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.15) 0%, transparent 10%),
        radial-gradient(circle at 50% 50%, rgba(20, 184, 166, 0.15) 0%, transparent 10%);
    animation: floatingOrbs 20s ease-in-out infinite alternate;
    z-index: 1;
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes floatingOrbs {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1) rotate(5deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    margin-bottom: var(--spacing-md);
    letter-spacing: -0.02em;
}

.gradient-text {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {

    0%,
    100% {
        filter: hue-rotate(0deg);
    }

    50% {
        filter: hue-rotate(20deg);
    }
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--text-secondary);
    font-weight: 300;
    margin-bottom: var(--spacing-lg);
}

.hero-decoration {
    width: 100px;
    height: 4px;
    background: var(--gradient-accent);
    margin: var(--spacing-lg) auto 0;
    border-radius: 2px;
    animation: expandWidth 2s ease infinite;
}

@keyframes expandWidth {

    0%,
    100% {
        width: 100px;
    }

    50% {
        width: 150px;
    }
}

/* Main Content */
.main-content {
    padding: var(--spacing-2xl) 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--spacing-xl);
}

/* Search Bar */
.search-bar-container {
    grid-column: 1 / -1;
    margin-bottom: var(--spacing-lg);
    display: flex;
    justify-content: center;
}

.search-input {
    width: 100%;
    max-width: 500px;
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 1.1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-xl);
    background: var(--surface);
    color: var(--text-primary);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Services Section */
.services-section {
    grid-column: 1;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xl);
    text-align: center;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

/* Service Card */
/* Service Card styles moved to /css/service-card.css */

/* Loading State */
.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--spacing-2xl);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--surface-light);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--spacing-md);
}

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

/* Ad Containers */
.ad-container {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-placeholder {
    color: var(--text-muted);
    text-align: center;
    font-size: 0.9rem;
    padding: var(--spacing-md);
}

.ad-header,
.ad-footer {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.sidebar-ad {
    grid-column: 2;
    position: sticky;
    top: var(--spacing-lg);
    height: fit-content;
}

.ad-sidebar {
    min-height: 600px;
}

/* Footer */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: var(--spacing-xl) 0;
    text-align: center;
    margin-top: var(--spacing-2xl);
}

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

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

.admin-link {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.admin-link:hover {
    color: var(--accent);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .sidebar-ad {
        grid-column: 1;
        position: static;
    }

    .ad-sidebar {
        min-height: 250px;
    }
}

@media (max-width: 768px) {
    .hero {
        min-height: 50vh;
        padding: var(--spacing-xl) 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .footer .container {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* Language Switcher */
.language-switcher {
    position: fixed;
    top: var(--spacing-md);
    right: var(--spacing-md);
    z-index: 1000;
    display: flex;
    gap: var(--spacing-xs);
    background: var(--surface);
    padding: var(--spacing-xs);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
}

.lang-btn {
    font-size: 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    opacity: 0.6;
}

.lang-btn:hover {
    opacity: 1;
    transform: scale(1.1);
    background: var(--surface-light);
}

.lang-btn.active {
    opacity: 1;
    background: var(--primary);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .language-switcher {
        top: auto;
        bottom: var(--spacing-md);
        flex-wrap: wrap;
        max-width: calc(100vw - var(--spacing-lg));
    }

    .lang-btn {
        font-size: 1.2rem;
        padding: 0.4rem;
    }
}

/* Dynamic Background Overrides */
#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-background::after {
    display: none;
    /* Hide old orbs */
}

.hero-background::before {
    pointer-events: none;
    z-index: 2;
}

.hero-content {
    z-index: 3;
    pointer-events: auto;
}