/* ==========================================================================
   RAJSHAHI COLO - MOBILE RESPONSIVE ENHANCEMENTS
   Optimized for screens 320px - 768px (iPhone, Android, Foldables, Tablets)
   ========================================================================== */

/* 1. Global Viewport & Box Bounds (Prevent sideways horizontal overflow) */
html, body {
  max-width: 100vw !important;
  overflow-x: hidden !important;
  position: relative !important;
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
}

body.drawer-open {
  overflow: hidden !important;
  touch-action: none !important;
}

/* Ensure media and canvas never expand beyond viewport */
img, video, canvas, svg {
  max-width: 100% !important;
  height: auto;
}

/* 2. Mobile Header & Brand Logo */
@media (max-width: 1023px) {
  header.rajshahi-header {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    background-color: rgba(10, 10, 15, 0.95) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
  }
}

@media (max-width: 480px) {
  .rajshahi-logo-single {
    height: 1.85rem !important;
    max-width: 165px !important;
  }
  
  .rajshahi-mobile-btn {
    padding: 7px 9px !important;
    border-color: rgba(0, 240, 255, 0.3) !important;
    background: rgba(255, 255, 255, 0.03) !important;
  }
  
  .rajshahi-mobile-btn:active {
    background: rgba(0, 240, 255, 0.15) !important;
  }
}

/* 3. Mobile Navigation Drawer */
#rajshahi-mobile-drawer {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(10, 10, 15, 0.98) !important;
  backdrop-filter: blur(24px) !important;
  -webkit-backdrop-filter: blur(24px) !important;
  z-index: 99999 !important;
  padding: 1.25rem !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
}

#rajshahi-mobile-drawer.hidden {
  display: none !important;
}

#rajshahi-mobile-drawer a {
  min-height: 42px !important;
  display: flex !important;
  align-items: center !important;
}

/* 4. Hero Section */
@media (max-width: 768px) {
  .fiberstate-scope .hero-section-inner {
    padding-top: 92px !important;
    padding-bottom: 40px !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .fiberstate-scope .hero-top-badge {
    font-size: 11px !important;
    letter-spacing: 0.05em !important;
    padding: 6px 14px !important;
    max-width: 96% !important;
    margin-bottom: 18px !important;
    white-space: normal !important;
    text-align: center !important;
    line-height: 1.35 !important;
    display: inline-flex !important;
    box-sizing: border-box !important;
  }

  .fiberstate-scope .hero-heading-1,
  .fiberstate-scope .hero-heading-2 {
    font-size: clamp(1.9rem, 7.8vw, 2.5rem) !important;
    line-height: 1.15 !important;
    letter-spacing: -0.03em !important;
  }

  .fiberstate-scope .hero-subtext {
    font-size: clamp(0.92rem, 3.8vw, 1.05rem) !important;
    line-height: 1.6 !important;
    margin-top: 14px !important;
    margin-bottom: 24px !important;
    color: #cbd5e1 !important;
    max-width: 100% !important;
  }

  .fiberstate-scope .hero-buttons-group {
    flex-direction: column !important;
    width: 100% !important;
    max-width: 330px !important;
    margin: 0 auto !important;
    gap: 12px !important;
  }

  .fiberstate-scope .hero-btn-cyan,
  .fiberstate-scope .hero-btn-outline {
    width: 100% !important;
    min-height: 48px !important;
    font-size: 14.5px !important;
    padding: 12px 20px !important;
    justify-content: center !important;
    box-sizing: border-box !important;
  }
}

/* 5. Global Reach Pacific Map Section */
@media (max-width: 900px) {
  .fiberstate-scope .reach-header-row {
    flex-direction: column !important;
    gap: 16px !important;
  }
  .fiberstate-scope .reach-headline {
    font-size: clamp(1.85rem, 6.5vw, 2.4rem) !important;
    line-height: 1.15 !important;
  }
  .fiberstate-scope .reach-paragraph {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
  }
}

@media (max-width: 640px) {
  .fiberstate-scope.global-reach-wrapper {
    padding: 48px 14px 44px !important;
  }

  .fiberstate-scope .fs-map-card {
    height: 310px !important;
    border-radius: 12px !important;
  }

  .fiberstate-scope .fs-card-callout {
    padding: 3px 6px !important;
    border-radius: 6px !important;
    backdrop-filter: blur(4px) !important;
  }

  .fiberstate-scope .fs-card-title {
    font-size: 8.5px !important;
    line-height: 1.1 !important;
  }

  .fiberstate-scope .fs-card-sub {
    font-size: 7.5px !important;
    margin-top: 1px !important;
  }

  .fiberstate-scope .fs-badge-pop {
    padding: 2px 5px !important;
    font-size: 8.5px !important;
    gap: 2.5px !important;
    border-radius: 4px !important;
  }

  .fiberstate-scope .fs-badge-six {
    padding: 2px 5px !important;
    font-size: 8px !important;
    border-radius: 4px !important;
  }

  .fiberstate-scope .fs-pulse-beacon {
    width: 14px !important;
    height: 14px !important;
  }
}

@media (max-width: 480px) {
  .fiberstate-scope .fs-map-card {
    height: 275px !important;
  }

  /* Hide distant non-critical callouts on narrow screens so central Asian PoPs stay clean */
  .fiberstate-scope .fs-card-callout[style*="left: 36.5%"],
  .fiberstate-scope .fs-card-callout[style*="left: 14.0%"] {
    display: none !important;
  }
}

/* 6. Dedicated Servers Inventory Section */
@media (max-width: 859px) {
  .fiberstate-scope.fs-servers-section {
    padding: 50px 14px 45px !important;
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box !important;
  }

  .fiberstate-scope .fs-header-row {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 16px !important;
    margin-bottom: 24px !important;
  }

  .fiberstate-scope .fs-headline {
    font-size: clamp(1.9rem, 7.5vw, 2.5rem) !important;
    line-height: 1.15 !important;
  }

  .fiberstate-scope .fs-description {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
  }

  .fiberstate-scope .fs-table-card {
    border-radius: 14px !important;
  }

  .fiberstate-scope .fs-card-head {
    padding: 12px 14px !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  .fiberstate-scope .fs-loc-title {
    font-size: 13.5px !important;
  }

  .fiberstate-scope .fs-lg-link {
    font-size: 11.5px !important;
  }

  .fiberstate-scope .fs-mobile-cards-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 10px !important;
  }

  .fiberstate-scope .fs-mc-category {
    padding: 8px 12px !important;
    border-radius: 8px !important;
  }

  .fiberstate-scope .fs-mobile-card {
    padding: 14px 14px !important;
    border-radius: 12px !important;
    background: rgba(14, 19, 32, 0.98) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  .fiberstate-scope .fs-mc-btn {
    min-height: 46px !important;
    font-size: 13.5px !important;
  }
}

/* 7. Purpose-Built Datacenter & Colocation Sections */
@media (max-width: 768px) {
  .fiberstate-scope#datacenter-infrastructure {
    padding-top: 48px !important;
    padding-bottom: 48px !important;
  }

  .fiberstate-scope .columns.gap-3x {
    gap: 24px !important;
  }

  .fiberstate-scope .ui-snippet-frame {
    min-height: auto !important;
    padding: 18px 14px !important;
    border-radius: 18px !important;
  }

  .fiberstate-scope .medium-heading {
    font-size: 1.95rem !important;
    line-height: 1.2 !important;
  }

  .fiberstate-scope .text-block-8,
  .fiberstate-scope .text-block-9 {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
  }

  .fiberstate-scope#colocation-solutions {
    padding-top: 45px !important;
    padding-bottom: 45px !important;
  }

  .fiberstate-scope .boxes {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .fiberstate-scope .box {
    padding: 20px 18px !important;
    border-radius: 16px !important;
  }

  .fiberstate-scope#carrier-neutral-metrics {
    padding-top: 45px !important;
    padding-bottom: 45px !important;
  }

  .fiberstate-scope .carrierneutral {
    font-size: 1.95rem !important;
    line-height: 1.2 !important;
  }

  .fiberstate-scope .metric-box.large {
    padding: 22px 16px !important;
    border-radius: 16px !important;
  }

  .fiberstate-scope .metric-box.large .large-heading {
    font-size: 2.6rem !important;
  }

  .fiberstate-scope .metric-box:not(.large) {
    padding: 18px 16px !important;
    border-radius: 16px !important;
  }

  .fiberstate-scope .metric-box:not(.large) .medium-heading {
    font-size: 2.3rem !important;
  }

  .fiberstate-scope .button.align-center.larger {
    width: 100% !important;
    max-width: 320px !important;
    padding: 14px 20px !important;
    font-size: 14px !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  .fiberstate-scope#select-order-deploy {
    padding-top: 40px !important;
    padding-bottom: 50px !important;
  }

  .fiberstate-scope .seciton-inner.bg-dark-2 {
    padding: 28px 16px !important;
    border-radius: 20px !important;
  }

  .fiberstate-scope#select-order-deploy .medium-heading {
    font-size: 1.85rem !important;
    line-height: 1.25 !important;
  }

  .fiberstate-scope#select-order-deploy .large-text {
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
  }

  .fiberstate-scope .fine-print {
    font-size: 11.5px !important;
    line-height: 1.5 !important;
  }
}

/* 8. FAQ Section */
@media (max-width: 640px) {
  #faq {
    padding-top: 45px !important;
    padding-bottom: 45px !important;
  }

  #faq .home-heading {
    font-size: 1.95rem !important;
    line-height: 1.2 !important;
  }

  #faq details summary {
    font-size: 15px !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
    line-height: 1.4 !important;
  }

  #faq details p {
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin-top: 8px !important;
    margin-bottom: 10px !important;
  }
}

/* 9. Limda Footer Top CTA & Main Footer */
@media (max-width: 640px) {
  .limda-footer-top .max-w-7xl {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .limda-footer-top h2 {
    font-size: 1.65rem !important;
    line-height: 1.25 !important;
  }

  .limda-footer-top p {
    font-size: 0.92rem !important;
    margin-top: 1rem !important;
  }

  .limda-action-card {
    border-radius: 12px !important;
  }

  .limda-action-card button,
  .limda-action-card a h3 {
    min-height: 44px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .limda-main-footer {
    padding-top: 2.5rem !important;
    padding-bottom: 2rem !important;
  }

  .limda-main-footer .max-w-7xl {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .limda-member-box {
    height: 42px !important;
    padding: 0 10px !important;
  }

  .limda-member-box img {
    max-height: 24px !important;
    max-width: 70px !important;
  }
}

/* 10. GDPR Cookie Consent Banner */
@media (max-width: 640px) {
  #rcc-cookie-consent {
    left: 10px !important;
    right: 10px !important;
    bottom: 10px !important;
    width: auto !important;
    max-width: none !important;
    padding: 16px !important;
    border-radius: 14px !important;
  }

  #rcc-cookie-consent h3 {
    font-size: 14.5px !important;
  }

  #rcc-cookie-consent p {
    font-size: 12.5px !important;
    line-height: 1.4 !important;
  }

  #rcc-cookie-consent button {
    padding: 9px 12px !important;
    font-size: 13px !important;
    min-height: 42px !important;
  }
}
