/* 
  NexoraWeb Premium - Responsive Stylesheet
  =========================================
  Breakpoints: 320px, 375px, 480px, 576px, 768px, 992px, 1200px, 1400px, 1920px
*/

/* --- 1400px to 1920px (Extra Large Screens) --- */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

/* Fix top-bar wrap for mobile globally if needed */
.top-bar .container {
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* --- 1200px to 1399px (Large Desktops) --- */
@media (max-width: 1399px) {
  .container {
    max-width: 1140px;
  }
}

/* --- 992px to 1199px (Desktops & Tablets Landscape) --- */
@media (max-width: 1199px) {
  .container {
    max-width: 960px;
  }
  
  html {
    font-size: 15px; /* Slightly reduce base font size */
  }

  .hero-content {
    gap: 2rem;
  }
}

/* --- 768px to 991px (Tablets Portrait) --- */
@media (max-width: 991px) {
  .container {
    max-width: 720px;
  }
  
  .section {
    padding: var(--section-padding-mobile);
  }

  .grid-cols-4, .grid-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .trust-badges {
    justify-content: center;
  }
  
  .hero-text p {
    margin: 0 auto 2.5rem auto;
  }

  .process-steps { 
    grid-template-columns: 1fr; 
    gap: 4rem; 
  }
  .process-steps::before { 
    display: none; 
  }
  
  .portfolio-grid { 
    grid-template-columns: repeat(2, 1fr); 
  }
  
  .team-grid { 
    grid-template-columns: repeat(2, 1fr); 
  }

  /* Header adjustments for mobile */
  .desktop-menu {
    display: none !important;
  }
  
  .mobile-menu-btn {
    display: flex !important;
  }
}

/* --- 576px to 767px (Large Phones) --- */
@media (max-width: 767px) {
  .container {
    max-width: 540px;
  }
  
  .grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  .flex-row-reverse-mobile {
    flex-direction: column-reverse;
  }
  
  /* Top-bar text might be too long */
  .top-bar {
    font-size: 0.75rem;
  }
  .top-bar .flex.gap-4 {
    flex-direction: column;
    gap: 0.25rem;
    align-items: flex-start;
  }
  
  .portfolio-grid,
  .team-grid {
    grid-template-columns: 1fr;
  }
  
  /* Footer responsive */
  .footer .grid-cols-4 {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* --- 480px to 575px (Medium Phones) --- */
@media (max-width: 575px) {
  html {
    font-size: 14px;
  }
  
  .section {
    padding: 3rem 0;
  }
}

/* --- 375px to 479px (Small Phones) --- */
@media (max-width: 479px) {
  .btn {
    width: 100%; /* Full width buttons on small screens */
    margin-bottom: 0.5rem;
  }
}

/* --- 320px to 374px (Extra Small Phones) --- */
@media (max-width: 374px) {
  html {
    font-size: 13px;
  }
}

/* --- Mobile Menu Styles (Shared) --- */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 20px;
  position: relative;
  z-index: 1000;
  flex-direction: column;
  justify-content: space-between;
}

.mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-text);
  transition: all var(--transition-normal);
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-btn.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

.offcanvas-menu {
  position: fixed;
  top: 0;
  left: -100%;
  width: 80%;
  max-width: 400px;
  height: 100vh;
  background-color: var(--color-white);
  z-index: 999;
  box-shadow: var(--shadow-xl);
  transition: left 0.4s ease-in-out;
  padding: 5rem 2rem 2rem 2rem;
  overflow-y: auto;
}

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

.offcanvas-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease-in-out;
}

.offcanvas-overlay.active {
  opacity: 1;
  visibility: visible;
}
