/* Solicitors Direct v6.2.12 — medium desktop / Windows responsive pass.
 * Visual-only safeguards. The chat and routing engines are untouched.
 */

html,body{max-width:100%;overflow-x:hidden}
img,svg{max-width:100%}

/* Standard desktop header: keep the entire navigation on one clean row. */
@media (min-width:981px) and (max-width:1500px){
  #main-header .container,
  #top-header .container{
    width:96%!important;
    max-width:1440px!important;
  }

  #main-header .logo_container{
    width:270px!important;
  }

  #main-header #logo{
    width:auto!important;
    max-width:265px!important;
    max-height:58px!important;
  }

  #et-top-navigation{
    padding-left:285px!important;
    padding-top:25px!important;
    padding-bottom:25px!important;
    min-height:82px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-end!important;
  }

  #top-menu-nav,
  #top-menu{
    float:none!important;
  }

  #top-menu{
    display:flex!important;
    align-items:center!important;
    flex-wrap:nowrap!important;
    white-space:nowrap!important;
  }

  #top-menu>li{
    padding-right:14px!important;
    margin:0!important;
  }

  #top-menu>li>a{
    padding-bottom:0!important;
    font-size:14px!important;
    line-height:1.25!important;
    white-space:nowrap!important;
  }

  /* WooCommerce cart is not part of the current Solicitors Direct journey and
     was causing the search/cart controls to wrap onto a second header row. */
  #et-top-navigation .et-cart-info,
  #top-menu .et-cart-info{
    display:none!important;
  }

  #et_top_search{
    float:none!important;
    flex:0 0 20px!important;
    width:20px!important;
    margin:0 0 0 10px!important;
  }

  .et_search_outer{
    overflow:visible!important;
  }

  /* Platform hub pages */
  .sdp-platform-shell{
    width:min(1080px,calc(100% - 40px))!important;
  }
  .sdp-platform-hero{
    padding:38px 0 36px!important;
  }
  .sdp-platform-logo{
    width:175px!important;
    margin-bottom:12px!important;
  }
  .sdp-platform-hero h1{
    font-size:clamp(40px,4.2vw,50px)!important;
    letter-spacing:-1.4px!important;
  }
  .sdp-platform-hero>div>p{
    max-width:760px!important;
    margin:14px auto 22px!important;
    font-size:17px!important;
  }
  .sdp-platform-section{
    padding:44px 0!important;
  }
  .sdp-platform-grid.centres,
  .sdp-platform-grid.three{
    gap:16px!important;
  }
  .sdp-centre-card{
    padding:20px!important;
  }

  /* Specialist centre pages */
  .sdp-pi-shell{
    width:min(1120px,calc(100% - 40px))!important;
  }
  .sdp-pi-hero{
    padding:26px 0 30px!important;
  }
  .sdp-pi-centre-logo{
    width:142px!important;
    margin-bottom:10px!important;
  }
  .sdp-pi-hero h1{
    font-size:clamp(36px,4vw,50px)!important;
    letter-spacing:-1.4px!important;
  }
  .sdp-pi-hero-copy{
    max-width:740px!important;
    margin:10px auto 18px!important;
    font-size:15px!important;
  }
  .sdp-pi-chat{
    max-width:760px!important;
  }
  .sdp-pi-section{
    padding:24px 0!important;
  }

  /* Global footer remains balanced on common Windows widths. */
  .sdp-global-footer-shell{
    width:min(1180px,calc(100% - 48px))!important;
  }
  .sdp-global-footer-grid{
    gap:38px!important;
  }
}

/* Narrow desktop / Windows display scaling. Switch to Divi's compact mobile
 * navigation before the desktop menu can wrap or create a double-height header.
 */
@media (min-width:981px) and (max-width:1180px){
  #main-header .container{
    width:94%!important;
  }
  #main-header .logo_container{
    width:auto!important;
  }
  #main-header #logo{
    max-width:235px!important;
    max-height:54px!important;
  }
  #et-top-navigation{
    padding-left:250px!important;
    min-height:76px!important;
    padding-top:22px!important;
    padding-bottom:22px!important;
  }
  #top-menu>li{
    padding-right:9px!important;
  }
  #top-menu>li>a{
    font-size:12px!important;
  }
  #et_top_search{
    margin-left:6px!important;
  }
  .sdp-platform-grid.centres{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .sdp-pi-grid-4{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
}

/* At very tight desktop widths use the standard Divi mobile menu rather than
 * compressing text beyond readability. */
@media (min-width:981px) and (max-width:1040px){
  #top-menu-nav{display:none!important}
  #et_mobile_nav_menu{display:block!important;float:none!important;margin:0 8px 0 0!important}
  .mobile_menu_bar{display:block!important;padding-bottom:0!important}
  #et-top-navigation{
    padding-left:250px!important;
  }
  #et_top_search{display:none!important}
}

/* Windows-friendly typography and rendering. */
@supports (-ms-ime-align:auto){
  body,.sdp-platform-page,.sdp-pi-page{font-family:"Segoe UI",Arial,sans-serif!important}
}

/* v6.2.20 — homepage above-the-fold correction for common Windows displays.
 * Visitors at 100% browser zoom must see the guidance panel without having to
 * reduce browser zoom. These rules are deliberately scoped to the front page.
 */
@media (min-width:981px) and (max-width:1600px),
       (min-width:981px) and (max-height:950px){
  body.home #main-content > .et_builder_inner_content > .et_pb_section:first-child,
  body.home #main-content .et_builder_inner_content > .et_pb_section:first-child,
  body.home #main-content > article > .entry-content > .et_builder_inner_content > .et_pb_section:first-child{
    padding-top:26px!important;
    padding-bottom:26px!important;
    min-height:0!important;
  }

  body.home #main-content .et_builder_inner_content > .et_pb_section:first-child .et_pb_row{
    width:min(1080px,calc(100% - 42px))!important;
    max-width:1080px!important;
    padding-top:8px!important;
    padding-bottom:8px!important;
  }

  body.home #main-content .et_builder_inner_content > .et_pb_section:first-child h1,
  body.home #main-content .et_builder_inner_content > .et_pb_section:first-child h2{
    font-size:clamp(40px,4.1vw,54px)!important;
    line-height:1.04!important;
    letter-spacing:-1.5px!important;
    margin-bottom:10px!important;
  }

  body.home #main-content .et_builder_inner_content > .et_pb_section:first-child p{
    font-size:clamp(15px,1.25vw,18px)!important;
    line-height:1.48!important;
    margin-bottom:14px!important;
  }

  body.home #main-content .et_builder_inner_content > .et_pb_section:first-child .et_pb_module{
    margin-bottom:12px!important;
  }

  /* Homepage chat implementations used across current and earlier builds. */
  body.home .sdp-pi-chat,
  body.home .sdp-platform-page .sdp-pi-chat,
  body.home [class*="chat-box"],
  body.home [class*="chat_box"],
  body.home [class*="ai-chat"],
  body.home [class*="ai_chat"]{
    max-width:900px!important;
    margin-left:auto!important;
    margin-right:auto!important;
  }

  body.home .sdp-pi-chat-form,
  body.home .sdp-platform-page .sdp-pi-chat-form,
  body.home [class*="chat-box"] form,
  body.home [class*="chat_box"] form,
  body.home [class*="ai-chat"] form,
  body.home [class*="ai_chat"] form{
    min-height:104px!important;
    padding:14px 16px!important;
  }

  body.home .sdp-pi-chat-form textarea,
  body.home .sdp-platform-page .sdp-pi-chat-form textarea,
  body.home textarea{
    min-height:66px!important;
  }

  body.home .sdp-trust-row,
  body.home [class*="trust-row"],
  body.home [class*="trust_row"]{
    margin-top:12px!important;
    gap:14px!important;
  }
}

/* Typical 1366×768 and scaled Windows laptop viewports need an even tighter
 * first screen. This remains desktop, but uses laptop-sized rhythm. */
@media (min-width:981px) and (max-width:1400px),
       (min-width:981px) and (max-height:820px){
  body.home #main-content .et_builder_inner_content > .et_pb_section:first-child{
    padding-top:16px!important;
    padding-bottom:18px!important;
  }
  body.home #main-content .et_builder_inner_content > .et_pb_section:first-child h1,
  body.home #main-content .et_builder_inner_content > .et_pb_section:first-child h2{
    font-size:clamp(36px,3.7vw,47px)!important;
  }
  body.home #main-content .et_builder_inner_content > .et_pb_section:first-child p{
    font-size:15px!important;
    margin-bottom:10px!important;
  }
  body.home .sdp-pi-chat-form,
  body.home .sdp-platform-page .sdp-pi-chat-form{
    min-height:92px!important;
    padding:11px 14px!important;
  }
  body.home .sdp-pi-chat-form textarea,
  body.home .sdp-platform-page .sdp-pi-chat-form textarea{
    min-height:58px!important;
    font-size:15px!important;
  }
}
