:root {
    --primary: #1E40AF;
    --primary-dark: #1E3A8A;
    --secondary: #3B82F6;
    --dark: #0F172A;
    --light: #F8FAFC;
    --text: #1E293B;
    --text-light: #64748B;
    --accent: #0EA5E9;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Manrope', sans-serif;
    background: var(--light);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Animated Background */
.bg-pattern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        radial-gradient(circle at 20% 50%, rgba(30, 64, 175, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
        radial-gradient(circle at 40% 90%, rgba(14, 165, 233, 0.04) 0%, transparent 50%);
    animation: bgShift 20s ease infinite;
}

@keyframes bgShift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, -20px) scale(1.05); }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    position: relative;
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.hero-content {
    text-align: center;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    animation: fadeInUp 1s ease 0.2s backwards;
}

.hero-video-container {
    max-width: 800px;
    width: 100%;
    margin: 0 auto 3rem;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(30, 64, 175, 0.25);
    position: relative;
    aspect-ratio: 16/9; /* Горизонтальное для десктопа */
    animation: fadeInUp 1s ease 0.3s backwards;
}

.hero-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-video-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    text-align: center;
    padding: 3rem;
    font-size: 1.25rem;
    border-radius: inherit;
}

/* Скрываем вертикальное видео на десктопе */
.hero-video-vertical {
    display: none;
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

/* Показываем горизонтальное видео на десктопе */
.hero-video-horizontal {
    display: block;
    border-radius: 20px;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.hero-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.hero-play-button::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 24px solid var(--primary);
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    margin-left: 6px;
}

.hero-play-button:hover {
    transform: translate(-50%, -50%) scale(1.1);
    background: white;
}

h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease 0.4s backwards;
}

@media (max-width: 480px) {
    h1 {
        font-size: clamp(1.9rem, 8.5vw, 3rem);
    }
}

.hero-lead {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: var(--text-light);
    max-width: 720px;
    margin: 0 auto 1.75rem;
    font-weight: 500;
    animation: fadeInUp 1s ease 0.45s backwards;
}

.video-instruction {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: rgba(30, 64, 175, 0.08);
    border: 2px solid rgba(30, 64, 175, 0.2);
    border-radius: 12px;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease 0.5s backwards;
}

.video-instruction::before {
    content: "▶";
    font-size: 1.2rem;
}

.subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 700;
    color: var(--text);
    max-width: 860px;
    margin: 0 auto 1rem;
    animation: fadeInUp 1s ease 0.6s backwards;
}

.subtitle-text {
    font-size: clamp(1.05rem, 3vw, 1.4rem);
    color: var(--text-light);
    max-width: 740px;
    margin: 0 auto 3rem;
    font-weight: 500;
    animation: fadeInUp 1s ease 0.65s backwards;
}

.cta-button {
    display: inline-block;
    padding: 1.5rem 3.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(30, 64, 175, 0.25);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1s ease 0.8s backwards;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.cta-buttons > a {
    width: 100%;
    justify-content: center;
}

.cta-icon {
    width: 26px;
    height: 26px;
    display: inline-block;
    fill: currentColor;
    flex: 0 0 auto;
}

.cta-button--telegram {
    background: linear-gradient(135deg, #229ED9, #1787B9);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.cta-button--whatsapp {
    background: linear-gradient(135deg, #25D366, #1FA855);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.cta-qr {
    width: 96px;
    height: 96px;
    border-radius: 8px;
    object-fit: cover;
    background: white;
    padding: 4px;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(30, 64, 175, 0.35);
}

/* Video Gallery Section */
.gallery-section {
    padding: 5rem 2rem;
    background: white;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.125rem;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.video-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: var(--dark);
    aspect-ratio: 9/16;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.video-card:hover {
    transform: translateY(-5px);
}

.video-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    opacity: 1;
}


.video-overlay h3 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.video-overlay p {
    font-size: 0.875rem;
    opacity: 0.8;
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(30, 64, 175, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: none;
}

.play-button::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 20px solid white;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 5px;
}

.video-card:hover .play-button {
    transform: translate(-50%, -50%) scale(1.1);
    background: var(--primary);
}

/* Placeholder for videos */
.video-placeholder {
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    text-align: center;
    padding: 0;
}

.video-placeholder video {
    display: block;
}

/* Stats Section */
.stats-section {
    padding: 5rem 2rem;
    background: var(--dark);
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: rgba(255,255,255,0.7);
    font-size: 1.125rem;
}

/* CTA Section */
.cta-section {
    padding: 5rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.cta-section h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.cta-section p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
}

.cta-button-white {
    display: inline-block;
    padding: 1.5rem 3.5rem;
    background: white;
    color: var(--primary);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.cta-button-white--telegram {
    border: 2px solid rgba(34, 158, 217, 0.6);
    color: #1787B9;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.cta-button-white--whatsapp {
    border: 2px solid rgba(37, 211, 102, 0.6);
    color: #1FA855;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.cta-button-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

/* Scroll Animation */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        min-height: 90vh;
    }

    .hero-video-container {
        max-width: 100%;
        margin-bottom: 2rem;
        aspect-ratio: 9/12;
    }

    .hero-video-horizontal {
        display: block;
    }

    .hero-video-vertical {
        display: none;
    }

    .hero-video-container video {
        transform: none;
    }

    .video-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .gallery-section,
    .stats-section,
    .cta-section {
        padding: 3rem 1.5rem;
    }
    .cta-qr {
        width: 80px;
        height: 80px;
    }
}

@media (pointer: coarse) and (hover: none) {
    .hero-play-button {
        display: none;
    }
}

/* FORCE SHOW (local) */
.fade-in,
.video-card,
.stat-item {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

.video-overlay { opacity: 1 !important; }


/* Frank 的精准修复：彻底移除蓝色占位框 */

/* 1. 强制隐藏原本那个蓝色的占位层 */
.hero-video-placeholder, 
.video-main-wrapper::before, 
.hero-play-button {
    display: none !important;
    background: transparent !important;
}

/* 2. 确保视频容器是透明的，不再显示蓝色 */
.video-main-wrapper {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* 3. 让视频标签显示出来，不要被隐藏 */
video {
    display: block !important;
    visibility: visible !important;
}
