:root {
    --azul-profundo: #061b33;
    --azul: #0b5ea8;
    --azul-claro: #e8f4fb;
    --amarelo-sol: #f5a623;
    --laranja-sol: #f17722;
    --verde: #18b991;
    --texto: #132d40;
    --texto-suave: #657789;
    --linha: #dce7ef;
    --branco: #ffffff;
    --fundo: #f4f8fb;
    --sombra: 0 20px 50px rgba(18, 57, 82, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--fundo);
    color: var(--texto);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

.portfolio-page {
    min-height: 100vh;
}

#portfolioPublicoView h1, #portfolioPublicoView h2, #portfolioPublicoView h3 { color: var(--portfolio-title-color, #123952); }
#portfolioPublicoView .section-header h2 { font-size: var(--portfolio-title-size, 34px); }
#portfolioPublicoView .section-kicker, #portfolioPublicoView .card h3, #portfolioPublicoView .system-item strong, #portfolioPublicoView .timeline-step strong { color: var(--portfolio-subtitle-color, #123952); font-size: var(--portfolio-subtitle-size, 20px); }
#portfolioPublicoView .section-header > p:not(.section-kicker), #portfolioPublicoView .card p, #portfolioPublicoView .system-item span, #portfolioPublicoView .timeline-step p { color: var(--portfolio-text-color, #46596b); font-size: var(--portfolio-text-size, 16px); }
#portfolioPublicoView .hero-copy h1, #portfolioPublicoView .hero-copy p { color: #fff; }
.portfolio-service-card-v126 { position: relative; min-height: 250px; padding: 0 !important; overflow: hidden; background: #dce7ef; }
.portfolio-service-card-v126 > img { width: 100%; height: 250px; object-fit: cover; }
.portfolio-service-card-v126 > img { display:block; margin:auto; background:#f4f7f9; }
.portfolio-service-caption-v126 { position: absolute; inset: auto 0 0; padding: 42px 18px 18px; background: linear-gradient(transparent, rgba(6,27,51,.94)); color: #fff; }
.portfolio-service-caption-v126 h3 { margin: 4px 0 0; color: #fff !important; }
.photo-slot-v127 { position:relative; display:flex; align-items:center; justify-content:center; padding:0; background:#eef3f6; overflow:hidden; }
.photo-slot-v127 img { display:block; margin:auto; }
.photo-slot-v127 span { position:absolute; left:10px; right:10px; bottom:10px; z-index:2; background:rgba(6,27,51,.82); color:#fff; padding:7px 9px; border-radius:4px; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--linha);
    backdrop-filter: blur(14px);
}

.topbar-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 78px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand img {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.brand-name {
    display: block;
    color: var(--azul-profundo);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.brand-subtitle {
    display: block;
    color: var(--texto-suave);
    font-size: 12px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--azul-profundo);
    font-size: 14px;
    font-weight: 700;
}

.nav a {
    padding: 10px 0;
}

.nav a:hover {
    color: var(--laranja-sol);
}

.section {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 76px 0;
}

.hero {
    width: min(1180px, calc(100% - 32px));
    margin: 34px auto 0;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    gap: 34px;
    align-items: stretch;
}

.hero-copy {
    position: relative;
    overflow: hidden;
    border-radius: 18px 0 0 18px;
    background:
        linear-gradient(135deg, rgba(18, 57, 82, 0.98), rgba(15, 95, 149, 0.94)),
        radial-gradient(circle at 88% 10%, rgba(247, 178, 26, 0.36), transparent 34%);
    color: var(--branco);
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: var(--sombra);
}

.hero-copy::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: -90px;
    bottom: -90px;
    border: 28px solid rgba(247, 178, 26, 0.24);
    border-radius: 50%;
}

.eyebrow {
    width: fit-content;
    margin: 0 0 18px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff3c7;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 860px;
    margin-bottom: 18px;
    font-size: 44px;
    line-height: 1.08;
    letter-spacing: 0;
}

.hero-copy p {
    max-width: 690px;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 17px;
}

.hero-actions,
.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.btn {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 800;
}

.btn-primary {
    background: var(--amarelo-sol);
    color: #1d3447;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.28);
    color: var(--branco);
}

.hero-panel {
    background: var(--branco);
    box-shadow: var(--sombra);
    display: grid;
    grid-template-rows: auto 1fr;
    border-radius: 0 18px 18px 0;
    overflow: hidden;
}

.service-visual {
    min-height: 300px;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(18, 57, 82, 0.68), rgba(18, 57, 82, 0.18)),
        linear-gradient(25deg, #dce7ef 0 24%, #f6fafc 24% 45%, #b8d7e8 45% 64%, #ffffff 64%);
}

.service-visual.has-portfolio-image {
    min-height: 420px;
    background-position: center;
    background-size: cover;
}

.service-visual.has-portfolio-image .unit {
    display: none;
}

.unit {
    position: absolute;
    background: #fff;
    border: 1px solid #cbdce8;
    box-shadow: 0 16px 32px rgba(18, 57, 82, 0.18);
}

.unit-large {
    width: 310px;
    height: 200px;
    left: 38px;
    bottom: 34px;
}

.unit-small {
    width: 160px;
    height: 118px;
    right: 36px;
    top: 52px;
}

.unit::before,
.unit::after {
    content: "";
    position: absolute;
    inset: 22px;
    border: 10px solid #d5e3ec;
    border-radius: 50%;
}

.unit::after {
    inset: 58px;
    border-width: 7px;
    border-color: #0f5f95;
}

.tool-card {
    position: absolute;
    right: 46px;
    bottom: 38px;
    width: 190px;
    padding: 16px;
    background: var(--azul-profundo);
    color: var(--branco);
    box-shadow: 0 16px 32px rgba(18, 57, 82, 0.28);
}

.tool-card strong {
    display: block;
    color: var(--amarelo-sol);
    font-size: 28px;
    line-height: 1;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: var(--linha);
    border-top: 1px solid var(--linha);
}

.stat {
    min-height: 104px;
    background: var(--branco);
    padding: 20px;
}

.stat strong {
    display: block;
    color: var(--azul-profundo);
    font-size: 26px;
    line-height: 1;
}

.stat span {
    display: block;
    margin-top: 8px;
    color: var(--texto-suave);
    font-size: 13px;
}

.section-header {
    max-width: 820px;
    margin-bottom: 30px;
}

.section-kicker {
    margin-bottom: 8px;
    color: var(--laranja-sol);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

h2 {
    color: var(--azul-profundo);
    font-size: 34px;
    line-height: 1.16;
}

.section-header p {
    color: var(--texto-suave);
    font-size: 17px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.card {
    background: var(--branco);
    border: 1px solid var(--linha);
    border-radius: 8px;
    padding: 26px;
    box-shadow: 0 12px 32px rgba(18, 57, 82, 0.07);
}

.card h3 {
    margin-bottom: 10px;
    color: var(--azul-profundo);
    font-size: 20px;
}

.card p {
    margin-bottom: 0;
    color: var(--texto-suave);
}

.card-number {
    display: inline-flex;
    width: 38px;
    height: 38px;
    margin-bottom: 18px;
    align-items: center;
    justify-content: center;
    background: var(--azul-claro);
    color: var(--azul);
    border-radius: 50%;
    font-weight: 800;
}

.split-band {
    width: 100%;
    background: var(--azul-profundo);
    color: var(--branco);
}

.split-band .section {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
    gap: 36px;
    align-items: center;
}

.split-band h2,
.split-band .section-kicker {
    color: var(--branco);
}

.split-band .section-header p {
    color: rgba(255, 255, 255, 0.78);
}

.system-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.system-item {
    min-height: 112px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
}

.system-item strong {
    display: block;
    margin-bottom: 6px;
    color: #fff2bd;
}

.system-item span {
    color: rgba(255, 255, 255, 0.76);
    font-size: 14px;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.timeline-step {
    position: relative;
    background: var(--branco);
    border: 1px solid var(--linha);
    border-top: 4px solid var(--amarelo-sol);
    border-radius: 8px;
    padding: 22px;
}

.timeline-step strong {
    display: block;
    margin-bottom: 10px;
    color: var(--azul-profundo);
}

.timeline-step p {
    margin-bottom: 0;
    color: var(--texto-suave);
    font-size: 14px;
}

.clients-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.client-slot {
    min-height: 112px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: var(--branco);
    border: 1px solid var(--linha);
    border-radius: 8px;
    color: var(--texto-suave);
    text-align: center;
    font-weight: 700;
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.photo-slot {
    min-height: 260px;
    display: flex;
    align-items: flex-end;
    padding: 18px;
    border-radius: 8px;
    overflow: hidden;
    background:
        linear-gradient(180deg, transparent 0 45%, rgba(18, 57, 82, 0.86) 100%),
        linear-gradient(135deg, #dbe8ef, #ffffff 42%, #8fbdd6);
    color: var(--branco);
    font-weight: 800;
    background-position: center;
    background-size: cover;
    box-shadow: 0 12px 32px rgba(6, 27, 51, 0.12);
}

.photo-slot:nth-child(2) {
    background:
        linear-gradient(180deg, transparent 0 45%, rgba(18, 57, 82, 0.86) 100%),
        linear-gradient(135deg, #f8d479, #ffffff 48%, #82b7da);
}

.photo-slot:nth-child(3) {
    background:
        linear-gradient(180deg, transparent 0 45%, rgba(18, 57, 82, 0.86) 100%),
        linear-gradient(135deg, #c9dce8, #ffffff 45%, #ef7f22);
}

.photo-slot:nth-child(4) {
    background:
        linear-gradient(180deg, transparent 0 45%, rgba(18, 57, 82, 0.86) 100%),
        linear-gradient(135deg, #dce7ef, #ffffff 48%, #18b991);
}

.cta {
    padding: 58px;
    background: var(--branco);
    border: 1px solid var(--linha);
    border-radius: 8px;
    box-shadow: var(--sombra);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
}

.cta h2 {
    margin-bottom: 8px;
}

.cta p {
    margin-bottom: 0;
    color: var(--texto-suave);
}

.cta .btn-secondary {
    background: var(--azul-profundo);
}

.footer {
    background: #0b2538;
    color: rgba(255, 255, 255, 0.72);
}

.footer-inner {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 32px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    font-size: 13px;
}

.footer strong {
    color: var(--branco);
}

@media (max-width: 980px) {
    .topbar-inner {
        min-height: auto;
        padding: 12px 0;
        align-items: flex-start;
        flex-direction: column;
    }

    .nav {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .hero,
    .split-band .section,
    .cta {
        grid-template-columns: 1fr;
    }

    .hero {
        min-height: auto;
    }

    .hero-copy {
        padding: 36px;
    }

    h1 {
        font-size: 38px;
    }

    .grid-3,
    .timeline,
    .photo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .clients-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .cta .section-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .section {
        padding: 52px 0;
    }

    .brand-name {
        font-size: 17px;
    }

    .brand img {
        width: 48px;
        height: 48px;
    }

    .hero-copy {
        padding: 28px;
    }

    h1 {
        font-size: 31px;
    }

    h2 {
        font-size: 27px;
    }

    .hero-copy p,
    .section-header p {
        font-size: 15px;
    }

    .hero-stats,
    .grid-3,
    .system-list,
    .timeline,
    .clients-grid,
    .photo-grid {
        grid-template-columns: 1fr;
    }

    .service-visual {
        min-height: 270px;
    }

    .unit-large {
        width: 230px;
        height: 160px;
        left: 20px;
    }

    .unit-small {
        width: 120px;
        height: 92px;
        right: 16px;
        top: 38px;
    }

    .tool-card {
        right: 18px;
        bottom: 22px;
        width: 160px;
    }

    .cta {
        padding: 28px;
    }

    .footer-inner {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media print {
    .topbar,
    .hero-actions,
    .section-actions {
        display: none;
    }

    body {
        background: #fff;
    }

    .section,
    .hero {
        width: 100%;
        padding: 22px 0;
        margin: 0;
    }
}
