/* DeepBlue dbs.com.sa — phone/tablet layout overlay. Does not change brand colors. */
@media (max-width: 991.98px) {
  html,
  body {
    overflow-x: hidden;
    max-width: 100%;
  }

  .what-we-do,
  .partners,
  .but-how {
    height: auto !important;
    min-height: 0 !important;
  }

  .what-we-do .desc h2,
  .but-how .title h2,
  .company-building .title h2,
  .our-ventures .title h2,
  .specialists-story .title h2 {
    line-height: 1.3 !important;
  }

  .navbar-toggler {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
    display: inline-grid;
    place-items: center;
  }

  .offcanvas .nav-link,
  .header li a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  .hero-section .hero-content .contact-us,
  .hero-section .hero-content .btn,
  .startup-together .contact-us button {
    min-height: 48px;
  }

  div:has(> a[href*="wa.me"]) {
    width: 48px !important;
    height: 48px !important;
    bottom: max(16px, env(safe-area-inset-bottom, 0px)) !important;
  }

  a[href*="wa.me"] {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px;
    min-height: 48px;
  }

  .whatsapp-fixed,
  .scroll-up,
  .show-up {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px;
    min-height: 48px;
    bottom: max(16px, env(safe-area-inset-bottom, 0px)) !important;
  }
}

@media (max-width: 767.98px) {

  [style*="opacity: 0"]:not(.stat-box),
  [style*="opacity:0"]:not(.stat-box) {
    opacity: 1 !important;
    transform: none !important;
  }

  .header {
    padding-block: 6px !important;
  }

  .header .logo img,
  .header .navbar-brand img,
  .header img[data-db-brand] {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    object-fit: contain !important;
    flex: 0 0 40px;
  }

  .header .db-wordmark {
    font-size: 0.98rem;
  }

  .navbar-toggler {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 8px;
    display: inline-grid;
    place-items: center;
  }

  .hero-section {
    height: auto !important;
    min-height: 0 !important;
    padding: 88px 0 72px !important;
  }

  .hero-section .hero-content .row.g-3 {
    --bs-gutter-x: 0.5rem;
    --bs-gutter-y: 0.5rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .hero-section .hero-content .row.g-3 > [class*="col-"] {
    width: 100%;
    max-width: 100%;
    padding: 0;
    flex: none;
  }

  .hero-section .hero-content h1,
  .hero-section .hero-content h1.display-3 {
    font-size: clamp(1.4rem, 6.4vw, 1.75rem) !important;
    line-height: 1.4 !important;
    margin-bottom: 12px !important;
    overflow-wrap: break-word;
  }

  .hero-section .hero-content h2 {
    font-size: clamp(1.35rem, 6vw, 1.7rem) !important;
    line-height: 1.35 !important;
  }

  .hero-section .hero-content > p.lead,
  .hero-section .hero-content > p:not(.db-trust):not(.db-hero-form-title) {
    font-size: 15px !important;
    line-height: 1.7 !important;
    margin-top: 0 !important;
    margin-bottom: 14px !important;
  }

  .hero-section .hero-content .contact-us,
  .hero-section .hero-content .btn {
    min-height: 48px;
    font-size: 16px !important;
    padding: 10px 16px !important;
  }

  .what-we-do,
  .partners,
  .but-how {
    height: auto !important;
    min-height: 0 !important;
    padding-block: 36px 40px;
  }

  .what-we-do .desc h2,
  .but-how .title h2,
  .company-building .title h2,
  .our-ventures .title h2,
  .specialists-story .title h2,
  .startup-together .box h3 {
    font-size: clamp(1.45rem, 6.6vw, 1.9rem) !important;
    line-height: 1.3 !important;
  }

  .what-we-do .desc p,
  .but-how .title p,
  .company-building .title p {
    font-size: 15px !important;
    line-height: 1.7 !important;
  }

  .but-how .desc h4 {
    font-size: 17px !important;
    line-height: 1.4 !important;
  }

  .but-how .desc p {
    font-size: 14.5px !important;
    line-height: 1.65 !important;
  }

  .specialists-story .title p {
    font-size: 1.05rem !important;
    line-height: 1.5 !important;
  }

  .company-building .row {
    --bs-gutter-x: 0.75rem;
    --bs-gutter-y: 0.75rem;
  }

  .company-building .row.mt-5 {
    margin-top: 1rem !important;
  }

  .company-building .icon {
    margin-bottom: 0 !important;
  }

  .company-building .icon .box {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    grid-template-areas:
      "img title"
      "img body";
    column-gap: 12px;
    row-gap: 4px;
    align-items: start;
    text-align: start !important;
    padding: 16px 0 !important;
    min-height: 0 !important;
    height: auto !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(10, 160, 208, 0.16) !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .company-building .icon img,
  .company-building .icon .img-fluid {
    grid-area: img;
    width: 56px !important;
    height: 56px !important;
    object-fit: contain;
    margin: 0 !important;
  }

  .company-building .icon h4 {
    grid-area: title;
    margin: 0 !important;
    font-size: 16px !important;
    line-height: 1.35 !important;
  }

  .company-building .icon p {
    grid-area: body;
    font-size: 13px !important;
    line-height: 1.55 !important;
  }

  .specialists-story .box .icon {
    width: 72px !important;
    height: 72px !important;
  }

  .specialists-story .box img {
    width: 40px !important;
    height: 40px !important;
  }

  .specialists-story .box h4 {
    font-size: 20px !important;
    line-height: 1.35 !important;
  }

  .specialists-story .box p {
    font-size: 14px !important;
    line-height: 1.6 !important;
  }

  .our-ventures .img-logo img {
    width: 56px !important;
    height: 56px !important;
  }

  .partners .box h3 {
    font-size: 1.25rem !important;
    line-height: 1.4 !important;
  }

  .partners .box p {
    line-height: 1.65 !important;
  }

  .whatsapp-fixed,
  .scroll-up,
  .show-up {
    width: 48px !important;
    height: 48px !important;
    min-width: 48px;
    min-height: 48px;
    bottom: max(16px, env(safe-area-inset-bottom, 0px)) !important;
  }

  .footer img {
    max-width: 140px;
    height: auto;
  }

  .startup-together .contact-us input,
  .startup-together .contact-us textarea {
    min-height: 48px;
  }
}

@media (min-width: 576px) and (max-width: 767.98px) {
  .company-building .row > [class*="col-"] {
    flex: 0 0 50%;
    max-width: 50%;
  }
}
