@media (max-width: 767px) {

  /* Contact modal - fix for sticky header overlap */
  #contactModal {
    padding-top: 0 !important;
  }

  #contactModal .modal-dialog {
    margin-top: 0 !important;
    padding-top: 80px !important;
  }

  #contactModal .modal-content {
    padding-top: 20px !important;
    position: relative !important;
  }

  #contactModal .tab-container {
    margin-top: 10px !important;
  }

  #contactModal .nav-tabs {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    margin-top: 10px !important;
  }

  #contactModal .nav-tabs .nav-link {
    font-size: 13px !important;
    padding: 8px 12px !important;
    white-space: nowrap !important;
  }

  #contactModal button.btn-close {
    top: 90px !important;
    right: 20px !important;
    left: auto !important;
    z-index: 99999 !important;
    position: fixed !important;
    background: #fff url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/12px no-repeat !important;
    opacity: 1 !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid #ccc !important;
  }

  /* Restore mobile carousel sizing for workstation sliders (previous baseline) */
  body.single-workstation .work-slider {
    width: auto;
    max-width: none;
    margin: 0 auto;
    padding: 0;
    box-sizing: border-box;
  }

  .home section.banner>.container,
  .home section.banner>.container>.row.signature-section,
  .home section.banner>.container>.row.signature-section>[class*="col-"] {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .home section.banner {
    padding: 0 !important;
    margin: 0 !important;
  }

  .home section.banner .banner_slider,
  .home section.banner .banner_slider .slick-list,
  .home section.banner .banner_slider .slick-track,
  .home section.banner .banner_slider .banner_slide {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
  }

  .home section.banner .banner_slider img,
  .home section.banner .banner_slider video {
    width: 100% !important;
    height: auto !important;
    display: block;
  }

  .trapezoid-1 {
    display: none !important;
  }

  /* Mobile floating contact tab - trapezoid design at bottom center */
  .mobile-contact-tab {
    display: block !important;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
  }

  .mobile-contact-tab__link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: #59B7B3;
    width: 140px;
    height: 45px;
    clip-path: polygon(15% 0%, 85% 0%, 100% 100%, 0% 100%);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.15);
  }

  .mobile-contact-tab__text {
    font-family: 'Heebo', sans-serif;
    font-style: normal;
    font-weight: 700;
    font-size: 11px;
    line-height: 13px;
    text-align: center;
    color: #FFFFFF;
    text-transform: uppercase;
    white-space: nowrap;
    letter-spacing: 0.5px;
  }

  /* REMOVED: Workstation slider rules - now handled by parent theme (single source of truth)
     Parent theme style.css lines 2403-2481 handles all mobile slider styling */

  /* Only event card media after pseudo-element override needed here */
  body.single-workstation .work-slider[data-slider="events"] .event-card__media::after {
    display: none;
  }

  /* Treatment lobby: hex grid adjustments */
  body.page-template-treament_template .main_part>.container>.row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-left: -12px;
    margin-right: -12px;
  }

  body.page-template-treament_template .treatment_list {
    float: none;
    flex: 0 0 50%;
    max-width: 50%;
    padding: 12px;
    display: flex;
    justify-content: center;
  }

  body.page-template-treament_template .treatment_list .treament-thumb {
    margin: 0 auto;
    width: 190px;
  }

  body.page-template-treament_template .treatment_list:last-child {
    flex-basis: 100%;
    max-width: 100%;
  }

  body.page-template-treament_template .treatment_list:last-child .treament-thumb {
    margin: 0 auto;
  }

  /* Testimonial slider tweaks */
  .testimonial_slider .slick-dots {
    margin-top: 28px;
    bottom: auto !important;
    position: static;
  }

  .testimonial_slider .slick-dots li button:before {
    font-size: 14px;
    color: #59B7B3;
    opacity: 0.4;
  }

  .testimonial_slider .slick-dots li.slick-active button:before {
    opacity: 1;
    color: #59B7B3;
  }

  /* Treatment lobby: results single column */
  body.page-template-treament_template .result-slide1 {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 0 12px 12px;
  }

  body.page-template-treament_template .result_list1 {
    float: none;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 12px 12px;
  }

  body.page-template-treament_template .result_list1 .main_div,
  body.page-template-treament_template .result_list1 .ba-Slider {
    max-width: 340px;
    margin: 0 auto;
  }

  /* Gallery prima/dopo: single column */
  body.page-template-after-before-template #posts-container,
  body.page-template-gallery-before-after-template #posts-container {
    display: block;
    padding: 0 16px 32px;
  }

  body.page-template-after-before-template .Clinical-Studies-list.row>[class*="col-"],
  body.page-template-gallery-before-after-template .Clinical-Studies-list.row>[class*="col-"] {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    padding: 0;
    margin: 0 0 28px;
  }

  body.page-template-after-before-template .Clinical-Studies-list.row>[class*="col-"] .result_list1,
  body.page-template-gallery-before-after-template .Clinical-Studies-list.row>[class*="col-"] .result_list1 {
    max-width: 360px;
    margin: 0 auto;
  }

  body.page-template-after-before-template .Clinical-Studies-list.row>[class*="col-"] .result_list1 .main_div,
  body.page-template-after-before-template .Clinical-Studies-list.row>[class*="col-"] .result_list1 .ba-Slider,
  body.page-template-gallery-before-after-template .Clinical-Studies-list.row>[class*="col-"] .result_list1 .main_div,
  body.page-template-gallery-before-after-template .Clinical-Studies-list.row>[class*="col-"] .result_list1 .ba-Slider {
    max-width: 100%;
  }

  /* Floating CTA above galleries */
  /* Arrows */
  body.single-workstation .work-slider .slick-prev,
  body.single-workstation .work-slider .slick-next {
    top: 50%;
    transform: translateY(-50%);
    z-index: 2
  }

  body.single-workstation .work-slider .slick-prev {
    left: -8px
  }

  body.single-workstation .work-slider .slick-next {
    right: -8px
  }

  body.single-workstation .work-slider .slick-prev:before,
  body.single-workstation .work-slider .slick-next:before {
    color: #ffffff;
    font-size: 20px
  }

  /* ================================================
     WORKSTATION INNER PAGE - FIGMA MOBILE LAYOUT
     ================================================ */

  /* Hide Navbar Toggler "IgniteRF >" */
  .navbar.navbar-top.p2i {
    display: none !important;
  }

  /* ================================================
     ANCHOR MENU STRIP - Reduced Height (Figma)
     Container: ~30-40px height, horizontal scroll
     ================================================ */
  .workstation-menu-strip,
  body.single-workstation .workstation-menu-strip {
    height: auto !important;
    min-height: 32px !important;
    max-height: 40px !important;
    padding: 6px 0 !important;
    background: #F3F3F3 !important;
  }

  ul.workstation_nav_fix {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    /* Reduced gap to prevent items from overflowing */
    padding: 4px 10px !important;
    margin: 0 !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  ul.workstation_nav_fix::-webkit-scrollbar {
    display: none;
  }

  ul.workstation_nav_fix li {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  ul.workstation_nav_fix li a {
    font-family: 'Franklin Gothic ATF', sans-serif !important;
    font-size: 7px !important;
    /* Slightly smaller to fit better */
    font-weight: 500 !important;
    color: #000 !important;
    display: block !important;
    line-height: 1.2 !important;
  }

  /* ================================================
     CONTENT SECTION - Machine Image LEFT, Text RIGHT
     Figma: Image at left:-16px, Text on right 55% width
     ================================================ */
  section.main_part {
    overflow: visible !important;
  }

  body.single-workstation .row.content_work {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    position: relative !important;
    min-height: 400px !important;
    padding: 30px 0 0 0 !important;
    /* More padding at top */
    background: #191919 !important;
  }

  /* Machine Image: Left side, anchored at BOTTOM per Figma */
  body.single-workstation .row.content_work .bg_work {
    display: block !important;
    position: absolute !important;
    left: -16px !important;
    bottom: 0 !important;
    /* Anchored to bottom */
    top: auto !important;
    width: 170px !important;
    z-index: 5 !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-shrink: 0 !important;
  }

  body.single-workstation .row.content_work .bg_work img {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    width: 170px !important;
    height: auto !important;
    max-height: 320px !important;
    object-fit: contain !important;
  }

  /* Text Content: Right side with proper spacing on all sides */
  body.single-workstation.single .row.content_work>.post_desc,
  body.single-workstation.single .row.content_work>[class*="col-"].post_desc,
  body.single-workstation .row.content_work .post_desc {
    display: block !important;
    width: calc(100% - 185px) !important;
    /* Leave space for machine + right margin */
    max-width: calc(100% - 185px) !important;
    margin-left: 155px !important;
    /* Space for machine image */
    margin-right: 15px !important;
    /* Right margin - don't go to edge */
    padding: 10px 10px 20px 15px !important;
    /* Top, right, bottom, left */
    position: relative !important;
    z-index: 10 !important;
  }


  /* Typography: Figma Specs (Brother 1816 18px, Franklin Gothic 9px) */
  body.single-workstation .post_desc h2.inner_heading {
    font-family: 'Brother 1816', sans-serif !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    line-height: 95% !important;
    color: #FFFFFF !important;
    margin-bottom: 10px !important;
  }

  body.single-workstation .post_desc p,
  body.single-workstation .post_desc li {
    font-family: 'Franklin Gothic ATF', sans-serif !important;
    font-weight: 400 !important;
    font-size: 9px !important;
    line-height: 11px !important;
    color: #FFFFFF !important;
  }

  /* ================================================
     EVENTS & NEWS SECTION TITLES - Figma Format
     "EmpowerRF Events" / "EmpowerRF News"
     Figma: font-size: 24px, font-weight: 700
     NOTE: Content has <p> tags inside <h2> - must target those too!
     ================================================ */
  body.single-workstation section#work_event h2,
  body.single-workstation section#work_news h2,
  body.single-workstation section.work_event h2,
  body.single-workstation section.work_news h2,
  body.single-workstation section#work_event h2 p,
  body.single-workstation section#work_news h2 p,
  body.single-workstation section.work_event h2 p,
  body.single-workstation section.work_news h2 p {
    font-family: 'Brother 1816', 'Inter', sans-serif !important;
    font-weight: 700 !important;
    font-size: 24px !important;
    line-height: 95% !important;
    text-align: center !important;
    color: #000000 !important;
    /* BLACK - fixing white-on-white */
    text-transform: none !important;
    padding: 20px 0 !important;
    margin: 0 !important;
  }

  /* The <code> tag inside titles should be teal */
  body.single-workstation section#work_event h2 code,
  body.single-workstation section#work_news h2 code,
  body.single-workstation section.work_event h2 code,
  body.single-workstation section.work_news h2 code {
    color: #59B7B3 !important;
    /* Teal */
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
  }

  /* ================================================
     ANCHOR MENU FIX - Links have <p><code> inside
     All text must be BLACK, not white
     ================================================ */
  body.single-workstation .workstation_nav_fix li a,
  body.single-workstation .workstation_nav_fix li a p,
  body.single-workstation .workstation_nav_fix li a code,
  body.single-workstation ul.workstation_nav_fix li a,
  body.single-workstation ul.workstation_nav_fix li a p,
  body.single-workstation ul.workstation_nav_fix li a code,
  body.single-workstation .p2i_list li a,
  body.single-workstation .p2i_list li a p,
  body.single-workstation .p2i_list li a code {
    color: #000000 !important;
    /* ALL BLACK */
    font-family: 'Franklin Gothic ATF', 'Inter', sans-serif !important;
    font-size: 8px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* ================================================
     NEWS CARD TITLE FIX - WHITE on WHITE BUG
     Title must be BLACK on white background
     ================================================ */
  body.single-workstation .news-card__title,
  body.single-workstation .news-card__title a,
  body.single-workstation section#work_news .news-card__title,
  body.single-workstation section#work_news .news-card__title a,
  body.single-workstation section.work_news .news-card__title,
  body.single-workstation section.work_news .news-card__title a {
    color: #000000 !important;
    /* BLACK - NOT WHITE */
    font-family: 'Brother 1816', 'Inter', sans-serif !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    text-decoration: none !important;
  }

  /* News card description text */
  body.single-workstation .news-card p,
  body.single-workstation section#work_news .news-card p {
    color: #333333 !important;
    font-family: 'Franklin Gothic ATF', 'Inter', sans-serif !important;
    font-size: 12px !important;
    line-height: 15px !important;
  }

  /* News card type badge */
  body.single-workstation .news-card__type {
    color: #FFFFFF !important;
    background: #6DB8B3 !important;
  }

  /* ================================================
     TECHNOLOGIES ON WORKSTATION SECTION - Figma Design
     Prototype: Horizontal cards - hexagon LEFT, text RIGHT
     ================================================ */
  body.single-workstation section.work_technologies,
  body.single-workstation section#work_technologies {
    background: #FFFFFF !important;
    padding: 40px 15px !important;
    text-align: center !important;
  }

  /* Technologies Section Title */
  body.single-workstation section.work_technologies h2,
  body.single-workstation section#work_technologies h2 {
    font-family: 'Brother 1816', 'Inter', sans-serif !important;
    font-weight: 700 !important;
    font-size: 24.6px !important;
    line-height: 95% !important;
    color: #000000 !important;
    text-align: center !important;
    margin-bottom: 20px !important;
  }

  body.single-workstation section.work_technologies h2 p,
  body.single-workstation section#work_technologies h2 p {
    color: #000000 !important;
    margin: 0 !important;
  }

  body.single-workstation section.work_technologies h2 code,
  body.single-workstation section#work_technologies h2 code {
    color: #59B7B3 !important;
  }

  /* ================================================
     TECHNOLOGY CARD - Prototype Exact Match
     - Flexbox layout: hexagon LEFT, content RIGHT
     - NO border-radius (sharp corners per prototype)
     - Hexagon: 136px x 136px
     ================================================ */
  body.single-workstation .tech-card {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    /* Allow slider to wrap to next line */
    align-items: center !important;
    /* Horizontally align hexagon and content */
    background: #6DB8B3 !important;
    margin-bottom: 20px !important;
    min-height: 136px !important;
    position: relative !important;
    overflow: hidden !important;
    border-radius: 0 !important;
  }

  /* Hexagon - 136px per prototype, stays on LEFT */
  body.single-workstation .tech-card__hexagon {
    width: 136px !important;
    height: 136px !important;
    background: #191919 !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%) !important;
  }

  body.single-workstation .tech-card__hexagon img,
  body.single-workstation .tech-card__hexagon-img {
    width: 102px !important;
    height: auto !important;
    object-fit: contain !important;
  }

  /* Content area - RIGHT side of hexagon, takes remaining space */
  body.single-workstation .tech-card .card-div-row {
    padding: 15px !important;
    flex: 1 !important;
    min-width: 0 !important;
    display: block !important;
    text-align: left !important;
    background: #6DB8B3 !important;
    /* Same teal background */
  }

  /* Technology Logo/Title */
  body.single-workstation .tech-card__logo {
    display: block !important;
    text-align: left !important;
    margin: 0 0 8px 0 !important;
  }

  body.single-workstation .tech-card__logo-img {
    max-width: 130px !important;
    height: auto !important;
    margin-bottom: 8px !important;
    display: block !important;
  }

  /* Technology Description - 8px font per prototype */
  body.single-workstation .tech-card__content,
  body.single-workstation .tech-card__text {
    display: block !important;
    text-align: left !important;
  }

  body.single-workstation .tech-card__text,
  body.single-workstation .tech-card__text p {
    margin: 0 !important;
    color: #FFFFFF !important;
    font-family: 'Franklin Gothic ATF', 'Inter', sans-serif !important;
    font-size: 8px !important;
    line-height: 10px !important;
    text-align: left !important;
  }

  /* BA Slider - Full width, wraps to BELOW the hexagon+content row */
  body.single-workstation .tech-card__slider {
    flex: 0 0 100% !important;
    /* Take full width, force wrap */
    width: 100% !important;
    margin-top: 0 !important;
    display: block !important;
    background: #FFFFFF !important;
    /* White/neutral background for slider */
  }

  body.single-workstation .tech-card__slider .ba-Slider {
    width: 100% !important;
    display: block !important;
  }

  /* ================================================
     FIX: Anchor Menu Z-Index (Root Cause)
     The .top-outer container (containing sidebar) has z-index: 99
     The anchor menu needs z-index BELOW 99 so sidebar appears on top
     ================================================ */
  .workstation-menu-strip,
  ul.workstation_nav_fix,
  body.single-workstation .workstation-menu-strip {
    z-index: 50;
    /* Below .top-outer (99) so mobile menu overlay appears above */
  }

  /* ================================================
     FIX: Clinical Studies Slider
     Main CSS is in style.css following MASTER-FIXES-BIBLE
     This just adds supplementary section overflow rule
     ================================================ */
  body.single-workstation section.clinical_studies {
    overflow: hidden;
  }

  /* Study cards - remove desktop max-width constraints */
  body.single-workstation .study-card-figma,
  body.single-workstation .studies_list.study-card-figma {
    max-width: 100%;
  }
}