/*
Geral
Cabeçalho
Rodapé
Seção
Caixa de conteúdo
Caixa de links
Caixa de créditos
Caixa de dicas (tooltips)
Botões
Cartões
*/

/*
-----------------------------
Geral
-----------------------------
*/

:root {
    --base-margin: 15px;
    --base-border-radius: 5px;

    --content-width: 900px;
    --header-height: 215px;
    --footer-height: 175px;
    --footer-height-mobile: 190px;
}

body {
    background-image: url('/assets/image/base/background3.png');
    background-repeat: repeat;
}

#content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.site-width {
    max-width: var(--content-width);
    margin: auto;
}

.vertical-marging {
    margin-bottom: var(--base-margin);
}

.background-black  { color: var(--white); background-color: var(--theme-color); }
.background-blue   { color: var(--black); background-color: var(--blue); }
.background-red    { color: var(--white); background-color: var(--red); }
.background-orange { color: var(--black); background-color: var(--orange); }
.background-green  { color: var(--black); background-color: var(--green); }
.background-yellow { color: var(--black); background-color: var(--yellow); }

/*
-----------------------------
Cabeçalho
-----------------------------
*/

#header {
    height: var(--header-height);
    background: black url('/assets/image/base/topo2.png') repeat-x scroll top center;
    color: var(--white);
}

#header a {
    text-decoration: none;
    color: var(--white);
}

#header-title a {
    font: normal normal 70px Geo;
}

#header-session {
    padding-top: 160px;
    position: absolute;
}

#header-session a {
    color: var(--red-soft);
}

#header-image {
    height: 180px;
    text-align: right;
}

#header-menu {
    height: 26px;
}

#header-menu ul {
    margin-top: 9px;
    list-style-type: none;
    padding: 0;
}

#header-menu li {
    padding: 0;
    display: inline;
}

/* #header-menu > ul li:nth-last-child(-n + 3) {
    float: right;
} */

#header-menu-bar {
    padding: 0px 2px !important;
    margin-right: 4px;
    background-color: var(--white);
}

#header-menu li a {
    padding: 8px 8px;
    transition: all 200ms ease-out;
}

#header-menu li a:hover {
    background-color: var(--grey-strong);
    transition: all 200ms ease-out;
}

#header-current {
    border-bottom: 3px var(--red) solid;
}

#alert {
    padding: 10px;
    background-color: #b7291e;
    border-radius: var(--base-border-radius);
    color: var(--white);
    display: inline-block;
}

#header-menu-toggle {
    display: none;
}

@media only screen and (min-width: 900px) {
    #header-menu ul {
        display: flex;
        align-items: center;
        margin-top: 9px;
        list-style: none;
        padding-left: 0;
    }

    #header-menu li {
        display: block;
    }

    /* primeiro item que “empurra” o resto pra direita */
    #header-menu li.header-menu-right {
        margin-left: auto;
    }
}

/* Mobile: até 899px vira hambúrguer */
@media only screen and (max-width: 899px) {
    #header {
        height: auto;
    }

    #header-image {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #header-menu {
        position: relative;
        height: auto;
    }

    /* show hamburger button */
    #header-menu-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 32px;
        background: transparent;
        color: var(--white);
        cursor: pointer;
        font-size: 20px;
        padding: 0;
        border: unset;
    }

    /* menu fechado por padrão no mobile */
    #header-menu ul {
        display: none;
        margin-top: 8px;
        padding: 0;
        list-style: none;
        background: rgba(0, 0, 0, 0.9);
    }

    /* quando estiver aberto (classe .is-open no #header-menu) */
    #header-menu.is-open ul {
        display: block;
    }

    #header-menu li {
        display: block;
        float: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    #header-menu > ul li:nth-last-child(-n + 3) {
        float: none; /* cancela o float right no mobile */
    }

    #header-menu li a {
        display: block;
        padding: 10px 12px;
    }

    .header-separator {
        border-top: 2px dashed gray;
    }
}

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

html, body, #wrap {
    height: 100%;
}

body > #wrap {
    height: auto;
    min-height: 100%;
}

#main {
    overflow:hidden;
    padding-bottom: var(--footer-height); /* Altura do rodapé (1) */
}

#footer {
    position: relative;
    margin-top: calc(var(--footer-height) * -1);; /* Altura do rodapé (2) */
    height: var(--footer-height); /* Altura do rodapé (3) */
    clear:both;
    text-align: center;
    background-color: var(--theme-color);
}

@media only screen and (max-width: 899px) {
    #main {
        padding-bottom: var(--footer-height-mobile); /* Altura do rodapé (1.1) */
    }

    #footer {
        margin-top: calc(var(--footer-height-mobile) * -1);; /* Altura do rodapé (2.1) */
        height: var(--footer-height-mobile); /* Altura do rodapé (3.1) */
    }
}

#footer a {
    color: var(--red-soft);
    transition: all 200ms ease-out;
}

#footer a:hover {
    color: var(--grey-strong);
    background-color: var(--red-soft);
    padding: 2px 2px 2px 2px;
    border-radius: var(--base-border-radius);
    transition: all 200ms ease-out;
}

#link-area div {
    vertical-align: top;
}

#link-area .link-box:not(:last-child) {
    margin-right: 15px;
}

/*
-----------------------------
Seção
-----------------------------
*/

.section {
    margin-bottom: 16px;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.35rem 0.35rem;
    margin-bottom: 16px;
    background-color: #161616;
    border-radius: 18px;
    color: white;
    font-weight: 800;
}

.section-description {
    padding-bottom: 16px;
}

.section-description p:last-child {
    padding-bottom: 0;
}

.section-chip {
    font-size: 0.9rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgb(26 26 26);
    color: #f5f5f5;
    opacity: 0.9;
}

.section-title {
    font-size: 0.9rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    white-space: nowrap;
}

@media only screen and (max-width: 899px) {
    .section-title {
        font-size: 0.8rem;
        letter-spacing: 0.1em;
    }
}

.section-links {
    text-align: center;
    padding: 8px 8px;
    margin-bottom: 16px;
    background-color: #fff2f2;
    border-radius: var(--base-border-radius);
    border: 1px solid red;
}

.section-links a {
    font-size: 16px;
    font-weight: 800;
    transition: transform 150ms ease-in;
    transform-origin: center center;
    display: inline-block;
}

.section-links a:hover {
    transform: scale(1.05);
}

.section-text {
    margin: 0 16px 16px 16px;
}

.section-text p:last-of-type,
.section-text ul:last-of-type {
    padding-bottom: 0;
    margin-bottom: 0;
}

/*
-----------------------------
Caixa de conteúdo
-----------------------------
*/

.content-box {
    border: 1px solid black;
    border-radius: var(--base-border-radius);
    box-shadow: 2px 2px 3px 1px grey;
    background: rgba(255, 255, 255, 0.97);
    margin: 0 var(--base-margin) var(--base-margin) var(--base-margin);
    width: -moz-available;
    width: -webkit-fill-available;
}

.content-box-title {
    font: normal normal 23px Geo;
    padding: 3;
    text-align: center;
    vertical-align: middle;
    line-height: 46px;
}

.content-box-text {
    padding: 16px;
    overflow: auto;
}

.content-box ul > li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 0.05em;
    font-size: 1.1em;
    color: #555;
}

/*
-----------------------------
Caixa de links
-----------------------------
*/

.link-box {
    color: var(--white);
    display: inline-block;
    text-align: left;
    padding: 20px 10px 0px 10px;
}

.link-box li {
    padding: 1px 0 1px 0;
}

.link-box a {
    text-decoration: none;
    padding: 0 2px 0 2px;
}

.link-box h2 {
    margin-left: -5px;
    margin-bottom: 8px;
}

/*
-----------------------------
Caixa de créditos
-----------------------------
*/

#credits-box {
    color: var(--white);
    padding: 0 10px 10px 10px;
    bottom: 0px;
    position: absolute;
    max-width: var(--content-width);
    width: -moz-available;
    width: -webkit-fill-available;
}

#credits-box-left {
    float: left;
}

#credits-box-right {
    float: right;
}

@media only screen and (max-width: 899px) {
    #credits-box-left {
        float: none;
        text-align: center;
    }

    #credits-box-right {
        float: none;
        text-align: center;
    }
}

/*
-----------------------------
Caixa de dicas (tooltips)
-----------------------------
*/

.tooltip {
    position: relative;
    display: inline-block;
    }

.tooltip .tooltiptext {
    visibility: hidden;
    margin-top: -17px;
    background-color: #292929;
    color: #fff;
    border-radius: var(--base-border-radius);
    border-style: solid;
    border-color: white;
    border-width: 1px;
    position: absolute;
    z-index: 1;
    padding: 5px 5px;
    left: 0;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
}

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

/* Base */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;             /* espaço pra ícone se quiser */
    padding: 0.45rem 0.9rem;
    border-radius: var(--base-border-radius);
    font-size: 1rem;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    transition:
        background-color 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.05s ease;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.btn:active:not(:disabled) {
    transform: translateY(0);
}

.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px var(--black), 0 0 0 4px var(--blue);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Variantes sólidas */

.btn-primary {
    background-color: var(--blue);
    border-color: var(--blue);
    color: var(--theme-color);
}

.btn-primary:hover:not(:disabled) {
    background-color: #6cb1eb;
    border-color: #6cb1eb;
}

.btn-secondary {
    background-color: var(--grey-strong);
    border-color: var(--grey-strong);
    color: var(--white);
}

.btn-secondary:hover:not(:disabled) {
    background-color: #404040;
    border-color: #404040;
}

.btn-success {
    background-color: var(--green);
    border-color: var(--green);
    color: var(--theme-color);
}

.btn-success:hover:not(:disabled) {
    background-color: #5ca842;
    border-color: #5ca842;
}

.btn-warning {
    background-color: var(--orange);
    border-color: var(--orange);
    color: var(--theme-color);
}

.btn-warning:hover:not(:disabled) {
    background-color: #e0871d;
    border-color: #e0871d;
}

.btn-danger {
    background-color: var(--red);
    border-color: var(--red);
    color: var(--white);
}

.btn-danger:hover:not(:disabled) {
    background-color: var(--red-dark);
    border-color: var(--red-dark);
}

/* Ghost / texto (bom pra cima de fundo escuro) */

.btn-ghost {
    background-color: transparent;
    border-color: transparent;
    color: var(--blue);
}

.btn-ghost:hover:not(:disabled) {
    background-color: rgba(130, 197, 255, 0.12);
}

/* Outlines */

.btn-outline-primary {
    background-color: transparent;
    color: var(--blue);
    border-color: var(--blue);
}

.btn-outline-primary:hover:not(:disabled) {
    background-color: rgba(130, 197, 255, 0.12);
}

.btn-outline-secondary {
    background-color: transparent;
    color: var(--grey);
    border-color: var(--grey);
}

.btn-outline-secondary:hover:not(:disabled) {
    background-color: rgba(188, 188, 188, 0.12);
}

.btn-outline-danger {
    background-color: transparent;
    color: var(--red);
    border-color: var(--red);
}

.btn-outline-danger:hover:not(:disabled) {
    background-color: rgba(255, 47, 32, 0.12);
}

/* Tamanhos */

.btn-sm {
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
}

/* Full width opcional */

.btn-block {
    display: flex;
    width: 100%;
}

/*
-----------------------------
Cartões
-----------------------------
*/

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 15px;
}

.card {
    position: relative;
    overflow: visible;
    background: linear-gradient(to bottom, #ffffff 0%, #f6f6f6 55%, #ececec 100%);
    border-radius: var(--base-border-radius);
    padding: 12px;
    text-align: center;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.7) inset,
        0 2px 4px rgba(0,0,0,0.3);
    transition: transform .15s ease-out, box-shadow .2s ease;
}

/* textura diagonal bem discreta por cima do degradê */
.card::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        135deg,
        rgba(0,0,0,0.03) 0px,
        rgba(0,0,0,0.03) 1px,
        transparent 1px,
        transparent 4px
    );
    opacity: 0.9;
    pointer-events: none;
}

/* garante que o conteúdo fique acima da textura */
.card > * {
    position: relative;
    z-index: 1;
}

.card:hover {
    z-index: 50;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.9) inset,
        0 4px 7px rgba(0,0,0,0.4);
}

.card-body {
    padding: 5px;
}

.card-title {
    font-size: 20px;
    font-weight: bold;
}

.card-title.small {
    font-size: 17px;
}

.card-img {
    width: 100%;
    border-radius: var(--base-border-radius);
    border: 1px solid black;
    margin-bottom: 10px;
}

.card-links {
    margin-top: 10px;
    margin-bottom: 10px;
}

.card-desc {
    text-align: center;
}
