/**
 * Olayemi Hospital — visually balanced homepage feature grids.
 *
 * Match the stacked right cards with the left introductory card height on
 * tablets, and align the department detail card to its navigation panel.
 */

@media (min-width: 992px) {
  .page-home-v2 #why-us > .container > .row {
    align-items: stretch;
  }

  .page-home-v2 #why-us .content {
    display: flex;
    width: 100%;
    flex-direction: column;
    justify-content: center;
  }

  .page-home-v2 #why-us .content .more-btn {
    margin-top: 3px;
  }

  .page-home-v2 #why-us .icon-boxes {
    width: 100%;
    min-width: 0;
    height: 100%;
    display: flex !important;
    flex-direction: column;
    justify-content: stretch !important;
  }

  .page-home-v2 #why-us .icon-boxes > .row {
    flex: 1 1 auto;
    height: 100%;
    margin-top: 0;
    margin-bottom: 0;
    --bs-gutter-y: 16px;
  }

  .page-home-v2 #why-us .icon-boxes > .row > [class*="col-"] {
    display: flex;
    min-width: 0;
  }

  .page-home-v2 #why-us .icon-boxes .icon-box {
    margin-top: 0 !important;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: clamp(19px, 2vw, 30px);
  }

  .page-home-v2 #why-us .icon-boxes .icon-box i {
    margin-bottom: clamp(10px, 1.2vw, 19px);
  }

  .page-home-v2 #why-us .icon-boxes .icon-box h4 {
    margin-bottom: 9px;
  }

  .page-home-v2 #departments > .container > .row {
    align-items: stretch;
  }

  .page-home-v2 #departments .departments-nav {
    display: flex;
    flex-direction: column;
    height: 100%;
    gap: 10px;
  }

  .page-home-v2 #departments .departments-nav > .nav-item {
    display: flex;
    flex: 1 1 0;
    min-height: 0;
    margin-top: 0;
  }

  .page-home-v2 #departments .departments-nav .nav-link {
    display: flex;
    align-items: center;
    width: 100%;
    margin: 0;
    min-height: 58px;
  }

  .page-home-v2 #departments .departments-panel {
    display: flex;
    width: 100%;
    min-height: 100%;
    align-items: center;
    border: 0;
  }

  .page-home-v2 #departments .departments-panel > .tab-pane {
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
  }

  .page-home-v2 #departments .departments-panel .tab-pane > .row {
    align-items: center;
  }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
  .page-home-v2 #why-us .icon-boxes > .row > [class*="col-"] {
    width: 100%;
  }

  .page-home-v2 #why-us .icon-boxes .icon-box {
    padding: 18px 22px;
  }

  .page-home-v2 #why-us .icon-boxes .icon-box h4 {
    font-size: 17px;
  }

  .page-home-v2 #why-us .icon-boxes .icon-box p {
    font-size: 13px;
  }
}

/* Stacked phone layout avoids forced heights and preserves reading order. */
@media (max-width: 991.98px) {
  .page-home-v2 #why-us .icon-boxes,
  .page-home-v2 #departments .departments-panel {
    height: auto;
  }

  .page-home-v2 #why-us .icon-boxes > .row > [class*="col-"] {
    display: flex;
  }

  .page-home-v2 #why-us .icon-boxes .icon-box {
    flex: 1 1 auto;
    width: 100%;
  }

  .page-home-v2 #departments .departments-nav {
    height: auto;
  }
}
