/* ==========================================================================
   StudyHub Global - responsive corrections on top of the theme
   Loaded last, so it overrides bootsnav/style.css without editing them.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Header: keep the logo and the menu on one row.
   The theme floats them, so once the menu grew (Gallery, Client Login) it
   wrapped onto a second line. Flexbox keeps brand left / menu right and the
   type tightens as the window narrows instead of breaking the row.
   -------------------------------------------------------------------------- */

@media (min-width: 1024px) {
  nav.navbar.bootsnav > .container-full,
  nav.navbar.bootsnav > .container,
  nav.navbar.bootsnav > .container-fluid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
  }

  nav.navbar.bootsnav .navbar-header {
    float: none;
    flex: 0 0 auto;
    margin: 0;
  }

  nav.navbar.bootsnav .navbar-collapse {
    float: none;
    flex: 1 1 auto;
    display: flex !important;
    justify-content: flex-end;
    padding-left: 0;
    padding-right: 0;
    overflow: visible;
  }

  nav.navbar.bootsnav ul.nav.navbar-right,
  nav.navbar.bootsnav ul.nav.navbar-nav {
    float: none;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    margin: 0;
  }

  nav.navbar.bootsnav ul.nav > li {
    float: none;
    flex: 0 0 auto;
  }

  /* Size the menu in proportion to the window instead of at fixed
     breakpoints, so all of the items keep fitting on one row from a small
     laptop up to a wide desktop. */
  nav.navbar.bootsnav ul.nav > li > a {
    white-space: nowrap;
    padding: 30px clamp(7px, 0.82vw, 15px);
    font-size: clamp(11px, 0.86vw, 13px);
    letter-spacing: 0.02em;
  }

  nav.navbar.bootsnav .navbar-brand img.logo {
    max-height: clamp(42px, 3.6vw, 70px);
    width: auto;
  }

  /* On desktop the client link lives in the top bar, so hide the menu copy. */
  nav.navbar.bootsnav ul.nav > li.nav-client-login { display: none !important; }

  /* Dropdowns still need normal positioning inside the flex row. */
  nav.navbar.bootsnav ul.nav > li.dropdown { position: relative; }
  nav.navbar.bootsnav ul.nav > li.dropdown > ul.dropdown-menu {
    left: 0;
    right: auto;
  }
}

/* --------------------------------------------------------------------------
   2. Top contact bar: wrap neatly instead of overflowing.
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
  .top-bar-area .info.box {
    margin-right: 15px !important;
    justify-content: center !important;
  }
  .top-bar-area .info.box ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 18px;
  }
}

@media (max-width: 767px) {
  .top-bar-area { padding: 6px 0; }
  .top-bar-area .info.box { margin-right: 0 !important; }
  .top-bar-area .info.box ul { gap: 2px 12px; }
  .top-bar-area .info.box ul li p { font-size: 11px; }
}

/* The client login sits in the top utility bar on desktop; on tablet and
   phone the top bar is hidden by the theme, so the menu copy takes over. */
.top-bar-area .topbar-client a { font-weight: 600; }
.top-bar-area .topbar-client .icon i { font-size: 13px; }

/* --------------------------------------------------------------------------
   3. Mobile menu: give the drawer room and make the items easy to tap.
   -------------------------------------------------------------------------- */

@media (max-width: 1023px) {
  nav.navbar.bootsnav .navbar-header { padding: 6px 0; }
  nav.navbar.bootsnav .navbar-brand img.logo { max-height: 44px; width: auto; }

  nav.navbar.bootsnav .navbar-collapse {
    max-height: 78vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  nav.navbar.bootsnav ul.nav > li > a {
    padding: 13px 15px;
    font-size: 13px;
  }
  nav.navbar.bootsnav ul.nav ul.dropdown-menu > li > a { padding: 11px 26px; }
}

/* --------------------------------------------------------------------------
   4. Page banners: keep the heading inside the screen on small devices.
   -------------------------------------------------------------------------- */

@media (max-width: 991px) {
  .breadcrumb-area .centeredtxt h1 { font-size: 34px; }
}

@media (max-width: 600px) {
  .breadcrumb-area .centeredtxt h1 {
    font-size: 24px;
    line-height: 1.25;
    word-break: break-word;
  }
}

/* --------------------------------------------------------------------------
   5. General small-screen safety.
   -------------------------------------------------------------------------- */

img { max-width: 100%; }

@media (max-width: 767px) {
  body { overflow-x: hidden; }
  .default-padding, .default-padding-top { padding-top: 50px; }
  .default-padding, .default-padding-bottom { padding-bottom: 50px; }
  .site-heading h2 { font-size: 24px; }
}
