/*** Min breakpointy ********************************************************/
@media (min-width: 922px) {
    /* 1. Skrytí původních textů pouze pro konkrétní úroveň */
    .wpml-ls-item-cs > a > .wpml-ls-native,
    .wpml-ls-item-sk > a > .wpml-ls-native {
        font-size: 0 !important;
        display: inline-block !important;
    }

    /* Vložení CZ pouze do české položky */
    .wpml-ls-item-cs > a > .wpml-ls-native::before {
        content: "CZ" !important;
    }

    /* Vložení SK pouze do slovenské položky */
    .wpml-ls-item-sk > a > .wpml-ls-native::before {
        content: "SK" !important;
    }

    /* 2. Vložení CZ pouze do české položky */
    .wpml-ls-item-cs > a > .wpml-ls-native::before,
    .wpml-ls-item-sk > a > .wpml-ls-native::before {
        display: inline-block;
        
        font-weight: 600;
        font-style: SemiBold;
        font-size: .75rem;
        line-height: 100%;
        letter-spacing: 0%;

        color: var(--text-negative-secondary, #D2D2D6);
    }

    /* Úprava odsazení šipky (pokud je v menu) */
    .wpml-ls-item-toggle::after {
        font-size: 10px;
        vertical-align: middle;
        margin-left: 4px;
        top: calc(50% - .35em) !important;
    }
}

/*** Max breakpointy ********************************************************/
@media (max-width: 1240px) {
  .ast-container {
    max-width: fit-content;
    margin: 0;
    padding-left: 20px;
    padding-right: 20px;
  }
  .ast-desktop .main-header-menu {
    gap: 20px;
  }
  /* header grid-center-col-layout → přesunuto do css/header.css „FÁZE 3". #4 2026-09-07. */
  /* footer wraps gutter + footer-scroll right + copyright width → přesunuto do
     css/footer.css „2) @max-1240". Konsolidace 2026-09-06 batch A. */
}

/* @media (max-width:1160px) header grid → přesunuto do css/header.css „FÁZE 3". #4 2026-09-07. */

@media (max-width: 1120px) {
    .ast-desktop .main-header-menu {
        gap: 16px;
    }
    /* header grid → css/header.css „FÁZE 3". */
    .gamin-search-container .gamin-search-input-container {
        min-width: 200px;
    }
    .gamin-search-input-container {
        width: 200px;
    }
}

@media (max-width: 1020px) {
    /* header grid → css/header.css „FÁZE 3". */
    .gamin-search-container .gamin-search-input-container {
        min-width: 160px;
    }
    .gamin-search-input-container {
        width: 160px;
    }
}

@media (max-width: 992px) {
    /* header grid → css/header.css „FÁZE 3". */
    .gamin-search-container .gamin-search-input-container {
        /*min-width: 120px;*/
        max-width: 120px;
    }
    .gamin-search-input-container {
        width: 120px;
    }
}

@media (max-width: 921px) { /* 921px je default breakpoint Astry */
    #ast-desktop-header {
        display: block;
    }
    #masthead {
        display: flex;
        flex-direction: column;
    }
    #ast-mobile-header { order: -1; }   /* dej mobilní hlavičku jako první */
    #ast-desktop-header { order: 0; }   /* desktop až pod ní */
    #ast-desktop-header .ast-primary-header-bar .ast-builder-grid-row {
        display: block;
    }
    .ast-primary-header-bar .site-primary-header-wrap { min-height: inherit; }
    .site-header { max-height: inherit; z-index: initial; }
    .gamin-search-container {
        position: relative;
        width: 100% !important;
        top: inherit;
        right: inherit;
    }
    #ast-desktop-header .ast-container {
        margin: 0;
    }
    .site-header-section.site-header-primary-section-right-center {
        justify-content: flex-start;
    }
    #ast-desktop-header .header-widget-area {
        width: 100%;
        padding: 0;
    }
    #ast-desktop-header .gamin-search-input-container {
        display: block;
    }
    .ast-header-break-point .main-navigation ul .menu-item .menu-link {
        padding: 20px 0 18px 0;
    }
    .main-navigation ul.main-header-menu {
        padding: 0 16px;
    }
    .ast-hfb-header .ast-mobile-svg.ast-menu-svg::before {
        content: 'Menu';
    }
    .ast-hfb-header .ast-mobile-svg.ast-menu-svg::before {
        content: 'Zavřít';
    }

    #main .wp-block-group,
    #main .wp-block-columns {
        padding-left: 16px;
        padding-right: 16px;
    }

    /* .grid-sluzby sloupce → sluzby.css (konsolidace krok 04) */

    /* .sluzby gutter → content.css @10001 (padding shorthand 64/16, 2026-09-08). */
    .skoleni {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .owl-carousel {
        & .owl-stage-outer {
            overflow: hidden !important;
            &::after {
                display: none;
            }
        }
    }

    .logo_slider {
        width: 100%;
        &::before, &::after {
            content: none;
            display: none;
        }
    }

    /* .reference-box .blok → reference.css @921 (konsolidace 2026-09-08) */

    /* footer grid repeat(2) na tabletu → MRTVÉ (footer.css tablet dělá display:block =
       vertikální footer). Smazáno. Konsolidace footer batch B 2026-09-06. */

    .woocommerce .products.columns-4 {
        gap: 12px;
        padding-bottom: 0;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gamin-search-list {
        display: block;
    }

    .sub-wrapper .megamenu-content {
        display: none !important;
    }

    /* Vytvoření prostoru pro šipku */
    .ast-header-break-point .main-header-menu .menu-item-has-children > .menu-link {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding-right: 15px;
    }

    /* Vložení ikony šipky (chevron) */
    .ast-header-break-point .main-header-menu .menu-item-has-children > .menu-link::after {
        content: "";
        display: inline-block;
        width: 24px;
        height: 24px;
        background-repeat: no-repeat;
        background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8 10L12 14L16 10' stroke='%23022930' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    }

    /* Rotace šipky při rozbalení (pokud Astra přidává třídu ast-submenu-expanded) */
    .ast-header-break-point .menu-item-has-children.ast-submenu-expanded > .menu-link::after {
        transform: rotate(180deg);
    }

    .ast-header-break-point .main-header-menu .menu-item-has-children > .menu-link::after {
        pointer-events: none;
    }

    .ast-header-break-point .main-header-bar-navigation .menu-item-has-children.ast-submenu-expanded .sub-menu {
        display: block;
    }

    #ast-mobile-header .content-align-flex-start {
        max-height: inherit;
    }

    .main-header-menu .menu-item > a .menu-icon-wrapper {
        display: none;
    }

    .main-header-menu .sub-wrapper .sub-wrapper {
        display: none;
    }

    .ast-header-break-point .main-navigation .sub-wrapper ul .menu-item .menu-link {
        border: 0;

        font-weight: 450;
        font-style: regular;
        font-size: 1rem;
        line-height: 160%;

        color: var(--text-positive-secondary, #52525B);
    }

    .ast-header-break-point .main-header-menu .sub-wrapper .menu-item-has-children > .menu-link::after {
        display: none !important;
    }

    .ast-footer-language-switcher-element {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .gamin-search-container .gamin-search-input-container {
        max-width: 100%;
    }
    /* ol,ul{margin-left:25} + .jquery-modal.blocker{padding:0} → global.css @768;
       .frame{padding:16} → custom.css @768 (vlastník .frame base). Konsolidace 2026-09-09. */
    #ast-desktop-header {
        display: initial;
    }
    #ast-desktop-header .ast-above-header-wrap {
        display: none;
    }
    #ast-desktop-header .site-header-primary-section-left,
    #ast-desktop-header .site-header-primary-section-center {
        display: none;
    }
    .ast-builder-language-switcher.dropdown-initialized {
        padding: 10px 16px;
        font-size: 14px;
        min-width: 70px;
    }
    
    .ast-builder-language-switcher a.ast-builder-language-switcher-item {
        padding: 12px 16px;
        font-size: 14px;
    }

    .wp-block-columns .wp-block-image img {
        /*width: 100% !important;*/
    }

    body.home #content .ast-container {
        padding: 0;
    }

    body.home .main-header-menu > .menu-item > .menu-link {
        font-weight: 650;
        font-style: Bold;
        font-size: 1rem;
        leading-trim: NONE;
        line-height: 160%;
        letter-spacing: 0%;
        color: var(--text-positive-primary, #022930);
    }

    body.home .hero-background {
        background-size: cover;
        height: 100vh;
        background-position: 80% 50%;
    }

    body.home .hero-section {
        min-height: inherit;
        max-width: inherit;
        margin: 0;
        padding: 32px 16px 290px 16px;
        text-align: center;
    }

    body.home .hero-section .wp-block-buttons {

    }

    body.home .full-width-hero-wrapper h2 {
        font-weight: 700;
        font-style: Bold;
        font-size: 2rem !important;
        line-height: 120%;
        text-align: center;
    }

    /* Mobilní footer (padding, grid 1 sloupec, footer menu) → přesunuto do css/footer.css
       mobil sekce (dedup s custom.css). Konsolidace footer batch B 2026-09-06. */

    /* poradit-box → sjednoceno v custom.css bloku „PORADIT-BOX". Konsolidace 2026-09-06. */

    .site-above-footer-wrap[data-section="section-above-footer-builder"] {
        background-image: none;
    }

    /* Horizontal gutter (.skoleni/.odbornici/.reference-box 16px) → sjednoceno do
       custom.css „SECTION SPACING" @media ≤767.98 (dedup). Konsolidace #1 2026-09-06. */

    .logo_slider {
        &::before, &::after {
            width: 16px;
        }
    }

    /* .grid-sluzby sloupce → sluzby.css (konsolidace krok 04) */

    .woocommerce .products.columns-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .woocommerce ul.products li.product .woocommerce-loop-category__title {
        text-align: left;

        /* Figma weight = 700 (#50, dřív audit-fixes override; sjednoceno 2026-09-08). */
        font-weight: 700;
        font-style: Medium;
        font-size: .75rem;
        line-height: 160%;
        letter-spacing: 2%;
        vertical-align: middle;
    }

    .woocommerce ul.products li.product .woocommerce-loop-product__title, 
    .woocommerce-page ul.products li.product .woocommerce-loop-product__title {
        font-weight: 450;
        font-style: regular;
        font-size: .875rem;
        line-height: 160%;
        letter-spacing: 0%;
    }

     .woocommerce div.product .related.products ul.products li.product, 
     .woocommerce[class*="rel-up-columns-"] div.product .related.products ul.products li.product, 
     .woocommerce-page div.product .related.products ul.products li.product, 
     .woocommerce-page[class*="rel-up-columns-"] div.product .related.products ul.products li.product {
        margin-right: 0;
    }


    /* .odbornici-grid .item{max-width:inherit} → odbornici.css @768 (konsolidace 2026-09-08) */

}

@media (max-width: 560px) {
    .woocommerce .products.columns-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .woocommerce ul.products li.product.product-category a > img {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }
}

@media (max-width: 544px) {
    .ast-header-break-point .ast-shop-toolbar-container {
        flex-direction: row;
    }
}

/* (Volitelné) zmenšení mezer v úzkých zobrazeních */
@media (max-width: 380px) {
    .mobile-lang-switch { gap: 6px; }
    .mobile-lang-switch .mls-btn { padding: 8px 12px; }
}