/* ==========================================================================
   DIGITALTAB PTY LTD - MASTER RESPONSIVE STYLESHEET
   Carefully tuned for:
   - Desktops & Laptops (1024px - 1440px)
   - Tablets (769px - 992px)
   - Mobile Landscape & Phablets (481px - 768px)
   - Standard Phones (375px - 480px, iPhone SE / 13 / 14 / 15 / Galaxy S)
   - Ultra-Compact Phones (320px - 360px)
   ========================================================================== */

/* --- Strict Horizontal Overflow Prevention --- */
html,
body {
  max-width: 100vw;
  overflow-x: hidden !important;
  position: relative;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ==========================================================================
   1. LAPTOPS & SMALL DESKTOPS (max-width: 1200px)
   ========================================================================== */
@media screen and (max-width: 1200px) {
  .dt-container {
    max-width: 100%;
    padding-left: 24px;
    padding-right: 24px;
  }

  .dt-hero-grid {
    gap: 36px;
  }

  .dt-footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 32px;
  }
}

/* ==========================================================================
   2. TABLETS (max-width: 992px)
   ========================================================================== */
@media screen and (max-width: 992px) {
  :root {
    --header-height: 72px;
  }

  /* Hide topbar on mobile/tablet to conserve vertical space */
  .dt-topbar {
    display: none !important;
  }

  /* Header */
  .dt-header-inner {
    height: 72px;
  }

  .dt-nav {
    display: none !important;
  }

  .dt-hamburger {
    display: flex !important;
  }

  .dt-logo-status-tag {
    display: none !important;
  }

  /* Hero */
  .dt-hero {
    min-height: auto;
    padding: 36px 0 40px;
    overflow-x: hidden;
  }

  .dt-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
    width: 100%;
  }

  .dt-hero-content {
    max-width: 100%;
    min-width: 0;
  }

  /* 12 Sections Tablet */
  .dt-stats-grid-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .dt-services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .dt-portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .dt-industries-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .dt-testimonials-grid {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin: 0 auto;
  }

  .dt-cta-box {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 36px 28px;
  }

  .dt-feature-split {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .dt-feature-split.reverse {
    direction: ltr;
  }

  .dt-contact-layout {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .dt-spotlight-grid {
    grid-template-columns: 1fr !important;
  }

  .dt-product-overview-layout {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  .dt-footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }
}

/* ==========================================================================
   3. MOBILE PHONES (max-width: 768px)
   ========================================================================== */
@media screen and (max-width: 768px) {

  /* Container Padding */
  .dt-container,
  .dt-container-narrow {
    padding-left: 16px !important;
    padding-right: 16px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* --- Navbar: Clean, Uncrowded Layout --- */
  .dt-header {
    width: 100%;
    overflow-x: hidden;
  }

  .dt-header-inner {
    height: 66px;
    padding: 0;
  }

  .dt-logo-link {
    gap: 0;
  }

  .dt-logo-dock {
    padding: 4px 8px;
    border-radius: 10px;
  }

  .dt-logo {
    height: 38px;
    max-width: 130px;
  }

  /* Hide header CTA button on mobile so logo & hamburger breathe cleanly */
  .dt-header-actions .dt-btn-cyber-nav {
    display: none !important;
  }

  .dt-header-actions {
    gap: 0;
  }

  /* --- Hero Section: Perfect Mobile Fit --- */
  .dt-hero {
    padding: 20px 0 28px;
    overflow-x: hidden;
    width: 100%;
  }

  .dt-hero>.dt-container {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .dt-hero-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 24px;
    width: 100%;
    max-width: 100%;
  }

  .dt-hero-content {
    width: 100%;
    max-width: 100%;
    min-width: 0 !important;
    padding: 0;
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* Cyber Badge: Responsive wrap */
  .dt-cyber-badge {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 10px;
    max-width: 100%;
    box-sizing: border-box;
    margin-bottom: 12px;
  }

  .dt-cyber-badge-text {
    font-size: 0.66rem;
    letter-spacing: 0.02em;
    white-space: normal;
    line-height: 1.35;
    flex: 1;
    word-break: break-word;
  }

  .dt-cyber-badge-code {
    font-size: 0.6rem;
    padding: 2px 5px;
  }

  /* Cyber Headline: Scaled down to prevent horizontal clipping */
  .dt-cyber-headline {
    font-size: clamp(1.4rem, 6.2vw, 1.95rem) !important;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 10px;
    word-break: break-word;
    overflow-wrap: break-word;
    width: 100%;
  }

  .dt-holographic-text {
    font-size: inherit;
    line-height: inherit;
    word-break: break-word;
  }

  .dt-headline-sub {
    font-size: clamp(1rem, 4.2vw, 1.25rem) !important;
    line-height: 1.25;
    margin-top: 4px;
    word-break: break-word;
  }

  /* Hero Paragraph */
  .dt-hero-desc {
    font-size: 0.86rem;
    line-height: 1.55;
    margin-bottom: 18px;
    width: 100%;
    max-width: 100%;
    word-break: break-word;
  }

  /* 4 Capability Pills: 2x2 Grid with compact text */
  .dt-hero-feature-tags {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px;
    width: 100%;
    margin-bottom: 18px;
    box-sizing: border-box;
  }

  .dt-cyber-pill {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center;
    padding: 7px 4px;
    font-size: 0.68rem;
    text-align: center;
    box-sizing: border-box;
    gap: 5px;
  }

  .dt-cyber-pill span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .dt-cyber-pill i {
    font-size: 0.72rem;
    flex-shrink: 0;
  }

  /* Hero Buttons: Full Width Stack */
  .dt-hero-btns {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px;
    margin-bottom: 20px;
    box-sizing: border-box;
  }

  .dt-btn-cyber-primary,
  .dt-btn-cyber-secondary {
    width: 100% !important;
    justify-content: center;
    padding: 13px 18px;
    font-size: 0.92rem;
    box-sizing: border-box;
    text-align: center;
  }

  /* Trust Bar: 2x2 Grid */
  .dt-hero-trust-bar {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px;
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px 12px;
    border-radius: 14px;
    box-sizing: border-box;
  }

  .dt-trust-sep {
    display: none !important;
  }

  .dt-trust-metric {
    align-items: center;
    text-align: center;
  }

  .dt-trust-val {
    font-size: 1.05rem;
  }

  .dt-trust-lbl {
    font-size: 0.64rem;
    letter-spacing: 0.02em;
    text-align: center;
  }

  /* --- 3D Cyber Console Mobile Dimensions --- */
  .dt-cyber-hud-console {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 14px 10px;
    border-radius: 16px;
    box-sizing: border-box;
    margin-top: 4px;
    overflow: hidden;
  }

  .dt-hud-header {
    flex-wrap: wrap;
    gap: 8px;
    padding-bottom: 10px;
    margin-bottom: 10px;
  }

  .dt-hud-code {
    font-size: 0.68rem;
  }

  .dt-hud-ping {
    font-size: 0.62rem;
  }

  .dt-hud-core-stage {
    height: 230px;
    width: 100%;
    overflow: hidden;
    position: relative;
  }

  .dt-orbit-svg {
    width: 190px;
    height: 190px;
  }

  .dt-core-inner-sphere {
    width: 48px;
    height: 48px;
    font-size: 1.15rem;
  }

  .dt-core-sonar-ring {
    width: 64px;
    height: 64px;
  }

  .dt-core-label {
    font-size: 0.58rem;
    margin-top: 4px;
  }

  /* Micro Telemetry Chips on Mobile */
  .dt-hud-chip {
    padding: 3px 6px !important;
    border-radius: 6px !important;
    gap: 4px !important;
    max-width: 110px !important;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08) !important;
    animation: none !important;
    /* disable hover translation on small screens */
  }

  .dt-chip-icon {
    width: 18px !important;
    height: 18px !important;
    font-size: 0.6rem !important;
    border-radius: 4px !important;
    flex-shrink: 0 !important;
  }

  .dt-chip-title {
    font-size: 0.55rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 72px !important;
  }

  .dt-chip-meta {
    display: none !important;
  }

  .dt-chip-pos-1 {
    top: 6px !important;
    left: 4px !important;
  }

  .dt-chip-pos-2 {
    top: 6px !important;
    right: 4px !important;
  }

  .dt-chip-pos-3 {
    bottom: 6px !important;
    left: 4px !important;
  }

  .dt-chip-pos-4 {
    bottom: 6px !important;
    right: 4px !important;
  }

  .dt-terminal-body {
    padding: 8px 8px !important;
    font-size: 0.62rem !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  /* Marquee Ticker */
  .dt-hero-ticker-ribbon {
    margin-top: 20px;
    padding: 8px 0;
    font-size: 0.72rem;
  }

  .dt-ticker-item {
    font-size: 0.72rem;
  }

  /* --- Other Homepage Sections on Mobile --- */
  .dt-services-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .dt-why-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .dt-process-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .dt-models-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .dt-tech-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }

  .dt-form-row {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .dt-footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .dt-footer-bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .dt-footer-legal {
    justify-content: center;
  }

  .dt-section {
    padding: 44px 0;
  }

  .dt-section-header {
    margin-bottom: 1.8rem;
  }

  .dt-section-title {
    font-size: 1.55rem;
  }

  .dt-section-desc {
    font-size: 0.88rem;
  }
}

/* ==========================================================================
   4. SMALL PHONES (max-width: 480px)
   ========================================================================== */
@media screen and (max-width: 480px) {

  .dt-container,
  .dt-container-narrow {
    padding-left: 14px !important;
    padding-right: 14px !important;
  }

  .dt-header-inner {
    height: 62px;
  }

  .dt-logo {
    height: 36px;
    max-width: 115px;
  }

  .dt-cyber-headline {
    font-size: 1.45rem !important;
  }

  .dt-headline-sub {
    font-size: 1rem !important;
  }

  .dt-tech-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .dt-industries-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .dt-stats-grid-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .dt-contact-form-panel,
  .dt-contact-info-panel {
    padding: 20px 14px;
  }

  .dt-cta-box {
    padding: 24px 14px;
  }

  .dt-cta-content h2 {
    font-size: 1.45rem;
  }

  .dt-back-to-top {
    bottom: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
  }

  /* Offcanvas Menu */
  .dt-offcanvas-header {
    padding: 12px 14px;
  }

  .dt-offcanvas-body {
    padding: 14px 12px 28px;
    gap: 14px;
  }

  .dt-offcanvas-link {
    padding: 10px 12px;
    font-size: 0.92rem;
  }

  .dt-offcanvas-sublink {
    padding: 8px 10px;
    font-size: 0.82rem;
  }
}