/* ==========================================================================
   HANEXA - RESPONSIVE STYLES (MOBILE-FIRST POLISH)
   Zero horizontal overflow, fluid typography, smooth mobile navigation
   ========================================================================== */

/* Universal Overflow Protection */
html, body, #wrapper, #content {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  position: relative;
}

/* Base Mobile Drawer Styling (Available at all breakpoints, triggered by active class) */
.mobile-nav-drawer {
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 14, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(-8px);
  padding: 0;
  overflow-y: auto;
}

.mobile-nav-drawer.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(12, 16, 23, 0.8);
}

.mobile-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mobile-close-btn:hover {
  background: rgba(255, 255, 255, 0.16);
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 2rem 1.75rem;
}

.mobile-nav-links a {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.25rem 0;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
  color: #fff;
  transform: translateX(4px);
}

.mobile-drawer-footer {
  padding: 1.5rem 1.75rem;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: rgba(12, 16, 23, 0.8);
}

.mobile-drawer-info {
  text-align: center;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.mobile-drawer-info strong {
  color: #fff;
}

/* About Leadership & Address Block */
.about-leadership-badge {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0 1rem 0;
}

.founder-info-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.founder-label {
  color: var(--text-dim);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.founder-name {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1.05rem;
}

.address-info-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.address-info-row svg {
  color: var(--accent-cyan);
  flex-shrink: 0;
}

/* Breakpoint: Desktop Laptops & Monitors (1200px) */
@media (max-width: 1200px) {
  .hero-grid {
    gap: 2.5rem;
  }
  
  .process-timeline {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-top {
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 2rem;
  }
}

/* Breakpoint: Tablets (1024px) */
@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3.5rem;
    text-align: center;
  }

  .hero-content {
    align-items: center;
    text-align: center;
  }

  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta-group {
    justify-content: center;
  }

  .hero-badges-row {
    justify-content: center;
  }

  .hero-visual-wrapper {
    width: 100%;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

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

  .contact-card-box {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 2.5rem;
  }

  .scoping-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-top {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
}

/* Breakpoint: Mobile Landscape & Small Tablets (880px) */
@media (max-width: 880px) {
  .nav-links,
  .nav-right .btn-primary {
    display: none;
  }

  .hamburger-menu {
    display: block;
  }

  .section {
    padding: 4.5rem 1.25rem;
  }

  /* Sleek App-Like Horizontal Swipe Track for Services */
  .services-tabs-nav {
    display: flex;
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start !important;
    gap: 0.5rem;
    padding: 0.4rem 0.2rem 0.8rem 0.2rem;
    margin-bottom: 2rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    width: 100%;
  }

  .services-tabs-nav::-webkit-scrollbar {
    display: none;
  }

  .service-tab-btn {
    flex-shrink: 0;
    white-space: nowrap;
    font-size: 0.84rem;
    padding: 0.5rem 1.15rem;
  }

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

  .process-timeline {
    grid-template-columns: 1fr;
  }

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

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

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

/* Breakpoint: Standard Mobile (640px) */
@media (max-width: 640px) {
  .section {
    padding: 3.5rem 1rem;
  }

  /* Ambient Glows: Soften and constrain to prevent border glare */
  .bg-radial-glow-1 {
    width: 260px !important;
    height: 260px !important;
    filter: blur(50px) !important;
    top: 10px !important;
    opacity: 0.7;
  }

  .bg-radial-glow-2 {
    display: none !important;
  }

  /* Hero Section */
  .hero {
    min-height: auto;
    padding-top: 5.5rem;
    padding-bottom: 2.5rem;
  }

  .hero-title {
    font-size: clamp(1.8rem, 6.8vw, 2.3rem);
    line-height: 1.15;
    margin-bottom: 1rem;
    text-align: center;
  }

  .hero-description {
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 1.5rem;
    text-align: center;
  }

  .hero-pill {
    font-size: 0.76rem;
    padding: 0.35rem 0.9rem;
    margin-bottom: 1.2rem;
  }

  .hero-cta-group {
    flex-direction: column;
    width: 100%;
    gap: 0.75rem;
    margin-bottom: 2rem;
  }

  .hero-cta-group .btn {
    width: 100%;
    justify-content: center;
    padding: 0.8rem 1.2rem;
    font-size: 0.94rem;
  }

  .hero-badges-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    padding-top: 1.25rem;
    width: 100%;
  }

  .hero-badge-item {
    font-size: 0.78rem;
    gap: 0.45rem;
  }

  .hero-badge-item:last-child {
    grid-column: span 2;
    justify-content: center;
  }

  /* Hero Tech Card */
  .hero-visual-wrapper {
    margin-top: 1.5rem;
    width: 100%;
  }

  .hero-tech-card {
    padding: 1.1rem;
    width: 100%;
    border-radius: 14px;
  }

  .tech-pipeline-row {
    gap: 0.65rem;
    margin-bottom: 1rem;
  }

  .pipeline-item {
    padding: 0.6rem 0.75rem;
    gap: 0.5rem;
  }

  .pipeline-icon {
    width: 28px;
    height: 28px;
  }

  .pipeline-text h4 {
    font-size: 0.82rem;
  }

  .pipeline-text p {
    font-size: 0.68rem;
  }

  .pipeline-status {
    font-size: 0.7rem;
    padding: 0.15rem 0.45rem;
    flex-shrink: 0;
  }

  .tech-metrics-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem;
    padding-top: 0.75rem;
  }

  .metric-box {
    padding: 0.45rem 0.2rem;
  }

  .metric-value {
    font-size: 0.98rem;
  }

  .metric-label {
    font-size: 0.62rem;
  }

  .floating-badge {
    display: none !important;
  }

  /* Service Cards */
  .service-card {
    padding: 1.4rem 1.1rem;
    border-radius: 12px;
  }

  .service-title {
    font-size: 1.15rem;
  }

  .service-desc {
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 1.2rem;
  }

  /* Process Cards */
  .process-card {
    padding: 1.4rem 1.1rem;
  }

  .process-number {
    font-size: 2.2rem;
  }

  .process-step-title {
    font-size: 1.15rem;
  }

  /* Why Hanexa Cards */
  .why-card {
    padding: 1.4rem 1.1rem;
  }

  /* Portfolio CTA Box */
  .portfolio-cta-box {
    padding: 2.5rem 1.2rem;
  }

  .portfolio-cta-box h3 {
    font-size: 1.7rem;
    line-height: 1.2;
  }

  /* Scoping / Pricing Card */
  .scoping-card {
    padding: 2rem 1.2rem;
  }

  .scoping-content h3 {
    font-size: 1.6rem;
  }

  .scoping-card-cta {
    padding: 1.4rem 1rem;
  }

  /* FAQ Accordion */
  .faq-button {
    padding: 1rem 1.1rem;
  }

  .faq-title {
    font-size: 0.96rem;
  }

  .faq-content {
    padding: 0 1.1rem;
  }

  .faq-item.active .faq-content {
    padding: 0 1.1rem 1.1rem 1.1rem;
  }

  /* Contact Section */
  .contact-card-box {
    padding: 1.6rem 1.1rem;
    gap: 2rem;
  }

  .contact-info-col h3 {
    font-size: 1.8rem;
  }

  .contact-detail-text a.value,
  .contact-detail-text span.value {
    font-size: 0.98rem;
    word-break: break-word;
  }

  .contact-form-col {
    padding: 1.4rem 1.1rem;
  }

  .form-input,
  .form-textarea,
  .form-select {
    font-size: 16px; /* Prevents auto-zoom on iOS */
  }

  /* Footer */
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  /* Floating Widgets: Compact & Non-Obtrusive */
  .floating-whatsapp {
    bottom: 16px;
    right: 16px;
    padding: 0.65rem 0.95rem;
    font-size: 0.82rem;
    border-radius: var(--radius-full);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
    z-index: 9999;
  }

  .back-to-top {
    bottom: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    z-index: 9999;
  }
}

/* Breakpoint: Extra Small Phones (360px and below) */
@media (max-width: 360px) {
  .hero-title {
    font-size: 1.65rem;
  }

  .hero-pill {
    font-size: 0.7rem;
  }

  .btn {
    font-size: 0.88rem;
    padding: 0.7rem 1rem;
  }

  .floating-whatsapp span {
    display: none; /* Icon-only on ultra-narrow screens */
  }

  .floating-whatsapp {
    padding: 0.65rem;
    width: 42px;
    height: 42px;
    justify-content: center;
  }
}