/* ==========================================================================
   SM GLOBAL IT SOLUTION - DEDICATED MOBILE VIEW & APP-LIKE EXPERIENCE (FIXED)
   Custom Mobile Architecture: Bottom Dock Bar, Touch Gestures & Native Layout
   ========================================================================== */

/* Hidden on desktop by default */
.mobile-bottom-dock {
  display: none;
}

.mobile-drawer-overlay {
  display: none;
}

.mobile-drawer {
  display: none;
}

.mobile-header-actions {
  display: none;
}

.swipe-hint {
  display: none;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS: TABLET & MOBILE (< 992px)
   ========================================================================== */
@media (max-width: 991px) {
  /* Layout shifts */
  .top-bar {
    display: none; /* Hide top utility bar on mobile to save vertical space */
  }

  .site-header {
    padding: 0.25rem 0;
  }

  .site-header .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0.4rem 0;
  }

  .brand-logo {
    flex-shrink: 0;
  }

  .brand-logo img {
    height: 32px;
    max-width: 140px;
    object-fit: contain;
  }

  /* Desktop nav is hidden */
  .nav-menu {
    display: none;
  }

  .nav-actions .btn-desktop {
    display: none;
  }

  /* Mobile quick actions in header */
  .mobile-header-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
  }

  .mobile-action-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #25D366;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.35);
  }

  .mobile-action-call {
    background: var(--blue-vibrant);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
  }

  .mobile-nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    color: var(--primary-navy);
    border: 1px solid var(--border-light);
  }

  /* Grids collapse */
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.2rem;
    text-align: center;
  }

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

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

  .hero-trust-metrics {
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.2rem;
  }

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

  .pillars-grid {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }

  .counters-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
  }

  .counter-card {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem;
  }

  .counter-card:nth-last-child(-n+2) {
    border-bottom: none;
  }

  .team-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
  }

  .testimonials-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .cta-banner-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .cta-form-box {
    text-align: left;
  }

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

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

/* ==========================================================================
   MOBILE PHONES (< 768px): SEAMLESS APP EXPERIENCE
   ========================================================================== */
@media (max-width: 767px) {
  /* Safe padding for fixed dock */
  body {
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-section {
    padding: 2rem 0 3rem;
  }

  .hero-title {
    font-size: 1.95rem;
    line-height: 1.2;
    letter-spacing: -0.01em;
  }

  .hero-description {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
  }

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

  .hero-cta-group .btn {
    width: 100%;
    padding: 0.85rem 1.2rem;
  }

  .hero-trust-metrics {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
    text-align: left;
  }

  .trust-item {
    background: #FFFFFF;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
  }

  /* Hero Visual & Sample Explorer */
  .hero-visual {
    margin-top: 0.5rem;
  }

  .hero-main-card {
    padding: 1.2rem;
  }

  .floating-metric-badge {
    display: none;
  }

  .hero-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
  }

  .hero-stat-box {
    padding: 0.7rem;
  }

  .hero-stat-number {
    font-size: 1.25rem;
  }

  .sample-explorer-section {
    padding: 1.2rem;
    margin-top: 2rem;
  }

  .sample-filter-tabs {
    overflow-x: auto;
    white-space: nowrap;
    width: 100%;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
  }

  .swipe-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--blue-vibrant);
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-align: right;
  }

  .client-logo-grid {
    gap: 1.5rem;
  }

  .client-logo-item img {
    max-height: 26px;
  }

  .section {
    padding: 3rem 0;
  }

  .section-header {
    margin-bottom: 2rem;
  }

  .team-grid {
    grid-template-columns: 1fr;
    max-width: 300px;
    margin: 0 auto;
  }

  .team-photo-wrap {
    height: 220px;
  }

  .compliance-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    text-align: left;
  }

  .compliance-badge {
    font-size: 0.75rem;
  }

  .cta-banner-section {
    padding: 2rem 1.2rem;
    border-radius: var(--radius-lg);
  }

  .cta-form-box {
    padding: 1.4rem;
  }

  /* ==========================================================================
     CUSTOM MOBILE BOTTOM APP DOCK BAR (Pill / Floating Blur Design)
     ========================================================================== */
  .mobile-bottom-dock {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(60px + env(safe-area-inset-bottom, 0px));
    background: rgba(10, 17, 40, 0.96);
    backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 -5px 25px rgba(0, 0, 0, 0.35);
    z-index: 9990;
    align-items: center;
    justify-content: space-around;
    padding: 0 0.5rem env(safe-area-inset-bottom, 0px);
  }

  .dock-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    color: var(--text-light);
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.35rem 0.4rem;
    border-radius: 8px;
    transition: all var(--transition-fast);
    text-decoration: none;
    flex: 1;
    text-align: center;
    user-select: none;
  }

  .dock-item svg {
    width: 20px;
    height: 20px;
    stroke-width: 2;
  }

  .dock-item.active, .dock-item:active {
    color: var(--cyan-accent);
  }

  .dock-item.dock-highlight {
    background: linear-gradient(135deg, var(--blue-vibrant) 0%, var(--cyan-accent) 100%);
    color: #FFFFFF;
    border-radius: 9999px;
    padding: 0.45rem 0.6rem;
    margin: 0 0.2rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    transform: translateY(-3px);
  }

  .dock-item.dock-whatsapp {
    color: #25D366;
  }

  /* ==========================================================================
     MOBILE OFF-CANVAS APP DRAWER
     ========================================================================== */
  .mobile-drawer-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 17, 40, 0.7);
    backdrop-filter: blur(8px);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 300ms ease;
  }

  .mobile-drawer-overlay.open {
    opacity: 1;
    visibility: visible;
  }

  .mobile-drawer {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    width: 86%;
    max-width: 360px;
    height: 100vh;
    background: #FFFFFF;
    z-index: 10001;
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1), visibility 320ms;
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
  }

  .mobile-drawer.open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.3rem;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-subtle);
  }

  .drawer-header img {
    height: 34px;
    width: auto;
  }

  .drawer-close {
    background: #FFFFFF;
    border: 1px solid var(--border-light);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-primary);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
  }

  .drawer-body {
    padding: 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
  }

  .drawer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    transition: all var(--transition-fast);
  }

  .drawer-link:active, .drawer-link.active {
    background: rgba(37, 99, 235, 0.08);
    color: var(--blue-vibrant);
  }

  .drawer-link-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .drawer-link-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-vibrant);
  }

  .drawer-submenu {
    padding-left: 2.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.4rem;
  }

  .drawer-sublink {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 0.3rem 0;
  }

  .drawer-footer {
    padding: 1.2rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-page);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
  }

  /* iOS Safari Input Zoom Prevention (Ensure >= 16px to prevent unwanted automatic viewport zooming) */
  .form-control,
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px !important;
  }

  /* Mobile Touch Targets (WCAG 2.2 Level AA standard: min 44x44px target sizes) */
  .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .tool-pill-btn {
    min-height: 40px;
    padding: 0.55rem 0.95rem !important;
    font-size: 0.84rem !important;
  }

  /* Mobile Padding for Long-form Content & Inquiry Cards */
  .legal-doc-card,
  .contact-form-card {
    padding: 1.5rem 1.15rem !important;
    border-radius: var(--radius-lg) !important;
  }

  /* Safe Word Breaking for URLs, Emails & Long Strings to prevent horizontal scroll */
  p, h1, h2, h3, h4, h5, td, th, .detail-val {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* Mobile Map Container Optimization */
  .map-responsive-container {
    height: 240px !important;
  }
}

