/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 1200px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
 
  .slide-content {
    padding: 0 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
  }
 
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
 
  .footer-logo {
    grid-column: span 2;
    text-align: center;
    align-items: center;
  }
 
  .slide-title {
    font-size: 2.8rem;
    width: min(82%, calc(100% - 260px));
  }
}

@media (max-width: 992px) {
  .advantages-grid {
    grid-template-columns: repeat(2, 1fr);
  }
 
  .slide-content {
    padding: 0 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
  }
  
  .main-slider {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .main-slider .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
  }
 
  .content-wrapper {
    grid-template-columns: 1fr;
  }
 
  .image-container {
    max-width: 500px;
    margin: 0 auto;
  }
 
  .main-slider {
    height: 30vh;
    min-height: 300px;
  }
 
  .slide-title {
    font-size: 2.2rem;
    width: min(90%, calc(100% - 240px));
  }
 
  .section-title, .section-header {
    font-size: 32px;
  }
 
  .category-card {
    height: 250px;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 10px 0;
    background: linear-gradient(135deg, #1a1f35 0%, #252b42 50%, #1e2338 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  }

  .header.scrolled {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  }

  .header-top {
    grid-template-columns: auto 1fr auto;
    gap: 10px;
  }

  .header-left {
    justify-content: flex-start;
  }

  .header-left .logo {
    width: 160px;
  }

  .header-center {
    justify-content: center;
  }

  .header-right {
    display: flex;
    justify-content: flex-end;
  }

  .header-right .nav-icons {
    gap: 6px;
  }

  .header-right .icon-btn {
    padding: 8px;
    width: 40px;
    height: 40px;
  }

  .header-right .icon-btn img {
    width: 18px;
    height: 18px;
  }

  .nav-toggle {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
  }

  .nav-toggle span {
    background: #ffffff;
    width: 22px;
  }

  .nav-toggle span:nth-child(2) {
    width: 18px;
  }
 
  .slide-content {
    padding: 0 55px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
  }
  
  .main-slider {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .main-slider .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .carousel-container {
    padding: 60px 0 60px 0;
  }
  
  .nav-button {
    top: 50%;
    transform: translateY(-50%);
  }
  
  .nav-button:hover {
    transform: translateY(-50%) scale(1.08);
  }

  .nav-container {
    position: absolute;
    top: calc(var(--header-mobile-height) + 10px);
    left: 50%;
    width: calc(100% - 24px);
    padding: 16px;
    background: linear-gradient(135deg, rgba(20, 26, 43, 0.98) 0%, rgba(30, 38, 58, 0.96) 100%);
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 22px 45px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06);
    transform: translate(-50%, -14px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    max-height: calc(100vh - var(--header-mobile-height) - 24px);
    overflow-y: auto;
    backdrop-filter: blur(20px);
  }

  .nav-container.active {
    transform: translate(-50%, 0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 0;
  }

  .nav-menu {
    display: none;
  }

  .nav-link {
    justify-content: space-between;
    color: var(--secondary-color);
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8) 0%, rgba(241, 245, 249, 0.9) 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), inset 0 0 0 1px rgba(30, 41, 59, 0.08);
    border-radius: 14px;
    padding: 14px 18px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav-link:hover,
  .nav-link:focus {
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(37, 99, 235, 0.15) 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15), inset 0 0 0 1px rgba(37, 99, 235, 0.2);
    transform: translateX(4px);
  }

  .dropdown {
    position: static;
    display: none;
    box-shadow: none;
    width: 100%;
    opacity: 1;
    visibility: visible;
    transform: none;
    margin-top: 8px;
    margin-bottom: 10px;
    background: none;
    border: none;
  }
 
  .nav-item.active .dropdown {
    display: block;
  }

  .dropdown a {
    border-bottom: none;
    padding: 10px 12px;
    background: rgba(148, 163, 184, 0.16);
    border-radius: 10px;
    margin-bottom: 8px;
    font-size: 15px;
  }

  .dropdown a:last-child {
    margin-bottom: 0;
  }

  .mobile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .mobile-navbox {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .mobile-navbox.expanded {
    border-color: rgba(96, 165, 250, 0.4);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2), inset 0 0 0 1px rgba(96, 165, 250, 0.2);
  }

  .menu-title {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.98);
    font-size: 14px;
    letter-spacing: 0.02em;
    position: relative;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .mobile-navbox.expanded .menu-title {
    color: rgba(255, 255, 255, 1);
  }

  .menu-title::after {
    content: '';
    width: 12px;
    height: 12px;
    border-right: 2px solid rgba(255, 255, 255, 0.8);
    border-bottom: 2px solid rgba(255, 255, 255, 0.8);
    transform: rotate(45deg);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
  }

  .mobile-navbox.expanded .menu-title::after {
    transform: rotate(225deg);
    border-color: rgba(96, 165, 250, 0.9);
  }

  .mobile-navbox ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .mobile-navbox.expanded ul {
    padding: 6px 14px 10px;
    max-height: 500px;
    opacity: 1;
  }

  .mobile-navbox a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 13px;
    padding: 8px 10px;
    border-radius: 8px;
    display: block;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
  }

  .mobile-navbox a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, var(--primary-color), var(--primary-light));
    border-radius: 0 2px 2px 0;
    transition: height 0.2s ease;
  }

  .mobile-navbox a:hover {
    color: rgba(255, 255, 255, 1);
    background: rgba(96, 165, 250, 0.12);
    transform: translateX(3px);
    padding-left: 14px;
  }

  .mobile-navbox a:hover::before {
    height: 60%;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
  
  .categories-section {
    padding: 60px 20px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }
 
  .footer-container {
    grid-template-columns: 1fr;
  }
 
  .footer-logo {
    grid-column: 1;
    margin-bottom: 20px;
  }
 
  .social-links {
    position: static;
    flex-direction: row;
    justify-content: center;
    margin-top: 30px;
    gap: 15px;
  }
 
  .social-link {
    border-radius: 50%;
    width: 45px;
    height: 45px;
  }
 
  .tech-support {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
 
  .main-slider {
    height: 30vh;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .main-slider .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .slide-title {
    font-size: 1.7rem;
    width: calc(100% - 140px);
    margin: 0 auto;
  }

  .nav-button {
    width: 45px;
    height: 45px;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .nav-button:hover {
    transform: translateY(-50%) scale(1.08);
  }

  .nav-prev {
    left: 35px;
  }
 
  .nav-next {
    right: 35px;
  }
 
  .section-title, .section-header {
    font-size: 28px;
    margin-bottom: 50px;
  }
}

@media (max-width: 576px) {
  .header {
    padding: 12px 0;
  }
 
  .slide-content {
    padding: 0 16px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .main-slider {
    height: 30vh;
    min-height: 220px;
  }

  .slide-title {
    font-size: 1.4rem;
    width: calc(100% - 120px);
    max-width: calc(100% - 120px);
    margin: 0;
    padding: 14px;
  }

  .header-left .logo {
    width: 140px;
  }

  .header-right .nav-icons {
    gap: 4px;
  }

  .header-right .icon-btn {
    width: 36px;
    height: 36px;
    padding: 6px;
  }

  .header-right .icon-btn img {
    width: 16px;
    height: 16px;
  }

  .nav-toggle {
    width: 40px;
    height: 40px;
  }

  .nav-toggle span {
    width: 20px;
  }

  .nav-toggle span:nth-child(2) {
    width: 16px;
  }

  .nav-content {
    padding: 24px 18px;
    border-radius: 20px;
    max-width: 100%;
  }

  .categories-grid {
    grid-template-columns: 1fr;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }
 
  .advantages-grid {
    grid-template-columns: 1fr;
  }
 
  .section-title, .section-header {
    font-size: 26px;
    margin-bottom: 40px;
  }
 
  .advantage-title {
    font-size: 20px;
  }
 
  .company-name {
    font-size: 24px;
  }
 
  .company-motto {
    font-size: 16px;
  }
 
  .main-slider {
    height: 32vh;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .main-slider .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .carousel-container {
    padding: 50px 0 50px 0;
  }

  .slide-content {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
  }

  .slide-title {
    font-size: 1.4rem;
    width: calc(100% - 120px);
    max-width: calc(100% - 120px);
    margin: 0 auto;
    padding: 14px;
  }

  #scrollToTopBtn {
    width: 45px;
    height: 45px;
    right: 15px;
    bottom: 15px;
  }

  .nav-button {
    width: 35px;
    height: 35px;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .nav-button:hover {
    transform: translateY(-50%) scale(1.08);
  }
 
  .nav-prev {
    left: 20px;
  }
 
  .nav-next {
    right: 20px;
  }
 
  .nav-button img {
    width: 18px;
    height: 18px;
  }
 
  .modal-content, .search-box {
    padding: 25px 20px;
  }
 
  .categories-section {
    padding: 40px 15px 30px;
  }
  
  .categories-section .container {
    padding: 30px 20px;
    border-radius: 20px;
  }
  
  .advantages-section {
    padding: 30px 15px 40px;
    margin-top: -20px;
  }
  
  .company-section {
    padding: 30px 15px 50px;
  }
  
  .categories-section, .advantages-section, .company-section {
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow-x: hidden;
  }
}

@media (min-width: 1024px) {
  .header {
    padding: 10px 0;
    background: linear-gradient(135deg, #1a1f35 0%, #252b42 50%, #1e2338 100%);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08);
  }

  .header-top {
    padding-top: 0;
    padding-bottom: 0;
    gap: 40px;
  }

  .logo {
    width: auto;
    display: flex;
    align-items: center;
    min-width: 260px;
  }

  .logo img {
    height: 70px;
    width: auto;
    max-width: 300px;
    transition: transform 0.3s ease, filter 0.3s ease;
  }

  .nav-container {
    padding: 34px 48px;
    width: min(980px, calc(100% - 80px));
  }

  .nav-link {
    padding: 8px 20px;
    font-size: 15px;
  }

  .nav-link:hover,
  .nav-link:focus {
    color: #f3a4ff;
    background-color: rgba(243, 164, 255, 0.15);
    box-shadow: inset 0 0 0 1px rgba(243, 164, 255, 0.4), 0 4px 12px rgba(243, 164, 255, 0.2);
    transform: translateY(-2px);
  }

  .nav-icons {
    gap: 12px;
  }

  .icon-btn {
    padding: 10px;
    width: 44px;
    height: 44px;
  }

  .icon-btn img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
  }

  .nav-toggle {
    width: 48px;
    height: 48px;
  }

  .nav-toggle span {
    width: 24px;
    background: #ffffff !important;
  }

  .nav-toggle span:nth-child(2) {
    width: 20px;
  }

  .header.scrolled {
    background: linear-gradient(135deg, rgba(26, 31, 53, 0.98) 0%, rgba(37, 43, 66, 0.98) 50%, rgba(30, 35, 56, 0.98) 100%);
    backdrop-filter: blur(24px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.16), 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  .nav-container {
    position: fixed;
    top: 120px;
    left: 50%;
    width: min(520px, calc(100% - 120px));
    padding: 20px;
    background: linear-gradient(135deg, rgba(20, 26, 43, 0.98) 0%, rgba(30, 38, 58, 0.96) 100%);
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.08);
    transform: translate(-50%, -20px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: none;
    overflow: visible;
    backdrop-filter: blur(20px);
    z-index: 1000;
  }

  .nav-container.active {
    transform: translate(-50%, 0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav-content {
    gap: 14px;
    padding: 0;
  }

  .nav-menu {
    display: none;
  }

  .mobile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .mobile-navbox {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 0;
    overflow: hidden;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
  }

  .mobile-navbox.expanded {
    border-color: rgba(96, 165, 250, 0.4);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 5px 16px rgba(37, 99, 235, 0.25), inset 0 0 0 1px rgba(96, 165, 250, 0.2);
  }

  .menu-title {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.98);
    font-size: 15px;
    letter-spacing: 0.02em;
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .menu-title::after {
    content: '';
    width: 12px;
    height: 12px;
    border-right: 2px solid rgba(255, 255, 255, 0.8);
    border-bottom: 2px solid rgba(255, 255, 255, 0.8);
    transform: rotate(45deg);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
  }

  .mobile-navbox.expanded .menu-title::after {
    transform: rotate(225deg);
    border-color: rgba(96, 165, 250, 0.9);
  }

  .mobile-navbox ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .mobile-navbox.expanded ul {
    padding: 8px 18px 14px;
    max-height: 520px;
    opacity: 1;
  }

  .mobile-navbox a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    font-size: 14px;
    padding: 10px 12px;
    border-radius: 10px;
    display: block;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
  }

  .mobile-navbox a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, var(--primary-color), var(--primary-light));
    border-radius: 0 2px 2px 0;
    transition: height 0.2s ease;
  }

  .mobile-navbox a:hover {
    color: rgba(255, 255, 255, 1);
    background: rgba(96, 165, 250, 0.12);
    transform: translateX(3px);
    padding-left: 18px;
  }

  .mobile-navbox a:hover::before {
    height: 60%;
  }
}