/* 
 * Стили для hero-section (первая секция) сайта Garantiks
 * В этом файле содержатся только стили, относящиеся к hero-section
 */

/* Основные переменные */
: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;
    --hero-primary: #3a86ff;
    --hero-secondary: #4361ee;
    --hero-tertiary: #3a0ca3;
    --hero-accent: #60a5fa;
    --hero-text: #ffffff;
    --hero-card-bg: rgba(255, 255, 255, 0.1);
    --hero-card-border: rgba(255, 255, 255, 0.2);
    --hero-animation-duration: 0.3s;
    --hero-dark: #0d1b2a;
    --hero-gradient: linear-gradient(135deg, #1a365d, #2563eb);
    --hero-text-color: #ffffff;
    --hero-highlight: #93c5fd;
    --hero-button-gradient: linear-gradient(135deg, #2563eb, #3b82f6);
    --hero-stats-bg: rgba(255, 255, 255, 0.15);
    
    /* 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;
}

/* Общие компоненты и стили для кнопок */
.btn {
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--hero-button-gradient);
    padding: 16px 32px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    transition: all 0.3s ease;
}

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

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(37, 99, 235, 0.4);
}

.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;
}

.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(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

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

/* Hero секция - основные стили */
.hero-section {
    background: var(--hero-gradient);
    position: relative;
    padding: 120px 0 60px;
    overflow: hidden;
    z-index: var(--z-base-level);
}

/* Эффект частиц для фона */
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/static/images/platforms/фон.png');
    background-size: cover;
    background-position: center;
    opacity: 0.8;
    animation: slowZoom 30s infinite alternate ease-in-out;
    z-index: var(--z-background);
}

/* Эффект медленного увеличения фона */
@keyframes slowZoom {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
}

/* Эффект плавающих частиц */
.hero-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 10%),
        radial-gradient(circle at 80% 30%, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 15%),
        radial-gradient(circle at 40% 70%, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 12%),
        radial-gradient(circle at 90% 85%, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 18%);
    animation: floatBackground 20s infinite alternate ease-in-out;
    z-index: var(--z-section-background);
}

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

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

.hero-text-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 25px;
    width: 100%;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: var(--z-section-content);
}

.hero-text {
    flex: 0 0 50%;
    max-width: 500px;
}

.badge-primary {
    background: var(--hero-accent);
    color: var(--hero-text-color);
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.2);
    margin-bottom: 10px;
}

.hero-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--hero-text-color);
    margin-bottom: 15px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    background: linear-gradient(to right, #ffffff, #93c5fd);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 16px;
    color: var(--hero-text-color);
    margin-bottom: 20px;
    line-height: 1.4;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.hero-cta {
    margin-top: 20px;
}

.btn-primary:hover {
    background: #3bb3d6;
    transform: translateY(-2px);
}

/* Статистика */
.tender-stats {
    flex: 0 0 45%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 0;
}

.stat-counter {
    background: var(--hero-stats-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.counter-value {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #ffffff;
}

.counter-label {
    font-size: 14px;
    color: #ffffff;
    opacity: 0.9;
}

/* Стили для отображения карточек тендеров в один горизонтальный ряд */
#desktop-tender-cards {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 20px 0 !important;
    margin-top: 50px !important;
    width: 100% !important;
    gap: 20px !important;
    z-index: var(--z-section-cards) !important;
}

#desktop-tender-cards::-webkit-scrollbar {
    height: 8px !important;
    width: 8px !important;
}

#desktop-tender-cards::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 10px !important;
}

#desktop-tender-cards::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3) !important;
    border-radius: 10px !important;
}

#desktop-tender-cards::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5) !important;
}

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

@media (max-width: 1400px) {
    #desktop-tender-cards .col-lg-4 {
        flex: 0 0 330px !important;
        min-width: 330px !important;
        max-width: 330px !important;
    }
    
    .card-wrapper {
        height: 460px !important;
    }
}

@media (max-width: 991px) {
    #desktop-tender-cards {
        padding-bottom: 30px !important;
    }
    
    #desktop-tender-cards .col-lg-4 {
        flex: 0 0 300px !important;
        min-width: 300px !important;
        max-width: 300px !important;
    }
    
    .card-wrapper {
        height: 440px !important;
    }
    
    .hero-text-wrapper {
        padding: 15px;
        gap: 15px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .counter-value {
        font-size: 24px;
    }

    .counter-label {
        font-size: 12px;
    }
}

@media (max-width: 767px) {
    .hero-section {
        padding: 80px 0 40px;
    }
    
    .hero-text-wrapper {
        flex-direction: column;
        padding: 15px;
        gap: 20px;
    }
    
    .hero-text {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: center;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .tender-stats {
        flex: 0 0 100%;
        width: 100%;
    }
    
    #desktop-tender-cards {
        margin-top: 30px !important;
    }
    
    #desktop-tender-cards .col-lg-4 {
        flex: 0 0 270px !important;
        min-width: 270px !important;
        max-width: 270px !important;
    }
    
    .card-wrapper {
        height: 420px !important;
    }
    
    .platforms-slider {
        margin-top: 40px;
    }
    
    .platforms-title {
        font-size: 1rem;
    }
    
    .platform-icon {
        flex: 0 0 100px;
        height: 50px;
    }
}

@media (max-width: 375px) {
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
    
    .counter-value {
        font-size: 28px;
    }
    
    .counter-label {
        font-size: 12px;
    }
    
    .card-wrapper {
        height: 400px !important;
    }
}

/* Добавим индикатор прокрутки и кнопки навигации */
.cards-container {
    position: relative;
    width: 100%;
    margin-top: 50px;
}

.scroll-indicator {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    gap: 6px;
}

.scroll-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.scroll-dot.active {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.card-nav-buttons {
    position: absolute;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    z-index: 5;
    pointer-events: none;
}

.card-nav-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    pointer-events: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.card-nav-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.card-nav-button i {
    color: white;
    font-size: 20px;
}

.card-wrapper {
    height: 483px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 15px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
    transition: all 0.4s ease !important;
    z-index: var(--z-section-cards) !important;
}

.card-wrapper:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2) !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
    z-index: var(--z-section-card-hover) !important;
}

.tender-card-3d {
    height: 100%;
    position: relative;
    transition: transform 0.3s ease;
}

.card-front {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 25px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-badge {
    position: absolute;
    top: 25px;
    right: 25px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
}

.card-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 340px;
    justify-content: space-between;
}

.card-top {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.card-bottom {
    flex: 0 0 auto;
    margin-top: auto;
    padding-top: 15px;
}

.card-front h4 {
    font-size: 15px !important;
    line-height: 1.4;
    margin: 35px 0 0 0;
    color: #fff;
    min-height: 65px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-organizer {
    font-size: 13px !important;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    min-height: 35px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card-meta span {
    display: flex;
    align-items: center;
}

.card-meta i {
    margin-right: 5px;
    font-size: 12px !important;
}

.card-price {
    font-size: 18px !important;
    font-weight: 600;
    color: #fff;
    margin: 0;
    text-align: center;
    padding: 12px 0;
}

.card-action {
    margin-top: 15px;
    padding-top: 0;
}

.card-btn {
    display: block;
    width: 100%;
    padding: 12px;
    text-align: center;
    background: #0d47a1;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-btn:hover {
    background: #1565c0;
    color: #fff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13, 71, 161, 0.3);
}

/* Анимация при наведении на карточку */
.tender-card-3d:hover {
    transform: translateY(-5px);
}

/* Медиа-запросы для карточек */
@media (max-width: 1400px) {
    .card-wrapper {
        height: 460px !important;
    }
    
    .card-front h4 {
        font-size: 14px !important;
    }
    
    .card-organizer {
        font-size: 12px !important;
    }
    
    .card-meta {
        font-size: 11px !important;
    }
    
    .card-price {
        font-size: 16px !important;
    }
}

@media (max-width: 991px) {
    .card-wrapper {
        height: 440px !important;
    }
}

@media (max-width: 767px) {
    .card-wrapper {
        height: 420px !important;
    }
}

/* Карусель платформ */
.platforms-slider {
    margin-top: 60px;
    position: relative;
    z-index: var(--z-section-content);
}

.platforms-title {
    color: white;
    font-size: 1.2rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.platforms-wrapper {
    overflow: hidden;
    border-radius: 10px;
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.platforms-track {
    display: flex;
    animation: scroll 30s linear infinite;
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.platform-icon {
    flex: 0 0 120px;
    height: 60px;
    margin: 0 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.platform-icon img {
    max-width: 100%;
    max-height: 100%;
    filter: grayscale(30%) brightness(1.2);
    transition: all 0.3s ease;
}

.platform-icon:hover img {
    filter: grayscale(0%) brightness(1.3);
    transform: scale(1.1);
}

/* Анимации появления */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Медиа-запросы для планшетов */
@media (min-width: 768px) and (max-width: 991px) {
    .hero-text-wrapper {
        flex-direction: column;
        align-items: center;
        padding: 25px;
    }

    .hero-text {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: center;
        margin-bottom: 30px;
    }

    .tender-stats {
        flex: 0 0 100%;
        flex-direction: row;
        justify-content: center;
        gap: 20px;
        margin: 0;
    }
}

/* Медиа-запросы для мобильных устройств */
@media (max-width: 767px) {
    .hero-section {
        padding: 80px 0 40px;
    }
    
    .hero-text-wrapper {
        flex-direction: column;
        padding: 15px;
        gap: 20px;
    }
    
    .hero-text {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: center;
    }
    
    .badge-primary {
        font-size: 12px;
        padding: 6px 16px;
    }
    
    .hero-title {
        font-size: 36px;
        margin-bottom: 15px;
    }
    
    .hero-subtitle {
        font-size: 18px;
        margin-bottom: 20px;
    }
    
    .hero-cta {
        margin-top: 20px;
    }
    
    .btn-primary {
        padding: 14px 28px;
        font-size: 16px;
        width: 100%;
    }
    
    .tender-stats {
        flex: 0 0 100%;
        width: 100%;
        margin: 0;
    }
    
    .stat-counter {
        padding: 12px;
        text-align: center;
    }
    
    .counter-value {
        font-size: 32px;
    }
    
    .counter-label {
        font-size: 14px;
    }
    
    .platforms-slider {
        margin-top: 40px;
    }
    
    .platforms-title {
        font-size: 1rem;
    }
    
    .platform-icon {
        flex: 0 0 100px;
        height: 50px;
    }

    /* Показываем только одну карточку на мобильных */
    #desktop-tender-cards .col-lg-4:not(:first-child) {
        display: none !important;
    }

    #desktop-tender-cards .col-lg-4:first-child {
        flex: 0 0 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        margin: 0 auto !important;
        padding: 0 20px !important;
    }

    /* Скрываем навигацию карточек на мобильных */
    .card-nav-buttons,
    .scroll-indicator {
        display: none !important;
    }

    .cards-container {
        padding-left: 20px;
        margin-right: -20px;
        width: calc(100% + 20px);
    }

    #desktop-tender-cards {
        margin-right: -20px !important;
    }

    #desktop-tender-cards .col-lg-4:first-child {
        flex: 0 0 calc(100% - 20px) !important;
        min-width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
        margin-left: 20px !important;
    }

    .card-wrapper {
        width: calc(100% - 20px) !important;
    }
}

@media (max-width: 375px) {
    .cards-container {
        padding-left: 15px;
        margin-right: -15px;
        width: calc(100% + 15px);
    }

    #desktop-tender-cards {
        margin-right: -15px !important;
    }

    #desktop-tender-cards .col-lg-4:first-child {
        margin-left: 15px !important;
    }
}

/* Дополнительные анимации и эффекты для десктопных устройств */
@media (min-width: 992px) {
    .hero-section {
        position: relative;
        min-height: 90vh;
        display: flex;
        align-items: center;
        padding: 0;
        overflow: visible;
        background: linear-gradient(135deg, #084c7c, #2274b2);
        border-bottom: 5px solid #84abcf !important;
    }
    
    .hero-text-wrapper {
        padding: 20px !important;
        gap: 20px !important;
        margin-bottom: 25px !important;
        max-height: 400px !important; /* Ограничиваем максимальную высоту */
    }

    .hero-text {
        flex: 0 0 45% !important; /* Уменьшаем ширину текстового блока */
        max-width: 450px !important;
        padding-right: 20px !important;
    }
    
    .hero-title {
        font-size: 32px !important;
        line-height: 1.2 !important;
        margin-bottom: 15px !important;
    }

    .hero-subtitle {
        font-size: 16px !important;
        line-height: 1.4 !important;
        margin-bottom: 20px !important;
    }

    .badge-primary {
        padding: 4px 12px !important;
        font-size: 12px !important;
        margin-bottom: 10px !important;
    }

    .hero-cta {
        margin-top: 20px !important;
    }

    .hero-section .btn-primary {
        padding: 12px 24px !important;
        font-size: 16px !important;
    }

    /* Статистика */
    .tender-stats {
        flex: 0 0 45% !important;
        gap: 15px !important;
    }

    .stat-counter {
        padding: 15px !important;
        border-radius: 12px !important;
    }

    .counter-value {
        font-size: 28px !important;
        margin-bottom: 8px !important;
    }

    .counter-label {
        font-size: 13px !important;
        line-height: 1.3 !important;
    }
}

/* Дополнительные стили для больших экранов */
@media (min-width: 1200px) {
    .hero-text-wrapper {
        max-width: 1140px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

/* Высокое разрешение */
@media (min-width: 1400px) {
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .counter-value {
        font-size: 3rem;
    }

    .counter-label {
        font-size: 1.2rem;
    }
}

/* Анимация для счетчиков */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-counter {
    animation: countUp 0.6s ease-out forwards;
}

.stat-counter:nth-child(2) {
    animation-delay: 0.2s;
}

/* Дополнительные стили для очень маленьких экранов */
@media (max-width: 375px) {
    .hero-title {
        font-size: 32px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .counter-value {
        font-size: 28px;
    }

    .counter-label {
        font-size: 13px;
    }
} 