/* ===== MOBILE UX — Consolidated Responsive Overrides ===== */
/* Sources: Customizer CSS mobile section + 3820.js mobile fixes */
/* All mobile-only rules in one file. Component @media queries */
/* remain with their components in brand.css / layout.css. */

@media (max-width: 767px) {

  /* --- Global: force all containers to viewport width --- */
  body {
    overflow-x: hidden !important;
  }
  *, *::before, *::after {
    box-sizing: border-box !important;
  }
  .content_wrap {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }
  .post_content.entry-content,
  .wpb-content-wrapper {
    max-width: 100vw !important;
    width: 100% !important;
    overflow-x: hidden !important;
  }

  /* --- Header: logo centered, menu button below --- */
  .top_panel {
    position: sticky !important;
    top: 0 !important;
    z-index: 9999999 !important;
    background: #fff !important;
  }
  .top_panel_navi {
    display: block !important;
    padding: 0 !important;
  }
  .top_panel_navi .columns_wrap {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 12px 10px 8px !important;
  }
  .top_panel_navi .columns_wrap::after {
    content: none !important;
    display: none !important;
  }
  .top_panel_navi .sc_layouts_column_align_left,
  .top_panel_navi .sc_layouts_column_align_right {
    width: 100% !important;
    flex: 0 0 auto !important;
    margin-left: 0 !important;
    text-align: center !important;
    display: block !important;
    float: none !important;
  }
  .top_panel_navi .sc_layouts_logo {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }
  .top_panel_navi .sc_layouts_logo img {
    width: auto !important;
    max-width: 100% !important;
    max-height: 48px !important;
    height: auto !important;
  }
  .top_panel_navi .sc_layouts_menu {
    display: none !important;
  }

  /* --- Mobile menu: fullscreen overlay on top of everything --- */
  .menu_mobile.menu_mobile_fullscreen {
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    overflow: hidden !important;
    z-index: 99999999 !important;
    background: #fff !important;
  }
  .menu_mobile.menu_mobile_fullscreen .menu_mobile_inner {
    width: 100% !important;
    padding-top: 20px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    padding-bottom: 40px !important;
  }
  .menu_mobile.menu_mobile_fullscreen .menu_mobile_close {
    position: absolute !important;
    top: 18px !important;
    right: 18px !important;
    left: auto !important;
    width: auto !important;
    z-index: 10 !important;
    cursor: pointer !important;
    font-size: 0 !important;
  }
  .menu_mobile.menu_mobile_fullscreen .menu_mobile_close .icon-cancel {
    font-size: 28px !important;
  }
  .menu_mobile.menu_mobile_fullscreen .menu_mobile_nav_area {
    width: 100% !important;
    padding: 50px 0 0 0 !important;
    border: none !important;
  }
  .menu_mobile.menu_mobile_fullscreen .menu_mobile_nav_area li {
    width: 100% !important;
    text-align: center !important;
  }
  .menu_mobile.menu_mobile_fullscreen .menu_mobile_nav_area li > a {
    font-size: 22px !important;
    padding: 8px 20px !important;
  }
  /* Chevron indicator on expandable menu items — inline next to text */
  .menu_mobile.menu_mobile_fullscreen .menu_mobile_nav_area .menu-item-has-children > a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: auto !important;
    position: relative !important;
    padding-right: 20px !important;
    text-align: center !important;
  }
  .menu_mobile.menu_mobile_fullscreen .menu_mobile_nav_area .menu-item-has-children > a .open_child_menu {
    position: static !important;
    width: auto !important;
    height: auto !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
    padding: 4px !important;
  }
  .menu_mobile .menu-item-has-children > a .open_child_menu::before {
    content: none !important;
    display: none !important;
  }
  .menu_mobile .menu-item-has-children > a .open_child_menu::after {
    content: "" !important;
    display: block !important;
    width: 7px !important;
    height: 7px !important;
    border-right: 2px solid #1a1a2e !important;
    border-bottom: 2px solid #1a1a2e !important;
    transform: rotate(45deg) !important;
    transition: transform 0.2s ease !important;
  }
  .menu_mobile .menu-item-has-children.opened > a .open_child_menu::after {
    transform: rotate(-135deg) !important;
  }
  /* Hide menu footer (copyright, terms, socials) */
  .menu_mobile .copyright_mobile,
  .menu_mobile .socials_mobile {
    display: none !important;
  }
  /* Hide sticky bar & scroll-to-top when mobile menu is open; lock body scroll */
  body:has(.menu_mobile.opened) {
    overflow: hidden !important;
  }
  body:has(.menu_mobile.opened) .kizne-sticky-bar,
  body:has(.menu_mobile.opened) .trx_addons_scroll_to_top {
    display: none !important;
  }

  /* --- Hamburger menu button: 48px, no border --- */
  .sc_layouts_menu_mobile_button {
    display: inline-block !important;
    width: 48px !important;
    height: 48px !important;
    padding: 0 !important;
    margin: 6px auto 0 !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
  }
  .sc_layouts_menu_mobile_button a,
  .sc_layouts_menu_mobile_button .sc_layouts_item_link {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    width: 48px !important;
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .sc_layouts_menu_mobile_button .sc_layouts_item_icon,
  .sc_layouts_menu_mobile_button .icon-menu {
    font-size: 28px !important;
  }

  /* --- Disable desktop breakout formulas on mobile --- */
  body .vc_row.custom-hero-row,
  .page_wrap .custom-hero-row,
  div.custom-hero-row,
  .sc_background_wrap + .vc_empty_space + .sc_title {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .vc_row-fluid.vc_row-o-full-width,
  .vc_row-full-width + .vc_row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
  }

  /* --- Hero image: hidden on mobile --- */
  .custom-hero-image {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    background: none !important;
    background-image: none !important;
  }
  .custom-hero {
    flex-direction: column !important;
    min-height: auto !important;
    height: auto !important;
  }
  .custom-hero-content {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    padding: 30px 20px !important;
  }
  .custom-hero,
  .custom-hero-content {
    max-width: 100% !important;
    width: 100% !important;
    overflow: hidden !important;
  }
  .custom-hero-label {
    text-align: center !important;
  }
  .custom-hero h1 {
    font-size: 28px !important;
    line-height: 1.3 !important;
    text-align: center !important;
  }
  .custom-hero-desc {
    text-align: center !important;
  }

  /* --- Hero CTA buttons: stacked --- */
  .custom-hero-actions {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
    padding: 0 15px !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  .custom-hero-actions .hero-btn-filled,
  .custom-hero-actions .hero-btn-outline {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    text-align: center !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  /* --- Bio/promo image: hidden on mobile --- */
  .sc_promo_image {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
    background-image: none !important;
    background: none !important;
  }
  .sc_promo {
    min-height: auto !important;
    overflow: hidden !important;
  }
  .sc_promo_text {
    width: 100% !important;
    max-width: 100% !important;
    padding: 20px 15px !important;
  }

  /* --- Sticky bar: always visible at top on mobile --- */
  .kizne-sticky-bar {
    transform: translateY(0) !important;
  }

  /* --- Go-to-top button: 40px circle, right side (aligned with cookie consent) --- */
  a.trx_addons_scroll_to_top,
  a.trx_addons_scroll_to_top.inited {
    width: 40px !important;
    height: 40px !important;
    right: 15px !important;
    left: auto !important;
    bottom: 15px !important;
    transform: none !important;
    border-radius: 50% !important;
    text-indent: -9999px !important;
    z-index: 99999 !important;
    overflow: hidden !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 19V5'/%3E%3Cpath d='M5 12l7-7 7 7'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-size: 18px 18px !important;
  }

  /* --- Footer: constrain desktop-width containers to viewport --- */
  .footer_wrap .vc_row,
  .footer_wrap .sc_layouts_row,
  .footer_wrap .vc_column_container,
  .footer_wrap .vc_column-inner,
  .footer_wrap .wpb_wrapper,
  .footer_wrap .sc_content,
  .footer_wrap .sc_content_container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  /* --- Footer nav: stack vertically on mobile --- */
  .footer_wrap .menu {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .footer_wrap .menu li {
    display: block !important;
    text-align: center !important;
    width: 100% !important;
  }

  /* --- Page title banner: compact on mobile --- */
  .top_panel_title {
    min-height: auto !important;
    height: auto !important;
    padding: 15px !important;
  }
  .top_panel_title .sc_layouts_title {
    padding: 20px 0 15px !important;
  }
  .top_panel_title h1,
  .top_panel_title .sc_layouts_title_caption {
    font-size: 22px !important;
    line-height: 1.3 !important;
    width: 100% !important;
    max-width: 100% !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }
  .top_panel_title .sc_layouts_title_breadcrumbs {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 12px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  /* --- Sidebar: stack below content on mobile --- */
  .content {
    width: 100% !important;
    float: none !important;
    padding-top: 20px !important;
    padding-bottom: 20px !important;
  }
  .sidebar {
    width: 100% !important;
    float: none !important;
    margin-top: 30px !important;
    padding-top: 0 !important;
  }

  /* --- News listing (chess layout): text-only cards on mobile --- */
  .chess_wrap.posts_container {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .post_layout_chess {
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    height: auto !important;
    margin-bottom: 20px !important;
    border-bottom: 1px solid #eee !important;
    padding-bottom: 20px !important;
  }
  .post_layout_chess:last-child {
    border-bottom: none !important;
    margin-bottom: 10px !important;
  }
  .post_layout_chess .post_featured {
    display: none !important;
  }
  .post_layout_chess .post_inner {
    position: static !important;
    width: 100% !important;
    float: none !important;
    top: auto !important;
    transform: none !important;
    padding: 0 15px !important;
  }
  .post_layout_chess .post_content_inner,
  .post_layout_chess .post_inner_content {
    width: 100% !important;
    padding: 0 !important;
  }
  /* Hide "0Comments" link in news listing */
  .post_layout_chess .post_meta .post_counters_comments {
    display: none !important;
  }

  /* --- Blog post: hide featured hero image on mobile --- */
  .single .post_featured {
    display: none !important;
  }

  /* --- Related posts ("Taip pat skaitykite"): compact on mobile --- */
  .related_wrap {
    margin-top: 30px !important;
  }
  .related_wrap .columns_wrap {
    flex-direction: column !important;
    margin-right: 0 !important;
  }
  .related_wrap .column-1_2 {
    width: 100% !important;
    margin-bottom: 20px !important;
  }

  /* --- Mobile menu submenus: clean expand/collapse --- */
  .menu_mobile .menu_mobile_nav_area .open > a {
    font-weight: 600 !important;
  }
  .menu_mobile .menu_mobile_nav_area ul.sub-menu {
    padding-left: 15px !important;
  }
  .menu_mobile .menu_mobile_nav_area ul.sub-menu li > a {
    font-size: 18px !important;
    padding: 6px 20px !important;
  }

  /* --- WPBakery columns: stack on mobile --- */
  .wpb_column.vc_col-sm-6,
  .wpb_column.vc_col-sm-4,
  .wpb_column.vc_col-sm-3 {
    width: 100% !important;
    margin-left: 0 !important;
  }

  /* --- Team grid (/komanda/): single column on mobile --- */
  .sc_team.sc_team_default .sc_team_columns_wrap {
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
  }
  .sc_team_item,
  .sc_team_item .sc_team_item_info,
  .sc_team_item .sc_team_item_title,
  .sc_team_item .sc_team_item_subtitle,
  .sc_team_item .sc_team_item_content {
    width: 100% !important;
    text-align: center !important;
  }
  .sc_team_item .sc_team_item_thumb img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 1 / 1 !important;
    object-fit: cover !important;
    margin: 0 auto !important;
  }

  /* --- CTA buttons section 02 --- */
  a[href="tel:+37060538755"][style*="inline-block"],
  a[href*="nuotolines-teisines-konsultacijos"][style*="inline-block"] {
    display: block !important;
    width: 260px !important;
    max-width: 80vw !important;
    margin: 8px auto !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }
  .wpb_raw_html div[style*="text-align:center"] {
    padding: 2px 0 !important;
  }

  /* --- Hide gincu prevencija / bylinejimasis section (homepage only) --- */
  body.home .wpb-content-wrapper > .vc_row:nth-child(3),
  body.home .wpb-content-wrapper > .vc_row:nth-child(4) {
    display: none !important;
  }

  /* --- WPBakery empty spacers: reduce on mobile --- */
  .vc_empty_space {
    height: 2em !important;
  }

}

/* ===== END MOBILE UX ===== */
