/* StyleDB.css - Темная тема для страницы баз данных */

/* Базовые переменные для темной темы */
:root {
    --dark-bg: #0f172a;
    --dark-card: #1e293b;
    --dark-text: #f1f5f9;
    --dark-text-secondary: #94a3b8;
    --dark-border: #334155;
    --accent-color: #3b82f6;
    --accent-hover: #2563eb;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --radius: 12px;
    --shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Общие стили для темной темы */
.dark-theme {
    background-color: var(--dark-bg);
    color: var(--dark-text);
    min-height: 100vh;
}

.dark-theme a {
    color: #fffff;
    transition: color 0.3s ease;
}

.dark-theme a:hover {
    color: var(--accent-hover);
}

/* Хедер в темной теме */
.dark-header {
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--dark-border);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

.dark-header .nav-menu a {
    color: var(--dark-text);
}

.dark-header .nav-menu a:hover,
.dark-header .nav-menu a.active {
    color: var(--accent-color);
}

.dark-header .phone-link {
    background-color: var(--accent-color);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius);
}

.dark-header .phone-link:hover {
    background-color: var(--accent-hover);
    color: white;
}

/* Дропдаун меню */
.dark-dropdown {
    background-color: var(--dark-card);
    border: 1px solid var(--dark-border);
    box-shadow: var(--shadow);
}

.dark-dropdown a {
    color: var(--dark-text);
}

.dark-dropdown a:hover {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
}

/* Герой секция */
.dark-hero {
    background: linear-gradient(135deg, #01050e, #072a9a);
    padding-top: 100px;
    padding-bottom: 80px;
    position: relative;
    overflow: hidden;
}

.dark-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
}

.dark-hero .hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, #e3e7e7, #b21fbe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dark-hero .hero-subtitle {
    font-size: 1.25rem;
    color: #fffff;
    max-width: 800px;
    margin: 0 auto 2rem;
}

/* Секции в темной теме */
.dark-section {
    padding: 80px 0;
    background-color: var(--dark-bg);
}

.dark-section .section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--dark-text);
}

.dark-section .section-subtitle {
    font-size: 1.1rem;
    color: var(--dark-text-secondary);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Карточки в темной теме */
.dark-card {
    background-color: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius);
    padding: 30px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
}

.dark-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--accent-color);
}

/* Карточки услуг */
.service-card.dark-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card .service-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    color: white;
}

.accent-bg {
    background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
}

.service-card .service-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-text);
}

.service-card .service-desc {
    color: var(--dark-text-secondary);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.service-features {
    margin-bottom: 1.5rem;
}

.service-features p {
    color: var(--dark-text);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.service-features i {
    color: var(--success-color);
    margin-right: 10px;
}

/* Теги технологий */
.tech-tag.dark-tag {
    background-color: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid rgba(59, 130, 246, 0.3);
    margin-right: 8px;
    margin-bottom: 8px;
    display: inline-block;
}

/* Технологический стек */
.tech-section {
    background-color: #0c1425;
}

.tech-stack {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.tech-item {
    text-align: center;
    padding: 25px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tech-item .tech-icon {
    font-size: 48px;
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.tech-item:hover .tech-icon {
    transform: scale(1.1);
}

.tech-item h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--dark-text);
}

.tech-item p {
    font-size: 0.9rem;
    color: var(--dark-text-secondary);
    line-height: 1.4;
}

/* Процесс и гарантии */
.process-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.process-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.process-step {
    position: relative;
    text-align: center;
}

.process-step .step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 20px;
}

.process-step h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark-text);
}

.process-step p {
    color: var(--dark-text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.guarantees-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.guarantee-item {
    text-align: center;
    padding: 30px 20px;
}

.guarantee-icon {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.guarantee-item h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark-text);
}

.guarantee-item p {
    color: var(--dark-text-secondary);
    line-height: 1.5;
}

/* Проблемы и решения */
.problem-solution {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 40px;
}

@media (max-width: 768px) {
    .problem-solution {
        grid-template-columns: 1fr;
    }
}

.dark-problem,
.dark-solution {
    padding: 35px;
    border-radius: var(--radius);
    position: relative;
    overflow: hidden;
}

.dark-problem {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(239, 68, 68, 0.05) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.dark-problem h3 {
    color: #f87171;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dark-solution {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.dark-solution h3 {
    color: #34d399;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dark-problem ul,
.dark-solution ul {
    list-style: none;
    padding: 0;
}

.dark-problem li,
.dark-solution li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    padding-left: 25px;
}

.dark-problem li:last-child,
.dark-solution li:last-child {
    border-bottom: none;
}

.dark-problem li::before {
    content: '✗';
    position: absolute;
    left: 0;
    color: #f87171;
    font-weight: bold;
}

.dark-solution li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #34d399;
    font-weight: bold;
}

/* Кейсы */
.cases-section {
    background-color: #0c1425;
}

.result-box {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 20px;
    border-radius: var(--radius);
    margin-top: 20px;
}

.result-box p {
    margin: 0;
    color: #34d399;
}

/* FAQ */
.faq-section {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.faq-item {
    padding: 30px;
}

.faq-question {
    font-size: 1.2rem;
    color: var(--dark-text);
    margin-bottom: 15px;
    position: relative;
    padding-left: 30px;
}

.faq-question::before {
    content: '?';
    position: absolute;
    left: 0;
    top: 0;
    width: 24px;
    height: 24px;
    background-color: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: bold;
}

.faq-answer {
    color: var(--dark-text-secondary);
    line-height: 1.6;
    padding-left: 30px;
}

/* CTA секция */
.dark-cta {
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.dark-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 0%, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
}

.cta-title {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: white;
}

.cta-text {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #00d4ff), #af45e1);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
    color: white;
}

.btn-secondary {
    background-color: transparent;
    color: var(--dark-text);
    border: 2px solid var(--dark-border);
}

.btn-secondary:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
}

.btn-large {
    padding: 18px 42px;
    font-size: 1.1rem;
}

/* Футер */
.dark-footer {
    background-color: #0c1425;
    border-top: 1px solid var(--dark-border);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col .logo {
    margin-bottom: 20px;
    display: inline-block;
}

.footer-desc {
    color: var(--dark-text-secondary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--dark-card);
    border-radius: 50%;
    color: var(--dark-text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--accent-color);
    color: white;
    transform: translateY(-3px);
}

.footer-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--dark-text);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--dark-text-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-links a.active {
    color: var(--accent-color);
    font-weight: 600;
}

.footer-contacts {
    list-style: none;
    padding: 0;
}

.footer-contacts li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    color: var(--dark-text-secondary);
}

.footer-contacts i {
    margin-right: 10px;
    color: var(--accent-color);
    width: 20px;
}

.footer-contacts a {
    color: var(--dark-text-secondary);
    text-decoration: none;
}

.footer-contacts a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid var(--dark-border);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    color: var(--dark-text-secondary);
    font-size: 0.9rem;
}

.footer-bottom .footer-links {
    display: flex;
    gap: 20px;
}

/* Адаптивность */
@media (max-width: 992px) {
    .dark-hero .hero-title {
        font-size: 2.8rem;
    }
    
    .tech-stack {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .process-timeline {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .dark-hero .hero-title {
        font-size: 2.3rem;
    }
    
    .dark-section .section-title {
        font-size: 2rem;
    }
    
    .process-timeline {
        grid-template-columns: 1fr;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .dark-hero {
        padding-top: 140px;
        padding-bottom: 60px;
    }
    
    .dark-hero .hero-title {
        font-size: 2rem;
    }
    
    .tech-stack {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .guarantees-grid {
        grid-template-columns: 1fr;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* Анимированная герой-секция */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-animation {
        order: -1;
    }
}

.hero-content {
    max-width: 600px;
}

.hero-facts {
    display: flex;
    gap: 30px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.fact {
    text-align: center;
}

.fact-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.fact-text {
    display: block;
    font-size: 0.9rem;
    color: var(--dark-text-secondary);
    margin-top: 5px;
}

/* Анимация баз данных */
.db-animation {
    position: relative;
    height: 400px;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
    border-radius: 20px;
    border: 1px solid var(--dark-border);
    padding: 30px;
    overflow: hidden;
}

/* Серверы */
.server {
    position: absolute;
    width: 100px;
    text-align: center;
}

.server-body {
    width: 80px;
    height: 120px;
    background: linear-gradient(135deg, #1e293b, #334155);
    border-radius: 10px;
    margin: 0 auto 15px;
    position: relative;
    border: 2px solid rgba(59, 130, 246, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.server-light {
    position: absolute;
    width: 12px;
    height: 12px;
    background-color: #10b981;
    border-radius: 50%;
    bottom: 15px;
    animation: pulse 1.5s infinite ease-in-out;
}

.server-light:nth-child(1) { left: 20px; }
.server-light:nth-child(2) { left: 34px; }
.server-light:nth-child(3) { left: 48px; }

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.server-label {
    color: var(--dark-text);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Позиционирование серверов */
.server:nth-child(1) {
    top: 80px;
    left: 50px;
}

.replica {
    top: 80px;
    right: 50px;
}

/* Облако */
.cloud {
    position: absolute;
    top: 50px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.cloud-icon {
    font-size: 60px;
    color: #3b82f6;
    margin-bottom: 10px;
    animation: float 3s infinite ease-in-out;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.cloud-label {
    color: var(--dark-text);
    font-size: 0.9rem;
}

/* Иконки БД */
.db-icon {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: float 4s infinite ease-in-out;
}

.db-icon i {
    font-size: 32px;
    margin-bottom: 8px;
}

.db-label {
    font-size: 0.8rem;
    color: var(--dark-text-secondary);
    background: rgba(30, 41, 59, 0.8);
    padding: 2px 8px;
    border-radius: 10px;
    white-space: nowrap;
}

.postgresql {
    top: 200px;
    left: 40px;
    color: #336791;
    animation-delay: 0.5s;
}

.mongodb {
    top: 250px;
    left: 50%;
    transform: translateX(-50%);
    color: #47a248;
    animation-delay: 1s;
}

.sqlserver {
    top: 200px;
    right: 40px;
    color: #cc2927;
    animation-delay: 1.5s;
}

/* Потоки данных */
.data-flow {
    position: absolute;
    background: linear-gradient(90deg, transparent, #3b82f6, transparent);
    height: 2px;
    animation: flow 3s linear infinite;
}

.data-flow-1 {
    top: 140px;
    left: 140px;
    width: 200px;
    animation-delay: 0s;
}

.data-flow-2 {
    top: 140px;
    left: 360px;
    width: 200px;
    animation-delay: 1s;
}

.data-flow-3 {
    top: 140px;
    left: 200px;
    width: 200px;
    animation-delay: 2s;
}

@keyframes flow {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    10%, 90% {
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Статистика в реальном времени */
.live-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 30px;
}

.stat-item {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9));
    border: 1px solid var(--dark-border);
    border-radius: 15px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.stat-item:hover {
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--dark-text-secondary);
    margin-top: 5px;
}

/* Анимация чисел */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#queries-value, #data-value {
    animation: countUp 1s ease-out;
}

/* Дополнительные стили для заголовка */
.hero-title {
    position: relative;
    display: inline-block;
}

.hero-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), #8b5cf6);
    border-radius: 2px;
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .hero-grid {
        gap: 30px;
    }
    
    .db-animation {
        height: 300px;
        padding: 20px;
    }
    
    .server-body {
        width: 60px;
        height: 90px;
    }
    
    .server-light {
        width: 8px;
        height: 8px;
    }
    
    .server:nth-child(1) {
        left: 20px;
    }
    
    .replica {
        right: 20px;
    }
    
    .cloud-icon {
        font-size: 40px;
    }
    
    .db-icon i {
        font-size: 24px;
    }
    
    .db-label {
        font-size: 0.7rem;
    }
    
    .live-stats {
        grid-template-columns: 1fr;
    }
    
    .hero-facts {
        flex-direction: column;
        gap: 20px;
    }
    
    .fact-number {
        font-size: 1.5rem;
    }
}

.nav-menu > li > a {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 800;
    font-size: 0.8rem;
    transition: var(--transition);
    position: relative;
    padding: 8px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

