/* ==========================================================================
   SignGov - Home (landing page)
   Design tokens + componentes da página institucional.
   ========================================================================== */

:root {
    --sg-blue-dark: #05374f;
    --sg-blue: #125A7B;
    --sg-teal: #56A3A9;
    --sg-teal-deep: #30565a;
    /* variante mais escura, usada em texto/ícones sobre fundos claros para garantir contraste AA */
    --sg-teal-text: #2F6D73;
    /* variante mais clara, usada em ícones sobre fundos escuros para garantir contraste AA */
    --sg-teal-light: #8FD0D6;
    --sg-bg: #F4F4F4;
    --sg-text-muted: #5A5A5A;
    --sg-white: #FFFFFF;

    --sg-font-heading: 'Montserrat', 'Roboto', sans-serif;
    --sg-font-body: 'Roboto', sans-serif;

    --sg-radius: 12px;
    --sg-radius-sm: 8px;
    --sg-shadow-sm: 0 2px 8px rgba(5, 55, 79, 0.08);
    --sg-shadow-md: 0 8px 24px rgba(5, 55, 79, 0.12);
    --sg-shadow-lg: 0 12px 32px rgba(5, 55, 79, 0.16);

    --sg-container-max: 1200px;
}

/* ==========================================================================
   Base
   ========================================================================== */

body {
    background: var(--sg-bg);
    font-family: var(--sg-font-body);
    color: var(--sg-text-muted);
    overflow-x: hidden;
}

/* Rolagem suave ao clicar nas âncoras do menu, respeitando quem prefere menos movimento */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

img {
    max-width: 100%;
}

h1, h2, h3, h4,
.sg-heading {
    font-family: var(--sg-font-heading);
    color: var(--sg-blue);
    font-weight: 700;
}

a {
    -webkit-tap-highlight-color: transparent;
}

.sg-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 2000;
    padding: 10px 16px;
    background: var(--sg-white);
    color: var(--sg-blue);
    border-radius: 0 0 var(--sg-radius-sm) 0;
    font-weight: 600;
}

.sg-skip-link:focus {
    left: 0;
}

.sg-container {
    width: 100%;
    max-width: var(--sg-container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.sg-section {
    padding-top: 72px;
    padding-bottom: 72px;
}

@media (max-width: 767.98px) {
    .sg-section {
        padding-top: 52px;
        padding-bottom: 52px;
    }
}

/* Compensa a navbar sticky ao navegar pelas âncoras do menu */
#como-funciona,
#validade-juridica,
#parceiros,
#contato {
    scroll-margin-top: 84px;
}

.sg-section-title {
    font-size: 30px;
    text-align: center;
    margin-bottom: 12px;
}

.sg-section-title .sg-accent {
    color: var(--sg-teal-text);
}

.sg-section-subtitle {
    text-align: center;
    color: var(--sg-text-muted);
    font-size: 16px;
    max-width: 620px;
    margin: 0 auto 40px;
}

@media (max-width: 575.98px) {
    .sg-section-title {
        font-size: 26px;
    }

    .sg-section-subtitle {
        font-size: 15px;
        margin-bottom: 32px;
    }
}

/* Foco visível consistente em toda a página (halo de duas cores garante contraste
   tanto sobre fundos claros quanto escuros, sem depender só de cor) */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--sg-white), 0 0 0 6px var(--sg-teal-deep);
    border-radius: var(--sg-radius-sm);
}

/* ==========================================================================
   Botões
   ========================================================================== */

.sg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    max-width: 100%;
    padding: 10px 24px;
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    border-radius: var(--sg-radius-sm);
    border: 2px solid transparent;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
    white-space: normal;
}

.sg-btn:hover {
    transform: translateY(-1px);
}

.sg-btn-primary {
    background: var(--sg-blue);
    color: var(--sg-white);
    box-shadow: var(--sg-shadow-sm);
}

.sg-btn-primary:hover,
.sg-btn-primary:focus-visible {
    background: #0e4a63;
    color: var(--sg-white);
}

.sg-btn-outline {
    background: transparent;
    border-color: var(--sg-white);
    color: var(--sg-white);
}

.sg-btn-outline:hover,
.sg-btn-outline:focus-visible {
    background: var(--sg-white);
    color: var(--sg-blue);
}

.sg-btn-light {
    background: var(--sg-white);
    color: var(--sg-blue);
    box-shadow: var(--sg-shadow-sm);
}

.sg-btn-light:hover,
.sg-btn-light:focus-visible {
    background: #eef4f6;
    color: var(--sg-blue);
}

.sg-btn-accent {
    background: var(--sg-teal-deep);
    color: var(--sg-white);
}

.sg-btn-accent:hover,
.sg-btn-accent:focus-visible {
    background: #244652;
    color: var(--sg-white);
}

/* ==========================================================================
   Header / Navbar
   ========================================================================== */

.sg-navbar {
    background: var(--sg-blue-dark);
    padding-top: 14px;
    padding-bottom: 14px;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: var(--sg-shadow-sm);
}

.sg-navbar .navbar-brand img {
    height: 42px;
    width: auto;
}

.sg-nav-links {
    gap: 8px;
}

.sg-nav-links .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    font-size: 15px;
    padding: 10px 14px !important;
    border-radius: var(--sg-radius-sm);
    transition: background-color .15s ease, color .15s ease;
}

.sg-nav-links .nav-link:hover,
.sg-nav-links .nav-link:focus-visible {
    color: var(--sg-white);
    background: rgba(255, 255, 255, 0.08);
}

.sg-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.35);
    min-width: 44px;
    min-height: 44px;
    padding: 8px 10px;
}

.sg-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(86, 163, 169, 0.6);
}

.sg-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.sg-nav-ctas {
    gap: 10px;
}

@media (max-width: 991.98px) {
    .sg-nav-links {
        margin-top: 16px;
        margin-bottom: 12px;
    }

    .sg-nav-links .nav-link {
        padding: 12px 14px !important;
    }

    .sg-nav-ctas {
        flex-direction: column;
        align-items: stretch !important;
        padding-bottom: 8px;
    }

    .sg-nav-ctas .sg-btn {
        width: 100%;
    }
}

/* ==========================================================================
   Hero
   ========================================================================== */

.sg-hero {
    background: linear-gradient(135deg, var(--sg-blue-dark) 0%, var(--sg-teal-deep) 100%);
    padding-top: 64px;
    padding-bottom: 64px;
    color: var(--sg-white);
    overflow: hidden;
}

.sg-hero-grid {
    display: flex;
    align-items: center;
    gap: 40px;
}

.sg-hero-copy {
    flex: 1 1 520px;
    min-width: 0;
}

.sg-hero-media {
    flex: 1 1 420px;
    min-width: 0;
    text-align: center;
}

.sg-hero-media img {
    max-width: 100%;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.25));
}

.sg-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--sg-white);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    padding: 8px 18px;
    margin-bottom: 20px;
}

.sg-hero-badge i {
    color: var(--sg-teal-light);
    font-size: 15px;
}

.sg-hero-title {
    color: var(--sg-white);
    font-size: 46px;
    line-height: 1.15;
    margin-bottom: 16px;
}

.sg-hero-subtitle {
    color: rgba(255, 255, 255, 0.88);
    font-size: 18px;
    line-height: 1.6;
    max-width: 540px;
    margin-bottom: 28px;
}

.sg-hero-trust {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 20px;
    margin-bottom: 0;
}

.sg-hero-trust i {
    color: var(--sg-teal-light);
    font-size: 15px;
    margin-top: 2px;
    flex-shrink: 0;
}

.sg-hero-flow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.sg-hero-flow-step {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    font-size: 15px;
    color: var(--sg-white);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    padding: 8px 18px;
}

.sg-hero-flow i {
    color: rgba(255, 255, 255, 0.65);
    font-size: 14px;
}

.sg-hero-ctas {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
}

@media (max-width: 991.98px) {
    .sg-hero-grid {
        flex-direction: column;
        text-align: center;
    }

    /* Em coluna, o eixo principal do flex passa a ser vertical: sem resetar o
       flex-basis (pensado para largura no desktop), os itens herdariam aquele
       valor como ALTURA e criariam vãos vazios enormes entre eles. */
    .sg-hero-copy,
    .sg-hero-media {
        flex: 0 0 auto;
    }

    .sg-hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .sg-hero-flow {
        justify-content: center;
    }

    .sg-hero-ctas {
        justify-content: center;
        width: 100%;
    }

    .sg-hero-trust {
        justify-content: center;
    }

    .sg-hero-media {
        order: -1;
        max-width: 320px;
        margin: 0 auto;
    }
}

@media (max-width: 575.98px) {
    .sg-hero {
        padding-top: 40px;
        padding-bottom: 48px;
    }

    .sg-hero-title {
        font-size: 30px;
    }

    .sg-hero-subtitle {
        font-size: 16px;
    }

    .sg-hero-flow {
        justify-content: center;
    }

    .sg-hero-media {
        max-width: 240px;
    }

    .sg-hero-badge {
        font-size: 12px;
        padding: 8px 14px;
        text-align: left;
    }

    .sg-hero-ctas {
        flex-direction: column;
        align-items: stretch;
    }

    .sg-hero-ctas .sg-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   Como funciona
   ========================================================================== */

.sg-section-comofunciona {
    background: var(--sg-bg);
}

.sg-flow-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    margin-bottom: 24px;
}

.sg-flow-title .sg-flow-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--sg-blue);
    color: var(--sg-white);
    font-size: 16px;
    flex-shrink: 0;
}

.sg-flow-block + .sg-flow-block {
    margin-top: 48px;
}

.sg-progress-track {
    position: relative;
    margin-bottom: 24px;
}

.sg-progress-track .progress {
    height: 6px;
    border-radius: 999px;
    background: rgba(18, 90, 123, 0.12);
}

.sg-progress-track .progress-bar {
    background-color: var(--sg-teal-deep);
    transition: width .3s ease;
}

.sg-progress-arrows {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
}

.sg-progress-arrows img {
    height: 18px;
    width: auto;
}

.sg-cards-row {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 0;
}

.sg-card {
    flex: 1 1 300px;
    background: var(--sg-white);
    border-radius: var(--sg-radius);
    box-shadow: var(--sg-shadow-sm);
    padding: 28px 24px;
    opacity: .55;
    transition: opacity .2s ease, box-shadow .2s ease, transform .2s ease;
    min-width: 0;
}

.sg-card:hover,
.sg-card:focus-within {
    box-shadow: var(--sg-shadow-md);
}

/* opacity de cada card continua controlada via JS (hover sequencial) já existente */
.sg-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.sg-card-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--sg-blue);
    color: var(--sg-white);
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

.sg-card-title {
    font-family: var(--sg-font-heading);
    font-weight: 700;
    font-size: 18px;
    color: var(--sg-teal-text);
    margin: 0;
}

.sg-card-text {
    font-size: 15px;
    line-height: 1.55;
    color: var(--sg-text-muted);
    margin-bottom: 16px;
}

.sg-card-media {
    text-align: center;
}

.sg-card-media img {
    max-height: 140px;
    width: auto;
}

.sg-comofunciona-cta {
    text-align: center;
    margin-top: 48px;
    padding-left: 16px;
    padding-right: 16px;
}

@media (max-width: 991.98px) {
    .sg-progress-track,
    .sg-progress-arrows {
        display: none;
    }

    .sg-cards-row {
        flex-direction: column;
    }

    /* mesmo motivo do hero/validade/integração: em coluna o flex-basis de
       largura (300px) seria lido como altura mínima, inflando os cards */
    .sg-card {
        flex: 1 1 auto;
    }

    /* Em telas de toque não há "hover" para revelar os cards (efeito
       pensado para desktop) — por isso todos ficam sempre com opacidade total */
    .sg-card {
        opacity: 1;
    }
}

/* ==========================================================================
   Validade jurídica
   ========================================================================== */

.sg-section-validade {
    background: var(--sg-white);
}

.sg-validade-grid {
    display: flex;
    align-items: center;
    gap: 48px;
}

.sg-validade-copy {
    flex: 1 1 560px;
    min-width: 0;
}

.sg-validade-media {
    flex: 0 1 380px;
    min-width: 0;
    text-align: center;
}

.sg-validade-block {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(18, 90, 123, 0.1);
}

.sg-validade-block:last-of-type {
    border-bottom: none;
}

.sg-validade-block i {
    color: var(--sg-teal-text);
    font-size: 22px;
    margin-top: 2px;
    flex-shrink: 0;
}

.sg-validade-block p {
    font-size: 16px;
    line-height: 1.6;
    color: var(--sg-blue);
    margin: 0;
}

.sg-validade-block strong {
    font-weight: 700;
}

@media (max-width: 991.98px) {
    .sg-validade-grid {
        flex-direction: column;
    }

    /* mesmo motivo do hero: sem isso o flex-basis vira altura e sobra vão vazio */
    .sg-validade-copy,
    .sg-validade-media {
        flex: 0 0 auto;
    }

    .sg-validade-media {
        order: -1;
        max-width: 240px;
        margin: 0 auto;
    }
}

/* ==========================================================================
   Integração
   ========================================================================== */

.sg-section-integracao {
    background: var(--sg-teal-deep);
    color: var(--sg-white);
}

.sg-integracao-grid {
    display: flex;
    align-items: center;
    gap: 40px;
}

.sg-integracao-media {
    flex: 0 1 380px;
    min-width: 0;
    text-align: center;
}

.sg-integracao-copy {
    flex: 1 1 480px;
    min-width: 0;
}

.sg-integracao-copy .sg-heading {
    color: var(--sg-white);
    font-size: 26px;
    margin-bottom: 16px;
}

.sg-integracao-copy p {
    color: var(--sg-white);
    font-size: 16px;
    line-height: 1.6;
}

.sg-integracao-copy .sg-highlight {
    font-weight: 700;
}

@media (max-width: 991.98px) {
    .sg-integracao-grid {
        flex-direction: column;
        text-align: center;
    }

    /* mesmo motivo do hero: sem isso o flex-basis vira altura e sobra vão vazio */
    .sg-integracao-media,
    .sg-integracao-copy {
        flex: 0 0 auto;
    }

    .sg-integracao-media {
        max-width: 240px;
        margin: 0 auto;
    }
}

/* ==========================================================================
   Parceiros
   ========================================================================== */

.sg-section-parceiros {
    background: var(--sg-bg);
}

.sg-parceiros-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-top: 32px;
}

/* Cada logo de parceiro tem proporções/recortes bem diferentes entre si; um
   "slot" de tamanho fixo com object-fit garante que todas ocupem um espaço
   visualmente equivalente na fileira, em vez de ficarem desproporcionais
   (algumas bem maiores que outras) só por limitar a altura. */
.sg-parceiros-row img {
    height: 46px;
    width: 130px;
    object-fit: contain;
    object-position: center;
    opacity: .85;
    transition: opacity .15s ease;
}

.sg-parceiros-row img:hover {
    opacity: 1;
}

@media (max-width: 575.98px) {
    .sg-parceiros-row {
        gap: 24px;
    }

    .sg-parceiros-row img {
        height: 36px;
        width: 104px;
    }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.sg-footer {
    background-color: var(--sg-blue-dark);
    color: var(--sg-white);
    padding-top: 56px;
    /* padding extra (além do respiro visual) garante espaço suficiente para a página
       rolar e respeitar o scroll-margin-top do link "Contato" do menu, já que o
       footer é o último elemento — sem essa folga o navegador não conseguiria
       rolar o bastante e a navbar fixa cobriria o topo da seção. */
    padding-bottom: 88px;
}

.sg-footer-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.sg-footer-brand img {
    height: 48px;
    width: auto;
    margin-bottom: 12px;
}

.sg-footer-brand p {
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
    max-width: 280px;
    line-height: 1.6;
}

.sg-footer-heading {
    color: var(--sg-white);
    font-family: var(--sg-font-heading);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.sg-footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sg-footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.5;
}

.sg-footer-contact i {
    color: var(--sg-teal-light);
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.sg-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding-top: 24px;
    text-align: center;
}

.sg-footer-bottom span {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
}

@media (max-width: 767.98px) {
    .sg-footer-grid {
        flex-direction: column;
        text-align: left;
    }
}
