﻿@media (orientation: portrait) {

  #promo-title {
    font-size: 8vw;

  }

  .stars-background {
    position: absolute;
    top: -300px;
    top: 0;
    left: 0;
    width: 200%;
    height: auto;
    z-index: 0;
  }

  .right-hand {
    top: 0;
    right: -330px;
  }

  .left-hand {
    top: 0;
    left: -280px;
  }


  .decor-left {
    display: none;
  }

  .decor-right {
    right: -250px;
  }

  .hero-background {
    left: -40px;
    width: 110%;

  }


  #shadow img {
    width: 220%;
  }

  .content {
    margin-top: 120px;
  }

  .categories-container {
    margin-top: -250px;

  }

  .main-title {
    font-size: 42px;
    line-height: 48px;
  }


}






@media (max-width: 1700px) {

  /* прячем текстовый заголовок */
  .repair_parts_row h5 {
    display: none;
  }

  /* превращаем кнопку в “ПОТРІБНІ ЗАПЧАСТИНИ?” */
  .parts_btn {
    width: auto;
    padding-left: 45px;
    padding-right: 25px;
  }

  .parts_btn::before {
    content: "ПОТРІБНІ ЗАПЧАСТИНИ?";
  }

  /* прячем обычный текст кнопки */
  .parts_btn {
    font-size: 0;
    /* скрытие текста */
  }

  .parts_btn::before {
    font-size: 20px;
    /* padding-left: 25px; */

    letter-spacing: 1px;
    /* font-family: Gilroy; */
    font-weight: 700;
    color: #073009;
    text-transform: uppercase;
  }

  .icons_line {
    left: 65%;
    margin: 0;
    gap: 50px;
  }

  .icons_line img {
    transform: scale(0.9);
    filter: brightness(1.0) contrast(1.08);
  }
}



@media (max-width: 1550px) {


  .icons_line {
    left: 65%;
    margin: 0;
    gap: 30px;
  }

  .icons_line img {
    transform: scale(0.8);
    filter: brightness(1.0) contrast(1.08);
  }




  /* Base sizes for video teasers and selects at 1550px */
  .category-selects .select-wrapper {
    width: 840px;
    /* ~2x wider */
    max-width: calc(100% - 40px);
  }

  .video-thumb-wrap {
    width: 840px;
    /* ~2x wider */
    max-width: calc(100% - 40px);
    margin: 0 auto 18px auto;
  }

  .video-thumbs {
    justify-content: center;
  }

  .mini-video-title {
    font-size: 24px;
    line-height: 28px;
  }

  /* Maintain correct video proportions using aspect-ratio */
  .video-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
  }

  /* keep play-icon proportionate */
  .play-icon {
    width: 80px;
    height: auto;
  }
}

/* Stack selects and teasers vertically at 1395px */
@media (max-width: 1395px) {

  .icons_line {
    left: 63%;
    margin: 0;
    gap: 30px;
  }

  .icons_line img {
    transform: scale(0.8);
    filter: brightness(1.0) contrast(1.08);
  }

  .parts_btn::before {
    content: "КАТАЛОГ ЗАПЧАСТИН";
  }



  .category-selects {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
    align-items: center;
  }

  .category-selects .select-wrapper {
    margin: 0;
  }



  /* styles for the dynamically created stacked pairs container */
  .video-select-stack {
    display: none;
  }

  .video-select-stack-tabs.sub-tabs {
    margin-top: 0px;
    margin-bottom: 50px;
  }

  /* Tabs use existing .sub-tabs styles; no extra styles here */

  .video-select-stack .video-select-pair {
    display: none;
    /* hide by default; show only active */
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-bottom: 20px;
  }

  .video-select-stack .video-select-pair.active {
    display: flex;
  }

  .video-select-stack .select-wrapper {
    width: 100%;
    max-width: 560px;
    margin-bottom: 25px;
  }

  .video-select-stack .video-thumb-wrap {
    width: 100%;
    max-width: 560px;
  }


  .operator-info .search-container {

    top: 20px;
  }




}

/* Short labels for main tabs are handled via JS text swap for correct underline widths */



@media (max-width: 1300px) {

  .icons_line {
    left: 61%;
    margin: 0;
    gap: 20px;
  }

  .icons_line img {
    transform: scale(0.8);
    filter: brightness(1.0) contrast(1.08);
  }

  .parts_btn::before {
    content: "ЗАПЧАСТИНИ";
  }


}

@media (max-width: 1150px) {

  .icons_line {
    left: 63%;
    margin: 0;
    gap: 10px;
  }

  .icons_line img {
    transform: scale(0.8);
    filter: brightness(1.0) contrast(1.08);
  }

  .parts_btn::before {
    content: "ЗАПЧАСТИНИ";
  }
  .repair_parts_icons::after {

    width: 93vw;

  }

.parts_btn {
  margin-left: 20px;
}


}


@media (max-width: 1050px) {

  .right-hand {
    right: -100px;
  }

  .left-hand {
    left: -100px;
  }

  .categories-container {
    margin-top: -150px;
  }

  .decor-left {
    display: none;
  }

   .decor-right {
    top: -80px;
    right: 100px;
   }
    

  .icons_line {
    left: 50%;
    margin: 0;
    gap: 30px;
  }

  .icons_line img {
    transform: scale(0.9);
    filter: brightness(1.0) contrast(1.08);
  }

  /* .parts_btn::before {
        content: "ЗАПЧАСТИНИ";
    } */
  .parts_btn {
    display: none;
  }

    .repair_parts_icons::after {

    width: 90vw;

  }


  .devices-container.repair {
    display: block;
    position: relative;
    z-index: 10;
    margin-top: 60px;
    margin-bottom: -80px;
    padding: 0 24px;
  }  

  .mobile-button {
    position: relative;
    z-index: 11;
    margin-top: -60px;
    margin-bottom: 40px;
    width: 100%;
    display: flex;
    justify-content: center;
}



.btn-mob {
    display: flex;
    
    align-items: center;
    justify-content: center;

    width: 308px;
    height: 60px;

    background: #62F014;        
    border-radius: 40px;

    color: #073009;             
    font-family: Gilroy, sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;

    transition: all 0.25s ease;
}

.btn-mob-outer {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 308px;
    height: 60px;

    background: transparent;          /* прозрачная */
    border: 3px solid #62F014;        /* зелёная рамка */
    border-radius: 40px;

    color: #62F014;                   /* текст зелёный */
    font-family: Gilroy, sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;

    transition: all 0.25s ease;
}

}



@media (max-width: 1040px) and (orientation: landscape),
(max-width: 1040px) and (aspect-ratio: 1/1) {

  #fusion-items {
    display: none;
  }

  .stars-background {
    width: 200%;
  }

  .hero-background {
    left: -50px;
    width: 120%;
  }

  #promo-title {
    font-size: 60px;
    line-height: 1.2;
    margin-top: 50px;
  }






}




@media (max-width: 950px) {

  .icons_line {
    left: 50%;
    margin: 0;
    gap: 15px;
  }

  .icons_line img {
    transform: scale(0.8);
    filter: brightness(1.0) contrast(1.08);
  }

  /* .parts_btn::before {
        content: "ЗАПЧАСТИНИ";
    } */
  .parts_btn {
    display: none;
  }

    .repair_parts_icons::after {

    width: 90vw;

  }

}



@media (max-width: 850px) {

  .icons_line {
    left: 50%;
    margin: 0;
    gap: 5px;
  }

  .icons_line img {
    transform: scale(0.8);
    filter: brightness(1.0) contrast(1.08);
  }

  /* .parts_btn::before {
        content: "ЗАПЧАСТИНИ";
    } */
  .parts_btn {
    display: none;
  }


  .repair_parts_icons::after {

    width: 90vw;

  }

}













/* Mobile version ================================================================== */
@media (max-width: 768px) {

  /* Mobile menu full width on mobile/tablet */
  .mobile-menu {
    width: 100%;
    max-width: 100%;
  }

  /* Close button aligned under cart icon on mobile */
  .mobile-menu-close {
    right: 16px !important;
  }

  /* Prevent body scroll when menu is open */
  body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }

  .devices-container.repair {
    display: block;
    position: relative;
    z-index: 10;
    margin-top: 60px;
    margin-bottom: -80px;
    padding: 0 24px;
  }

    #hero-mob-intro {
        margin-top: 220px;
    }

.btn-mob {
  width: 85vw;
}

  #shadow {
    margin-top: -180px;
  }

  .devices-menu {
    text-align: left;
  }

  .categories-container {
    display: none;
  }

  .video-container .video-subtitle,
  .video-container .main-title {
    /* font-size: 12px; */
    /* display: none; */
  }

  .video-container {
    position: relative;
    display: block;
    margin-top: -10px;
  }

  .header.header-hidden {
    transform: translateY(-100px);
    /* ← изменить */
  }

  /* Header - mobile layout: menu icon | logo | cart icon */
  .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 26px;
    height: auto;
  }

  /* Keep same paddings on scroll to avoid jumps */
  .header.scrolled {
    padding: 24px 26px !important;
  }

  /* Re-layout nav icons on mobile: make them span full width with logo centered */
  .nav-icons {
    position: static;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    width: 100%;
    pointer-events: all;
  }

  .menu-icon {
    height: 24px;
    cursor: pointer;
    pointer-events: all;
  }

  .logo {
    position: absolute;
    left: 50%;
    top: 12px;
    /* align vertically inside header padding */
    transform: translateX(-50%);
    pointer-events: none;
    /* clicks pass to underlying area; logo usually not interactive on mobile */
  }

  .desktop-logo {
    display: none;
  }

  .mobile-logo {
    display: block;
    height: 54px;
    /* match compact mobile header */
    width: auto;
  }

  .cart-icon {
    margin-top: 2px;
    height: 28px;
    cursor: pointer;
    pointer-events: all;
  }

  .nav-link {
    font-size: 12px;
    padding: 6px 12px;
  }

  .stars-background {

    width: 250%;
  }

  /* Hero section */
  .hero-background {
    left: -50%;
    top: 15%;
    width: 250%;
    height: auto;
  }

  #clouds {
    display: none;
  }

  .decor_line {
    /* margin-top: 50px; */

  }



  .moon-background {
    display: none;
    margin-left: -60px;
    margin-top: 30px;
  }

  .moon-background img {
    width: 30px;
    height: auto;

  }

  #promo-title {
    font-size: 50px;
    line-height: 1.2;
    margin-top: 100px;

  }

  #top-title {
    position: relative;
    z-index: 1;
  }

  /* .moon {
    width: 30px;
    right: 40px;
    top:  120px;
    
  } */

  .left-hand,
  .right-hand {
    display: none;
  }

  .decor-left,
  .decor-right {
    display: none;
  }

  #shadow img {
    width: 300%;
  }

  /* Content */
  .content {
    margin-top: 80px;
    padding: 0 16px;
  }

  .hero-title {
    font-size: 32px;
    line-height: 1.2;
    margin-bottom: 16px;
  }

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

  /* Categories */
  .categories-container {
    margin-top: 20px;
    gap: 12px;
  }

  .category-block {
    padding: 16px;
    min-height: 180px;
  }

  .category-title {
    font-size: 18px;
    margin-bottom: 12px;
  }

  .category-links {
    gap: 8px;
  }

  .category-link {
    font-size: 12px;
    padding: 6px 10px;
  }

  /* Operator Info */
  .operator-info {
    margin-top: 60px;
    padding: 24px 16px;
  }

  .operator-title {
    font-size: 24px;
    margin-bottom: 16px;
  }

  .operator-description {
    font-size: 14px;
    line-height: 1.6;
  }

  .search-container {
    position: static;
    margin-top: 20px;
    width: 100%;
  }

  .search-input {
    font-size: 14px;
    padding: 12px 40px 12px 16px;
  }

  /* Devices section */
  .devices-section {
    padding: 40px 16px;
  }

  .devices-title {
    font-size: 28px;
    margin-bottom: 24px;
  }

  /* Main tabs */
  .main-tabs {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
  }

  .main-tabs>div {
    font-size: 12px;
    padding: 8px 12px;
  }

  /* Sub tabs */
  .sub-tabs {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
  }

  .sub-tabs>div {
    font-size: 11px;
    padding: 6px 10px;
  }

  /* Video selects */
  .category-selects {
    gap: 12px;
  }

  .select-wrapper {
    width: 100%;
    margin-bottom: 16px;
  }

  .custom-select {
    font-size: 13px;
    padding: 10px 32px 10px 12px;
  }

  /* Video teasers */
  .video-teasers-row {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .video-thumb-wrap {
    width: 100%;
  }

  .video-title {
    font-size: 14px;
    margin-top: 8px;
  }

  .play-icon {
    width: 60px;
    height: 60px;
  }

  /* Show mobile hero intro under main hero title */
  .hero-mobile-intro {
    display: block;


    margin: 16px 0 20px 0;
    padding: 0 16px;
    color: #E9ECEF;
    font-size: 14px;
    line-height: 1.6;
  }

  #video_block::before {
    content: "";
    position: absolute;
    top: -160px;
    /* вынос тени наружу */
    left: 0;
    right: 0;
    height: 160px;
    background: linear-gradient(to top, rgba(0, 0, 0, 1), rgba(0, 0, 0, 0));
    pointer-events: none;
    z-index: 100;
  }

  #video_block {
    background: #000;
    /* box-shadow: 0 0 40px 20px rgba(0, 0, 0, 0.9); */
    position: relative;
    isolation: isolate;

  }

  .video-decor {
    padding-top: 50px;
    padding-bottom: 40px;
    display: flex;
    justify-content: center;
    /* по горизонтали */
    align-items: center;
    /* по вертикали */

  }

  .video-decor video {
    display: block;
    width: 70vw;
  }

  .hero-mobile-intro p {
    margin: -40px 0 40px 0;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.7);
    font-size: 20px;


  }

  /* .hero-mobile-intro .hero-mobile-actions {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .hero-mobile-intro .btn-primary,
  .hero-mobile-intro .btn-secondary {
    flex: 1 1 100%;
    font-size: 14px;
    padding: 16px 14px;
    text-align: center;
    font-size: 17px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
    letter-spacing: 1px;
    text-transform: uppercase;
    height: 60px;
  }

  .hero-mobile-intro .btn-primary {
    fill: linear-gradient(269deg, #64F26B 0%, #3BD943 26.9%, #45C94C 100%);
    color: #073009;


  }

  

  .hero-mobile-intro .btn-secondary {
    background-color: transparent;
    border: 2px solid #3BD943;
    color: #3BD943;
  } */

.img-mob-icon {
    /* display: block; */
    position: absolute;
    top: -105px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: auto;
    z-index: 1;
  }


.hero-mobile-intro .hero-mobile-actions {
    margin-top: 100px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

/* === БАЗА КАК РАНЕЕ === */
.hero-mobile-intro .btn-primary,
.hero-mobile-intro .btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    /* width: 308px; */
    height: 60px;

    font-family: Gilroy, sans-serif;
    font-size: 20px;            
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 0;

    border-radius: 40px;
    text-decoration: none;

    transition: all 0.25s ease;
}

/* === 1. ЗЕЛЁНАЯ КНОПКА (как btn-mob) === */
.hero-mobile-intro .btn-primary {
    background: #62F014;
    /* background: #3bd943; */
    color: #073009;
    border: none;
}

/* .hero-mobile-intro .btn-primary:hover {
    filter: brightness(1.15);
    transform: scale(1.04);
} */

/* === 2. OUTLINE КНОПКА (как btn-mob-outer) === */
.hero-mobile-intro .btn-secondary {
    background: transparent;
    border: 3px solid #62F014;
    color: #62F014;
    border: 3px solid #3bd943;
    color: #3bd943;    
}

/* .hero-mobile-intro .btn-secondary:hover {
    background: #62F014;
    color: #073009;
    transform: scale(1.04);
    filter: brightness(1.1);
} */



  
  /* Stacked video gallery */
  .video-select-stack .select-wrapper {
    max-width: 100%;
  }

  .video-select-stack .video-thumb-wrap {
    max-width: 100%;
  }

  .video-select-stack-tabs.sub-tabs {
    margin-bottom: 30px;
  }

  /* Terminal modal */
  .terminal-modal.show {
    width: 95vw;
    height: 70vh;
    max-width: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }

  .terminal-header {
    padding: 16px 20px 8px 16px;
  }

  .terminal-title {
    font-size: 16px;
  }

  .terminal-close {
    width: 28px;
    height: 28px;
  }

  .terminal-body {
    padding: 12px 16px;
    font-size: 13px;
  }

  .terminal-body .line {
    margin-bottom: 8px;
  }

  /* Buttons */
  .btn-primary {
    font-size: 14px;
    padding: 10px 20px;
  }

  /* Video background */
  video {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }

  /* Do not shrink icons or logo on scroll for mobile */

  .header.scrolled .cart-icon {
    margin-top: 2px;
    height: 28px;
    cursor: pointer;
    pointer-events: all;
  }


  .header.scrolled .menu-icon {
    height: 24px;
    margin-top: 2px;
  }

  .header.scrolled .logo {
    /* prevent scale and position shifts on scroll */
    transform: translateX(-50%);
    margin-top: 0;
    margin-left: 0;
  }

  /* Devices: turn tab rows into selects */
  .devices-menu .main-tabs,
  .devices-menu .sub-tabs {
    display: none;
  }

  /* Hide video stack tabs on small mobile; use custom select instead */
  .video-select-stack-tabs {
    display: none;
  }

  /* Show the mobile video stack select */
  #video_select_stack [data-stack-ui="type-select"] {
    display: block;
    margin-bottom: 16px;
  }

  .devices-selects {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
    /* как в существующем селекте — выравнивание по левому краю текста */
    margin-top: 16px;
    padding: 0 40px;
  }

  .devices-selects .select-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
  }

  .devices-selects .select-header {
    align-items: flex-start;
    text-align: left;
  }


  #promo-title {
    font-size: 8vw;
    /* margin-top: 80px; */
  }

  #devices_block {
    background: #000;
  }


  .repair_parts_icons {
    height: 650px;
  }

  .repair_parts_icons::after {
    height: 320px;
    width: 88vw;

  }

  .icons_line {
    left: 50%;
    margin: 0;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 40px 50px;
  }

  .icons_line img {
    transform: scale(1.0);
    filter: brightness(1.0) contrast(1.08);
  }

  /* .parts_btn::before {
        content: "ЗАПЧАСТИНИ";
    } */
  .parts_btn {
    display: none;
  }





}





@media (max-width: 600px) {


  .repair_parts_icons::after {
    height: 350px;
    width: 88vw;

  }


  /* .repair_parts_icons {
  height: 650px;
}  

.repair_parts_icons::after {
  height: 350px;
  width: 90vw;

} */

  .icons_line {
    left: 50%;
    margin: 0;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 30px;
  }

  .icons_line img {
    transform: scale(0.95);
    filter: brightness(1.0) contrast(1.08);
  }


  /* .parts_btn {
    display: none;
  }

  .devices-container.repair {
    display: block;
    position: relative;
    z-index: 10;
    margin-top: 60px;
    margin-bottom: -80px;
  } */

}


@media (max-width: 500px) {

  .repair_parts_icons {
    height: 590px;
    background: #000;
  }

  .repair_parts_icons::after {
    height: 400px;
    width: 88vw;
    opacity: 0;
    /* background: #000; */

  }

  .icons_line {
    left: 50%;
    margin: 0;

    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 30px 60px;
    /* background: #000; */
    
  }

  .icons_line img {
    transform: scale(1.0);
    filter: brightness(1.0) contrast(1.08);

  }

}





/* Extra small mobile */
@media (max-width: 480px) {


  .decor_line img {
    width: 300px;
    height: 50px;
  }

  .decor_line.vid_block {
    margin-top: 50px;
  }

  body,
  html {
    overflow-x: hidden !important;
    width: 100%;
    max-width: 100vw;
  }

  #hero-mob-intro {
    margin-top: 220px;
  }

  .main-title {
    font-size: 26px;
  }

  .sub-main-title {
    font-size: 16px;
  }

  .select-value {
    font-size: 16px;
  }

  .hero-header {
    width: 100%;
    padding: 0;
  }

  .video-container {

    padding: 0;
  }

  #video_block {
    /* width: 100% !important; */
    padding: 0 16px;
  }

  /* .header nav {
    gap: 8px;
  } */

  .nav-link {
    font-size: 11px;
    padding: 4px 8px;
  }

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

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

  .category-block {
    padding: 12px;
    min-height: 160px;
  }

  .category-title {
    font-size: 16px;
  }

  .category-link {
    font-size: 11px;
    padding: 4px 8px;
  }

  .operator-title {
    font-size: 20px;
  }

  .devices-title {
    font-size: 24px;
  }

  .main-tabs>div {
    font-size: 11px;
    padding: 6px 10px;
  }

  .sub-tabs>div {
    font-size: 10px;
    padding: 5px 8px;
  }

  .terminal-modal.show {
    width: 98vw;
    height: 80vh;
  }

  .terminal-body {
    font-size: 12px;
  }

  /* Consistent side padding for video stack select too */
  #video_select_stack {
    padding: 0 16px;
  }
}