/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --secondary-color: #10b981;
    --text-dark: #f3f4f6;
    --text-light: #9ca3af;
    --bg-light: #1a1a1a;
    --bg-white: #242424;
    --bg-card: rgba(45, 45, 45, 0.7);
    --bg-card-hover: rgba(55, 55, 55, 0.9);
    --bg-dark: #0f0f0f;
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

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

ul {
    list-style: none;
}

/* Навигация */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 100;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem 1rem 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.logo-image {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

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

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

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

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

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

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Главная секция (Carbon) */
.hero {
    position: relative;
    min-height: auto;
    padding: 8rem 0 5rem 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
    background: transparent;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto 5rem auto;
    animation: fadeInUp 1s ease;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    display: block;
    width: 30px;
    height: 50px;
    border: 2px solid white;
    border-radius: 25px;
    position: relative;
}

.scroll-indicator span::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: scroll 2s infinite;
}

/* Кнопки */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

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

.btn-small {
    padding: 0.5rem 1.5rem;
    font-size: 0.875rem;
}

.btn-full {
    width: 100%;
}

/* Промежуточная секция с изображением (Abrams) */
.hero-transition {
    margin-top: 83px;
    position: relative;
    height: 50vh;
    min-height: 400px;
    overflow: hidden;
    display: flex;
    align-items: center; 
    justify-content: center;
    background: transparent;
}

.hero-transition-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('images/abrams.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.hero-transition-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2;
}

/* Особенности */
.features {
    padding: 5rem 0;
    background: transparent;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(250px, 1fr));
    align-items: start;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.feature-card {
    display: flex;
    flex-direction: column;
    text-align: center;
    padding: 2rem;
    border-radius: 1rem;
    background: var(--bg-card);
    backdrop-filter: blur(5px);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    align-self: stretch;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background: var(--bg-card-hover);
}


.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-light);
    flex-grow: 1;
}

/* Каталог */
.products {
    padding: 5rem 0;
    background: transparent;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2.5rem;
}

.product-card {
    background: var(--bg-card);
    backdrop-filter: blur(5px);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    background: var(--bg-card-hover);
}

.product-image {
    position: relative;
    height: 280px;
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-img {
    transform: scale(1.05);
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--secondary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.product-info {
    padding: 2rem;
}

.product-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.product-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    font-size: 0.9375rem;
}

.product-specs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.product-specs span {
    color: var(--text-dark);
}

.product-advantages {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.product-advantages h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.product-advantages ul {
    padding: 0;
    margin: 0;
}

.product-advantages ul li {
    color: var(--text-light);
    font-size: 0.875rem;
    line-height: 1.6;
    padding-left: 1.25rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.product-advantages ul li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 600;
}

/* Попап детальной информации о товаре */
.product-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.product-modal.is-open {
    display: flex;
    /* animation: popupVisible 2s; */
}

/* @keyframes popupVisible {
    0% {
        display: none;
    }
    100% {
        display: flex;
    }
} */

.product-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
}

.product-modal__content {
    position: relative;
    max-width: 980px;
    width: 100%;
    margin: 0 16px;
    background: var(--bg-card);;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
    padding: 2rem;
    backdrop-filter: blur(5px);
}

.product-modal__close {
    position: absolute;
    top: 4px;
    right: 12px;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: var(--text-dark);
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease, color 0.2s ease;
}

.product-modal__close:hover {
    transform: scale(1.1);
    color: var(--primary-color);
}

.product-modal__layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: stretch;
}

.product-modal__images {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
}

.product-modal__image {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.product-modal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-modal .product-badge {
    left: 10px;
    bottom: 10px;
    top: auto;
    right: auto;
}

.product-modal__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background-color: #fff;
}

.product-modal__swiper {
    display: none;
    max-width: 477.56px;
}

.product-modal__swiper.is-active {
    display: flex; 
    gap: 0.6rem;
}


.product-modal__swiper--active {
    display: flex;
}

.product-modal__swiper-slide {
    flex-shrink: 0;
    width: 60px;
    height: 80px;
    border-radius: 0.5rem;
    cursor: pointer;
    overflow: hidden;
    background-color: #fff;
}

.product-modal__info {
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
}

.product-modal__title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
}

.product-modal__description {
    color: var(--text-light);
    font-size: 0.9rem;
}

.product-modal__main {
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
    max-height: 450px;
    overflow-y: scroll;
    scrollbar-width: thin;
    scrollbar-color: var(--text-light) var(--bg-card);
    padding-right: 8px;
    margin-right: -8px;
}

.product-modal h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.product-modal__advantages-list li {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 0.3rem;
    padding-left: 1.2rem;
    position: relative;
}

.product-modal__advantages-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 600;
}

.product-modal__configuration-list {
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.3);
    font-size: 0.9rem;
    color: var(--text-dark);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.product-modal__spec-list, .product-modal__equip-list {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
    margin-bottom: 0.3rem;
}

/* Фуллскрин изображение */
.image-lightbox {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    padding: 20px;
}

.image-lightbox.is-open {
    display: flex;
}

.image-lightbox__overlay {
    position: absolute;
    inset: 0;
}

.image-lightbox__content {
    max-width: 900px;
    max-height: 900px;
    height: calc(100dvh - 60px);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
}

.image-lightbox__img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: var(--shadow-xl);
    background-color: rgb(210, 209, 209);
    border-radius: 1rem;
}

.image-lightbox__close {
    position: absolute;
    top: 10px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    color: #fff;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease, color 0.2s ease;
}

.image-lightbox__close:hover {
    transform: scale(1.1);
    color: var(--primary-color);
}

/* О нас */
.about {
    padding: 5rem 0;
    background: transparent;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    background: var(--bg-card);
    backdrop-filter: blur(5px);
    padding: 3rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.about-text p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 1.0625rem;
}

/* Изменения для блока с видео */
.about-image {
    height: 400px;
    background: rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Обрезает углы видео, чтобы соответствовать border-radius */
    padding: 0;
}

.about-image video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Заполняет блок видео, сохраняя пропорции */
    display: block;
}

/* Контакты */
.contact {
    padding: 5rem 0;
    background: transparent;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
    background: var(--bg-card);
    backdrop-filter: blur(5px);
    padding: 3rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
}


.contact-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.contact-item p {
    color: var(--text-light);
}

.contact-item a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-item a:hover {
    color: var(--primary-color);
}

.contact-form {
    background: rgba(0, 0, 0, 0.2);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
    background: rgba(0, 0, 0, 0.5);
    color: var(--text-dark);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-group textarea {
    resize: vertical;
}

/* Футер */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 3rem 0 1.5rem;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 10;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
}

.footer .logo {
    color: white;
}

.footer .logo-text {
    color: white;
}

.footer-policy a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-policy a:hover {
    color: white;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.social-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9375rem;
}

.social-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
}

.page-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('images/carbon.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Анимации */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes scroll {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

/* Адаптивность */
@media (min-width: 841px) {
    .product-modal__swiper--scroll {
        overflow-x: scroll;
        scrollbar-width: thin;
        scrollbar-color: var(--text-light) var(--bg-card);
    }
}

@media (max-width: 840px) {
    .product-modal {
        align-items: stretch;
        justify-content: stretch;
    }

    .product-modal__content {
        padding-top: 3.4rem;
        margin: 0;
        background: rgba(45, 45, 45, 1);
        border-radius: 0;
        z-index: 1000;
        overflow-y: auto;
    }

    .product-modal__close {
        height: 48px;
        width: 48px;
        font-size: 3rem;
        top: 0;
        right: 0;
    }

    .product-modal__layout {
        grid-template-columns: 1fr;
    }

    .product-modal__image {
        display: none;
    }

    .product-modal__swiper {
        max-width: calc(100dvw - 66px);
        overflow-x: scroll;
        scroll-snap-type: x mandatory;
    }

    .product-modal__swiper-slide {
        scroll-snap-align: start;
        width: calc(100dvw - 66px);
        height: fit-content;
        border-radius: 0;
        flex-shrink: 0;
    }

    .product-modal__swiper-slide img {
        object-fit: contain;
    }

    .product-modal__main {
        max-height: none;
    }

    .product-modal .btn {
        text-align: center;
    }
}

@media (max-width: 768px) {
    body {
        background-attachment: scroll;
    }

    .hero-transition {
        height: 30vh;
        min-height: 250px;
        margin-top: 77px;
    }
    
    .hero-transition-background {
        background-attachment: scroll;
    }
    
    .hero {
        padding: 6rem 0 4rem 0;
    }
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: var(--bg-light);
        border-top: 1px solid var(--border-color);
        width: 100%;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transition: left 0.3s ease;
    }

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

    .mobile-menu-toggle {
        display: flex;
    }

    .logo-image {
        height: 44px;
    }

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

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

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

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

    .products-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-card p {
        flex-grow: 0;
    }

    .feature-card {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1.25rem;
    }

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

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