/*responsice.css*/


.advantages-grid {
    display: grid;
    align-items: start;
}

.advantages-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg, 
        rgba(76, 175, 80, 0.1), 
        rgba(69, 160, 73, 0.05)
    );
    border-radius: 20px;
}
/* Для экранов больше 1920px (4K и большие мониторы) */
@media (min-width: 1921px) {
    .advantages-grid {
        grid-template-columns: 1fr 1.2fr;
        gap: 6rem;
    }
    
    .advantage-image {
        transform: scale(1.05);
        margin-left: 40px;
    }
    .nav-container,
    .footer-content,
    .responsive-img {
        max-width: 1600px;
    }

    .main-title {
        font-size: 6rem;
    }

    .header-text {
        left: 15vw;
    }
}

/* Ноутбуки и большие планшеты (1025px - 1440px) */
@media (max-width: 1440px) {
    .section-main-title {
        font-size: 4.5rem;
    }
    .logo {
        margin-left: -5rem;
    }

    .nav-links {
        gap: 2rem;
    }
}

/* Средние экраны (769px - 1024px) */
@media (max-width: 1024px) {
     .advantages-grid {
        grid-template-columns: 1fr;
    }

    .advantage-image {
        position: relative;
        display: block; /* Явно указываем отображение */
        max-width: 80%;
        height: auto; /* Автоматическая высота */
        margin: 3rem auto 0;
        grid-column: 1;
        grid-row: 3;
    }
    
    .advantage-photo {
        height: auto; /* Автоматическая высота для сохранения пропорций */
    }

    .advantages-content {
        grid-template-columns: 1fr;
        padding-right: 0;
        padding-left: 0;
    }

    .section-main-title {
        font-size: 3rem;
        margin-left: 0;
        text-align: center;
    }

    .section-title-container {
        text-align: center;
    }
    .logo {
        font-size: 2rem;
        margin-left: -2rem;
        display: block !important;
    }

    .nav-link {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .main-title {
        font-size: 4rem;
    }

    .header-text {
        max-width: 50%;
    }

    .footer-block {
        padding: 20px;
    }
}

@media (min-width: 769px) {
    body {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    /* Оптимизация отступов */
    .container {
        padding: 0 2rem;
    }
    
    /* Улучшение пропорций изображений */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Уточнение точек перехода для выпадающих меню */
    .dropdown:hover .dropdown-content {
        min-width: 200px;
    }
    
    /* Улучшение видимости кнопок карусели */
    .carousel-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    .mobile-menu {
        display: none !important;
        background: #f8f9fa
    }
    .hamburger {
        display: none !important;
    }
    .dropdown:hover .dropdown-content {
        display: block;
    }
        
    .dropdown:hover .arrow {
         transform: rotate(180deg);
    }
    .advantages-content {
        grid-template-columns: 1fr;
    }
    
    .advantage-card {
        padding: 1.5rem;
    }
    
    .highlight {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .specs-grid {
        grid-template-columns: 1fr;
        padding: 15px;
    }
    
    .modal-header {
        padding: 20px 15px 10px;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .spec-group {
        padding: 15px;
    }
    .image-badge {
        top: 10px;
        right: 10px;
        font-size: 0.8rem;
    }
    .carousel-slide {
        flex: 0 0 50%;
    }
    
    .carousel-slide.active {
        transform: scale(1.05);
    }
    
    .slide-details-btn {
        font-size: 0.8rem;
        padding: 0.3rem 1rem;
    }
    .product-title {
        font-size: 2.3rem;
    }
    
    .tech-specs {
        padding: 1.5rem;
    }
    
    .specs-grid {
        grid-template-columns: 1fr;
    }
    
    .image-badge {
        top: 10px;
        right: 10px;
        font-size: 0.8rem;
    }
    .container {
        width: 100%;
        padding-left: 20px;
        padding-right: 20px;
        box-sizing: border-box;
    }

    .cards-row {
        flex-direction: column; /* если ещё не установлено */
    }

    .advantage-card {
        width: 100%;
        margin-bottom: 20px; /* небольшой отступ между карточками */
    }
    .carousel-slide {
        width: 85%;
    }
    .slide-caption {
        font-size: 0.9rem;
    }
    .slide-details-btn {
        font-size: 0.95rem;
    }
    .modal-content {
        width: 95%;
        padding: 16px;
        max-height: 85vh;
    }
    .modal-title {
        font-size: 1.5rem;
    }
    .modal-subtitle {
        font-size: 1rem;
    }
    .mobile-menu {
        padding-top: 60px;
    }
    
    .mobile-nav-links {
        padding-top: 20px;
    }

    .advantage-image {
        max-width: 100%;
        margin: 2rem auto 0;
        height: auto;
    }
    .advantages-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding-left: 0;
        padding-right: 0;
    }
    .advantage-card {
        width: 100%;
        max-width: 500px;
        margin: 1rem 0;
    }

    .cards-row {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
    .section-main-title {
        font-size: 3.5rem;
        text-align: center;
        margin-left: 0;
    }
    .section-title-container {
        margin: 2rem auto 0;
        padding: 0 1rem;
    }
    .cards-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .gallery-item.prev-2,
    .gallery-item.next-2 {
        display: none;
    }
    
    .gallery-item.prev-1 {
        left: 10%;
        transform: translateX(-50%) scale(0.6);
    }
    
    .gallery-item.active {
        width: 80%;
        left: 50%;
    }
    
    .gallery-item.next-1 {
        left: 90%;
        transform: translateX(-50%) scale(0.6);
    }
    .gallery-container {
        padding: 0 1rem;
        position: relative;
        z-index: 1;
    }
    
    .gallery-track {
        height: 400px;
    }
    
    .gallery-item {
        width: 30%;
        height: 60%;
    }
    
    .gallery-item.prev-2,
    .gallery-item.next-2 {
        opacity: 0;
        pointer-events: none;
    }
    
    .gallery-item.prev-1 {
        left: 10%;
        transform: translateX(-50%) scale(0.7);
    }
    
    .gallery-item.active {
        width: 70%;
        height: 80%;
        z-index: 170 !important;
    }
    
    .gallery-item.next-1 {
        left: 90%;
        transform: translateX(-50%) scale(0.7);
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        transform: translateY(-50%) scale(0.8);
        z-index: 180 !important;
    }
    .contacts-container {
        grid-template-columns: 1fr;
    }
    
    .map-container {
        height: 300px;
    }
    
    .contacts-title {
        font-size: 1.8rem;
    }
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    .hamburger.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-20px);
    }
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    .mobile-dropdown-content a {
        display: block;
        padding: 8px 0;
    }
    .mobile-menu .nav-link,
    .mobile-menu .contact-btn {
        color: var(--text-light);
        padding: 12px 0;
    }
    .dropdown.active .dropdown-content {
        display: block;
        position: static;
        background: rgba(0,0,0,0.3);
        margin-top: 10px;
    }
    
    .dropdown .arrow {
        transition: transform 0.3s;
    }
    
    .dropdown.active .arrow {
        transform: rotate(90deg);
    }
    .nav-links .arrow {
        display: none;
    }
    .mobile-menu {
        top: 10;
        right: 20px;
        background: #fff;
        box-shadow: -2px 0 15px rgba(0,0,0,0.1);
        width: 100%;
        max-width: 320px;
        padding: 15px;
        transform: translateY(110%);
        max-height: 100vh;
        height: auto;
        min-height: 100vh;
        z-index: 1000 !important;
    }
    .mobile-nav-link:hover,
    .mobile-dropdown-btn:hover {
        background: #e9ecef;
        transform: translateX(5px);
    }
    .mobile-sub-link:hover {
        background: #e9ecef;
        color: #2b8a3e;
        transform: translateX(8px);
    }

    .mobile-dropdown.active .mobile-dropdown-btn {
        color: #2b8a3e;
    }
    
    .mobile-contact-btn:hover {
        background: #0056b3;
    }
    
    .hamburger.active + .logo {
        display: none;
    }

    .dropdown .arrow {
        display: inline-block;
        transform: rotate(0);
    }
    
    .dropdown.open .arrow {
        transform: rotate(90deg);
    }
    .hamburger {
        padding: 8px;
        position: fixed;
        left: 20px;
        z-index: 1000;
        display: block;
        display: block !important;
    }
    .hamburger-box {
        width: 28px;
        height: 22px;
    }
    .hamburger span {
        background: #ffffff;
        transition: all 0.3s ease;
    }
    .hamburger.active span {
        background: #ffffff;
    }
    body.menu-open {
        overflow: hidden;
    }
    body.menu-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 998;
    }
    .mobile-menu.active {
        display: block;
        transform: translateY(0);
        opacity: 1;
    }
    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .logo {
        position: static;
        transform: none;
        text-align: center;
        margin: 15px auto;
        display: none !important;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        margin: 0;
        display: none !important;
        visibility: hidden;
    }

    .header-image-container {
        height: 60vh;
    }

    .header-text {
        left: 5%;
        max-width: 90%;
    }

    .main-title {
        font-size: 3rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    .footer-content {
        flex-wrap: wrap;
    }

    .footer-block {
        min-width: 100%;
        margin-bottom: 2rem;
    }

    .contacts-title.gradient-text {
        font-size: 2rem;
    }
    .dropdown-content {
        position: static;
        background: rgba(255,255,255,0.1);
        box-shadow: none;
    }
    .header {
        z-index: 200;
    }
}

/* Мобильные устройства (до 480px) */
@media (max-width: 480px) {
    .mobile-menu-wrapper {
        display: block;
    }
    .product-carousel {
        max-width: 100%;
        margin: 2rem 0;
        padding: 0 20px;
    }

    .carousel-wrapper {
        overflow: visible !important;
    }

    .carousel-list {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding: 0;
        margin: 0;
        transform: none !important;
    }

    .carousel-slide {
        flex: none;
        padding: 0;
        position: relative;
        overflow: visible !important;
        transform: none !important;
        width: 90%;
        max-width: 300px;
    }

    .carousel-slide.active {
        transform: none !important;
        z-index: auto;
    }

    .slide-figure {
        height: auto;
        border-radius: 8px;
        box-shadow: none;
    }

    .slide-figure img {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 8px;
    }

    .slide-details-btn {
        position: static;
        margin: 0.5rem auto 0;
        display: block;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
        width: fit-content;
    }

    .carousel-nav {
        display: none;
    }

    .advantages-section {
        padding: 2rem 20px;
        width: 100%;
        box-sizing: border-box;
    }
    .advantages-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    .cards-row {
        display: block !important;
    }

    .advantage-card {
        min-height: auto;
        margin-bottom: 1.5rem;
    }

    .section-title-container {
        padding: 0 20px;
        margin-bottom: 1rem;
        max-width: 100%;
    }
    .mobile-close-btn {
        top: 15px;
        left: 15px;
        width: 35px;
        height: 35px;
    }
    
    .mobile-close-btn svg {
        width: 25px;
        height: 25px;
    }
    
    .mobile-nav-links {
        padding-top: 40px;
    }
    .advantage-photo {
        max-height: 300px;
        object-fit: contain;
    }
    .advantage-image {
        max-width: 100%;
        margin: 1.5rem auto 0;
        order: 3;
    }
    
    .advantages-content {
        order: 1;
    }
    
    .advantage-card {
        padding: 1.5rem;
    }
    .advantages-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .section-main-title {
        font-size: 2.8rem;
        letter-spacing: 2px;
    }
    .mobile-dropdown-content {
        grid-template-columns: 1fr;
    }
    .mobile-dropdown-btn {
        padding: 12px 15px;
        font-size: 1rem;
    }
    
    .mobile-sub-link {
        padding: 10px 15px;
        font-size: 0.9rem;
        white-space: normal;
        overflow-wrap: anywhere;
    }
    .mobile-menu {
        right: -100%;
        width: 95%;
        max-height: calc(100vh - 40px);
        margin: 20px 0;
    }
    
    .mobile-menu.active {
        right: 0;
    }
    
    .hamburger {
        padding: 10px;
    }
    .logo {
        font-size: 1.8rem;
    }

    .nav-link {
        padding: 0.5rem 0.8rem;
    }

    .main-title {
        font-size: 2.5rem;
    }

    .subtitle {
        font-size: 1rem;
        padding-top: 1rem;
    }

    .header-text {
        top: 45%;
    }

    .contact-btn {
        padding: 0.8rem 1.5rem !important;
    }

    .company-name {
        font-size: 1.8rem;
    }

    .contacts-title.gradient-text {
        font-size: 1.8rem;
    }
    .advantages-section {
        padding: 2rem 1rem;
    }
    
    .advantage-title {
        font-size: 1.3rem;
    }
    
    .advantage-text {
        font-size: 0.95rem;
    }
}

@media (max-height: 600px) {
     .advantage-card {
        padding: 1.5rem;
    }

    .section-main-title {
        font-size: 2.2rem;
    }

    .highlight {
        font-size: 1.4em;
    }
    .header-image-container {
        height: 100vh;
    }

    .header-text {
        top: 40%;
    }
}

/* Адаптация для сверхшироких экранов (более 2500px) */
@media (min-width: 2500px) {
    :root {
        font-size: 18px;
    }

    .nav-container,
    .footer-content,
    .responsive-img {
        max-width: 2000px;
    }

    .main-title {
        font-size: 7rem;
    }

    .subtitle {
        font-size: 1.8rem;
    }
}

@media (max-width: 1200px) {
    .carousel-slide {
        max-width: 400px;
    }
    .slide-caption {
        font-size: 1.1rem;
    }
    .slide-details-btn {
        font-size: 1.05rem;
    }
    .modal-content {
        width: 800px;
        padding: 24px;
    }
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    
    .advantage-image {
        max-width: 80%;
        margin: 0 auto 3rem;
    }
}

@media (min-width: 1441px) {
    .advantages-grid {
        grid-template-columns: 1.2fr 1fr;
        gap: 8rem;
    }
    
    .advantage-image {
        max-width: 900px;
        transform: scale(1.05);
        margin-left: -50px;
    }
}

/* Стандартные десктопы (1025px - 1440px) */
@media (min-width: 1025px) and (max-width: 1440px) {
        /* Шапка */
        .header-image-container {
            height: 70vh;
        }
        
        .header-text {
            max-width: 45%;
        }
        
        .main-title {
            font-size: 4.5rem;
        }
        
        .subtitle {
            font-size: 1.3rem;
        }
        
        /* Навигация */
        .logo {
            font-size: 2.2rem;
            margin-left: 0;
        }
        
        .nav-links {
            gap: 1.5rem;
        }
        
        .nav-link {
            padding: 0.7rem 1rem;
            font-size: 0.95rem;
        }
        
        .contact-btn {
            padding: 0.9rem 1.8rem !important;
        }
        
        /* Секция преимуществ */
        .advantages-section {
            padding: 4rem 3rem;
        }
        
        .section-main-title {
            font-size: 3.5rem;
        }
        
        .advantage-card {
            padding: 1.8rem;
            min-height: 220px;
        }
        
        .advantage-title {
            font-size: 1.4rem;
        }
        
        .advantage-text {
            font-size: 0.95rem;
        }
        
        .advantage-image {
            max-width: 600px;
            right: 80px;
        }
        
        /* Карусель */
        .gallery-track {
            height: 500px;
        }
        
        /* Контакты */
        .contacts-title {
            font-size: 2.2rem;
        }
        
        /* Футер */
        .company-name {
            font-size: 2rem;
        }
        
        .contacts-title.gradient-text {
            font-size: 1.8rem;
        }
    }
    .advantages-grid {
        grid-template-columns: 1.5fr 1fr;
        gap: 6rem;
    }
    
    .advantage-image {
        max-width: 650px;
        align-self: center;
    }

@media (min-width: 769px) and (max-width: 1024px) {
    .header-image-container {
        height: 65vh;
    }
    
    .header-text {
        max-width: 50%;
        left: 5vw;
    }
    
    .main-title {
        font-size: 4rem;
    }
    
    .subtitle {
        font-size: 1.2rem;
    }
    
    /* Навигация */
    .logo {
        font-size: 2rem;
        margin-left: 0;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .nav-link {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .contact-btn {
        padding: 0.8rem 1.5rem !important;
    }
    
    /* Секция преимуществ */
    .advantages-grid {
        grid-template-columns: 1fr;
    }
    
    .advantages-section {
        padding: 3rem 2rem;
    }
    
    .section-main-title {
        font-size: 3.2rem;
    }
    
    .advantages-content {
        padding-right: 0;
        padding-left: 0;
    }
    
    .advantage-card {
        padding: 1.5rem;
        min-height: auto;
    }
    
    .advantage-image {
        max-width: 80%;
        margin: 3rem auto 0;
        position: relative;
        right: 0;
        top: auto;
        transform: none;
        height: auto;
    }
    
    /* Карусель */
    .gallery-track {
        height: 450px;
    }
    
    .gallery-item {
        width: 25%;
    }
    
    /* Контакты */
    .contacts-container {
        grid-template-columns: 1fr;
    }
    
    .contacts-title {
        font-size: 2rem;
    }
    
    /* Футер */
    .footer-content {
        flex-wrap: wrap;
    }
    
    .footer-block {
        min-width: 50%;
        margin-bottom: 2rem;
    }
    
    .company-name {
        font-size: 1.8rem;
    }
    
    .advantage-photo {
        height: auto;
    }
    
    .advantages-content {
        order: 1;
    }
}

/* Планшеты в портретной ориентации (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        width: 100%;
        padding-left: 20px;
        padding-right: 20px;
        box-sizing: border-box;
    }

    .cards-row {
        flex-direction: column; /* если ещё не установлено */
    }

    .advantage-card {
        width: 100%;
        margin-bottom: 20px; /* небольшой отступ между карточками */
    }
    .advantage-image {
        max-width: 100%;
        margin: 2rem auto 0;
        height: auto;
    }
    .advantages-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .advantages-content {
        order: 1;
    }
}

@media (max-width: 767px) {
  .mobile-menu-wrapper {
    display: block;
  }
}

@media (max-width: 767px) {
  .desktop-language-switcher {
    display: none;
  }
}
