/* 
 * Объединенный базовый CSS файл для домашней страницы Garantiks
 * Включает базовые стили, общие для всех устройств
 */

/* Удалены стили для хедера и футера, т.к. они наследуются из унифицированных шаблонов */

/* КРИТИЧЕСКИ ВАЖНЫЕ ПРАВИЛА Z-INDEX */
section .container,
section .section-header,
section .section-title,
section .section-subtitle,
section .section-label,
section .card,
.favorite-card,
.stats-card,
.pricing-card,
.testimonial-card,
.industry-card,
.feature-card,
.features-grid,
.favorites-grid,
.industry-grid,
.pricing-grid,
.stats-grid {
    position: relative !important;
    z-index: 9999 !important;
}

section .section-background,
section canvas,
section > div:not(.container):not(.col-12) {
    z-index: -9999 !important;
}

/* Основные переменные */
:root {
    --primary-color: #0d47a1;
    --secondary-color: #1a237e;
    --success-color: #4caf50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --info-color: #03a9f4;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --text-light: #f8f9fa;
    --accent-color: #4caf50;
    --text-color: #333;
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    
    /* Новые переменные для фонов секций */
    --section-bg-even: #2c3e50;
    --section-bg-odd: #34495e;
    --section-bg-accent: #3498db;
    --section-text-color: #ffffff;
    --section-accent-color: #6EDCC4;
    --section-border-color: rgba(255, 255, 255, 0.1);
    
    /* Цвета для карточек */
    --card-bg: rgba(255, 255, 255, 0.15);
    --card-border: rgba(255, 255, 255, 0.25);
    
    /* Переработанные Z-индексы для правильного отображения элементов */
    --z-background: -10;          /* Фоновые элементы (понижен приоритет) */
    --z-section-background: -5;   /* Фон секций (понижен приоритет) */
    --z-base-level: 1;            /* Базовый уровень */
    --z-section-container: 5;     /* Контейнеры секций */
    --z-section-content: 10;      /* Содержимое секций */
    --z-section-cards: 15;        /* Карточки в секциях */
    --z-section-card-hover: 16;   /* Карточки при наведении */
    --z-section-card-content: 20; /* Содержимое карточек */
    --z-section-overlay: 25;      /* Наложения в секциях */
    --z-modal-level: 100;         /* Модальные окна */
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-color);
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    background-color: var(--section-bg-even);
}

/* Общие стили для секций */
section:not(.hero-section):not(.features-section) {
    padding: 80px 0;
    margin: 0;
    transition: background-color 0.5s ease;
    position: relative;
    border: none !important;
    overflow: visible !important;
    color: var(--section-text-color);
    z-index: var(--z-base-level);
}

/* Чередование цветов для секций */
section:nth-of-type(odd):not(.sources-section) {
    background-color: var(--section-bg-odd);
}

section:nth-of-type(even):not(.sources-section) {
    background-color: var(--section-bg-even);
}

/* Стили для специфических секций */
.favorites-section,
.industry-section {
    background: linear-gradient(135deg, var(--section-bg-even), var(--section-bg-odd));
}
/* Фон features-section задаём только в ее собственном CSS */

.pricing-section,
.stats-section,
.testimonials-section {
    background: linear-gradient(135deg, var(--section-bg-odd), var(--section-bg-even));
}

.cta-section {
    background: linear-gradient(135deg, #2980b9, #2c3e50);
}

.tabs-section {
    background: linear-gradient(135deg, #3a7bd5, #3a6073);
}

/* Удаление фона для секции sources-section */
.sources-section {
    background: none !important;
    background-color: transparent !important;
}

.subscription-section {
    background: linear-gradient(135deg, #2c3e50, #4ca1af);
}

.main-search-section {
    background: linear-gradient(135deg, #516395, #614385);
}

section + section:not(.features-section) {
    margin-top: -100px;
    padding-top: 130px;
    position: relative;
    z-index: calc(var(--z-base-level) + 1);
}

.hero-section + section {
    margin-top: 0 !important;
}

section:not(:last-child):not(.features-section):not(.unified-search-section)::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px; /* было 100px, делаем компактнее */
    z-index: var(--z-section-background);
    pointer-events: none;
}

section:last-child::after {
    display: none;
}

section .container {
    position: relative;
    z-index: var(--z-section-container);
}

/* Общие стили для заголовков секций */
section:not(.hero-section) .section-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    z-index: var(--z-section-content);
}

section:not(.hero-section) .section-subtitle {
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 40px;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: var(--z-section-content);
}

section:not(.hero-section) .section-label {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--section-accent-color);
    margin-bottom: 10px;
    text-align: center;
    display: block;
    position: relative;
    z-index: var(--z-section-content);
}

/* Удаляем прозрачную подложку под заголовок каждой секции */
section:not(.hero-section) .section-header {
    position: relative;
    z-index: var(--z-section-content);
    padding: 0;
    border-radius: 0;
    margin-bottom: 40px;
}

/* Общие стили для карточек */
section .card,
.favorite-card,
.stats-card,
.pricing-card,
.testimonial-card,
.industry-card,
.feature-card {
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid var(--section-border-color);
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: var(--z-section-cards);
}

section .card:hover,
.favorite-card:hover,
.stats-card:hover,
.pricing-card:hover,
.testimonial-card:hover,
.industry-card:hover,
.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.2);
    z-index: var(--z-section-card-hover);
}

/* Общие кнопки */
.btn {
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 5px;
    transition: all 0.3s ease;
    position: relative;
    z-index: var(--z-section-card-content);
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    position: relative;
    overflow: hidden;
}

.btn-primary.search-button, 
.btn-primary.animated {
    overflow: hidden;
}

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

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: var(--z-background);
}

.btn-primary:hover::after {
    width: 200%;
    height: 200%;
}

.btn-primary.search-button:hover, 
.btn-primary.animated:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

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

/* Эффект волны при клике */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 0;
    }
}

/* Платформы слайдер */
.platforms-slider {
    width: 100% !important;
    overflow: hidden !important;
    position: relative !important;
    margin-top: 2rem !important;
    margin-bottom: 2rem !important;
    background: transparent !important; /* Прозрачный фон */
    z-index: var(--z-section-content) !important;
}

.platforms-slider .container {
    background: transparent !important; /* Прозрачный фон для контейнера */
    padding: 15px 0 !important;
    z-index: var(--z-section-container) !important;
}

.platforms-title {
    font-size: 1.4rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
    text-align: center !important;
    margin-bottom: 20px !important;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2) !important;
    position: relative !important;
    z-index: var(--z-section-content) !important;
}

.platforms-wrapper {
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    padding: 10px 0 !important;
    background: transparent !important; /* Прозрачный фон */
    z-index: var(--z-section-content) !important;
}

.platforms-track {
    display: flex !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
    animation: scrollPlatforms 60s linear infinite !important;
    padding: 10px 0 !important;
    background: transparent !important; /* Прозрачный фон */
    position: relative !important;
    z-index: var(--z-section-content) !important;
}

.platform-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 20px !important;
    height: 70px !important; /* Увеличиваем высоту */
    flex-shrink: 0 !important;
    transition: transform 0.3s ease !important;
    position: relative !important;
    z-index: var(--z-section-cards) !important;
}

.platform-icon img {
    max-height: 60px !important; /* Увеличиваем размер изображений */
    max-width: 120px !important; /* Увеличиваем максимальную ширину */
    object-fit: contain !important;
    filter: grayscale(30%) !important; /* Небольшой эффект серого для контраста */
    opacity: 0.9 !important;
    transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease !important;
    position: relative !important;
    z-index: var(--z-section-card-content) !important;
}

.platform-icon:hover img {
    filter: grayscale(0%) !important; /* Убираем серый при наведении */
    opacity: 1 !important;
    transform: scale(1.1) !important; /* Небольшое увеличение при наведении */
}

/* Увеличение плавности анимации прокрутки */
@keyframes scrollPlatforms {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Медиа-запросы для десктопа */
@media screen and (min-width: 768px) {
    /* Принудительное отображение секций на средних и больших экранах */
    section,
    .section,
    #hero,
    #tabs-section,
    #features,
    .hero-section,
    .tabs-section,
    .features-section,
    .container,
    .col {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Очистка для flex/float элементов */
    .clearfix::after {
        content: "";
        clear: both;
        display: table;
    }
    
    /* Основной контент */
    .main-content {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

@media screen and (min-width: 992px) {
    section,
    .section {
        padding: 60px 0;
    }
    
    .container {
        max-width: 1200px;
        padding-left: 30px;
        padding-right: 30px;
    }
    
    /* Исправляем переполнение по горизонтали */
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
    
    /* Обеспечиваем, чтобы все контейнеры не выходили за пределы экрана */
    .container, .container-fluid {
        max-width: 100%;
        box-sizing: border-box;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Мобильная/десктопная видимость */
.desktop-only {
    display: block;
    visibility: visible;
    opacity: 1;
}

/* Стили для контента секций - обновленный z-index для контейнеров */
section .container {
    position: relative;
    z-index: var(--z-section-container);
}

/* Эффект волны при клике на карточки */
.ripple-effect {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transform: scale(0);
    animation: ripple 1s ease-out forwards;
    pointer-events: none;
    z-index: var(--z-section-overlay);
}

/* Добавляем правильные стили для карточек тендеров */
#desktop-tender-cards .row {
    width: 100% !important;
    margin: 0 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
}

#desktop-tender-cards .col-lg-4 {
    flex: 0 0 350px !important;
    min-width: 350px !important;
    max-width: 350px !important;
    padding: 0 10px !important;
}

/* Обновляем стили для футера */
.site-footer .row,
.footer-top .row,
.footer-bottom .row {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: flex !important;
}

.site-footer .col-md-4,
.site-footer .col-md-6 {
    width: 33.33% !important;
    flex: 0 0 33.33% !important;
    max-width: 33.33% !important;
}

.footer-bottom .col-md-6 {
    width: 50% !important;
    flex: 0 0 50% !important;
    max-width: 50% !important;
}

/* Выравнивание footer-bottom по ширине с footer-top */
.site-footer .footer-bottom {
    max-width: 1200px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
    background: none !important;
}

/* Добавляем фон, чтобы заменить удаленный фон */
.site-footer::after {
    content: "" !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 80px !important; /* Примерная высота footer-bottom */
    background-color: #000000 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    z-index: 1 !important;
}

/* Обеспечиваем, чтобы контент footer-bottom был поверх фона */
.site-footer .footer-bottom .container,
.site-footer .footer-bottom .row,
.site-footer .footer-bottom .col-md-6,
.site-footer .footer-bottom .copyright,
.site-footer .footer-bottom .social-links {
    position: relative !important;
    z-index: 2 !important;
}

/* Уменьшение высоты футера */
.site-footer {
    padding: 25px 0 0 !important; /* Уменьшаем верхний отступ футера */
}

/* Уменьшаем отступы в верхней части футера */
.site-footer .footer-top {
    padding: 10px 0 15px !important; /* Уменьшаем отступы */
}

/* Уменьшаем отступы между заголовком и содержимым */
.site-footer .footer-heading {
    font-size: 16px !important;
    margin-bottom: 10px !important;
}

/* Уменьшаем отступы после разделительной линии */
.site-footer .footer-heading:after {
    margin-top: 6px !important;
}

/* Уменьшаем размер текста в параграфах */
.site-footer .footer-company p {
    margin-bottom: 10px !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
}

/* Уменьшаем отступы в списках контактов */
.site-footer .footer-contact-list li {
    margin-bottom: 6px !important;
    font-size: 12px !important;
}

/* Уменьшаем отступы в списке ссылок */
.site-footer .footer-nav-list li {
    margin-bottom: 5px !important;
}

.site-footer .footer-nav-list a {
    font-size: 12px !important;
}

/* Уменьшаем отступы в нижней части футера */
.site-footer .footer-bottom {
    padding: 10px 0 !important;
    margin-top: 15px !important;
}

/* Уменьшаем размер иконок социальных сетей */
.site-footer .social-link {
    width: 30px !important;
    height: 30px !important;
    margin-left: 5px !important;
}

/* Обновляем высоту фона для нижней части футера */
.site-footer::after {
    height: 50px !important; /* Уменьшаем высоту фона */
}

/* Дополнительное уменьшение промежутка между footer-top и footer-bottom */
.site-footer .footer-bottom {
    margin-top: 0px !important; /* Убираем отступ сверху */
    padding-top: 5px !important; /* Минимальный отступ для разделительной линии */
}

/* Уменьшаем верхнюю границу */
.site-footer .footer-bottom {
    border-top-width: 1px !important;
}

/* Обновляем высоту фона для нижней части футера */
.site-footer::after {
    height: 40px !important; /* Уменьшаем высоту фона */
}

/* Увеличение шрифтов в футере главной страницы */
.site-footer .footer-heading {
    font-size: 18px !important; /* Увеличиваем размер заголовков */
}

.site-footer .footer-company p {
    font-size: 14px !important; /* Увеличиваем размер параграфов */
    line-height: 1.5 !important; /* Увеличиваем межстрочный интервал */
}

.site-footer .footer-contact-list li,
.site-footer .footer-nav-list a {
    font-size: 14px !important; /* Увеличиваем размер текста в списках */
}

.site-footer .copyright {
    font-size: 14px !important; /* Увеличиваем размер копирайта */
}

/* Увеличиваем размер иконок социальных сетей соразмерно */
.site-footer .social-link {
    width: 34px !important;
    height: 34px !important;
}

/* Мобильная версия увеличенных шрифтов */
@media (max-width: 767px) {
    .site-footer .footer-heading {
        font-size: 17px !important;
    }
    
    .site-footer .footer-company p,
    .site-footer .footer-contact-list li,
    .site-footer .footer-nav-list a {
        font-size: 13px !important;
    }
    
    .site-footer .copyright {
        font-size: 13px !important;
    }
}



