/* Layout público (TDD + páginas públicas do CDD) — mesmo design system do digitow.net
   (tokens, header, botões, hero, cartões, CTA e rodapé). Ver documentation/layout_publico.md */

:root {
    --bg: #f4f8fb;
    --surface: #ffffff;
    --surface-strong: #e9f4ff;
    --text: #143043;
    --muted: #5d7284;
    --primary: #0a74b8;
    --primary-dark: #075b90;
    --accent: #18b7b0;
    --danger: #d93025;
    --success: #1f9d6b;
    --border: rgba(20, 48, 67, 0.12);
    --shadow: 0 24px 60px rgba(11, 56, 87, 0.12);
    --shadow-soft: 0 10px 30px rgba(11, 56, 87, 0.08);
    --radius: 24px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: "Manrope", sans-serif;
    font-size: 16px;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(24, 183, 176, 0.14), transparent 34%),
        linear-gradient(180deg, #eef7fd 0%, #f8fbfe 38%, #ffffff 100%);
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

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

h1, h2, h3 {
    font-family: "Outfit", sans-serif;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
}

.skip-link:focus {
    left: 16px;
    top: 16px;
    z-index: 999;
    background: #fff;
    padding: 10px 14px;
    border-radius: 12px;
}

.container {
    width: min(calc(100% - 32px), var(--container));
    margin: 0 auto;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 3px solid rgba(10, 116, 184, 0.45);
    outline-offset: 2px;
}

[id] {
    scroll-margin-top: 100px;
}

.text-link {
    color: var(--primary);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ---------- Header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid rgba(20, 48, 67, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 80px;
}

.brand {
    flex-shrink: 0;
}

.brand img {
    display: block;
    width: auto;
    height: 52px;
}

.menu-toggle {
    display: none;
    width: 48px;
    height: 48px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 14px;
    padding: 0;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    background: var(--text);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.header-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex: 1;
}

.main-nav ul,
.footer-grid ul,
.hero-badges,
.check-list,
.social-icons,
.state-grid,
.breadcrumb ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-nav > ul {
    display: flex;
    align-items: center;
    gap: 2px;
}

.main-nav li {
    position: relative;
}

.main-nav > ul > li > a,
.submenu-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 42px;
    padding: 10px 12px;
    color: var(--text);
    border: 0;
    border-radius: 12px;
    background: none;
    font: inherit;
    font-weight: 600;
    font-size: 0.94rem;
    cursor: pointer;
    white-space: nowrap;
}

.submenu-toggle::after {
    content: "";
    width: 7px;
    height: 7px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    opacity: 0.6;
}

.main-nav > ul > li > a:hover,
.submenu-toggle:hover,
.main-nav > ul > li.is-current > a,
.main-nav > ul > li.is-current > .submenu-toggle {
    background: rgba(10, 116, 184, 0.08);
    color: var(--primary-dark);
}

.has-submenu ul {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 240px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.has-submenu ul::before {
    content: "";
    position: absolute;
    inset: -10px 0 auto;
    height: 10px;
}

.has-submenu:hover ul,
.has-submenu:focus-within ul,
.has-submenu.is-open ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.has-submenu ul a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: var(--text);
}

.has-submenu ul a:hover,
.has-submenu ul a[aria-current="page"] {
    background: rgba(10, 116, 184, 0.08);
    color: var(--primary-dark);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-actions .button {
    min-height: 40px;
    padding: 0 14px;
    font-size: 0.92rem;
    white-space: nowrap;
}

/* ---------- Botões ---------- */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-1px);
}

.button-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #1390de 100%);
    color: #fff;
    box-shadow: 0 12px 30px rgba(10, 116, 184, 0.25);
}

.button-primary:hover,
.button-primary:focus-visible {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #fff;
}

.button-accent {
    background: linear-gradient(135deg, #12a39d 0%, var(--accent) 100%);
    color: #fff;
    box-shadow: 0 12px 30px rgba(24, 183, 176, 0.25);
}

.button-secondary,
.button-ghost {
    background: var(--surface);
    color: var(--text);
    border-color: var(--border);
}

.button-secondary:hover,
.button-ghost:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
}

.button-large {
    min-height: 56px;
    padding: 0 22px;
}

.button-small {
    min-height: 38px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 0.9rem;
}

/* Botões gerados pelo JS do teste (fgs-typing.js usa classes "btn btn-sm btn-default") */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
}

/* ---------- Hero ---------- */

.eyebrow {
    display: inline-flex;
    margin: 0 0 18px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(24, 183, 176, 0.12);
    color: #0d6f76;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.page-hero {
    padding: 36px 0 28px;
}

.page-hero-grid {
    display: grid;
    gap: 42px;
    align-items: center;
}

.page-hero-split .page-hero-grid {
    grid-template-columns: 1.1fr 0.9fr;
}

.page-hero h1 {
    margin: 0;
    font-size: clamp(2.2rem, 4.6vw, 3.8rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    max-width: 18ch;
}

.page-hero-text {
    margin: 18px 0 0;
    max-width: 62ch;
    color: var(--muted);
    font-size: 1.08rem;
}

.page-hero-text a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 26px 0 20px;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.95rem;
}

.hero-badges li,
.check-list li {
    position: relative;
    padding-left: 26px;
}

.hero-badges li::before,
.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.5em;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    box-shadow: 0 0 0 4px rgba(24, 183, 176, 0.12);
}

.breadcrumb {
    margin-bottom: 22px;
    font-size: 0.9rem;
    color: var(--muted);
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.breadcrumb li + li::before {
    content: "/";
    margin-right: 8px;
    opacity: 0.5;
}

.breadcrumb a:hover {
    color: var(--primary);
}

/* Cartão de números ao lado do título */
.hero-panel {
    padding: 24px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow);
}

.hero-panel-title {
    margin: 0 0 16px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--muted);
}

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

.stat {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    text-align: center;
}

.stat strong {
    display: block;
    font-family: "Outfit", sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    color: var(--primary);
    line-height: 1.1;
}

.stat span {
    color: var(--muted);
    font-size: 0.9rem;
}

.stat-wide {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(10, 116, 184, 0.08), rgba(24, 183, 176, 0.1));
}

/* ---------- Seções e cartões ---------- */

.section {
    padding: 40px 0;
}

.section-tight {
    padding: 8px 0 24px;
}

.section-heading {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3.6vw, 2.8rem);
}

.section-heading p {
    margin: 14px auto 0;
    max-width: 62ch;
    color: var(--muted);
}

.section-heading p a {
    color: var(--primary);
    font-weight: 700;
}

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin-top: 30px;
}

.feature-card {
    padding: 28px;
    border: 1px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

.feature-card:nth-child(2) {
    border-top-color: var(--accent);
}

.feature-card:nth-child(3) {
    border-top-color: #e5306f;
}

.feature-card h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    font-size: 1.3rem;
}

.feature-icon {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--surface-strong);
    font-size: 1.2rem;
}

.feature-card .check-list {
    display: grid;
    gap: 10px;
    color: var(--muted);
}

.feature-card a {
    color: var(--primary);
    font-weight: 700;
}

.feature-card strong {
    color: var(--text);
}

.section-note {
    margin: 20px 0 0;
    text-align: center;
    color: var(--muted);
}

.section-note a {
    color: var(--primary);
    font-weight: 700;
}

.section-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
}

/* ---------- Tabelas de ranking ---------- */

.ranking-card {
    margin-top: 28px;
    overflow: hidden;
}

.ranking-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.ranking-table th,
.ranking-table td {
    padding: 13px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.ranking-table thead th {
    background: var(--surface-strong);
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.ranking-table tbody tr:last-child > * {
    border-bottom: 0;
}

.ranking-table tbody tr:hover td {
    background: rgba(10, 116, 184, 0.04);
}

.ranking-table .col-pos {
    width: 64px;
    text-align: center;
}

.ranking-table .col-name {
    font-weight: 700;
    white-space: normal;
    min-width: 140px;
}

.ranking-table .col-num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.ranking-table .col-tpm {
    color: var(--primary-dark);
    font-weight: 800;
}

.pos-badge {
    display: inline-grid;
    place-items: center;
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    border-radius: 10px;
    background: var(--bg);
    color: var(--muted);
    font-weight: 800;
    font-size: 0.9rem;
}

.rank-gold .pos-badge {
    background: linear-gradient(135deg, #f7d154, #e9b10b);
    color: #5b4300;
}

.rank-silver .pos-badge {
    background: linear-gradient(135deg, #e3e7ec, #b8c0ca);
    color: #38434f;
}

.rank-bronze .pos-badge {
    background: linear-gradient(135deg, #f0c39a, #cd7f32);
    color: #4d2a08;
}

.rank-gold td {
    background: rgba(247, 209, 84, 0.1);
}

.rank-silver td {
    background: rgba(184, 192, 202, 0.12);
}

.rank-bronze td {
    background: rgba(205, 127, 50, 0.08);
}

.ranking-table .ad-row td {
    padding: 20px 16px;
    background: #fff;
    white-space: normal;
}

.ranking-empty {
    padding: 28px;
    text-align: center;
    color: var(--muted);
}

/* Seletor de estado (Ranking::renderDropdownStates) */
.state-select {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 26px 0 0;
}

.state-select label {
    font-weight: 700;
}

.state-select select {
    min-height: 46px;
    min-width: 240px;
    padding: 10px 14px;
    border: 1px solid rgba(20, 48, 67, 0.2);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
}

/* Lista de estados (Ranking::getStateLinks) */
.state-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
    margin-top: 26px;
}

.state-grid a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
    font-weight: 600;
    transition: border-color 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.state-grid a::after {
    content: "→";
    color: var(--muted);
}

.state-grid a:hover,
.state-grid a[aria-current="page"] {
    border-color: var(--primary);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

/* ---------- Formulário de consulta + resultado (validar certificado, desempenho) ---------- */

.form-card {
    padding: 28px;
}

.inline-form label {
    display: block;
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.inline-form-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.field-input {
    width: 100%;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px solid rgba(20, 48, 67, 0.2);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 16px;
}

.field-input:focus {
    border-color: var(--primary);
    outline: 3px solid rgba(10, 116, 184, 0.18);
    outline-offset: 0;
}

.field-code {
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-hint {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.result-box {
    margin-top: 20px;
    padding: 18px 20px;
    border: 1px solid;
    border-radius: 16px;
}

.result-box p {
    margin: 4px 0 0;
}

.result-valid {
    background: #e9f8f1;
    border-color: #9ad8bd;
    color: #155a3b;
}

.result-invalid {
    background: #fdecea;
    border-color: #f2b8b0;
    color: #8a2418;
}

.result-list {
    display: grid;
    gap: 10px;
    margin: 14px 0 0;
}

.result-list div {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(21, 90, 59, 0.15);
}

.result-list dt {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0.8;
}

.result-list dd {
    margin: 0;
    color: var(--text);
    font-weight: 600;
}

/* Desempenho: melhor resultado + gráfico */
.result-card,
.chart-card {
    padding: 28px;
}

.chart-card {
    margin-top: 22px;
}

.result-card-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.result-card-head .eyebrow {
    margin-bottom: 10px;
}

.result-card-head h2,
.chart-card h2 {
    margin: 0;
    font-size: clamp(1.5rem, 2.6vw, 2rem);
}

.result-meta,
.chart-note {
    margin: 6px 0 0;
    color: var(--muted);
}

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

.chart-wrap {
    position: relative;
    height: 340px;
    margin-top: 18px;
}

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

.feature-card p {
    margin: 0;
    color: var(--muted);
}

@media (max-width: 720px) {
    .form-card,
    .result-card,
    .chart-card {
        padding: 20px;
    }

    .stats-grid-3,
    .cards-grid-2 {
        grid-template-columns: minmax(0, 1fr);
    }

    .chart-wrap {
        height: 260px;
    }

    .inline-form-row,
    .result-list div {
        grid-template-columns: minmax(0, 1fr);
        gap: 6px;
    }
}

/* ---------- CTA final ---------- */

.cta-section {
    padding-bottom: 64px;
}

.cta-box {
    padding: 42px 28px;
    border-radius: var(--radius);
    text-align: center;
    background:
        linear-gradient(135deg, rgba(10, 116, 184, 0.94), rgba(24, 183, 176, 0.92)),
        linear-gradient(180deg, #0b6ea8, #0a5d8e);
    color: #fff;
    box-shadow: var(--shadow);
}

.cta-box h2 {
    margin: 0;
    font-size: clamp(1.8rem, 3.6vw, 2.8rem);
}

.cta-box p {
    max-width: 60ch;
    margin: 14px auto 0;
    color: rgba(255, 255, 255, 0.92);
}

.cta-box .button {
    margin-top: 22px;
    background: #fff;
    color: var(--primary-dark);
}

.cta-box .social-icons {
    justify-content: center;
    margin-top: 24px;
}

.cta-box .social-icons a {
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

/* ---------- Anúncios ---------- */

.ad-slot {
    margin: 28px 0 0;
    text-align: center;
}

/* ---------- Redes sociais ---------- */

.social-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.social-icons a {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: #fff;
    color: var(--text);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.social-icons a:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

/* ---------- Rodapé ---------- */

.site-footer {
    padding: 40px 0;
    border-top: 1px solid rgba(20, 48, 67, 0.08);
    background: rgba(255, 255, 255, 0.72);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.7fr repeat(3, 1fr);
    gap: 28px;
    align-items: start;
}

.footer-brand img {
    display: block;
    width: auto;
    height: 64px;
}

.footer-grid h2 {
    margin: 0 0 14px;
    font-size: 1.1rem;
}

.footer-grid nav ul {
    display: grid;
    gap: 10px;
}

.footer-grid nav a:hover,
.footer-bottom a:hover {
    color: var(--primary);
}

.footer-about p {
    max-width: 40ch;
    color: var(--muted);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding-top: 20px;
    margin-top: 28px;
    border-top: 1px solid rgba(20, 48, 67, 0.08);
    color: var(--muted);
    font-size: 0.95rem;
}

.footer-bottom p {
    margin: 0;
}

/* ---------- Responsivo ---------- */

@media (max-width: 1180px) {
    .menu-toggle {
        display: inline-block;
    }

    .header-inner {
        flex-wrap: wrap;
        min-height: 72px;
        padding: 10px 0;
    }

    .brand img {
        height: 44px;
    }

    .header-panel {
        display: none;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        padding: 6px 0 18px;
    }

    .header-panel.is-open {
        display: flex;
    }

    .main-nav > ul,
    .header-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .main-nav > ul > li > a,
    .submenu-toggle {
        width: 100%;
        justify-content: space-between;
    }

    .has-submenu ul {
        position: static;
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        min-width: auto;
        margin: 4px 0 8px;
        box-shadow: none;
        background: rgba(10, 116, 184, 0.03);
    }

    .has-submenu:hover ul,
    .has-submenu:focus-within ul {
        display: none;
    }

    .has-submenu.is-open ul {
        display: block;
    }

    .header-actions {
        padding-top: 12px;
        border-top: 1px solid var(--border);
    }

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

    .footer-about {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .page-hero-split .page-hero-grid,
    .cards-grid {
        grid-template-columns: minmax(0, 1fr);
    }

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

@media (max-width: 720px) {
    .page-hero {
        padding-top: 24px;
    }

    .section,
    .cta-section {
        padding: 28px 0;
    }

    .feature-card,
    .cta-box,
    .hero-panel {
        padding-left: 20px;
        padding-right: 20px;
    }

    .hero-actions .button,
    .section-actions .button {
        width: 100%;
    }

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

    /* Ranking: só as colunas principais no celular */
    .col-hide-mobile {
        display: none;
    }

    .ranking-table th,
    .ranking-table td {
        padding: 11px 10px;
    }

    .ranking-table .col-pos {
        width: 48px;
    }

    .ranking-table .col-name {
        min-width: 0;
    }

    .state-select select {
        width: 100%;
        min-width: 0;
    }
}

/* Cidade embaixo do nome só aparece no celular (a coluna Cidade some) */
.ranking-table .col-name small {
    display: none;
    color: var(--muted);
    font-weight: 500;
}

@media (max-width: 720px) {
    .ranking-table .col-name small {
        display: block;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
        scroll-behavior: auto !important;
    }
}
