/* Load after the theme so mobile layout rules retain precedence. */
.f-search__toggle { display: none; }
.header-menu-callback { display: none; }
#headerMenuOffcanvas { background: var(--theme-color); color: #fff; }
#headerMenuOffcanvas .offcanvas-menu-list a { color: #fff; border-bottom-color: rgba(255,255,255,.2); background-image: linear-gradient(#fff, #fff); }
#headerMenuOffcanvas .offcanvas-menu .dropdown-menu { background: rgba(255,255,255,.08); }
#headerMenuOffcanvas .offcanvas-menu .dropdown-menu a { color: #fff; }
#headerMenuOffcanvas .btn-close { filter: brightness(0) invert(1); opacity: 1; }
@media (min-width: 768px) {
    .f-search__grid.collapse { display: grid !important; height: auto !important; }
}
@media (max-width: 991px) {
    .header-menu-offcanvas { width: min(400px, 100vw); }
    .header-menu-offcanvas .mega-pad { padding: 16px; }
    .offcanvas-menu a, .mega-contact a { overflow-wrap: anywhere; }
    .methodology-area .methodology-image { height: auto; min-height: 280px; }
    .methodology-area .methodology-image img { width: 100%; height: 100%; object-fit: cover; }
    .methodology-area .methodology-content { margin-top: 24px; }
    footer .footer-place, footer .copyright { padding: 30px 20px; }
    footer .address li { overflow-wrap: anywhere; }
    .master .master-content { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .master .master-content > * { min-width: 0; }
    .master .sticky-master { position: static !important; }
    .master .dynamic-page-layout__image { min-height: 0 !important; height: 280px; object-fit: cover; margin-bottom: 24px; }
    .master .widget { padding: 24px; }
    .master .dynamic-page-layout { padding: 24px 0; }
    .fair-detail-shell { row-gap: 20px; }
    .fair-detail-media, .fair-tabs-card { height: auto; }
    footer .accordion-footer .collapse:not(.show) { display: none; }
    footer .accordion-footer { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1399px) {
    /* One grid owns all mobile header alignment; no absolute menu offsets. */
    header.header {
        display: grid; grid-template-columns: minmax(0, 1fr) 56px 44px;
        grid-template-rows: 30px 68px; column-gap: 12px;
        padding: 0 16px; background: #0b2147;
        border: 0; box-shadow: 0 1px 0 rgba(255,255,255,.12);
    }
    header.header::before, header.header::after { display: none; }
    header.header.scroll-sticky { background: #fff; }
    header.header .header-top { grid-column: 1 / -1; grid-row: 1; height: 30px; border: 0; padding: 0; }
    header.header .header-top .container-fluid,
    header.header .header-top .d-flex { width: 100%; height: 30px; margin: 0; padding: 0 !important; }
    header.header .header-top .d-flex { justify-content: flex-end; }
    header.header .header-top .sidebar__toggle { display: none; }
    header.header .header-top .sidebar__toggle_wrapper { margin: 0 0 0 auto !important; height: 30px; width: auto; }
    header.header .header-top .nav-elements { width: auto; height: 30px; margin: 0; padding: 0; }
    header.header .header-top .nav-elements .head-btn {
        width: auto !important; height: 30px !important; padding: 0 !important;
        border: 0 !important; gap: 8px; font-size: 11px; line-height: 1;
        display: flex; align-items: center; background: transparent; white-space: nowrap;
    }
    header.header .header-top .head-btn i { font-size: 15px; }
    .master header.header .header-top { background: transparent !important; }
    .master header.header.scroll-sticky .nav-elements .head-btn { color: #0b2147 !important; }
    header.header .header-middle,
    header.header .header-middle > .container-fluid,
    header.header .header-middle > .container-fluid > .row { display: contents; }
    header.header .header-middle .row > .order-1 {
        grid-row: 2; grid-column: 1; width: auto; min-width: 0; padding: 0; align-self: center;
    }
    header.header .header-middle .row > .order-2:last-child {
        grid-row: 2; grid-column: 2; width: auto; padding: 0; align-self: center;
    }
    header.header .inner-logo { padding: 0 !important; }
    header.header .header-logo { margin: 0; padding: 0; width: fit-content; max-width: 100%; }
    header.header .header-logo img { width: 156px; max-width: 100%; height: auto; max-height: 36px !important; display: block; }
    header.header .header-middle .nav-elements { width: 56px; height: 44px; padding: 0; margin: 0; align-items: center; justify-content: center; }
    header.header .header-middle .nav-elements > div { border: 0 !important; }
    header.header .lang-link .nav-elements-link { width: 56px; height: 44px; padding: 0; border: 0; font-size: 12px; display: flex; align-items: center; justify-content: center; }
    header.header .lang-link .dropdown-menu { min-width: 80px; right: 0; left: auto; }
    header.header .header-bottom {
        grid-row: 2; grid-column: 3; position: static; width: 44px; height: 44px;
        min-height: 0; padding: 0; margin: 0; border: 0; align-self: center;
    }
    header.header .header-bottom .container-fluid,
    header.header .header-bottom .row,
    header.header .header-bottom .col-pro-menu,
    header.header .header-bottom .col-pro-menu .inner,
    header.header .header-bottom .col-pro-menu .inner .dropdown {
        width: 44px; min-width: 0; height: 44px; min-height: 0;
        margin: 0; padding: 0 !important; border: 0; background: transparent;
    }
    header.header .header-bottom .row > :not(.col-pro-menu) { display: none; }
    header.header .header-bottom .col-pro-menu .inner .dropdown .dropdown-toggle {
        box-sizing: border-box; display: flex; align-items: center; justify-content: center;
        width: 44px; height: 44px; min-height: 44px; padding: 0;
        border: 1px solid rgba(255,255,255,.22); border-radius: 10px;
        color: #fff !important; background: rgba(255,255,255,.06); line-height: 1;
    }
    header.header .header-bottom .dropdown-toggle::after { display: none; }
    header.header .header-bottom .dropdown-toggle i { font-size: 26px; line-height: 1; }
    header.header.scroll-sticky .header-bottom .col-pro-menu .inner .dropdown .dropdown-toggle { color: #0b2147 !important; border-color: #d5dce7; background: #f3f6fa; }
    header.header button:focus-visible, header.header a:focus-visible { outline: 2px solid #71cfff; outline-offset: 3px; }
}

@media (max-width: 767px) {
    header.header { grid-template-rows: 0 68px; }
    header.header .header-top { display: none; }
    #headerMenuOffcanvas .offcanvas-body { min-height: 0; }
    #headerMenuOffcanvas .header-menu-callback {
        display: flex; flex: 0 0 auto; padding: 16px 20px calc(20px + env(safe-area-inset-bottom));
        border-top: 1px solid rgba(255,255,255,.2); background: var(--theme-color);
    }
    #headerMenuOffcanvas .header-menu-callback .head-btn {
        display: flex; width: 100%; min-height: 50px; align-items: center; justify-content: space-between;
        gap: 12px; padding: 12px 16px; border: 0; border-radius: 8px;
        background: #fff; color: var(--theme-color); font-size: 16px; font-weight: 700;
    }
    .container-fluid { padding-left: 16px; padding-right: 16px; }
    .offcanvas__info { max-width: 100vw; height: 100dvh; overflow-y: auto; }
    .offcanvas__info .mega-grid { height: auto !important; min-height: 100%; }

    .slide { height: max(620px, 88svh) !important; }
    .slide .swiper-slide .slide-txt-box { position: absolute; inset: 0; transform: none; display: flex; align-items: center; }
    .slide .slide-txt-box > .container-fluid { width: 100%; }
    .slide .slide-txt-box-video .container-fluid,
    .slide .slide-txt-box-video .slider-content,
    .slide .slide-txt-box-video .row,
    .slide .slide-txt-box-video .row > [class*="col-"] { height: auto; }
    .slide .banner-video, .slide .slide-txt-box { height: 100%; }
    .slide .banner-video > img, .slide .banner-video > video {
        width: 100%; height: 100%; object-fit: cover;
    }
    .slide .swiper-slide .slide-txt-box .slide-title-content {
        position: relative !important; bottom: auto !important;
        height: auto !important; padding: 120px 0 100px !important;
        display: flex !important; min-width: 0;
    }
    .slide .slide-title-content > div { top: 0; width: 100%; }
    .slide .titleslide { font-size: clamp(28px, 8vw, 40px) !important; line-height: 1.15; width: auto !important; overflow-wrap: anywhere; }
    .slide .titlesub { font-size: 16px !important; line-height: 1.5; }
    .slide .swiper-slide-active .titleslide, .slide .swiper-slide-active .titlesub,
    .slide .swiper-slide-active .desc, .slide .swiper-slide-active .btn-touch {
        opacity: 1 !important; visibility: visible !important; transform: none !important; transition: none !important;
    }
    .slide .pagination-wrapper { right: auto !important; left: 16px; width: calc(100% - 140px); bottom: 30px; }
    .slide .swiper-buttons { bottom: 24px !important; right: 16px; }
    .slide .swiper-button { min-width: 44px; min-height: 44px; }

    .last-fairs, .methodology-area, .international { padding-top: 40px; padding-bottom: 40px; }
    .last-fairs .section-title h2, .methodology-area .section-title h2,
    .international .section-title h2 { font-size: clamp(26px, 7vw, 36px); line-height: 1.2; overflow-wrap: anywhere; }
    .last-fairs .figure-caption { padding: 20px; overflow-wrap: anywhere; }
    .last-fairs .swiper-content { min-width: 0; }
    .methodology-area .methodology-content .item-content { padding: 20px; gap: 16px; }
    .methodology-area .methodology-content .item-content > div { min-width: 0; overflow-wrap: anywhere; }
    .methodology-area .methodology-image .methodology-current-title { left: 20px; right: 20px; font-size: 26px; }
    footer .footer-sub-menu ul, footer .social-footer ul { display: flex; flex-wrap: wrap; gap: 12px; }
    footer .newclick p { text-align: center; overflow-wrap: anywhere; }
    .newsletter input, .contact-box input, .contact-box select, .contact-box textarea { font-size: 16px; max-width: 100%; }
    #whatsapp { bottom: calc(16px + env(safe-area-inset-bottom)); left: 16px; right: auto; width: 48px; height: 48px; padding: 0; justify-content: center; align-items: center; border-radius: 50%; transform: none; }
    #whatsapp span { display: none; }
    #back-top { right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); }
}

@media (max-width: 767px) {
    /* Spacing and readable content, shared by all public page templates. */
    .text-anim .split-layer, .text-anim .split-layer * { opacity: 1 !important; visibility: visible !important; transform: none !important; }
    .container { padding-left: 16px; padding-right: 16px; }
    .master .container-fluid { padding-left: 16px !important; padding-right: 16px !important; }
    .master .master-page { padding-bottom: 32px; }
    .master .dynamic-page-title { padding-top: 20px; }
    .master .dynamic-page-title h1, .master .title-detail { font-size: clamp(26px, 7vw, 34px); line-height: 1.2; overflow-wrap: anywhere; }
    .master .bread { font-size: 12px; }
    .master .bread .breadcrumb { padding: 12px 0; flex-wrap: wrap; row-gap: 6px; }
    .master .breadcrumb-item { overflow-wrap: anywhere; }
    .master .dynamic-page-layout__content { font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; }
    .master .dynamic-page-layout__content h2 { font-size: 25px; line-height: 1.3; }
    .master .dynamic-page-layout__content h3 { font-size: 21px; line-height: 1.35; }
    .master .dynamic-page-layout__content p { margin-bottom: 16px; line-height: 1.75; }
    .master .dynamic-page-layout__content img { max-width: 100%; height: auto; }
    .master .dynamic-page-layout__content iframe { width: 100%; max-width: 100%; }
    .master .dynamic-page-layout__content table, .fair-description-info table { display: block; max-width: 100%; overflow-x: auto; }
    .master .subpage .sub-left, .master .subpage .sub-right { padding: 24px 16px; }
    .master .list-group-fairtag .list-group-item { flex-direction: column; gap: 8px; padding: 16px; }
    .master .list-group-fairtag .list-group-item > * { width: auto; max-width: 100%; }
    .service-list-item { margin-bottom: 24px; }
    .service-list-item img { width: 100%; height: 230px; object-fit: cover; border-radius: 10px; }

    /* Home: no desktop minimum heights or large gaps inside service cards. */
    .last-fairs .section-title { margin-bottom: 24px; }
    .last-fairs .section-title h2 { font-size: 24px; line-height: 1.4; }
    .last-fairs .swiper-content { margin-bottom: 0; }
    .last-fairs .swiper-content .swiper-img { height: 220px; }
    .last-fairs .swiper-content .swiper-img a { display: block; height: 100%; background: #fff; }
    .last-fairs .swiper-content .swiper-img img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
    .last-fairs .swiper-content .figure-caption { min-height: 0; padding: 20px 0; }
    .last-fairs .figure-caption h4 { font-size: 22px; line-height: 1.25; }
    .last-fairs .figure-caption h5 { font-size: 15px; line-height: 1.5; }
    .last-fairs .figure-caption p { display: block; overflow: visible; line-height: 1.6; }
    .last-fairs .last-fair-slider, .last-fairs .footer-last-fair-slider { padding-bottom: 56px; }
    .last-fairs .swiper-buttons { left: 0; right: auto; gap: 10px; }
    .last-fairs .swiper-buttons .swiper-button { width: 44px; height: 44px; }
    .methodology-area .section-title { margin-bottom: 24px; }
    .methodology-area .methodology-image { position: relative; top: auto !important; height: 260px; min-height: 0; max-height: none; }
    .methodology-area .methodology-content .item { min-height: 0; padding: 24px; margin-bottom: 20px; }
    .methodology-area .methodology-content .item .item-content { margin-top: 0; padding: 0; }
    .methodology-area .methodology-content .item .item-content > div { display: flex; flex-direction: column; align-items: flex-start; }
    .methodology-area .methodology-content .item .item-content i { position: static; display: inline-flex; padding: 12px; font-size: 26px; margin-bottom: 16px; border-radius: 8px; order: -1; }
    .methodology-area .methodology-content .item .item-content { display: flex; flex-direction: column; align-items: flex-start; gap: 0; }
    .methodology-area .methodology-content h2 { font-size: 23px; margin-bottom: 12px; }
    .methodology-area .methodology-content p { line-height: 1.7; }
    .international { padding: 40px 0; }
    .international .section-title { margin-bottom: 0; }

    /* Search stays available without pushing the first fair below the fold. */
    .f-search { padding: 16px; margin: 22px 0; }
    .f-search .f-search__head { display: none; }
    .f-search__toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 44px; padding: 0; background: transparent; color: #033e63; border: 0; font-weight: 700; font-size: 15px; text-align: left; }
    .f-search__toggle[aria-expanded="true"] > .bi-chevron-down { transform: rotate(180deg); }
    .f-search__grid.collapse:not(.show) { display: none; }
    .f-search__grid.collapse.show { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 12px; padding-top: 16px; }
    .f-search__field--query, .f-search__actions { grid-column: 1 / -1; }
    .f-search .form-control, .f-search .form-select { width: 100%; min-width: 0; height: 48px; font-size: 16px; }
    .f-search__field label { font-size: 13px; }
    .f-search__actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .f-search__submit, .f-search__reset { height: 48px; min-height: 48px; padding: 8px; font-size: 13px; }
    .posts.fairs { padding-top: 0; }
    .posts.fairs .post-item { min-height: 0; padding: 16px; margin-bottom: 20px; border-width: 1px; border-radius: 12px; border-width:2px !important; }
    .posts.fairs .post-gallery { margin-bottom: 16px; padding-bottom: 16px; }
    .posts.fairs .post-gallery > a { display: block; }
    .posts.fairs .post-gallery img { width: 100%; height: 190px; object-fit: contain; background: #fff; }
    .posts.fairs .post-inner-content h3 { margin: 8px 0 16px; font-size: 23px; line-height: 1.25; }
    .posts.fairs .post-inner-content h5 { line-height: 1.5; align-items: flex-start; }
    .posts.fairs .post-inner-content p { display: block; overflow: visible; line-height: 1.6; }
    .posts.fairs .post-inner-content .btn { display: inline-flex; min-height: 44px; align-items: center; padding: 10px 18px; }
    .posts.fairs .fair-card-flag { width: 24px; height: 18px; margin-top: 3px; }

    .fair-detail-media { padding: 16px; }
    .fair-detail-image .img-detail { height: 220px; object-fit: contain; background: #fff; }
    .fair-detail-heading .title-detail { font-size: 30px; }
    .fair-tabs-head { padding: 16px; gap: 16px; }
    .fair-detail-tabs { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
    .fair-detail-tabs .nav-link { padding: 10px; width: 100%; height: 100%; min-height: 48px; justify-content: center; font-size: 13px; }
    .fair-share-inline ul li a { width: 44px; height: 44px; }
    .fair-tab-content { padding: 16px; }
    .fair-tabs-card .fair-detail-caption ul li { min-height: 0; padding: 16px 0; }
    .fair-tabs-card .fair-detail-caption h6 { font-size: 12px; font-weight: 600; }
    .fair-description-info, .fair-travel-info { overflow-wrap: anywhere; }
    .footer-last-fairs { padding: 32px 0; }
    .footer-last-fairs .post-item { min-height: 0; }

    /* Forms: readable inputs, clear labels and usable touch targets. */
    .master .section { padding: 28px 0; }
    .master .contact-box { padding: 20px !important; margin-bottom: 20px !important; border-radius: 12px; background: #fff; }
    .master .contact-box .contact-inner { padding: 0; }
    .master .contact-box h2 { min-height: 0; margin-bottom: 16px; }
    .master .contact-address .box { padding: 0; margin-bottom: 16px; gap: 12px; }
    .master .contact-address h2 { font-size: 25px; margin: 0; }
    .master .contact-address .box h2 { padding: 0; }
    .master .contact-address .box-right { min-width: 0; overflow-wrap: anywhere; }
    .master .contact-address p { line-height: 1.65; }
    .master .contact-inner iframe { height: 240px; width: 100%; border-radius: 10px; }
    .master .contact-inner .mt-5 { margin-top: 24px !important; }
    .master .information-form { padding: 20px; margin-top: 24px; }
    .master input.form-control, .master select.form-control, .master select.form-select,
    .master textarea.form-control, .master .information-form input:not([type="checkbox"]):not([type="radio"]),
    .master .information-form select, .master .information-form textarea { font-size: 16px; max-width: 100%; min-height: 48px; }
    .master textarea.form-control { min-height: 130px; }
    .master .form-group, .master .mb-3 { margin-bottom: 18px; }
    .master .form-check-custom { align-items: flex-start; gap: 10px; }
    .master .form-check-custom input { flex: 0 0 24px; width: 24px; height: 24px; }
    .master .form-check-custom .form-check-label { margin-left: 0 !important; font-size: 14px; line-height: 1.65; }
    .master .contact-subject-option { min-height: 40px; line-height: 1.3; text-align: left; }
    .master .contact-box .btn, .master .information-form .btn { min-height: 48px; }
    .master .contact-box .btn-send, .master .information-form .btn-send { width: 100%; text-align: center; }
    .modal-dialog { margin: 12px; }
    .modal { padding-left: 0 !important; padding-right: 0 !important; }
    .fair-travel-modal .modal-header, .fair-travel-modal .modal-body { padding: 16px; }
    .fair-travel-modal .modal-title { font-size: 20px; }
    .fair-travel-modal .modal-header .btn-close { box-sizing: border-box; flex: 0 0 44px; width: 44px; height: 44px; padding: 12px; }
    .modal .modal-body { overflow-wrap: anywhere; }

    /* Footer has one consistent gutter and leaves room for floating controls. */
    footer .footer-place { padding: 32px 0; border: 0; }
    footer .footer-place > .container-fluid { padding: 0 16px !important; }
    footer .company-logo { margin-bottom: 24px; }
    footer .company-logo img { max-width: 180px; height: auto; filter: brightness(0) invert(1); }
    footer .address { padding-bottom: 0; height: auto; }
    footer .address ul { margin-bottom: 24px; }
    footer .address li { line-height: 1.65; }
    footer .social-footer h3 { margin-bottom: 12px; }
    footer .social-footer ul { gap: 10px; }
    footer .social-footer ul li a { display: flex; width: 44px; height: 44px; align-items: center; justify-content: center; padding: 0; }
    footer .newsletter { padding: 0 !important; }
    footer .newsletter .newsletter-content { padding: 28px 0 !important; }
    footer .newsletter .container-fluid { padding: 0 16px !important; }
    footer .newsletter .newsletter-left h2 { font-size: 24px !important; line-height: 1.25; }
    footer .newsletter .newsletter-left h3 { font-size: 18px; line-height: 1.4; }
    footer .newsletter .row { row-gap: 20px; }
    footer .newsletter .newsletter-form input { height: 50px !important; font-size: 16px; letter-spacing: normal; border-radius: 8px !important; }
    footer .newsletter .newsletter-form .submit { height: 48px !important; margin: 0; border-radius: 8px !important; }
    footer .copyright { padding: 16px !important; }
    footer .accordion-footer { grid-template-columns: minmax(0, 1fr); width: 100%; }
    footer .footer-list { padding: 0; border: 0; }
    footer .accordion-button { padding: 16px; min-height: 52px; }
    footer .footer-list li a { padding: 12px 16px; line-height: 1.4; }
    footer .footer-sub-menu { padding: 12px 0; }
    footer .footer-sub-menu ul { padding: 0; gap: 0 16px; }
    footer .footer-sub-menu li a { display: flex; align-items: center; font-size: 12px; }
    footer .newclick { padding: 16px 0 calc(24px + env(safe-area-inset-bottom)); }
    footer .newclick .row { row-gap: 6px; }
    footer .newclick p { font-size: 12px; text-align: center !important; }
    footer .newclick p.newclick-web { text-align: center !important; justify-content: center !important; }
}

@media (max-width: 359px) {
    header.header { column-gap: 6px; padding: 0 12px; grid-template-columns: minmax(0, 1fr) 50px 44px; }
    header.header .header-logo img { width: 138px; }
    .f-search__grid.collapse.show { grid-template-columns: minmax(0, 1fr); }
    .fair-detail-tabs { grid-template-columns: minmax(0, 1fr); }
    .g-recaptcha { max-width: 100%; overflow: hidden; height: 60px; }
    .g-recaptcha > div { transform: scale(.75); transform-origin: top left; }
}

@media (prefers-reduced-motion: reduce) {
    .slide .titleslide, .slide .titlesub { transition: none !important; }
    html { scroll-behavior: auto; }
}
