/* ==================================================
   PÁGINA SERVIÇOS (template-servicos.php)
   Carregado só neste modelo. Tudo escopado em .pagina-servicos.
   O texto vem do editor da página (classes sv-*); ícones e
   imagens ficam aqui, para o conteúdo não depender do domínio.
   O rodapé está em rodape-institucional.css.
================================================== */

.pagina-servicos {
    --sv-verde: #16a68a;
    --sv-verde-escuro: #0e7f69;
    --sv-verde-claro: #f1f8f5;
    --sv-verde-borda: #d6e9e1;
    --sv-vermelho: #c00000;
    --sv-vermelho-claro: #fdeceb;
    --sv-texto: #111;
    --sv-texto-suave: #3f3f3f;
    --sv-borda: #e2ebe7;

    position: relative;
    /* mesma largura da barra do menu (1410px); o header.css puxa o
       conteúdo 15px para cima, por isso o recuo no topo */
    width: calc(100% - 40px);
    max-width: 1410px;
    margin: 15px auto 0;
    padding: 36px 0 48px;
    background: linear-gradient(180deg, var(--sv-verde-claro) 0, #fff 520px);
    font-family: Arial, sans-serif;
    color: var(--sv-texto);
    overflow: hidden;
}

.sv-container {
    position: relative;
    padding: 0 28px;
}

/* ---------- Imagem do DNA no topo ---------- */

.sv-topo-imagem {
    position: absolute;
    top: 0;
    right: 0;
    width: 62%;
    height: 460px;
    background: url(../img/servicos-dna.webp) no-repeat right center / cover;
    opacity: .9;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 45%), linear-gradient(to bottom, #000 60%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image: linear-gradient(to right, transparent 0, #000 45%), linear-gradient(to bottom, #000 60%, transparent 100%);
    mask-composite: intersect;
    pointer-events: none;
}

/* ---------- Título e introdução ---------- */

.sv-h1 {
    position: relative;
    max-width: 640px;
    margin: 0 0 18px;
    padding-top: 18px;
    font-size: 44px;
    line-height: 1.1;
    font-weight: 700;
    color: var(--sv-texto);
}

.sv-h1::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 48px;
    height: 5px;
    border-radius: 3px;
    background: var(--sv-vermelho);
}

/* o seletor com .pagina-servicos vence o CSS inline .ancesgen-page-section p */
.pagina-servicos p {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.5;
    color: var(--sv-texto-suave);
}

.sv-intro {
    max-width: 620px;
    min-height: 250px;
}

.pagina-servicos a {
    color: var(--sv-verde-escuro);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pagina-servicos a:hover,
.pagina-servicos a:focus-visible {
    color: var(--sv-vermelho);
}

/* ---------- Responsável ---------- */

.sv-responsavel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 24px;
    margin: 28px 0 40px;
    padding: 20px 28px;
    background: rgba(230, 243, 238, .92);
    border: 1px solid var(--sv-verde-borda);
    border-radius: 10px;
}

.sv-responsavel img {
    flex: 0 0 auto;
    width: 96px;
    height: 96px;
    padding: 3px;
    border: 3px solid var(--sv-verde);
    border-radius: 50%;
    background: #fff;
    object-fit: cover;
}

.sv-responsavel h2 {
    margin: 0 0 6px;
    font-size: 19px;
    line-height: 1.3;
    font-weight: 700;
    color: var(--sv-texto);
}

.sv-responsavel p {
    margin: 0;
}

/* ---------- Títulos de seção (traço vermelho, como em Pesquisadores) ---------- */

.sv-titulo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 12px;
    font-size: 24px;
    line-height: 1.25;
    font-weight: 700;
    color: var(--sv-texto);
}

.sv-titulo::before {
    content: "";
    flex: 0 0 auto;
    width: 30px;
    height: 5px;
    border-radius: 3px;
    background: var(--sv-vermelho);
}

.sv-secao > p {
    max-width: 1000px;
}

/* ---------- Cartões dos serviços (3 + 2) ---------- */

.sv-cards {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 20px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.sv-card {
    grid-column: span 2;
    padding: 22px 24px;
    background: #fff;
    border: 1px solid var(--sv-borda);
    border-radius: 10px;
    box-shadow: 0 4px 18px rgba(16, 70, 55, .06);
}

.sv-card:nth-child(n+4) {
    grid-column: span 3;
}

.sv-card p {
    margin: 14px 0 0;
    font-size: 14px;
}

.sv-card strong {
    color: var(--sv-texto);
}

/* ---------- Ícones ---------- */

/* O ícone é um ::before do próprio bloco (classe sv-icone--nome), sem elemento
   vazio no conteúdo, para o editor Visual do WordPress não apagá-lo. */
.sv-com-icone::before {
    content: "";
    display: block;
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 10px;
    background: var(--sv-glifo) no-repeat center / 28px, #e3f4ee;
}

.sv-icone--ia::before,
.sv-icone--transcriptomica::before,
.sv-icone--personalizadas::before {
    background-color: var(--sv-vermelho-claro);
}

.sv-icone--ia { --sv-glifo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c00000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='5' width='14' height='14' rx='2'/%3E%3Crect x='9' y='9' width='6' height='6' rx='1'/%3E%3Cpath d='M9 2v3M15 2v3M9 19v3M15 19v3M2 9h3M2 15h3M19 9h3M19 15h3'/%3E%3C/svg%3E"); }
.sv-icone--dna { --sv-glifo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a68a' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M7 2c0 5 10 5 10 10s-10 5-10 10'/%3E%3Cpath d='M17 2c0 5-10 5-10 10s10 5 10 10'/%3E%3Cpath d='M8 4h8M8 10h8M8 14h8M8 20h8'/%3E%3C/svg%3E"); }
.sv-icone--transcriptomica { --sv-glifo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c00000' stroke-width='1.8' stroke-linejoin='round'%3E%3Crect x='3' y='12' width='4.5' height='9' rx='1'/%3E%3Crect x='9.75' y='7' width='4.5' height='14' rx='1'/%3E%3Crect x='16.5' y='3' width='4.5' height='18' rx='1'/%3E%3C/svg%3E"); }
.sv-icone--metagenomica { --sv-glifo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a68a' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='5.5'/%3E%3Ccircle cx='10.5' cy='10.5' r='1'/%3E%3Ccircle cx='13.8' cy='13.5' r='1.2'/%3E%3Cpath d='M12 2v4.5M12 17.5V22M2 12h4.5M17.5 12H22M4.9 4.9l3.2 3.2M15.9 15.9l3.2 3.2M19.1 4.9l-3.2 3.2M8.1 15.9l-3.2 3.2'/%3E%3C/svg%3E"); }
.sv-icone--personalizadas { --sv-glifo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c00000' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Ccircle cx='12' cy='12' r='7'/%3E%3Cpath d='M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9 7 7M17 17l2.1 2.1M4.9 19.1 7 17M17 7l2.1-2.1'/%3E%3C/svg%3E"); }
.sv-icone--consultoria { --sv-glifo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a68a' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='9' cy='8' r='4'/%3E%3Cpath d='M2 21c0-4 3-7 7-7s7 3 7 7'/%3E%3Cpath d='M16 4.5a4 4 0 0 1 0 7M18.5 14.5c2 1 3.5 3.5 3.5 6.5'/%3E%3C/svg%3E"); }
.sv-icone--treinamento { --sv-glifo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a68a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9l10-5 10 5-10 5z'/%3E%3Cpath d='M6 11v5c2 2 10 2 12 0v-5M22 9v6'/%3E%3C/svg%3E"); }
.sv-icone--parceria { --sv-glifo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a68a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 11l4-4 4 2 3-2 5 1 4 3'/%3E%3Cpath d='M6 13l4 4c.8.8 2 .8 2.8 0l4.7-4.7'/%3E%3Cpath d='M10 9l-2 2c-.6.6-.6 1.4 0 2s1.4.6 2 0l2-2M2 11l3 3M22 11l-3 3'/%3E%3C/svg%3E"); }
.sv-icone--web { --sv-glifo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a68a' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M2.5 12h19M12 2.5c3 3 3 16 0 19M12 2.5c-3 3-3 16 0 19'/%3E%3C/svg%3E"); }
.sv-icone--doc { --sv-glifo: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a68a' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='M6 2h8l5 5v15H6z'/%3E%3Cpath d='M14 2v5h5'/%3E%3C/svg%3E"); }

/* ---------- Consultoria e Treinamento (com imagem ao fundo) ---------- */

.sv-destaques {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin: 40px 0 0;
}

.sv-destaque {
    position: relative;
    min-height: 300px;
    padding: 26px 28px;
    background: var(--sv-verde-claro);
    border: 1px solid var(--sv-borda);
    border-radius: 10px;
    overflow: hidden;
}

/* imagem à direita, dissolvendo para a esquerda */
.sv-destaque::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 46%;
    background: no-repeat center / cover;
    -webkit-mask-image: linear-gradient(to right, transparent 0, #000 55%);
    mask-image: linear-gradient(to right, transparent 0, #000 55%);
    opacity: .9;
}

.sv-destaque--consultoria::after { background-image: url(../img/servicos-consultoria.webp); }
.sv-destaque--treinamento::after { background-image: url(../img/servicos-treinamento.webp); }

.sv-destaque > * {
    position: relative;
    z-index: 1;
    max-width: 60%;
}

.sv-destaque.sv-com-icone::before {
    position: relative;
    z-index: 1;
    margin-bottom: 14px;
}

.sv-destaque p {
    font-size: 14px;
}

/* ---------- Contato, Infraestrutura e Parcerias ---------- */

.sv-contato {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 32px;
    margin: 40px 0 0;
    padding: 28px;
    background: #e9f5f0;
    border: 1px solid var(--sv-verde-borda);
    border-radius: 10px;
}

.sv-contato-texto {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 18px;
    align-items: start;
}

.sv-contato-texto::before {
    grid-row: span 2;
}

.sv-contato-info {
    padding-left: 32px;
    border-left: 1px solid var(--sv-verde-borda);
}

.sv-info {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 16px;
    align-items: center;
    margin-bottom: 18px;
}

.sv-info:last-child {
    margin-bottom: 0;
}

.sv-info p {
    margin: 0;
    font-size: 14px;
}

.sv-info a {
    font-weight: 700;
    overflow-wrap: anywhere;
}

/* ---------- Tablet ---------- */

@media (max-width: 1100px) {
    .sv-topo-imagem { width: 55%; opacity: .6; }
    .sv-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sv-card,
    .sv-card:nth-child(n+4) { grid-column: span 1; }
    .sv-card:last-child { grid-column: 1 / -1; }
    .sv-destaques { grid-template-columns: minmax(0, 1fr); }
    .sv-contato { grid-template-columns: minmax(0, 1fr); }
    .sv-contato-info {
        padding: 24px 0 0;
        border-left: 0;
        border-top: 1px solid var(--sv-verde-borda);
    }
}

/* Telas menores: a imagem do DNA vai para cima do título, sem ficar atrás do texto */
@media (max-width: 900px) {
    .pagina-servicos { padding-top: 0; }
    .sv-topo-imagem {
        position: relative;
        width: 100%;
        height: 220px;
        margin-bottom: -10px;
        opacity: .9;
        -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
        mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
    }
    .sv-intro { min-height: 0; max-width: none; }
}

/* ---------- Celular ---------- */

@media (max-width: 720px) {
    .pagina-servicos { padding-bottom: 32px; }
    .sv-container { padding: 0 14px; }
    .sv-topo-imagem { height: 180px; }
    .sv-h1 { font-size: 32px; }
    .sv-titulo { font-size: 21px; }
    .sv-responsavel {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    .sv-responsavel h2 { font-size: 17px; }
    .sv-cards { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .sv-card:last-child { grid-column: auto; }
    .sv-destaque { padding: 22px 20px; min-height: 0; }
    .sv-destaque::after {
        position: relative;
        display: block;
        width: auto;
        height: 160px;
        margin: 16px -20px -22px;
        -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 35%);
        mask-image: linear-gradient(to bottom, transparent 0, #000 35%);
    }
    .sv-destaque > * { max-width: none; }
    .sv-contato { padding: 22px 20px; }
    .sv-contato-texto { grid-template-columns: minmax(0, 1fr); }
    .sv-contato-texto::before { grid-row: auto; margin-bottom: 12px; }
}
