/* =============================================================================
   ONCARD — portfólio de clientes (seção #clientes do site)
   Carrossel com card central em destaque, setas, pontos e modal de detalhes.
   Prefixo ocp- para não conflitar com o main.css nem com o Bootstrap.
   ========================================================================== */

.wrapper.oncard-portfolio {
    background: linear-gradient(180deg, #f5f7f6 0%, #edf5f0 100%);
    text-shadow: none;
}

.ocp {
    --ocp-cor: #00A651; --ocp-cor-escura: #077C40;
    --ocp-borda: #e4e9e6; --ocp-borda-ativa: #a9dcc0;
    --ocp-texto: #1f2a33; --ocp-suave: #5d6b76; --ocp-gap: 28px;
}

.ocp__cabeca, .ocp__cabeca h2, .ocp__cabeca p { text-align: center !important; }
.ocp__cabeca { margin: 0 auto 26px; max-width: 900px; padding: 0 20px; }

/* Seção em largura total, como as demais do site */
.ocp { position: relative; width: 100%; margin-bottom: 0 !important; }
.ocp__cabeca h2 { color: #333; margin: 0 0 6px; }
.ocp__cabeca p { color: var(--ocp-suave); margin: 0; }

/* Neutraliza os estilos globais de <button> do main.css dentro do portfólio */
.ocp button, .ocp-modal button {
    background: none; border: 0; border-radius: 0; padding: 0; margin: 0;
    color: inherit !important; font: inherit; font-weight: inherit; line-height: inherit;
    text-transform: none; letter-spacing: normal; overflow: visible; top: 0; box-shadow: none;
}
.ocp button:hover, .ocp button:active, .ocp-modal button:hover, .ocp-modal button:active { background: none; top: 0; }

.ocp__palco { position: relative; }

/* Trilho com rolagem horizontal e "encaixe" no centro */
.ocp__trilho {
    /* Largura fixa por card: quanto maior a tela, mais clientes aparecem ao mesmo tempo */
    --ocp-card: clamp(260px, 21vw, 340px);
    position: relative; width: 100%; min-width: 0;
    display: flex; align-items: stretch; gap: var(--ocp-gap);
    overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-behavior: smooth;
    padding: 14px 0 22px;
    scrollbar-width: none;
    /* Bordas esmaecidas: os cards "somem" suavemente nas laterais da tela */
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}
/* Espaços nas pontas para o primeiro e o último card poderem ficar no centro.
   (Feitos com pseudo-elementos porque padding em % encolheria os cards.) */
.ocp__trilho::before, .ocp__trilho::after {
    content: ''; flex: 0 0 calc((100% - var(--ocp-card)) / 2 - var(--ocp-gap));
}
.ocp__trilho::-webkit-scrollbar { display: none; }
.ocp__trilho:focus { outline: none; }

.ocp-card {
    position: relative; flex: 0 0 var(--ocp-card); scroll-snap-align: center;
    display: flex; flex-direction: column; align-items: flex-start;
    background: #fff; border-radius: 12px; padding: 18px 18px 20px;
    margin: 0 !important; /* o main.css dá margin-bottom: 3em a todo <article>, menos ao último */
    border: 1px solid var(--ocp-borda);
    box-shadow: 0 6px 22px rgba(31, 42, 51, .06);
    cursor: pointer;
    transition: border-color .25s, box-shadow .25s, transform .25s;
}
.ocp-card.is-ativo { border-color: var(--ocp-borda-ativa); box-shadow: 0 10px 28px rgba(0, 166, 81, .12); }
.ocp-card:hover { transform: translateY(-3px); border-color: var(--ocp-borda-ativa); }

/* A foto fica "solta" (absolute) dentro de uma moldura 16:9: assim fotos em retrato,
   quadradas ou paisagem nunca mudam a altura do card — são recortadas para caber. */
.ocp-card__foto {
    position: relative; width: 100%; height: auto; min-height: 0; aspect-ratio: 16 / 9;
    border-radius: 8px; overflow: hidden; background: #eef1f3; margin-bottom: 16px; flex: none;
}
.ocp-card__foto img {
    position: absolute; inset: 0; display: block; width: 100% !important; height: 100% !important;
    max-width: none; object-fit: cover; object-position: center; transition: transform .4s;
}
.ocp-card:hover .ocp-card__foto img { transform: scale(1.04); }

.ocp-card__tipo {
    display: inline-block; padding: 6px 14px; border-radius: 20px;
    font-size: 14px; font-weight: 600; line-height: 1.2; margin-bottom: 14px;
    background: #eceff1; color: #4b5863;
}
.ocp-tipo--cartao   { background: #e3f6ec; color: #077C40; }
.ocp-tipo--pulseira { background: #e0f3f1; color: #13786e; }
.ocp-tipo--display  { background: #fdede2; color: #b4561c; }
.ocp-tipo--cardapio { background: #f8e6f3; color: #a1307f; }
.ocp-tipo--tag      { background: #efeafd; color: #5b3fc4; }

.ocp-card__nome { margin: 0 0 4px; font-size: 1.15em; line-height: 1.3; color: var(--ocp-texto); text-align: left; }
/* position: static para o ::after se estender sobre o card inteiro
   (o main.css deixa todo <button> com position: relative) */
.ocp-card__abrir { cursor: pointer; text-align: left !important; position: static !important; }
/* O card inteiro é clicável (o botão do nome se estende sobre ele) */
.ocp-card__abrir::after { content: ''; position: absolute; inset: 0; border-radius: 12px; z-index: 1; }
.ocp-card__abrir:focus-visible { outline: none; }
.ocp-card__abrir:focus-visible::after { outline: 2px solid var(--ocp-cor); outline-offset: 3px; }
.ocp-card__segmento { margin: 0; font-size: 14px; color: var(--ocp-suave); line-height: 1.4; }

.ocp-card__icone {
    margin-top: auto; padding-top: 18px; display: block;
}
.ocp-card__icone svg {
    display: block; width: 34px; height: 34px; box-sizing: border-box; padding: 8px;
    border: 1.5px solid var(--ocp-cor); border-radius: 50%;
    fill: none; stroke: var(--ocp-cor); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
    transition: background .25s, stroke .25s;
}
.ocp-card.is-ativo .ocp-card__icone svg, .ocp-card:hover .ocp-card__icone svg { background: var(--ocp-cor); stroke: #fff; }

/* Setas laterais (finas, como no modelo) */
.ocp__seta {
    position: absolute !important; top: 50% !important; transform: translateY(-50%); z-index: 3;
    width: 50px; height: 50px; display: grid; place-items: center; cursor: pointer;
    border-radius: 50% !important; background: #fff !important;
    box-shadow: 0 4px 16px rgba(31, 42, 51, .14) !important; transition: box-shadow .2s, opacity .2s;
}
.ocp__seta:hover { box-shadow: 0 6px 20px rgba(0, 166, 81, .25) !important; }
.ocp__seta--anterior { left: max(16px, 2vw); }
.ocp__seta--proxima { right: max(16px, 2vw); }
.ocp__seta svg { width: 26px; height: 26px; fill: none; stroke: var(--ocp-cor); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ocp__seta:hover svg { stroke-width: 2.4; }
.ocp__seta:disabled { opacity: 0; pointer-events: none; }
.ocp__seta:focus-visible { outline: 2px solid var(--ocp-cor); }

/* Pontos com tamanhos graduados */
.ocp__pontos { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 6px; min-height: 16px; }
.ocp__ponto {
    width: 6px !important; height: 6px; border-radius: 50% !important; cursor: pointer;
    background: rgba(0, 166, 81, .3) !important; transition: width .2s, height .2s, background .2s;
}
.ocp__ponto.is-vizinho { width: 9px !important; height: 9px; background: rgba(0, 166, 81, .55) !important; }
.ocp__ponto.is-ativo { width: 14px !important; height: 14px; background: var(--ocp-cor) !important; }
.ocp__ponto:focus-visible { outline: 2px solid var(--ocp-cor); outline-offset: 2px; }

@media (max-width: 980px) {
    .ocp__trilho { --ocp-card: 290px; }
}
@media (max-width: 736px) {
    .ocp { --ocp-gap: 16px; }
    .ocp__seta { display: none; }
    .ocp__trilho {
        --ocp-card: 78%;
        -webkit-mask-image: none; mask-image: none;
    }
}

/* ---------------------------------------------------------------- modal */
.ocp-modal {
    width: min(960px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
    padding: 0; border: 0; border-radius: 16px; overflow: hidden;
    background: #fff; color: #1f2a33; text-shadow: none;
    box-shadow: 0 24px 60px rgba(0,0,0,.3);
}
.ocp-modal::backdrop { background: rgba(15, 23, 30, .6); backdrop-filter: blur(3px); }
.ocp-modal[open] { animation: ocp-entrar .25s ease; }
@keyframes ocp-entrar { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

.ocp-modal__caixa { display: grid; grid-template-columns: 1.25fr 1fr; max-height: calc(100vh - 32px); }
.ocp-modal__fechar {
    position: absolute !important; top: 12px !important; right: 12px; z-index: 3;
    width: 40px; height: 40px; border-radius: 50% !important; background: rgba(255,255,255,.92) !important;
    display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.15) !important;
}
.ocp-modal__fechar svg { width: 20px; height: 20px; stroke: #1f2a33; stroke-width: 2.2; stroke-linecap: round; fill: none; }

.ocp-modal__galeria { position: relative; background: #0f171e; display: flex; flex-direction: column; min-height: 0; }
.ocp-modal__foto { flex: 1; display: grid; place-items: center; min-height: 280px; }
.ocp-modal__foto img { display: block; max-width: 100%; max-height: min(62vh, 560px); object-fit: contain; }
.ocp-modal__nav {
    position: absolute !important; top: calc(50% - 40px) !important; width: 42px; height: 42px; border-radius: 50% !important;
    background: rgba(0,0,0,.45) !important; display: grid; place-items: center; cursor: pointer;
}
.ocp-modal__nav:hover { background: rgba(0,0,0,.65) !important; }
.ocp-modal__nav svg { width: 22px; height: 22px; stroke: #fff; stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ocp-modal__nav--anterior { left: 10px; }
.ocp-modal__nav--proxima { right: 10px; }
.ocp-modal__nav[hidden] { display: none; }
.ocp-modal__miniaturas { display: flex; gap: 8px; padding: 10px; overflow-x: auto; background: rgba(0,0,0,.25); }
.ocp-modal__miniaturas:empty { display: none; }
.ocp-modal__miniaturas button { flex: none; width: 58px; height: 58px; border-radius: 8px !important; overflow: hidden !important; opacity: .55; cursor: pointer; outline-offset: 2px; }
.ocp-modal__miniaturas button.is-ativo { opacity: 1; outline: 2px solid #fff; }
.ocp-modal__miniaturas img { width: 100%; height: 100%; object-fit: cover; display: block; }

.ocp-modal__info { padding: 34px 30px 28px; overflow-y: auto; display: flex; flex-direction: column; align-items: flex-start; }
.ocp-modal__info h3 { margin: 0 0 6px; font-size: 1.6em; line-height: 1.2; color: #1f2a33; text-align: left; }
.ocp-modal__local { margin: 0 0 16px; color: #5d6b76; font-size: 15px; }
.ocp-modal__local:empty { display: none; }
.ocp-modal__descricao { color: #34424d; line-height: 1.6; font-size: 15.5px; text-align: left; white-space: pre-line; margin-bottom: 22px; }
.ocp-modal__acoes { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.ocp-modal__cartao.button { margin-top: 0; }
.ocp-modal__cartao[hidden], .ocp-modal__quero[hidden] { display: none; }
.ocp-modal__quero { color: #077C40; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 736px) {
    .ocp-modal { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; margin: 0; }
    .ocp-modal__caixa { grid-template-columns: 1fr; max-height: 100dvh; height: 100%; overflow-y: auto; }
    .ocp-modal__foto { min-height: 0; }
    .ocp-modal__foto img { max-height: 46vh; }
    .ocp-modal__info { padding: 22px 20px 28px; overflow: visible; }
}

@media (prefers-reduced-motion: reduce) {
    .ocp__trilho { scroll-behavior: auto; }
    .ocp-card, .ocp-card__foto img, .ocp-modal[open] { transition: none; animation: none; }
}
