/* ============================================================
   DADOS DO SETOR — Estilos da página
   ============================================================ */


/* ---- MAIN (seção roxa) ---- */
#ds-main {
    padding: 0;
    overflow: hidden; /* evita scroll lateral dos paints decorativos */
}

.ds-main-inner {
    background: #66589e;
    border-radius: 20px;
    margin-top: 86px;
    padding: 55px 40px 600px; /* 220px = 150px overlap + 70px de espaço visível */
    position: relative;
    z-index: 1;
    overflow: visible;
}

/* Paints decorativos */
.ds-paint-left,
.ds-paint-right {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}
.ds-paint-left {
    left: -74px;
    top: 30px;
    transform: rotate(180deg) scaleY(-1);
}
.ds-paint-right {
    right: -100px;
    top: 260px;
    transform: rotate(180deg);
}
.ds-paint-left img { width: 324px; display: block; }
.ds-paint-right img { width: 341px; display: block; }

/* ---- TEXTO DO CONTEÚDO PRINCIPAL ---- */
.ds-content-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 18px;
    line-height: 1.88;
    color: #fff;
    letter-spacing: -0.32px;
    margin: 0 0 22px;
}
.ds-content-text:last-child { margin-bottom: 0; }

/* ---- HERO FOTO ---- */
.ds-hero-img,
.ds-hero-placeholder {
    width: 100%;
    max-width: 482px;
    height: 486px;
    border-radius: 20px;
    display: block;
    margin-left: auto;
}
.ds-hero-img {
    object-fit: cover;
    object-position: center bottom;
}
.ds-hero-placeholder {
    background: rgba(255,255,255,0.15);
}

/* ---- STATS WRAP (fundo #ecf1f6 — overlapping cards) ---- */
.ds-stats-wrap {
    background: #ecf1f6;
    border-radius: 20px;
    padding: 55px 30px 80px;
    margin: -580px 45px 0;  /* margem negativa sobe 150px sobre .ds-main-inner */
    position: relative;
    z-index: 2;             /* acima de .ds-main-inner (z-index:1) */
    overflow: visible;
}

/* Linhas de cards */
.ds-cards-row {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.ds-cards-row:last-child { margin-bottom: 0; }

/* Card individual */
.ds-stat-card {
    border: 3px solid #66589e;
    border-radius: 20px;
    width: 303px;
    min-height: 330px;
    background: #fff;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}
.ds-stat-card-header {
    background: #66589e;
    height: 82px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ds-stat-year {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 24px;
    color: #fff;
    letter-spacing: -0.32px;
    line-height: 1.88;
}
.ds-stat-card-body {
    padding: 16px 16px 20px;
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.ds-stat-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 16px;
    color: #66589e;
    letter-spacing: -0.32px;
    line-height: 1.88;
    margin-bottom: 0;
}
.ds-stat-value {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 64px;
    color: #66589e;
    letter-spacing: -0.32px;
    line-height: 1.1;
    margin: 2px 0;
}
.ds-stat-value-row {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    margin: 4px 0;
}
.ds-stat-prefix,
.ds-stat-suffix {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 14px;
    color: #66589e;
    letter-spacing: -0.32px;
    padding-bottom: 14px;
    line-height: 1;
}
.ds-stat-unit {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 16px;
    color: #66589e;
    letter-spacing: -0.32px;
    line-height: 1.88;
    margin: 0;
}
.ds-stat-sub {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 13px;
    color: #66589e;
    letter-spacing: -0.32px;
    line-height: 1.33;
    margin: 6px 0 0;
}

/* ---- O SETOR EM NÚMEROS ---- */
#ds-numeros {
    padding: 60px 0 30px;
}
.ds-numeros-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 30px;
    color: #66589e;
    letter-spacing: -0.32px;
    margin-bottom: 12px;
}
.ds-numeros-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 16px;
    color: #58536f;
    margin-bottom: 30px;
}
.ds-numeros-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.ds-numero-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 0 7px rgba(0,0,0,0.15);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1 1 calc(50% - 10px);
    min-width: 280px;
    box-sizing: border-box;
}
.ds-numero-badge {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 20px;
    text-align: center;
    line-height: 1.1;
}
.ds-numero-badge.is-compact { font-size: 15px; }
.ds-numero-card:nth-child(4n+1) .ds-numero-badge { background: #66589e; }
.ds-numero-card:nth-child(4n+2) .ds-numero-badge { background: #5a738d; }
.ds-numero-card:nth-child(4n+3) .ds-numero-badge { background: #7e71b3; }
.ds-numero-card:nth-child(4n+4) .ds-numero-badge { background: #58536f; }
.ds-numero-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.5;
    color: #58536f;
    margin: 0;
    flex: 1;
    min-width: 0;
}

/* ---- SEGMENTOS ---- */
#ds-segments {
    padding: 130px 0 60px;
}

.ds-paint-seg-left,
.ds-paint-seg-right {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}
.ds-paint-seg-left {
    left: -74px;
    top: 100px;
    transform: rotate(180deg) scaleY(-1);
}
.ds-paint-seg-right {
    right: -100px;
    top: 50%;
    transform: rotate(180deg);
}
.ds-paint-seg-left img { width: 324px; display: block; }
.ds-paint-seg-right img { width: 341px; display: block; }

.ds-seg-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 30px;
    color: #66589e;
    letter-spacing: -0.32px;
    line-height: normal;
    margin-bottom: 50px;
}

.ds-seg-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}
.ds-seg-name {
    width: 250px;
    min-width: 250px;
}
.ds-seg-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #66589e;
    letter-spacing: -0.32px;
    line-height: normal;
    margin: 0;
}
.ds-seg-sublabel {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 18px;
    color: #66589e;
    letter-spacing: -0.32px;
    margin: 2px 0 0;
    line-height: 1.3;
}
.ds-seg-bar-wrap {
    flex: 1;
    min-width: 0;
}
.ds-seg-pct-wrap {
    width: 109px;
    min-width: 109px;
    display: flex;
    justify-content: center;
}
.ds-seg-pct-inner {
    width: 109px;
    height: 109px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    background: #d9d9d9;
}
.ds-seg-ellipse {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ds-seg-pct-val {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 27px;
    color: #66589e;
    letter-spacing: -0.32px;
    position: relative;
    z-index: 1;
    line-height: 1;
}
.ds-seg-pct-sub {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #66589e;
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
    line-height: 1;
    margin-top: 3px;
}

/* ---- GRÁFICOS ---- */
.ds-charts-row {
    display: flex;
    gap: 60px;
    align-items: flex-start;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 60px;
}
.ds-chart-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.ds-chart-img {
    width: 370px;
    max-width: 100%;
    height: auto;
    display: block;
}
.ds-chart-legend {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}
.ds-chart-legend li {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #66589e;
    letter-spacing: -0.32px;
    line-height: 2.2;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ---- RÓTULO DAS COLUNAS ---- */
.ds-column-label {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: #66589e;
    text-align: center;
    max-width: 70px;
    line-height: 1.3;
}

.ds-donut-caption {
    display: inline-flex;
    align-items: center;
    border: 1px solid #6c85aa;
    border-radius: 999px;
    padding: 8px 20px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #66589e;
    margin-top: 30px;
}

/* ---- TABELA ---- */
#ds-table-section {
    padding: 40px 0 80px;
}
.ds-tbl-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 30px;
    color: #66589e;
    letter-spacing: -0.32px;
    margin-bottom: 30px;
}
.ds-data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 1;
}
.ds-data-table th,
.ds-data-table td {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 16px;
    color: #fff;
    text-align: center;
    padding: 18px 10px;
    height: 59px;
    line-height: 1;
    white-space: nowrap;
}
.ds-data-table thead th {
    font-size: 18px;
    background: #66589e;
}
.ds-data-table tbody tr:nth-child(odd) td {
    background: #66589e;
}
.ds-data-table tbody tr:nth-child(even) td {
    background: #7e71b3;
}
.ds-tbl-caption {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 16px;
    color: #66589e;
    text-align: center;
    line-height: 1.5;
    margin-top: 30px;
    padding: 0 20px;
}
.ds-tbl-divider {
    border: none;
    border-top: 1px solid #d9d9d9;
    max-width: 858px;
    margin: 20px auto 0;
}
.ds-tbl-note {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 14px;
    color: #66589e;
    text-align: center;
    line-height: 1.5;
    margin-top: 20px;
    padding: 0 20px;
}

/* ---- RESPONSIVO ---- */
@media (max-width: 1024px) {
    .ds-stat-card { width: 260px; }
    .ds-stat-value { font-size: 52px; }
    .ds-seg-name { width: 190px; min-width: 190px; }
    .ds-seg-sublabel { font-size: 15px; }
    .ds-seg-pct-val { font-size: 20px; }
    .ds-seg-pct-sub { font-size: 13px; }
}

@media (max-width: 768px) {
    .ds-main-inner { padding: 36px 20px 160px; /* 100px overlap + 60px visível */ }

    .ds-hero-img,
    .ds-hero-placeholder {
        height: 300px;
        max-width: 100%;
        margin: 24px auto 0;
    }

    .ds-stats-wrap {
        padding: 36px 12px 50px;
        margin: -100px 20px 0;
    }

    .ds-stat-card { width: 100%; max-width: 303px; }
    .ds-stat-value { font-size: 48px; }

    #ds-segments { padding: 100px 0 40px; }

    .ds-seg-row { flex-wrap: wrap; }
    .ds-seg-name { width: 100%; min-width: 0; }
    .ds-seg-bar-wrap { order: 3; width: 100%; }
    .ds-seg-pct-wrap { margin-left: auto; order: 2; }

    .ds-charts-row { flex-direction: column; align-items: center; gap: 40px; }
    .ds-chart-img { width: 100%; max-width: 370px; }
    .ds-donut { width: 220px; height: 220px; }
    .ds-columns { height: 180px; }

    .ds-data-table th,
    .ds-data-table td { font-size: 12px; padding: 12px 6px; white-space: normal; }
    .ds-tbl-note { font-size: 12px; padding: 0; }

    .ds-content-text { font-size: 16px; }
}

/* RESPONSIVE FIX 1360x768 — page-dados-do-setor.php
   Move o layout inline dos .ds-text-icon para CSS para permitir
   controle responsivo. Os inline styles foram removidos dos divs. */
.ds-text-icon {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 40px;
}

.ds-charts-wrap {
    margin-top: 100px;
}