@import url('https://fonts.googleapis.com/css2?family=Rethink+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --main-color: var(--blue-4);
    --main-font-color: var(--white);
    --font-color: var(--gray-4);
    --border-color: var(--gray-1);

    /* HA Color Palette */
    --white: #ffffff;
    --gray-0: #F5F5F5;
    --gray-1: #E6E6E6;
    --gray-3: #787878;
    --gray-4: #505050;
    --blue-1: #C3E6F5;
    --blue-HA: #0064D2;
    --blue-4: #001E9B;
    --pink-1: #FAD2E6;
    --pink-2: #FF78AA;
    --pink-HA: #DC1464;
    --pink-4: #73005F;

    --shadow-card: 0 1px 2px rgba(4, 5, 5, 0.06), 0 1px 6px rgba(4, 5, 5, 0.06);
    --shadow-card-hover: 0 10px 24px -8px rgba(0, 30, 155, 0.25);
}

/* Global Configs */
* {
    font-family: "Rethink Sans", sans-serif;
    padding: 0;
    margin: 0;
    text-decoration: none;
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html {
    height: 100%;
}

body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--white);
    color: var(--font-color);
}

a {
    color: inherit;
}

/* ===================== HERO / CABEÇALHO ===================== */
.hero {
    position: relative;
    background-color: var(--main-color);
    background-image:
        radial-gradient(circle at 12% 22%, rgba(255, 255, 255, 0.08) 0%, transparent 55%),
        radial-gradient(ellipse at 88% 0%, rgba(220, 20, 100, 0.35) 0%, transparent 60%),
        radial-gradient(circle, rgba(255, 255, 255, 0.09) 1px, transparent 1px);
    background-size: auto, 260% 140%, 22px 22px;
    padding: 40px 17px 34px;
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 55%;
    height: 100%;
    background: rgba(255, 255, 255, 0.14);
    clip-path: polygon(100% 0,
            100% 42%,
            72% 42%,
            72% 68%,
            44% 68%,
            44% 100%,
            100% 100%);
    pointer-events: none;
}

.hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 6px;
    background: linear-gradient(to right,
            var(--pink-4) 0% 25%,
            var(--pink-HA) 25% 50%,
            var(--pink-2) 50% 75%,
            var(--pink-1) 75% 100%);
    pointer-events: none;
}

#tituloPagina {
    color: var(--main-font-color);
    font-size: 32px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

#tituloPagina:hover {
    opacity: 0.85;
}

#subtitulo {
    color: var(--main-font-color);
    opacity: 0.85;
    font-size: 15px;
    margin-top: 10px;
    font-weight: 500;
}

/* ===================== BUSCA ===================== */
.campo-busca-slot {
    display: flex;
    justify-content: center;
    margin-top: 26px;
}

.campo-busca-caixa {
    position: relative;
    width: 100%;
    max-width: 460px;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid transparent;
    box-shadow: var(--shadow-card);
    display: flex;
    align-items: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.campo-busca-caixa:focus-within {
    border-color: var(--main-color);
    box-shadow: 0 0 0 4px rgba(0, 30, 155, 0.15);
}

.campo-busca-caixa i {
    position: absolute;
    left: 22px;
    color: var(--gray-3);
    font-size: 15px;
    pointer-events: none;
    transition: color 0.2s ease;
}

.campo-busca-caixa:focus-within i {
    color: var(--main-color);
}

.campo-busca-caixa input {
    width: 100%;
    border: none;
    background: transparent;
    color: var(--font-color);
    height: 54px;
    font-size: 15px;
    padding: 0 22px 0 50px;
    border-radius: 8px;
}

.campo-busca-caixa input::placeholder {
    color: var(--gray-3);
}

/* ===================== CONTEÚDO / CARDS ===================== */
.conteudo {
    flex: 1;
    max-width: 90%;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ===================== SUBMENU ===================== */
.submenu-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.botao-voltar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 8px 16px;
    color: var(--font-color);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.botao-voltar:hover {
    border-color: var(--main-color);
    color: var(--main-color);
}

#submenuTitulo {
    font-size: 20px;
    font-weight: 700;
    color: var(--font-color);
}

.cards-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.cards-grid > a {
    flex: 0 1 220px;
    display: flex;
}

.box {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    background-color: #f8faff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 38px 24px;
    cursor: pointer;
    overflow: hidden;
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.box:hover {
    box-shadow: var(--shadow-card-hover);
    border-color: var(--blue-1);
    transform: translateY(-2px);
}

.box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 100%);
    transition: left 0.9s ease-in-out;
}

.box:hover::before {
    left: 100%;
}

.box img {
    width: 60px;
    height: 60px;
}

.box .label-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.box .label {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-4);
    text-align: center;
}

.box .label-sub {
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-3);
    text-align: center;
}

.sem-resultados {
    text-align: center;
    color: var(--gray-3);
    font-size: 15px;
    padding: 60px 0;
}

/* ===================== RODAPÉ ===================== */
footer {
    text-align: center;
    color: var(--gray-3);
    font-size: 12px;
    padding: 16px 0;
}

/* ===================== RESPONSIVIDADE ===================== */
@media screen and (max-width: 600px) {
    .conteudo {
        max-width: 100%;
        padding: 28px 16px;
    }

    .hero {
        padding: 28px 14px 24px;
    }

    #tituloPagina {
        font-size: 24px;
    }

    .cards-grid {
        gap: 17px;
    }

    .cards-grid > a {
        flex-basis: 150px;
    }

    .box {
        padding: 26px 16px;
    }
}
