/* Mietsenkung Berlin - Optimized Styles */
/* Reset and Base Styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
    
    /* Neutral Colors */
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    
    /* Semantic Colors */
    --success: #22c55e;
    --warning: #eab308;
    --error: #ef4444;
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --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);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;
}

/* Base Styles */
html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--slate-50);
    color: var(--slate-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Card */
.card {
    border-radius: 1rem;
    border: 1px solid var(--slate-200);
    background-color: white;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    background-color: var(--primary-600);
    color: white;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--slate-300);
    background-color: white;
    color: var(--slate-700);
    transition: all 0.2s;
    text-decoration: none;
    cursor: pointer;
}

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

/* Section */
.section {
    padding-top: 4rem;
    padding-bottom: 4rem;
}

@media (min-width: 1024px) {
    .section {
        padding-top: 6rem;
        padding-bottom: 6rem;
    }
}

/* Typography */
.heading-1 {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--slate-900);
    line-height: 1.2;
}

@media (min-width: 768px) {
    .heading-1 {
        font-size: 3rem;
    }
}

@media (min-width: 1024px) {
    .heading-1 {
        font-size: 3.75rem;
    }
}

.heading-2 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .heading-2 {
        font-size: 2.25rem;
    }
}

.heading-3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--slate-900);
    margin-bottom: 1rem;
}

.text-large {
    font-size: 1.125rem;
    color: var(--slate-600);
    line-height: 1.75;
}

/* Logo Text Styles */
.logo-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-transform: uppercase;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

/* Remove underline from logo link */
header a {
    text-decoration: none !important;
}

header a:hover {
    text-decoration: none !important;
}

header a:focus {
    text-decoration: none !important;
}

header a:visited {
    text-decoration: none !important;
}

@media (min-width: 768px) {
    .logo-text {
        font-size: 1.875rem;
    }
}

/* Logo hover effects */
header a:hover .logo-text {
    color: var(--primary-700);
    transform: scale(1.02);
}

/* Dark mode logo styles */
.dark .logo-text {
    color: var(--primary-500);
}

.dark header a:hover .logo-text {
    color: var(--primary-400);
}

/* Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--slate-200);
}

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

header nav {
    display: none;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 768px) {
    header nav {
        display: flex;
    }
}

header nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-600);
    text-decoration: none !important;
    transition: color 0.2s;
}

/* Force remove all underlines from header links */
header a,
header a:hover,
header a:focus,
header a:visited,
header a:active {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

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

/* Mobile Menu Button - Hamburger Icon */
#mobile-menu-btn {
    position: relative;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 101; /* Выше всего, включая мобильное меню */
}

.hamburger-icon {
    position: relative;
    width: 24px;
    height: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-line {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--slate-700);
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.dark .hamburger-line {
    background-color: var(--slate-300);
}

/* Анимация гамбургера в крестик */
#mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

#mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100; /* Выше хедера (50) */
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu-overlay {
    position: absolute;
    top: 4rem; /* Начинается ниже хедера */
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1; /* Ниже контента меню */
    pointer-events: auto; /* Кликабельный для закрытия */
}

.mobile-menu.active .mobile-menu-overlay {
    opacity: 1;
}

.mobile-menu-content {
    position: absolute;
    top: 4rem;
    left: 0;
    right: 0;
    background-color: white;
    border-top: 1px solid var(--slate-200);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    transform: translateY(-20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2; /* Выше overlay */
    pointer-events: auto; /* Кликабельный */
}

.mobile-menu.active .mobile-menu-content {
    transform: translateY(0);
}

.dark .mobile-menu-content {
    background-color: var(--slate-100);
    border-color: var(--slate-200);
}

.mobile-menu-container {
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Каждый пункт меню - отдельная строка с четким разделением */
.mobile-menu-item {
    display: block;
    width: calc(100% - 3rem);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: var(--slate-700);
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
    border-radius: 0.75rem;
    background-color: var(--slate-50);
    border: 1px solid var(--slate-200);
    position: relative;
    overflow: hidden;
}

.mobile-menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: var(--primary-600);
    transform: scaleY(0);
    transition: transform 0.2s ease;
    border-radius: 0.75rem 0 0 0.75rem;
}

.mobile-menu-item:hover,
.mobile-menu-item:active {
    background-color: var(--primary-50);
    color: var(--primary-600);
    border-color: var(--primary-300);
    transform: translateX(4px);
}

.mobile-menu-item:hover::before,
.mobile-menu-item:active::before {
    transform: scaleY(1);
}

.dark .mobile-menu-item {
    color: var(--slate-200);
    background-color: var(--slate-200);
    border-color: var(--slate-300);
}

.dark .mobile-menu-item:hover,
.dark .mobile-menu-item:active {
    background-color: var(--slate-300);
    color: var(--primary-400);
    border-color: var(--primary-500);
}

/* Кнопка контакта - особый стиль */
.mobile-menu-item-btn {
    background-color: var(--primary-600);
    color: white;
    border-color: var(--primary-600);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.mobile-menu-item-btn::before {
    display: none;
}

.mobile-menu-item-btn:hover,
.mobile-menu-item-btn:active {
    background-color: var(--primary-700);
    color: white;
    border-color: var(--primary-700);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.dark .mobile-menu-item-btn {
    background-color: var(--primary-600);
    border-color: var(--primary-600);
}

.dark .mobile-menu-item-btn:hover,
.dark .mobile-menu-item-btn:active {
    background-color: var(--primary-700);
    border-color: var(--primary-700);
}

.mobile-menu-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem 1.5rem 0;
    margin-top: 1rem;
    border-top: 1px solid var(--slate-200);
}

.dark .mobile-menu-footer {
    border-color: var(--slate-200);
}

@media (min-width: 768px) {
    .mobile-menu {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
    }
    
    #mobile-menu-btn {
        display: none !important;
    }
    
    /* Убираем блокировку прокрутки на десктопе */
    body:has(.mobile-menu.active) {
        overflow: auto !important;
    }
}

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

@media (min-width: 768px) {
    .grid.md\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid.md\:grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .grid.lg\:grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid.lg\:grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Hero Section */
#hero {
    background: linear-gradient(to bottom right, var(--primary-50), var(--slate-100));
}

/* Улучшения для Hero секции на мобильных */
@media (max-width: 768px) {
    #hero .grid {
        gap: 2rem;
    }
    
    #hero .heading-1 {
        font-size: 1.875rem;
        line-height: 1.3;
    }
    
    #hero .text-large {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    #hero .flex.flex-col {
        gap: 0.75rem;
    }
    
    #hero .btn,
    #hero .btn-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* Primary Colors */
.bg-primary-50 { background-color: var(--primary-50); }
.bg-primary-100 { background-color: var(--primary-100); }
.bg-primary-400 { background-color: var(--primary-400); }
.bg-primary-500 { background-color: var(--primary-500); }
.bg-primary-600 { background-color: var(--primary-600); }
.bg-primary-700 { background-color: var(--primary-700); }
.text-primary-600 { color: var(--primary-600); }
.text-primary-100 { color: var(--primary-100); }

/* Slate Colors */
.bg-slate-50 { background-color: var(--slate-50); }
.bg-slate-100 { background-color: var(--slate-100); }
.bg-slate-900 { background-color: var(--slate-900); }
.text-slate-400 { color: var(--slate-400); }
.text-slate-500 { color: var(--slate-500); }
.text-slate-600 { color: var(--slate-600); }
.text-slate-700 { color: var(--slate-700); }
.text-slate-800 { color: var(--slate-800); }
.text-slate-900 { color: var(--slate-900); }
.border-slate-200 { border-color: var(--slate-200); }
.border-slate-300 { border-color: var(--slate-300); }
.border-slate-800 { border-color: var(--slate-800); }

/* Other Colors */
.bg-white { background-color: white; }
.bg-green-50 { background-color: #f0fdf4; }
.bg-green-500 { background-color: #22c55e; }
.bg-yellow-500 { background-color: #eab308; }
.text-white { color: white; }
.text-green-600 { color: #16a34a; }
.text-green-700 { color: #15803d; }
.text-yellow-400 { color: #facc15; }
.border-white { border-color: white; }

/* Utilities */
.fixed { position: fixed; }
.relative { position: relative; }
.absolute { position: absolute; }
.top-0 { top: 0; }
.left-0 { left: 0; }
.right-0 { right: 0; }
.-top-4 { top: -1rem; }
.-right-4 { right: -1rem; }
.-bottom-4 { bottom: -1rem; }
.-left-4 { left: -1rem; }
.z-50 { z-index: 50; }

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.hidden { display: none; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.flex-col { flex-direction: column; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.-space-x-2 > * + * { margin-left: -0.5rem; }

.w-full { width: 100%; }
.w-5 { width: 1.25rem; }
.w-6 { width: 1.5rem; }
.w-8 { width: 2rem; }
.w-10 { width: 2.5rem; }
.w-16 { width: 4rem; }
.w-20 { width: 5rem; }
.w-32 { width: 8rem; }
.w-96 { width: 24rem; }
.h-8 { height: 2rem; }
.h-10 { height: 2.5rem; }
.h-16 { height: 4rem; }
.h-20 { height: 5rem; }
.h-32 { height: 8rem; }
.h-96 { height: 24rem; }
.h-auto { height: auto; }
.h-full { height: 100%; }

.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-7xl { max-width: 80rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-2 { padding: 0.5rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.pt-4 { padding-top: 1rem; }
.pt-8 { padding-top: 2rem; }
.pt-16 { padding-top: 4rem; }
.pb-8 { padding-bottom: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mb-16 { margin-bottom: 4rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-16 { margin-top: 4rem; }
.mt-20 { margin-top: 5rem; }

.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }

.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.rounded-full { border-radius: 9999px; }

.border { border-width: 1px; }
.border-t { border-top-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-2 { border-width: 2px; }

.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

.text-sm { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-6xl { font-size: 3.75rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.uppercase { text-transform: uppercase; }

.leading-relaxed { line-height: 1.625; }

.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-colors { transition-property: color, background-color, border-color; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-opacity { transition-property: opacity; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-shadow { transition-property: box-shadow; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 300ms; }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.duration-200 { transition-duration: 200ms; }
.duration-300 { transition-duration: 300ms; }

.hover\:opacity-80:hover { opacity: 0.8; }
.hover\:opacity-90:hover { opacity: 0.9; }
.hover\:bg-slate-50:hover { background-color: var(--slate-50); }
.hover\:bg-slate-100:hover { background-color: var(--slate-100); }
.hover\:text-white:hover { color: white; }
.hover\:text-primary-600:hover { color: var(--primary-600); }
.hover\:shadow-lg:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05); }
.hover\:-translate-y-1:hover { transform: translateY(-0.25rem); }

.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:ring-2:focus { box-shadow: 0 0 0 2px var(--primary-600); }

/* Animations */
@keyframes bounce {
    0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8, 0, 1, 1); }
    50% { transform: translateY(0); animation-timing-function: cubic-bezier(0, 0, 0.2, 1); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-bounce { animation: bounce 1s infinite; }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.animate-fadeInUp { animation: fadeInUp 0.6s ease-out; }
.animate-fadeInLeft { animation: fadeInLeft 0.6s ease-out; }
.animate-fadeInRight { animation: fadeInRight 0.6s ease-out; }
.animate-scaleIn { animation: scaleIn 0.5s ease-out; }

/* Smooth transitions for all elements */
* {
    transition: all 0.3s ease;
}

/* Hover effects */
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Staggered animations for grid items */
.animate-stagger-1 { animation-delay: 0.1s; }
.animate-stagger-2 { animation-delay: 0.2s; }
.animate-stagger-3 { animation-delay: 0.3s; }
.animate-stagger-4 { animation-delay: 0.4s; }

/* Blog Styles */
.blog-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    overflow: hidden;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    color: var(--primary-600);
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

.read-more-btn:hover {
    color: var(--primary-700);
}

.blog-nav-btn {
    color: var(--slate-600);
    background: transparent;
    border: none;
    cursor: pointer;
}

.blog-nav-btn.active {
    color: white;
    background: var(--primary-600);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.blog-nav-btn:hover:not(.active) {
    color: var(--primary-600);
    background: var(--slate-200);
}

/* Blog Slider Styles */
#blog-slider {
    width: 300%; /* 3 slides */
}

.slider-dot {
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.slider-dot:hover {
    opacity: 0.8;
}

.slider-dot.active {
    opacity: 1;
}

/* Dark mode blog styles */
.dark .blog-card {
    background-color: var(--slate-100);
    border: 1px solid var(--slate-200);
}

.dark .blog-card:hover {
    background-color: var(--slate-200);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
}

.dark .blog-nav-btn {
    color: var(--slate-300);
}

.dark .blog-nav-btn.active {
    color: white;
    background: var(--primary-600);
}

.dark .blog-nav-btn:hover:not(.active) {
    color: var(--primary-500);
    background: var(--slate-200);
}

/* Blog Content Animation */
#blog-full-content {
    transition: all 0.5s ease-in-out;
}

#blog-full-content.show {
    display: block;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* FAQ Accordion Styles */
.faq-item {
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.faq-question {
    cursor: pointer;
    border: none;
    background: transparent;
    outline: none;
    width: 100%;
    transition: all 0.2s ease;
}

.faq-question:hover {
    background-color: var(--slate-50);
}

.faq-question h3 {
    color: var(--slate-900);
    font-weight: 600;
    margin: 0;
}

.faq-question:focus {
    outline: none;
    box-shadow: none;
}

.faq-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    background-color: var(--primary-600);
    color: white;
}

.faq-answer {
    max-height: 0;
    opacity: 0;
    transition: max-height 0.4s ease-in-out, opacity 0.3s ease 0.1s;
    overflow: hidden;
    padding: 0;
    display: block;
}

.faq-item.active .faq-answer {
    opacity: 1;
    max-height: 2000px;
    padding-top: 0;
}

.faq-item.active .faq-answer > div {
    padding: 0 1.5rem 1.5rem 1.5rem !important;
    display: block;
    visibility: visible;
}

.faq-answer > div {
    padding: 0;
    transition: padding 0.3s ease;
}

/* Улучшенное форматирование текста в FAQ */
.faq-answer p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.faq-answer ul {
    margin-top: 0.75rem;
    margin-bottom: 1rem;
}

.faq-answer li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Enhanced FAQ animations */
.faq-item.active {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--slate-200);
}

.faq-item.active .faq-question {
    background-color: transparent;
    color: inherit;
}

.faq-item.active .faq-question h3 {
    color: var(--slate-900);
    font-weight: 600;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    background-color: var(--primary-100);
}

/* Dark mode FAQ styles */
.dark .faq-item {
    background-color: var(--slate-100);
    border-color: var(--slate-200);
}

/* News Slider Styles */
.news-slider-container {
    position: relative;
}

.news-slider-wrapper {
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.news-slider {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.news-slide {
    min-height: 300px;
    display: flex;
    align-items: stretch;
    transition: all 0.4s ease-in-out;
    width: 100%;
}

.news-slide.hidden {
    display: none !important;
}

.news-slide.expanded {
    width: 100% !important;
    min-width: 100% !important;
}

.news-slide > div {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Сетка новостей - три колонки на десктопе */
#news-slider-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    transition: all 0.4s ease-in-out;
}

@media (max-width: 768px) {
    #news-slider-track {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Расширенное состояние - один слайд на всю ширину страницы */
#news-slider-track.news-expanded {
    grid-template-columns: 1fr !important;
    gap: 0;
    width: 100%;
}

#news-slider-container.news-expanded {
    max-width: 100%;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

/* Растягиваем секцию новостей на всю ширину при расширенном состоянии */
section.news-section-expanded .container {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

#news-slider-container.news-expanded .news-slide.expanded {
    width: 100% !important;
    max-width: 100%;
    margin: 0;
}

#news-slider-container.news-expanded .news-slide.expanded .news-card {
    margin: 0;
    border-radius: 0;
    max-width: 100%;
    width: 100%;
}

/* Кнопка "показать все" */
#news-show-all-container {
    animation: fadeIn 0.3s ease;
}

#news-show-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

@media (min-width: 769px) {
    #news-slider-track {
        gap: 2.5rem;
    }
    
    #news-slider-container.news-expanded {
        max-width: 100%;
    }
    
    #news-slider-container.news-expanded .news-slide.expanded .news-card {
        padding: 2rem;
    }
}

/* Мобильная версия */
@media (max-width: 768px) {
    .news-slide {
        width: 100% !important;
        flex-shrink: 0;
        margin-bottom: 0;
    }
    
    #news-slider-container.news-expanded {
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }
    
    #news-slider-container.news-expanded .news-slide.expanded .news-card {
        margin: 0;
        border-radius: 0;
        padding: 1.5rem;
    }
    
    .news-slide:last-child {
        margin-bottom: 0;
    }
    
    /* Убираем горизонтальные отступы у карточек на мобильных */
    .news-card {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Расширенное состояние на мобильных */
    #news-slider-container.news-expanded {
        max-width: 100%;
    }
    
    .news-slide.expanded .news-card-content {
        padding: 1.25rem;
    }
}

/* Новые стили для улучшенных карточек новостей */
.news-card {
    background: white;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--slate-200);
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: var(--primary-200);
}

/* Изображение карточки */
.news-card-image {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
}

.news-image-gradient {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.news-gradient-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 50%, #1e40af 100%);
}

.news-gradient-green {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 50%, #15803d 100%);
}

.news-gradient-slate {
    background: linear-gradient(135deg, #64748b 0%, #475569 50%, #334155 100%);
}

.news-image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 1;
}

.news-icon {
    font-size: 4rem;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    animation: float 3s ease-in-out infinite;
}

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

.news-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 3;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.news-badge-primary {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-700);
}

.news-badge-green {
    background: rgba(255, 255, 255, 0.95);
    color: #15803d;
}

.news-badge-slate {
    background: rgba(255, 255, 255, 0.95);
    color: var(--slate-700);
}

/* Контент карточки */
.news-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 1rem;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--slate-500);
}

.news-date {
    font-weight: 500;
}

.news-read-time {
    position: relative;
    padding-left: 0.75rem;
}

.news-read-time::before {
    content: '•';
    position: absolute;
    left: 0;
}

.news-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--slate-900);
    line-height: 1.3;
    margin: 0;
    transition: color 0.3s ease;
}

.news-card:hover .news-title {
    color: var(--primary-600);
}

.news-excerpt {
    color: var(--slate-600);
    line-height: 1.6;
    font-size: 0.9375rem;
    flex-grow: 1;
}

/* Полный контент */
.news-full-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease-in-out, opacity 0.3s ease-in-out, margin 0.3s ease;
    margin: 0;
}

.news-full-content:not(.hidden) {
    max-height: 2000px;
    opacity: 1;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

/* Расширенная карточка - больше места для контента */
.news-slide.expanded .news-card {
    max-width: 100%;
}

.news-slide.expanded .news-card-content {
    padding: 1.5rem;
}

.news-full-text {
    color: var(--slate-600);
    line-height: 1.7;
    font-size: 0.9375rem;
}

.news-full-text p {
    margin-bottom: 1rem;
}

.news-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.news-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--slate-600);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.news-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-600);
    font-weight: bold;
    font-size: 1rem;
}

/* Футер карточки */
.news-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--slate-200);
    margin-top: auto;
}

.news-read-more-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--primary-50);
    color: var(--primary-600);
    border: none;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    z-index: 10;
    pointer-events: auto;
    transition: all 0.3s ease;
    gap: 0.5rem;
    position: relative;
    z-index: 10;
    pointer-events: auto;
}

.news-read-more-btn:hover {
    background: var(--primary-100);
    color: var(--primary-700);
    transform: translateX(4px);
}

.news-read-more-btn svg {
    transition: transform 0.3s ease;
}

.news-read-more-btn:hover svg {
    transform: translateX(4px);
}

.news-prev-btn,
.news-next-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.news-prev-btn:hover,
.news-next-btn:hover {
    transform: translateY(-2px);
    border-color: var(--primary-200);
}

.news-prev-btn:active,
.news-next-btn:active {
    transform: translateY(0);
}

.news-dot {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.news-dot:hover {
    transform: scale(1.2);
    border-color: var(--primary-300);
}

.news-dot.active {
    background-color: var(--primary-600);
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* News item animations */
.news-slide {
    animation: slideIn 0.6s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Удалены дублирующие стили - используются новые стили выше */

/* Responsive news slider */
@media (max-width: 768px) {
    .news-slide {
        min-height: auto;
    }
    
    .news-card {
        margin: 0 0.5rem;
    }
    
    .news-card-image {
        height: 200px;
    }
    
    .news-icon {
        font-size: 3rem;
    }
    
    .news-badge {
        top: 0.75rem;
        right: 0.75rem;
        padding: 0.375rem 0.75rem;
        font-size: 0.6875rem;
    }
    
    .news-card-content {
        padding: 1.25rem;
    }
    
    .news-title {
        font-size: 1.25rem;
    }
    
    .news-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .news-read-more-btn {
        width: auto;
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
        justify-content: center;
    }
    
    .news-author-avatar {
        width: 2rem;
        height: 2rem;
        font-size: 0.75rem;
    }
    
    .news-prev-btn,
    .news-next-btn {
        padding: 0.75rem;
    }
    
    .news-dot {
        width: 0.5rem;
        height: 0.5rem;
    }
}

@media (max-width: 480px) {
    .news-card-image {
        height: 180px;
    }
    
    .news-icon {
        font-size: 2.5rem;
    }
    
    .news-card-content {
        padding: 1rem;
    }
    
    .news-title {
        font-size: 1.125rem;
    }
    
    .news-excerpt {
        font-size: 0.875rem;
    }
}

/* Dark mode news styles */
.dark .news-slider-wrapper {
    background-color: var(--slate-800);
    border: 1px solid var(--slate-700);
}

.dark .news-slide > div {
    background-color: var(--slate-800);
    border: 1px solid var(--slate-700);
}

.dark .news-card {
    background-color: var(--slate-100);
    border-color: var(--slate-200);
}

.dark .news-card:hover {
    border-color: var(--primary-400);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.1);
}

.dark .news-title {
    color: var(--slate-50);
}

.dark .news-card:hover .news-title {
    color: var(--primary-400);
}

.dark .news-excerpt,
.dark .news-full-text {
    color: var(--slate-300);
}

.dark .news-meta {
    color: var(--slate-400);
}

.dark .news-author-name {
    color: var(--slate-300);
}

.dark .news-footer {
    border-color: var(--slate-200);
}

.dark .news-read-more-btn {
    background: var(--slate-200);
    color: var(--primary-400);
}

.dark .news-read-more-btn:hover {
    background: var(--slate-300);
    color: var(--primary-300);
}

.dark .news-list li {
    color: var(--slate-300);
}

.dark .news-list li::before {
    color: var(--primary-400);
}

.dark .news-prev-btn,
.dark .news-next-btn {
    background-color: var(--slate-700);
    border-color: var(--slate-600);
}

.dark .news-prev-btn:hover,
.dark .news-next-btn:hover {
    background-color: var(--slate-600);
    border-color: var(--primary-400);
}

.dark .news-dot {
    background-color: var(--slate-500);
}

.dark .news-dot:hover {
    background-color: var(--primary-400);
}

.dark .news-dot.active {
    background-color: var(--primary-500);
}

.dark .faq-item:hover {
    background-color: var(--slate-200);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
}

.dark .faq-question:hover {
    background-color: var(--slate-200);
}

.dark .faq-icon {
    background-color: var(--slate-200);
    color: var(--primary-500);
}

.dark .faq-question h3 {
    color: var(--slate-200);
}

.dark .faq-answer p {
    color: var(--slate-300);
}

/* Form Styles */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--slate-300);
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-600);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-700);
    margin-bottom: 0.5rem;
}

/* FAQ Styles - удалены дублирующие стили, используются основные стили выше */

/* Form Message */
#form-message.success {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

#form-message.error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Object Fit */
.object-cover {
    object-fit: cover;
}

.overflow-hidden {
    overflow: hidden;
}

/* Language Switcher */
.lang-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--slate-300);
    background-color: white;
    color: var(--slate-600);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.lang-btn:hover {
    background-color: var(--slate-50);
    border-color: var(--primary-600);
}

.lang-btn.active {
    background-color: var(--primary-600);
    color: white;
    border-color: var(--primary-600);
}

.lang-btn.active:hover {
    background-color: var(--primary-700);
}

/* Theme Toggle Button - Same style as language buttons */
#theme-toggle,
#mobile-theme-toggle {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--slate-300);
    background-color: white;
    color: var(--slate-600);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.25rem;
}

#theme-toggle:hover,
#mobile-theme-toggle:hover {
    background-color: var(--slate-50);
    border-color: var(--primary-600);
}

#theme-toggle.active,
#mobile-theme-toggle.active {
    background-color: var(--primary-600);
    color: white;
    border-color: var(--primary-600);
}

#theme-toggle.active:hover,
#mobile-theme-toggle.active:hover {
    background-color: var(--primary-700);
}

/* Dark Mode Styles */
.dark {
    --slate-50: #0f172a;
    --slate-100: #1e293b;
    --slate-200: #334155;
    --slate-300: #475569;
    --slate-400: #64748b;
    --slate-500: #94a3b8;
    --slate-600: #cbd5e1;
    --slate-700: #e2e8f0;
    --slate-800: #f1f5f9;
    --slate-900: #f8fafc;
}

.dark body {
    background-color: var(--slate-50);
    color: var(--slate-800);
}

.dark .card {
    background-color: var(--slate-100);
    border-color: var(--slate-200);
    color: var(--slate-700);
}

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

.dark .btn:hover {
    background-color: var(--primary-700);
}

.dark .btn-secondary {
    background-color: var(--slate-100);
    border-color: var(--slate-300);
    color: var(--slate-600);
}

.dark .btn-secondary:hover {
    background-color: var(--slate-200);
}

.dark .lang-btn {
    background-color: var(--slate-100);
    border-color: var(--slate-300);
    color: var(--slate-600);
}

.dark .lang-btn:hover {
    background-color: var(--slate-200);
    border-color: var(--primary-600);
}

.dark .lang-btn.active {
    background-color: var(--primary-600);
    color: white;
    border-color: var(--primary-600);
}

.dark #theme-toggle,
.dark #mobile-theme-toggle {
    background-color: var(--slate-100);
    border-color: var(--slate-300);
    color: var(--slate-600);
}

.dark #theme-toggle:hover,
.dark #mobile-theme-toggle:hover {
    background-color: var(--slate-200);
    border-color: var(--primary-600);
}

.dark #theme-toggle.active,
.dark #mobile-theme-toggle.active {
    background-color: var(--primary-600);
    color: white;
    border-color: var(--primary-600);
}

.dark #theme-toggle.active:hover,
.dark #mobile-theme-toggle.active:hover {
    background-color: var(--primary-700);
}

.dark input[type="text"],
.dark input[type="email"],
.dark input[type="tel"],
.dark textarea {
    background-color: var(--slate-100);
    border-color: var(--slate-300);
    color: var(--slate-700);
}

.dark input:focus,
.dark textarea:focus {
    border-color: var(--primary-600);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

.dark label {
    color: var(--slate-600);
}

.dark header {
    background-color: rgba(15, 23, 42, 0.95);
    border-color: var(--slate-200);
}

.dark #mobile-menu {
    background-color: var(--slate-100);
    border-color: var(--slate-200);
}

.dark footer {
    background-color: var(--slate-50);
}

.dark .text-slate-400 {
    color: var(--slate-500);
}

.dark .text-slate-500 {
    color: var(--slate-400);
}

.dark .text-slate-600 {
    color: var(--slate-300);
}

.dark .text-slate-700 {
    color: var(--slate-200);
}

.dark .text-slate-800 {
    color: var(--slate-100);
}

.dark .text-slate-900 {
    color: var(--slate-50);
}

/* Team card hover effects */
.team-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.dark .team-card:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Fix dark mode text visibility */
.dark .text-slate-600 {
    color: var(--slate-300);
}

.dark .text-slate-700 {
    color: var(--slate-200);
}

.dark .text-slate-800 {
    color: var(--slate-100);
}

.dark .text-slate-900 {
    color: var(--slate-50);
}

/* Ensure proper contrast in dark mode */
.dark .card {
    background-color: var(--slate-100);
    border-color: var(--slate-200);
}

.dark .card:hover {
    background-color: var(--slate-200);
}

/* Dark mode section backgrounds */
.dark .section {
    background-color: var(--slate-50);
}

.dark .section.bg-white {
    background-color: var(--slate-100);
}

.dark .section.bg-slate-50 {
    background-color: var(--slate-100);
}

/* SVG Animation Styles */
.house-animation {
    animation: houseGlow 4s ease-in-out infinite;
}

.scales-animation {
    animation: scalesFloat 3s ease-in-out infinite;
}

.document-animation {
    animation: documentShake 2.5s ease-in-out infinite;
}

.euro-animation {
    animation: euroRotate 3.5s ease-in-out infinite;
}

.check-animation {
    animation: checkPulse 2s ease-in-out infinite;
}

@keyframes houseGlow {
    0%, 100% { 
        filter: brightness(1) drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
    }
    50% { 
        filter: brightness(1.2) drop-shadow(0 0 10px rgba(255, 255, 255, 0.6));
    }
}

@keyframes scalesFloat {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg);
    }
    25% { 
        transform: translate(2px, -2px) rotate(1deg);
    }
    75% { 
        transform: translate(-2px, 2px) rotate(-1deg);
    }
}

@keyframes documentShake {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg);
    }
    20% { 
        transform: translate(1px, 0) rotate(0.5deg);
    }
    40% { 
        transform: translate(-1px, 0) rotate(-0.5deg);
    }
    60% { 
        transform: translate(1px, 0) rotate(0.5deg);
    }
    80% { 
        transform: translate(-1px, 0) rotate(-0.5deg);
    }
}

@keyframes euroRotate {
    0%, 100% { 
        transform: rotate(0deg) scale(1);
    }
    50% { 
        transform: rotate(5deg) scale(1.1);
    }
}

@keyframes checkPulse {
    0%, 100% { 
        transform: scale(1);
        filter: brightness(1);
    }
    50% { 
        transform: scale(1.1);
        filter: brightness(1.3);
    }
}

/* Calendly Widget Styles */
.calendly-container {
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

.calendly-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 32px 64px -12px rgba(0, 0, 0, 0.3);
}

.calendly-header {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.calendly-embed-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.calendly-iframe {
    border: none;
    width: 100%;
    height: 100%;
    border-radius: 0;
    transition: opacity 0.3s ease;
}

.calendly-iframe:not([src=""]) {
    opacity: 1;
}

.calendly-fallback {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 400px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
}

.calendly-fallback.hidden {
    display: none;
}

/* Responsive Calendly */
@media (max-width: 768px) {
    .calendly-embed-container {
        height: 400px;
    }
    
    .calendly-container {
        margin: 0 1rem;
    }
    
    .calendly-header {
        padding: 0.75rem;
    }
    
    .calendly-header h3 {
        font-size: 1rem;
    }
    
    .calendly-header p {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .calendly-embed-container {
        height: 350px;
    }
    
    .calendly-fallback {
        height: 300px;
        padding: 1rem;
    }
}

/* Dark mode for Calendly */
.dark .calendly-container {
    background-color: var(--slate-100);
    border: 1px solid var(--slate-200);
}

.dark .calendly-fallback {
    background: linear-gradient(135deg, var(--slate-100), var(--slate-200));
}

.dark .calendly-fallback h4 {
    color: var(--slate-800);
}

.dark .calendly-fallback p {
    color: var(--slate-600);
}

/* Loading state for iframe */
.calendly-iframe[src=""] {
    opacity: 0;
}

/* Calendly inline widget styles */
.calendly-inline-widget {
    width: 100%;
    height: 100%;
    min-height: 500px;
}

/* Индикатор загрузки */
.calendly-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    z-index: 10;
    transition: opacity 0.3s ease;
}

.calendly-loading.hidden {
    display: none;
}

.calendly-embed-container::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid var(--primary-200);
    border-top: 3px solid var(--primary-600);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Скрываем индикатор загрузки когда Calendly загружен */
.calendly-embed-container.calendly-loaded::before {
    display: none;
    opacity: 0;
    visibility: hidden;
}

.calendly-iframe:not([src=""]) + .calendly-embed-container::before {
    display: none;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* SVG hover effects */
.house-animation:hover {
    animation-duration: 1s;
}

.scales-animation:hover {
    animation-duration: 1.5s;
}

/* Map Container Styles */
.map-container {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.map-container:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(-2px);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 0.75rem;
}

/* Contact Info Styles */
.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--slate-200);
    transition: all 0.2s ease;
}

.contact-info-item:last-child {
    border-bottom: none;
}

.contact-info-item:hover {
    background-color: var(--slate-50);
    padding-left: 0.5rem;
    border-radius: 0.5rem;
}

.contact-info-icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--primary-600);
    margin-top: 0.125rem;
}

.contact-info-content h4 {
    font-weight: 600;
    color: var(--slate-800);
    margin-bottom: 0.25rem;
}

.contact-info-content p {
    color: var(--slate-600);
    font-size: 0.875rem;
}

/* Dark mode for contact section */
.dark .contact-info-item {
    border-color: var(--slate-200);
}

.dark .contact-info-item:hover {
    background-color: var(--slate-200);
}

.dark .contact-info-content h4 {
    color: var(--slate-100);
}

.dark .contact-info-content p {
    color: var(--slate-300);
}

/* Responsive map */
@media (max-width: 768px) {
    .map-container {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .map-container {
        height: 250px;
    }
}

/* Responsive utilities */
@media (min-width: 640px) {
    .sm\:flex-row { flex-direction: row; }
    .sm\:px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
}

@media (min-width: 768px) {
    .md\:hidden { display: none; }
    .md\:flex { display: flex; }
    .md\:text-4xl { font-size: 2.25rem; }
    .md\:text-5xl { font-size: 3rem; }
}

@media (min-width: 1024px) {
    .lg\:px-8 { padding-left: 2rem; padding-right: 2rem; }
    .lg\:text-6xl { font-size: 3.75rem; }
}

/* Мобильная адаптивность - улучшения */
@media (max-width: 768px) {
    /* Улучшаем отступы контейнера на мобильных */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Улучшаем размеры заголовков на мобильных */
    .heading-1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .heading-2 {
        font-size: 1.75rem;
        margin-bottom: 1.25rem;
    }
    
    .heading-3 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    /* Улучшаем секции на мобильных */
    .section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    /* Улучшаем карточки на мобильных */
    .card {
        padding: 1.25rem;
    }
    
    /* Улучшаем кнопки на мобильных */
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
        width: 100%;
        justify-content: center;
    }
    
    .btn-secondary {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
        width: 100%;
        justify-content: center;
    }
    
    /* Улучшаем логотип на мобильных */
    .logo-text {
        font-size: 1.25rem;
    }
    
    header .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Улучшаем хедер на мобильных */
    header img {
        height: 2.5rem;
    }
    
    /* Улучшаем переключатели языка на мобильных */
    .lang-btn {
        padding: 0.5rem 0.625rem;
        font-size: 0.8125rem;
    }
    
    /* Улучшаем формы на мобильных */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea {
        padding: 0.875rem 1rem;
        font-size: 1rem; /* Предотвращаем зум на iOS */
    }
    
    /* Улучшаем FAQ на мобильных */
    .faq-question {
        padding: 1rem 1.25rem;
    }
    
    .faq-question h3 {
        font-size: 1.125rem;
    }
    
    .faq-item.active .faq-answer > div {
        padding: 0 1.25rem 1.25rem 1.25rem !important;
    }
    
    /* Улучшаем контактную секцию на мобильных */
    .map-container {
        height: 300px;
        margin-bottom: 1.5rem;
    }
    
    /* Улучшаем сетки на мобильных */
    .grid.md\:grid-cols-2,
    .grid.md\:grid-cols-3,
    .grid.lg\:grid-cols-2,
    .grid.lg\:grid-cols-4 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Улучшаем hero секцию на мобильных */
    #hero .container {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    /* Улучшаем Calendly на мобильных */
    .calendly-container {
        margin: 0;
        border-radius: 1rem;
    }
    
    /* Улучшаем footer на мобильных */
    footer .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    footer .grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    /* Дополнительные улучшения для очень маленьких экранов */
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .heading-1 {
        font-size: 1.75rem;
    }
    
    .heading-2 {
        font-size: 1.5rem;
    }
    
    .section {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }
    
    .card {
        padding: 1rem;
    }
    
    .logo-text {
        font-size: 1.125rem;
    }
    
    header img {
        height: 2.25rem;
    }
    
    /* Скрываем переключатели языка на очень маленьких экранах в хедере */
    header .flex.items-center.gap-4 {
        gap: 0.5rem;
    }
    
    .lang-btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Улучшаем мобильное меню на очень маленьких экранах */
    .mobile-menu-item {
        width: calc(100% - 2rem);
        padding: 0.875rem 1.25rem;
        font-size: 0.9375rem;
    }
    
    .mobile-menu-container {
        padding: 1rem 0;
        gap: 0.5rem;
    }
}

/* Scroll to Top Button */
.scroll-to-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top-btn:hover {
    background: linear-gradient(135deg, var(--primary-700), var(--primary-800));
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
    transform: translateY(-2px);
}

.scroll-to-top-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.scroll-to-top-btn svg {
    width: 1.5rem;
    height: 1.5rem;
}

/* Dark mode для кнопки */
.dark .scroll-to-top-btn {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.dark .scroll-to-top-btn:hover {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Responsive для кнопки */
@media (max-width: 768px) {
    .scroll-to-top-btn {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 3rem;
        height: 3rem;
    }
    
    .scroll-to-top-btn svg {
        width: 1.25rem;
        height: 1.25rem;
    }
}

@media (max-width: 480px) {
    .scroll-to-top-btn {
        bottom: 1rem;
        right: 1rem;
        width: 2.75rem;
        height: 2.75rem;
    }
}

/* Privacy Policy Modal */
.privacy-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.privacy-modal.active {
    display: flex;
}

.privacy-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.privacy-modal-content {
    position: relative;
    background: white;
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    z-index: 10000;
}

.dark .privacy-modal-content {
    background: var(--slate-800);
    color: var(--slate-100);
}

.privacy-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--slate-200);
}

.dark .privacy-modal-header {
    border-bottom-color: var(--slate-700);
}

.privacy-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--slate-900);
    margin: 0;
}

.dark .privacy-modal-title {
    color: var(--slate-100);
}

.privacy-modal-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    color: var(--slate-600);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.privacy-modal-close:hover {
    background: var(--slate-100);
    color: var(--slate-900);
}

.dark .privacy-modal-close {
    color: var(--slate-400);
}

.dark .privacy-modal-close:hover {
    background: var(--slate-700);
    color: var(--slate-100);
}

.privacy-modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.privacy-content {
    line-height: 1.8;
    color: var(--slate-700);
}

.dark .privacy-content {
    color: var(--slate-300);
}

.privacy-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--slate-900);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.dark .privacy-content h3 {
    color: var(--slate-100);
}

.privacy-content h3:first-child {
    margin-top: 0;
}

.privacy-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--slate-800);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.dark .privacy-content h4 {
    color: var(--slate-200);
}

.privacy-content p {
    margin-bottom: 1rem;
    color: var(--slate-700);
}

.dark .privacy-content p {
    color: var(--slate-300);
}

.privacy-content ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    list-style-type: disc;
}

.privacy-content li {
    margin-bottom: 0.5rem;
    color: var(--slate-700);
}

.dark .privacy-content li {
    color: var(--slate-300);
}

.privacy-content strong {
    font-weight: 600;
    color: var(--slate-900);
}

.dark .privacy-content strong {
    color: var(--slate-100);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive для модального окна */
@media (max-width: 768px) {
    .privacy-modal-content {
        max-height: 95vh;
        border-radius: var(--radius-lg);
    }
    
    .privacy-modal-header {
        padding: 1rem 1.5rem;
    }
    
    .privacy-modal-title {
        font-size: 1.25rem;
    }
    
    .privacy-modal-body {
        padding: 1.5rem;
    }
    
    .privacy-content h3 {
        font-size: 1.1rem;
    }
    
    .privacy-content h4 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .privacy-modal {
        padding: 0.5rem;
    }
    
    .privacy-modal-content {
        max-height: 98vh;
        border-radius: var(--radius-md);
    }
    
    .privacy-modal-header {
        padding: 0.75rem 1rem;
    }
    
    .privacy-modal-body {
        padding: 1rem;
    }
}

/* Стили для кнопки Datenschutz в футере */
#privacy-modal-btn {
    font-size: inherit;
    font-family: inherit;
    text-decoration: none;
    padding: 0;
    margin: 0;
}

#privacy-modal-btn:hover {
    text-decoration: underline;
}


