/* TripMídia - ajustes para celular (o público do site é quase todo mobile).
   Carregado em todas as páginas, depois do style.css do template. */

/* Botão flutuante de WhatsApp (todas as telas), no canto direito; o "voltar ao topo" fica no esquerdo */
.tm-whatsapp {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 999;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 8px 24px rgba(6, 17, 83, 0.25);
    transition: transform 0.2s ease;
}
.tm-whatsapp:hover,
.tm-whatsapp:focus {
    color: #fff;
    transform: scale(1.06);
}

@media (max-width: 767px) {
    /* Formulários: 16px evita o zoom automático do iPhone ao tocar no campo */
    input,
    select,
    textarea,
    .select2-container .select2-selection__rendered {
        font-size: 16px !important;
    }

    /* Leitura: nada abaixo de 14px */
    .project-info .tag,
    .tag-list .tag,
    .project-badge a,
    .blog-details__tags li,
    .blog-details__tags li a,
    .strategy-item .step,
    .tags span,
    .tags .tag {
        font-size: 14px !important;
    }

    /* Toque: áreas de pelo menos 44px de altura */
    .footer-widget .list-unstyled li a,
    .footer-policy a,
    .contact-info .contact-item a,
    .about-contact-card a,
    .callus-contact a,
    .inner-contact a,
    .info-text a,
    .project-badge a,
    .project-info .theme-btn,
    .blog-meta .continue-reading,
    .blog-list-card .continue-reading,
    .categories li a,
    .page-breadcrumb li a,
    .service-btn,
    .theme-btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    .footer-policy a + a {
        margin-left: 16px;
    }
    .icon-box .hover-icon,
    .social-links .social-icon,
    .blog-details__social-list a,
    .newsletter-form .form-group button {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* WhatsApp um pouco menor no celular */
    .tm-whatsapp {
        width: 52px;
        height: 52px;
        font-size: 28px;
        right: 14px;
        bottom: 14px;
    }
}

/* Listas longas (serviços, segmentos, cidades) viram carrossel de arrastar no celular.
   O próximo card fica aparecendo na borda para indicar que dá para arrastar. */
@media (max-width: 767px) {
    .tm-carrossel {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: stretch;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 16px;
        margin-left: -12px !important;
        margin-right: -12px !important;
        padding: 0 12px 16px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .tm-carrossel::-webkit-scrollbar {
        display: none;
    }
    .tm-carrossel > * {
        flex: 0 0 86% !important;
        max-width: 86% !important;
        width: 86% !important;
        scroll-snap-align: center;
        margin-top: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
}
@media (min-width: 768px) {
}

/* ===== Menu lateral do celular com o visual do site (claro, como o cabeçalho) ===== */
.mobile-menu-wrapper {
    background-color: rgba(6, 17, 83, .55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}
.mobile-menu-wrapper .mobile-menu-area {
    width: 88%;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    background: var(--light-color);
    border-radius: 0 24px 24px 0;
    box-shadow: 20px 0 50px rgba(6, 17, 83, .25);
    scrollbar-width: none;
}
.mobile-menu-wrapper .mobile-menu-area::-webkit-scrollbar { display: none; }
.mobile-menu-wrapper .mobile-logo {
    background: var(--white-color);
    padding: 18px 20px;
    border-bottom: 1px solid rgba(6, 17, 83, .08);
}
.mobile-menu-wrapper .mobile-logo img { max-width: 150px; }
.mobile-menu-wrapper .menu-toggle {
    border: 0;
    top: 22px;
    right: 16px;
    width: 40px;
    height: 40px;
    line-height: 40px;
    font-size: 16px;
    color: var(--title-color, #061153);
    background: var(--light-color2, #e8edfa);
    transition: all .3s ease;
}
.mobile-menu-wrapper .menu-toggle:hover { background: var(--theme-color); color: var(--white-color); }

/* itens */
.mobile-menu-wrapper .mobile-menu { border-bottom: 0; padding: 14px 12px 8px; }
.mobile-menu-wrapper .mobile-menu ul { padding: 0; }
.mobile-menu-wrapper .mobile-menu ul li,
.mobile-menu-wrapper .mobile-menu ul li:first-child { border: 0; margin-bottom: 2px; }
.mobile-menu-wrapper .mobile-menu ul li a {
    color: var(--title-color, #061153);
    font-size: 17px;
    padding: 12px 52px 12px 16px;
    border-radius: 14px;
    transition: background-color .25s ease, color .25s ease;
}
.mobile-menu-wrapper .mobile-menu ul li a:hover { background: var(--white-color); color: var(--theme-color); }
.mobile-menu-wrapper .mobile-menu > ul > li.active > a,
.mobile-menu-wrapper .mobile-menu > ul > li.active-class > a {
    background: var(--white-color);
    color: var(--theme-color);
    box-shadow: 0 6px 18px rgba(6, 17, 83, .06);
}
.mobile-menu-wrapper .mobile-menu > ul > li.active:not(.submenu-item-has-children) > a {
    background: var(--theme-color);
    color: var(--white-color);
}
/* seta dos submenus em círculo */
.mobile-menu-wrapper .mobile-menu ul .submenu-item-has-children > a .mean-expand-class {
    right: 8px;
    width: 34px;
    height: 34px;
    line-height: 34px;
    font-size: 15px;
    border-radius: 50%;
    color: var(--theme-color);
    background: var(--light-color2, #e8edfa);
}
.mobile-menu-wrapper .mobile-menu ul .submenu-item-has-children.active-class > a .mean-expand-class {
    background: var(--theme-color);
    color: var(--white-color);
}
/* submenu em card branco */
.mobile-menu-wrapper .mobile-menu ul li ul {
    background: var(--white-color);
    border-radius: 16px;
    margin: 6px 0 10px;
    padding: 6px;
    box-shadow: 0 8px 24px rgba(6, 17, 83, .06);
}
.mobile-menu-wrapper .mobile-menu ul li ul li { padding-left: 0; margin: 0; }
.mobile-menu-wrapper .mobile-menu ul li ul li a {
    font-size: 15px;
    padding: 10px 14px 10px 30px;
    border-radius: 10px;
    color: var(--title-color, #061153);
}
.mobile-menu-wrapper .mobile-menu ul li ul li a::after {
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-radius: 50%;
    background: var(--theme-color);
    opacity: .5;
}
.mobile-menu-wrapper .mobile-menu ul li ul li a:hover { background: var(--light-color); }
.mobile-menu-wrapper .mobile-menu ul li ul li.active > a { color: var(--theme-color); font-weight: 600; }

/* contatos em cards */
.mobile-menu-wrapper .contact-list-one {
    display: grid;
    gap: 10px;
    padding: 10px 12px 16px;
    margin: 0;
    border-top: 1px solid rgba(6, 17, 83, .08);
    padding-top: 18px;
}
.mobile-menu-wrapper .contact-list-one li { margin: 0; }
.mobile-menu-wrapper .contact-list-one li .contact-info-box {
    background: var(--white-color);
    border-radius: 16px;
    padding: 12px 14px 12px 64px;
    min-height: 62px;
    color: var(--title-color, #061153);
    font-size: 14px;
    line-height: 1.4;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.mobile-menu-wrapper .contact-list-one li .contact-info-box a { color: var(--title-color, #061153); font-weight: 600; word-break: break-word; }
.mobile-menu-wrapper .contact-list-one li .contact-info-box .icon {
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    line-height: 38px;
    border-radius: 50%;
    text-align: center;
    font-size: 16px;
    color: var(--white-color);
    background: var(--theme-color);
}
.mobile-menu-wrapper .contact-list-one li.tm-wa-menu .contact-info-box .icon { background: #25d366; font-size: 19px; }
.mobile-menu-wrapper .contact-list-one li .contact-info-box .title {
    font-size: 11px;
    letter-spacing: .06em;
    color: #6b7394;
    margin-bottom: 2px;
}
/* redes sociais */
.mobile-menu-wrapper .mobile-menu-area .social-links {
    background: none;
    border: 0;
    justify-content: center;
    gap: 10px;
    margin: auto 0 0;
    padding: 6px 12px 24px;
}
.mobile-menu-wrapper .mobile-menu-area .social-links li { width: auto; border: 0; }
.mobile-menu-wrapper .mobile-menu-area .social-links li a {
    width: 44px;
    height: 44px;
    line-height: 44px;
    border-radius: 50%;
    font-size: 18px;
    color: var(--white-color);
    background: var(--theme-color);
}
/* com o menu aberto, o botão flutuante do WhatsApp sai da frente (o WhatsApp já está no menu) */
body:has(.mobile-menu-wrapper.body-visible) .tm-whatsapp,
body:has(.mobile-menu-wrapper.body-visible) .scrollToTop {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.mobile-menu-wrapper .mobile-menu ul li a { text-transform: none; } /* mantém "Hotéis e Pousadas" como escrito */

/* Cards com foto e texto por cima (Cases e cards de projeto): no template o texto só sobe no "hover".
   Em telas de toque e no celular ele fica sempre visível, dentro do card e com margem dos dois lados. */
@media (hover: none), (max-width: 991px) {
    .tv-project-single-box .project-info {
        left: 20px;
        right: 20px;
        bottom: 20px;
    }
    .tv-project-single-box::before { height: 100%; }
    .tv-project-single-box .project-info .border { opacity: 1; visibility: visible; margin-bottom: 14px !important; }
    .tv-project-single-box .project-info .tag { display: inline-block; font-size: 12px; padding: 2px 14px; }
    .tv-project-single-box .project-info .title { font-size: 20px; line-height: 1.3; margin-top: 12px; }
    .tv-project-single-box .project-info p { font-size: 14px; line-height: 1.5; margin-bottom: 14px; }
    .tv-project-single-box .project-info .icon-box { width: 42px; height: 42px; }
}
/* Fotos desses cards (todas 432 x 520): proporção definida antes de carregar, para o card não ficar achatado
   no carrossel do celular (a foto com carregamento sob demanda só carrega quando tem altura na tela). */
.tv-project-single-box .image-wrapper img {
    aspect-ratio: 432 / 520;
    object-fit: cover;
    height: auto;
}

/* Carrosséis do celular: a linha de cards herdava a margem negativa do Bootstrap (gy-30 = -30px em cima),
   que encostava os cards no botão/título acima. Os cards já não usam o espaçamento vertical da grade. */
@media (max-width: 767px) {
    .row.tm-carrossel { margin-top: 0 !important; }
}

/* Cards de serviço no carrossel do celular: foto e texto dentro do card, com margem interna igual dos dois lados
   (o template dá largura mínima de 300px à foto, maior que o card no celular). */
@media (max-width: 767px) {
    .tv-service-section .tv-service-inner .tv-service-item { padding: 16px 16px 22px; }
    .tv-service-section .tv-service-inner .tv-service-item .service-left {
        min-width: 0;
        width: 100%;
    }
    .tv-service-section .tv-service-inner .tv-service-item .service-right {
        width: 100%;
        min-width: 0;
        padding: 0 4px;
    }
    .tv-service-section .tv-service-inner .tv-service-item .service-right p br { display: none; }
    .tv-service-section .tv-service-inner .tv-service-item .service-right .tags {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }
    .tv-service-section .tv-service-inner .tv-service-item .service-right .tags span { margin: 0; }
    .tv-service-section .tv-service-inner .tv-service-item .service-right .border { width: 100%; }
}

/* ===== Cabeçalho do celular: botão do menu no azul da marca (antes era um círculo só com contorno) ===== */
@media (max-width: 991px) {
    .sidebar-btn,
    .tv-header .sidebar-btn,
    .sticky-header .sidebar-btn {
        width: 46px;
        height: 46px;
        border: 0;
        border-radius: 14px;
        background: var(--theme-color);
        box-shadow: 0 8px 18px rgba(16, 83, 243, .28);
        display: inline-flex;
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
        gap: 5px;
        padding: 0 13px;
        line-height: 1;
        transition: background-color .25s ease, transform .2s ease;
    }
    .sidebar-btn .line,
    .tv-header .sidebar-btn .line,
    .sticky-header .sidebar-btn .line {
        width: 20px;
        height: 2.5px;
        margin: 0 !important;
        border-radius: 3px;
        background: var(--white-color);
    }
    .sidebar-btn .line:nth-child(2) { width: 13px; }
    .sidebar-btn:hover .line:nth-child(2),
    .sidebar-btn:focus-visible .line:nth-child(2) { width: 20px; }
    .sidebar-btn:hover { background: var(--title-color, #061153); }
    .sidebar-btn:active { transform: scale(.94); }
}

/* Cidades Atendidas no celular: 2 colunas com cards compactos (foto, região e nome) — antes 1 por linha (~10 mil px) */
@media (max-width: 575px) {
    .tm-cidades-grid { --bs-gutter-y: 12px; margin-left: -6px; margin-right: -6px; }
    .tm-cidades-grid > .grid-item { width: 50%; flex: 0 0 50%; max-width: 50%; padding-left: 6px; padding-right: 6px; }
    .tm-cidades-grid .tv-project-single-box { border-radius: 16px; }
    .tm-cidades-grid .tv-project-single-box .project-info { left: 10px; right: 10px; bottom: 10px; }
    .tm-cidades-grid .tv-project-single-box .project-info .tag { font-size: 10px; padding: 0 8px; line-height: 20px; }
    .tm-cidades-grid .tv-project-single-box .project-info .title { font-size: 15px; line-height: 1.25; margin-top: 6px; margin-bottom: 0; }
    .tm-cidades-grid .tv-project-single-box .project-info .border,
    .tm-cidades-grid .tv-project-single-box .project-info p,
    .tm-cidades-grid .tv-project-single-box .project-info .icon-box { display: none; }
    .tm-cidades-grid .tv-project-single-box::before { height: 70%; }
}

/* Seção "Sobre" (style-3) no celular: foto na largura toda e contador como cartão sobre a foto */
@media (max-width: 991px) {
    .tv-about-section.style-3 .about-left .about-thumb { padding-right: 0 !important; }
    .tv-about-section.style-3 .about-left .about-thumb img {
        display: block;
        width: 100%;
        aspect-ratio: 4 / 3;
        object-fit: cover;
    }
    .tv-about-section.style-3 .about-left .counter {
        position: relative;
        z-index: 2;
        margin: -46px 16px 0;
        padding: 14px 20px;
        background: #fff;
        border-radius: 20px;
        box-shadow: 0 14px 34px rgba(6, 17, 83, .12);
    }
    .tv-about-section.style-3 .about-left .counter .about-counter { justify-content: center; gap: 14px; }
    .tv-about-section.style-3 .about-left .counter .about-counter .count-box { font-size: 64px; }
    .tv-about-section.style-3 .about-left .counter .about-counter .text span { font-size: 28px; }
    .tv-about-section.style-3 .about-left .counter .about-counter .text p { font-size: 15px; line-height: 20px; }
    .tv-about-section.style-3 .about-content-wrap .title-wrap { margin-bottom: 0; }
    .tv-about-section.style-3 .about-content-wrap .theme-btn { margin-top: 24px !important; }
    /* círculo giratório vira selo no canto do cartão da equipe */
    .tv-about-section.style-3 .about-right { position: relative; width: 100%; }
    .tv-about-section.style-3 .about-right .video-box {
        position: absolute;
        top: -34px;
        right: 14px;
        z-index: 3;
        margin: 0;
        width: auto;
    }
    .tv-about-section.style-3 .about-right .video-box .circle-box {
        transform: scale(.72);
        transform-origin: top right;
        border-radius: 50%;
        box-shadow: 0 10px 28px rgba(6, 17, 83, .25);
    }
    .tv-about-section.style-3 .about-right .profile-card { margin-top: 0 !important; }
    .tv-about-section.style-3 .about-right .profile-card .image {
        display: block;
        width: 100%;
        aspect-ratio: 4 / 3;
        object-fit: cover;
    }
}

/* Seção "Por que" (choose): no celular o painel escuro vira uma faixa compacta abaixo da foto redonda */
@media (max-width: 575px) {
    .tv-choose-section .tv-choose-right-box { gap: 16px; align-items: stretch; width: 100%; }
    .tv-choose-section .tv-choose-right-box .data-item-hover { width: 100%; }
    .tv-choose-section .tv-choose-right-box .image_right { width: 100%; height: auto; aspect-ratio: 1 / 1; }
    .tv-choose-section .tv-choose-right-box .text_right {
        height: auto;
        max-width: none;
        margin-left: 0;
        padding: 20px 24px;
        border-radius: 20px;
    }
    .tv-choose-section .tv-choose-right-box .text_right .content {
        display: flex;
        align-items: center;
        gap: 14px;
        width: 100%;
        padding-left: 0;
    }
    .tv-choose-section .tv-choose-right-box .text_right .content .icon img { width: 34px; height: auto; }
    .tv-choose-section .tv-choose-right-box .text_right .content .arrow { display: none; }
    .tv-choose-section .tv-choose-right-box .text_right .title { font-size: 24px; line-height: 1.2; }
    .tv-choose-section .tv-choose-right-box .text_right .title br { display: none; }
    .tv-choose-section .tv-choose-right-box .text_right .year { margin-left: auto; font-size: 20px; line-height: 1; opacity: .6; }
    .tv-choose-section .tv-choose-right-box .middle-btn { display: none; }
}

/* Faixa azul de números (9 segmentos / 8 soluções / 4 etapas): no celular, três colunas iguais lado a lado */
@media (max-width: 767px) {
    .tv-counter-section .counter-inner .row { --bs-gutter-x: 0; --bs-gutter-y: 0; }
    .tv-counter-section .counter-inner .row > [class*="col-"] { flex: 0 0 33.3333%; max-width: 33.3333%; }
    .tv-counter-section .counter-inner .row > [class*="col-"] + [class*="col-"] { border-left: 1px solid rgba(255, 255, 255, .22); }
    .tv-counter-section .counter-inner .counter-box {
        flex-direction: column;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 10px;
        padding: 0 6px;
        text-align: center;
    }
    .tv-counter-section .counter-inner .counter-box .icon img { height: 42px; width: auto; }
    .tv-counter-section .counter-inner .counter-box .content .title { font-size: 34px; justify-content: center; }
    .tv-counter-section .counter-inner .counter-box .content h6 { font-size: 13px; line-height: 1.3; margin-top: 6px; }
}

/* "Voltar ao topo" no canto esquerdo (o WhatsApp fica no direito) */
.scrollToTop { right: auto; left: 20px; }
@media (max-width: 767px) { .scrollToTop { left: 14px; bottom: 20px; } }
