/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #e31e24;
    --secondary-color: #1a1a1a;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --gray: #6c757d;
    --dark-overlay: rgba(0, 0, 0, 0.6);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.navbar {
    padding: 15px 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

.logo img:hover {
    transform: scale(1.05);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero Section with Video Background */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 80px;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--dark-overlay);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: 6rem;
    font-weight: 900;
    margin-bottom: 20px;
    text-shadow: 3px 3px 20px rgba(0, 0, 0, 0.5);
    letter-spacing: 5px;
}

.hero-subtitle {
    font-size: 1.8rem;
    margin-bottom: 40px;
    font-weight: 300;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: transparent;
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(227, 30, 36, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Section Styles */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 3rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.section-line {
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    margin: 0 auto 20px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--gray);
}

/* About Section */
.about {
    background: var(--light-bg);
}

.about-grid {
    display: grid;
    gap: 60px;
}

.about-text {
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--gray);
}

.about-text p {
    margin-bottom: 20px;
}

.about-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.service-box {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    transition: var(--transition);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.service-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(227, 30, 36, 0.15);
}

.service-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.service-box h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.service-box p {
    color: var(--gray);
}

/* Gallery Section */
.gallery-section {
    background: var(--white);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    aspect-ratio: 4/3;
    background: #f0f0f0;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(227, 30, 36, 0.8);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Works Section (Примеры наших работ) - Grid 2x3 */
.works-section {
    background: var(--white);
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 0;
}

.work-item {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: var(--transition);
}

.work-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.work-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
    overflow: hidden;
}

.work-thumbnail iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: none;
}

.work-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    transition: var(--transition);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.work-play-overlay::before {
    content: '▶';
    width: 70px; /* Уменьшено с 80px до 70px (как в отзывах) */
    height: 70px; /* Уменьшено с 80px до 70px (как в отзывах) */
    background: rgba(227, 30, 36, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    transition: var(--transition);
    line-height: 70px; /* Обновлено для центрирования */
    text-align: center;
}

.work-item:hover .work-play-overlay {
    background: rgba(0, 0, 0, 0.3);
}

.work-item:hover .work-play-overlay::before {
    transform: scale(1.1);
    background: var(--primary-color);
}

.work-info {
    padding: 20px;
    text-align: center;
}

.work-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

/* VK Video Modal (для примеров работ) */
.vk-video-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.vk-video-modal.active {
    display: flex;
}

.vk-video-modal-close {
    position: absolute;
    top: 30px;
    right: 40px;
    font-size: 50px;
    color: var(--white);
    cursor: pointer;
    transition: var(--transition);
    z-index: 10001;
}

.vk-video-modal-close:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}

.vk-video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1920px;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.vk-video-modal-content iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Reviews Section (Отзывы) */
.reviews-section {
    background: var(--light-bg);
}

.reviews-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.video-item {
    position: relative;
    width: 350px; /* Фиксированная ширина как у work-item */
    flex-shrink: 0;
    border-radius: 15px;
    overflow: hidden;
    background: var(--white);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: var(--transition);
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

.video-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(227, 30, 36, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    transition: var(--transition);
}

.video-item:hover .video-play-btn {
    background: var(--primary-color);
    transform: translate(-50%, -50%) scale(1.1);
}

.video-info {
    padding: 20px;
}

.video-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin: 0;
}

/* Partners Section - Horizontal Slider */
.partners-section {
    background: var(--white);
}

.partners-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.partners-slider-container {
    flex: 1;
    overflow: hidden;
    padding: 40px 0;
}

.partners-slider {
    display: flex;
    gap: 60px;
    align-items: center;
    transition: transform 0.4s ease;
}

.partner-logo {
    flex-shrink: 0;
    width: 200px;
    height: 120px;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
    cursor: pointer;
}

.partner-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.15);
}

/* Slider Navigation Buttons */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--primary-color);
    background: var(--white);
    color: var(--primary-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 10;
}

.slider-btn-prev {
    left: -25px; /* Половина ширины кнопки за пределами контейнера */
}

.slider-btn-next {
    right: -25px; /* Половина ширины кнопки за пределами контейнера */
}

.slider-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-50%) scale(1.1);
}

.slider-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.slider-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: var(--gray);
}

.slider-btn:disabled:hover {
    background: var(--white);
    color: var(--gray);
    transform: scale(1);
}

/* Contact Section - Telegram QR */
.contact {
    background: var(--white);
}

.contact-telegram {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    padding: 60px 20px;
}

.telegram-icon {
    font-size: 5rem;
    margin-bottom: 30px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.telegram-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.telegram-subtitle {
    font-size: 1.2rem;
    color: var(--gray);
    margin-bottom: 40px;
}

.qr-code-wrapper {
    display: inline-block;
    padding: 30px;
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    transition: var(--transition);
}

.qr-code-wrapper:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

.qr-code {
    width: 250px;
    height: 250px;
    display: block;
    border-radius: 10px;
}

.telegram-note {
    font-size: 1.1rem;
    color: var(--gray);
}

.telegram-note strong {
    color: var(--primary-color);
    font-size: 1.3rem;
}

/* Footer */
.footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    text-align: center;
}

.footer-logo img {
    height: 70px;
    width: auto;
}

.footer-platforms {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-platforms h4 {
    font-size: 1.2rem;
    color: var(--white);
    margin: 0;
}

.platforms-links {
    display: flex;
    gap: 30px;
    justify-content: center;
    flex-wrap: wrap;
}

.platform-link {
    display: block;
    transition: var(--transition);
}

.platform-link img {
    height: 50px;
    width: auto;
    opacity: 0.9;
    transition: var(--transition);
    /* Убрал фильтр для проверки */
    /* filter: brightness(0) invert(1); */
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 10px;
}

.platform-link:hover img {
    opacity: 1;
    transform: translateY(-5px) scale(1.1);
    background: rgba(255, 255, 255, 0.2);
}

.footer-text {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
    width: 100%;
}

.footer-text p {
    color: rgba(255, 255, 255, 0.7);
    margin: 5px 0;
}

/* Lightbox for Images */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s;
}

.lightbox.active {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    animation: zoomIn 0.3s;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    color: var(--primary-color);
}

.lightbox-caption {
    color: white;
    margin-top: 20px;
    font-size: 1.2rem;
}

/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
}

.video-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
}

.video-modal-content video {
    width: 100%;
    border-radius: 10px;
}

.video-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.video-modal-close:hover {
    color: var(--primary-color);
}

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

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

@keyframes zoomIn {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

/* Tablet Responsive */
@media (max-width: 1024px) {
    .works-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 колонки для планшетов */
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--white);
        flex-direction: column;
        padding: 30px;
        transition: var(--transition);
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        left: 0;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .works-grid {
        grid-template-columns: 1fr; /* 1 колонка для мобильных */
        gap: 20px;
        padding: 30px 0;
    }

    .work-title {
        font-size: 1rem;
        padding: 15px;
    }

    .work-play-overlay::before {
        width: 60px; /* Оставляем 60px для мобильных (соответствует video-play-btn) */
        height: 60px;
        font-size: 1.5rem;
        line-height: 60px;
    }

    .vk-video-modal-content {
        width: 95%;
    }

    .vk-video-modal-close {
        top: 15px;
        right: 15px;
        font-size: 35px;
    }

    .reviews-grid {
        gap: 20px;
    }

    .video-item {
        width: 280px; /* Мобильная ширина как у work-item */
    }

    .qr-code {
        width: 200px;
        height: 200px;
    }

    .telegram-title {
        font-size: 2rem;
    }

    .about-services {
        grid-template-columns: 1fr;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .partners-slider-wrapper {
        gap: 10px;
    }

    .partners-slider-container {
        padding: 30px 0;
    }

    .partners-slider {
        gap: 40px;
    }

    .partner-logo {
        width: 150px;
        height: 90px;
    }

    .slider-btn {
        width: 40px;
        height: 40px;
    }

    .slider-btn-prev {
        left: -20px; /* Половина ширины кнопки для мобильных */
    }

    .slider-btn-next {
        right: -20px; /* Половина ширины кнопки для мобильных */
    }

    .slider-btn svg {
        width: 18px;
        height: 18px;
    }

    .platforms-links {
        gap: 20px;
    }

    .platform-link img {
        height: 40px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .btn {
        padding: 12px 30px;
        font-size: 0.9rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
}

