/* ==========================================================
   SINGLE EMPRESA — v11.0 / Guia de Guarapari
   First mobile: Integrante = descoberta | Parceiro = contato |
   Mantenedor = participação máxima.
   ========================================================== */

.empresa-single {
    --empresa-ink: #0b1f33;
    --empresa-text: #334155;
    --empresa-muted: #667085;
    --empresa-soft: #f7f9fc;
    --empresa-line: #e5eaf0;
    --empresa-blue: #0a5ed9;
    --empresa-blue-dark: #084eb4;
    --empresa-success: #168253;
    --empresa-danger: #b42318;
    background: #fff;
    color: var(--empresa-ink);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.empresa-single *,
.empresa-single *::before,
.empresa-single *::after { box-sizing: border-box; }

.empresa-container {
    width: min(1200px, calc(100% - 32px));
    margin-inline: auto;
}

.empresa-single a { text-underline-offset: 3px; }
.empresa-single button,
.empresa-single a { -webkit-tap-highlight-color: transparent; }

.empresa-single :focus-visible {
    outline: 3px solid rgba(10, 94, 217, .23);
    outline-offset: 3px;
}

/* Breadcrumb */
.empresa-breadcrumb {
    border-bottom: 1px solid var(--empresa-line);
    background: #fff;
}

.empresa-breadcrumb nav {
    display: flex;
    align-items: center;
    gap: 7px;
    overflow-x: auto;
    padding: 11px 0;
    color: var(--empresa-muted);
    font-size: .76rem;
    white-space: nowrap;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.empresa-breadcrumb nav::-webkit-scrollbar { display: none; }
.empresa-breadcrumb a { color: #315675; text-decoration: none; }
.empresa-breadcrumb a:hover { color: var(--empresa-blue); }

/* First mobile: informação antes da mídia */
.empresa-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-block: 20px 26px;
}

.empresa-info { order: 1; min-width: 0; }
.empresa-media { order: 2; min-width: 0; }

/* Card de decisão */
.empresa-card {
    width: 100%;
    border: 1px solid var(--empresa-line);
    border-radius: 12px;
    background: #fff;
    padding: 20px;
    box-shadow: none;
    overflow: visible;
    transform: none;
    transition: none;
}
.empresa-card:hover { transform: none; box-shadow: none; }

.card-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}

.avatar {
    display: grid;
    place-items: center;
    flex: 0 0 56px;
    width: 56px;
    height: 56px;
    overflow: hidden;
    border: 1px solid var(--empresa-line);
    border-radius: 10px;
    background: var(--empresa-soft);
}

.avatar-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: var(--empresa-blue);
    background: #eef5ff;
    font-size: 1.25rem;
    font-weight: 760;
}

.info-header { min-width: 0; flex: 1 1 auto; }
.info-header h1 {
    margin: 0;
    color: var(--empresa-ink);
    font-size: clamp(1.35rem, 6.8vw, 1.72rem);
    font-weight: 760;
    line-height: 1.08;
    letter-spacing: -.035em;
    overflow-wrap: anywhere;
}

.categoria-badge {
    display: inline-block;
    margin-top: 9px;
    color: var(--empresa-blue);
    font-size: .79rem;
    font-weight: 670;
    line-height: 1.3;
    text-decoration: none;
}
.categoria-badge:hover { text-decoration: underline; }

.categorias-adicionais {
    margin-top: 8px;
    color: var(--empresa-muted);
    font-size: .75rem;
    line-height: 1.55;
}
.categorias-adicionais .tag {
    color: var(--empresa-text);
    font-weight: 620;
    text-decoration: none;
    margin-left: 5px;
}
.categorias-adicionais .tag:hover { color: var(--empresa-blue); }

/* Confiança */
.rating {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    width: max-content;
    max-width: 100%;
    margin-top: 18px;
    color: inherit;
    text-decoration: none;
}
.stars { display: inline-flex; gap: 1px; }
.star { font-size: .92rem; line-height: 1; }
.star.full, .review-stars .star.full { color: #e7a400; }
.star.half { color: #e7a400; opacity: .7; }
.star.empty, .review-stars .star.empty { color: #d7dee7; }
.rating .value { color: var(--empresa-ink); font-size: .82rem; font-weight: 720; }
.rating .count { color: var(--empresa-muted); font-size: .78rem; }
.rating-empty { color: var(--empresa-muted); font-size: .78rem; }
.rating:hover .count,
.rating-empty:hover { color: var(--empresa-blue); }

/* Horários: status antes da ação */
.horarios {
    margin-top: 16px;
    padding-top: 15px;
    border-top: 1px solid var(--empresa-line);
}

.horarios-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--empresa-ink);
    font: inherit;
    cursor: pointer;
    text-align: left;
}
.horarios-summary { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.horarios-summary svg { flex: 0 0 auto; color: var(--empresa-muted); }
.status { font-size: .84rem; font-weight: 720; }
.status.aberto { color: var(--empresa-success); }
.status.fechado { color: var(--empresa-danger); }
.toggle { color: var(--empresa-blue); font-size: .76rem; font-weight: 660; }
.horarios-toggle[aria-expanded="true"] .toggle::after { content: " · fechar"; color: var(--empresa-muted); font-weight: 520; }

.horarios-dropdown {
    margin-top: 14px;
    padding: 12px 14px;
    background: var(--empresa-soft);
    border-radius: 8px;
}
.horarios-dropdown[hidden] { display: none !important; }
.linha {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 5px 0;
    color: var(--empresa-text);
    font-size: .79rem;
}
.linha.hoje { color: var(--empresa-ink); font-weight: 700; }

/* Endereço e evidências */
.empresa-facts {
    display: grid;
    gap: 9px;
    margin-top: 17px;
}
.endereco {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-width: 0;
    color: var(--empresa-text);
    font-size: .84rem;
    line-height: 1.5;
}
.endereco svg { flex: 0 0 auto; margin-top: 2px; color: #52708e; }
.endereco span { min-width: 0; overflow-wrap: anywhere; }
.endereco strong { color: var(--empresa-ink); font-weight: 680; }

.empresa-verificacao {
    margin: 10px 0 0;
    color: var(--empresa-muted);
    font-size: .72rem;
    line-height: 1.45;
}

/* Ações: Parceiro/Mantenedor = contato imediato */
.acoes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    margin-top: 18px;
}

.btn {
    min-width: 0;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    text-decoration: none;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1.15;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}
.btn svg { flex: 0 0 auto; }
.btn-primary { background: var(--empresa-ink); border-color: var(--empresa-ink); color: #fff; }
.btn-primary:hover { background: #15314f; border-color: #15314f; }
.btn-secondary { background: #fff; border-color: #cdd7e2; color: var(--empresa-ink); }
.btn-secondary:hover { border-color: var(--empresa-blue); color: var(--empresa-blue); }
.btn-detail { display: none; }

.contato-textual {
    grid-column: 1 / -1;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    color: var(--empresa-ink);
}
.contato-textual__icon { display: grid; place-items: center; color: var(--empresa-blue); }
.contato-textual__icon svg { width: 16px; height: 16px; }
.contato-textual__numero { font-size: .94rem; font-weight: 720; letter-spacing: .005em; }

.empresa-discovery-cta {
    display: inline-block;
    margin-top: 15px;
    color: var(--empresa-blue);
    font-size: .8rem;
    font-weight: 680;
    line-height: 1.45;
    text-decoration: none;
}
.empresa-discovery-cta:hover { text-decoration: underline; }

/* Canais digitais: linguagem do Guia, não das plataformas */
.links {
    display: grid;
    gap: 0;
    margin-top: 17px;
    border-top: 1px solid var(--empresa-line);
}
.link {
    display: grid;
    grid-template-columns: 18px 72px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 10px 0;
    border-bottom: 1px solid var(--empresa-line);
    color: var(--empresa-text);
    text-decoration: none;
}
.link svg { color: #6b8196; }
.link-label { color: var(--empresa-ink); font-size: .76rem; font-weight: 700; }
.link-text { min-width: 0; color: var(--empresa-muted); font-size: .77rem; overflow-wrap: anywhere; }
.link:hover .link-label,
.link:hover .link-text,
.link:hover svg { color: var(--empresa-blue); }

/* Mídia */
.empresa-cover {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 12px;
    background: #eef2f6;
}
.empresa-cover-trigger {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: zoom-in;
}
.empresa-cover .guia-picture,
.empresa-cover .guia-picture > img,
.cover-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.empresa-cover.has-photo::after {
    content: "Ampliar";
    position: absolute;
    right: 12px;
    bottom: 12px;
    pointer-events: none;
    padding: 5px 8px;
    border-radius: 6px;
    background: rgba(11, 31, 51, .78);
    color: #fff;
    font-size: .68rem;
    font-weight: 650;
    opacity: .88;
}
.empresa-single[data-plano="presenca"] .empresa-cover { aspect-ratio: 16 / 8.4; }

.empresa-gallery-premium {
    margin-top: 13px;
}
.empresa-gallery-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 9px;
}
.empresa-gallery-head strong { color: var(--empresa-ink); font-size: .85rem; font-weight: 700; }
.empresa-gallery-head span { color: var(--empresa-muted); font-size: .72rem; }
.empresa-thumbnails {
    display: flex;
    gap: 9px;
    overflow-x: auto;
    padding-bottom: 3px;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.empresa-thumbnails::-webkit-scrollbar { display: none; }
.thumbnail-item {
    position: relative;
    flex: 0 0 44%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--empresa-line);
    border-radius: 8px;
    background: var(--empresa-soft);
    cursor: zoom-in;
    scroll-snap-align: start;
}
.thumbnail-item .guia-picture,
.thumbnail-item .guia-picture > img,
.thumbnail-item img { width: 100%; height: 100%; display: block; object-fit: cover; }
.thumbnail-item.active { border-color: var(--empresa-blue); }

/* Navegação de profundidade */
.empresa-premium-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 0 0 20px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.empresa-premium-nav::-webkit-scrollbar { display: none; }
.empresa-premium-nav a {
    flex: 0 0 auto;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border: 1px solid var(--empresa-line);
    border-radius: 999px;
    background: #fff;
    color: var(--empresa-ink);
    text-decoration: none;
    font-size: .78rem;
    font-weight: 650;
}
.empresa-premium-nav a:hover { border-color: var(--empresa-blue); color: var(--empresa-blue); }

/* Conteúdo aprofundado: menos caixas, mais hierarquia */
.empresa-extra { margin-bottom: 52px; }
.sobre,
.avaliacoes,
.mapa,
.empresa-related {
    padding: 28px 0;
    border-top: 1px solid var(--empresa-line);
}
.sobre:first-child { border-top: 0; padding-top: 4px; }
.sobre h2,
.avaliacoes h2,
.mapa h2,
.empresa-related__head h2 {
    margin: 0 0 16px;
    color: var(--empresa-ink);
    font-size: clamp(1.35rem, 6vw, 1.75rem);
    font-weight: 740;
    line-height: 1.12;
    letter-spacing: -.032em;
}
.descricao { color: var(--empresa-text); font-size: .94rem; line-height: 1.72; }
.descricao > :first-child { margin-top: 0; }
.descricao > :last-child { margin-bottom: 0; }
.descricao.collapsed { max-height: 12rem; overflow: hidden; position: relative; }
.descricao.collapsed::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 56px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), #fff);
    pointer-events: none;
}
.ver-mais {
    margin-top: 12px;
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--empresa-blue);
    font: inherit;
    font-size: .82rem;
    font-weight: 680;
    cursor: pointer;
}

/* Avaliações */
.review-card {
    padding: 16px 0;
    border-bottom: 1px solid var(--empresa-line);
}
.review-header { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 6px; }
.review-header strong { color: var(--empresa-ink); font-size: .86rem; }
.review-date { color: var(--empresa-muted); font-size: .71rem; }
.review-stars { margin-bottom: 7px; }
.review-text { margin: 0; color: var(--empresa-text); font-size: .88rem; line-height: 1.58; }
.no-reviews { color: var(--empresa-muted); font-size: .86rem; }
.review-form { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--empresa-line); }
.review-form h3 { margin: 0 0 18px; color: var(--empresa-ink); font-size: 1rem; }

.review-form input[type="text"],
.review-form input[type="email"],
.review-form textarea {
    width: 100%;
    border: 1px solid #d9e1ea;
    border-radius: 8px;
    padding: 11px 12px;
    background: #fff;
    color: var(--empresa-ink);
    font: inherit;
}
.review-form textarea { min-height: 108px; resize: vertical; }
.guia-btn-submit-review {
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    background: var(--empresa-ink);
    color: #fff;
    padding: 11px 18px;
    font-weight: 700;
    cursor: pointer;
}
.guia-btn-submit-review:hover { background: #15314f; }

/* Localização */
.mapa-placeholder {
    padding: 20px;
    border-radius: 10px;
    background: var(--empresa-soft);
}
.mapa-placeholder p { margin: 0; color: var(--empresa-text); font-size: .84rem; line-height: 1.5; }
.mapa-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 14px; }
.btn-mapa,
.mapa-actions a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    padding: 10px 14px;
    font: inherit;
    font-size: .79rem;
    font-weight: 680;
    text-decoration: none;
    cursor: pointer;
}
.btn-mapa { border: 1px solid var(--empresa-ink); background: var(--empresa-ink); color: #fff; }
.mapa-actions a { border: 1px solid #cdd7e2; background: #fff; color: var(--empresa-ink); }
.mapa-container[hidden] { display: none !important; }
.mapa-container iframe { display: block; width: 100%; min-height: 280px; border: 0; border-radius: 10px; }

/* Integrante: continuidade da descoberta antes do aprofundamento final */
.empresa-related__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}
.empresa-related__head h2 { margin-bottom: 5px; }
.empresa-related__head p { margin: 0; color: var(--empresa-muted); font-size: .84rem; }
.empresa-related__all { flex: 0 0 auto; color: var(--empresa-blue); font-size: .78rem; font-weight: 680; text-decoration: none; }
.empresa-related__all:hover { text-decoration: underline; }
.empresa-related__grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.empresa-related__card {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--empresa-line);
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
    background: #fff;
}
.empresa-related__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--empresa-soft); }
.empresa-related__media img,
.empresa-related__media .guia-picture { width: 100%; height: 100%; display: block; object-fit: cover; }
.empresa-related__placeholder { width: 100%; height: 100%; background: var(--empresa-soft); }
.empresa-related__body { min-width: 0; align-self: center; padding: 12px 14px; }
.empresa-related__body h3 { margin: 0 0 4px; color: var(--empresa-ink); font-size: .92rem; line-height: 1.28; }
.empresa-related__body span { color: var(--empresa-muted); font-size: .74rem; }
.empresa-related__card:hover { border-color: #bfcbd8; }

/* Mantenedor: ação persistente sem bloquear a tela */
.empresa-single[data-plano="mantenedor"] { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
.empresa-sticky {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    transform: translateY(110%);
    transition: transform .22s ease;
    border-top: 1px solid var(--empresa-line);
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(10px);
    padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px));
}
.empresa-sticky.visible { transform: translateY(0); }
.sticky-container {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 7px;
}
.sticky-btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 8px;
    border: 1px solid transparent;
    border-radius: 7px;
    font-size: .76rem;
    font-weight: 720;
    line-height: 1;
    text-decoration: none;
}
.sticky-whatsapp { background: var(--empresa-ink); border-color: var(--empresa-ink); color: #fff; }
.sticky-rotas { background: #fff; border-color: #cdd7e2; color: var(--empresa-ink); }
.sticky-telefone { background: var(--empresa-blue); border-color: var(--empresa-blue); color: #fff; }

/* Lightbox acessível */
.empresa-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 54px 42px;
    background: rgba(4, 10, 18, .96);
}
.empresa-lightbox.show { display: flex; }
.lightbox-content { position: relative; max-width: min(1200px, 92vw); max-height: 88vh; }
.lightbox-viewport { display: grid; place-items: center; }
.lightbox-img { display: block; max-width: 100%; max-height: 82vh; object-fit: contain; }
.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255,255,255,.24);
    border-radius: 8px;
    background: rgba(255,255,255,.1);
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
}
.lightbox-close { top: -50px; right: 0; }
.lightbox-prev { left: -50px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: -50px; top: 50%; transform: translateY(-50%); }
.lightbox-caption { margin-top: 10px; color: rgba(255,255,255,.74); text-align: center; font-size: .76rem; }
.lightbox-prev[hidden], .lightbox-next[hidden] { display: none !important; }

/* Desktop */
@media (min-width: 981px) {
    .empresa-container { width: min(1200px, calc(100% - 40px)); }
    .empresa-main {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 380px;
        gap: 40px;
        align-items: start;
        margin-block: 40px 30px;
    }
    .empresa-media { order: 1; }
    .empresa-info { order: 2; position: sticky; top: 92px; }
    .empresa-card { padding: 24px; }
    .avatar { width: 64px; height: 64px; flex-basis: 64px; }
    .info-header h1 { font-size: 1.42rem; }
    .btn-detail { display: inline; font-weight: 540; opacity: .78; }
    .empresa-thumbnails { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: visible; }
    .thumbnail-item { width: 100%; flex: none; }
    .empresa-premium-nav { padding-bottom: 24px; }
    .empresa-extra { max-width: 900px; }
    .sobre, .avaliacoes, .mapa, .empresa-related { padding-block: 34px; }
    .empresa-related__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
    .empresa-related__card { display: block; }
    .empresa-related__media { aspect-ratio: 16 / 9; }
    .empresa-related__body { padding: 15px; }
    .empresa-single[data-plano="mantenedor"] { padding-bottom: 0; }
    .empresa-sticky { padding-inline: 0; }
    .sticky-container { max-width: 720px; }
}

@media (max-width: 420px) {
    .empresa-container { width: min(100% - 24px, 1200px); }
    .empresa-card { padding: 17px; }
    .card-header { gap: 11px; }
    .avatar { width: 50px; height: 50px; flex-basis: 50px; }
    .info-header h1 { font-size: 1.3rem; }
    .acoes { gap: 7px; }
    .btn { padding-inline: 9px; font-size: .78rem; }
    .link { grid-template-columns: 17px 64px minmax(0,1fr); gap: 8px; }
    .empresa-related__head { align-items: flex-start; flex-direction: column; gap: 9px; }
    .empresa-related__card { grid-template-columns: 94px minmax(0,1fr); }
    .empresa-lightbox { padding-inline: 14px; }
    .lightbox-prev { left: 2px; }
    .lightbox-next { right: 2px; }
}

@media (prefers-reduced-motion: reduce) {
    .empresa-sticky,
    .btn { transition: none; }
}


/* v16.28 entity presentation contract */
.empresa-single .empresa-container { width: min(1200px, calc(100% - 48px)); }
.empresa-single .empresa-card, .empresa-single .empresa-cover, .empresa-single .empresa-related__card { border-radius: 6px; }
.empresa-single .btn, .empresa-single .mapa-actions a, .empresa-single .guia-btn-submit-review { border-radius: 4px; }
@media (max-width: 767px) {
  .empresa-single .empresa-container { width: min(100% - 32px, 1200px); }
}
@media (max-width: 390px) {
  .empresa-single .empresa-container { width: min(100% - 24px, 1200px); }
}
