/* ==========================================================================
   css/continente-paises.css
   Tela de seleção de países - Enciclopédia Infantil IK Educa
   ========================================================================== */

/* ==========================================================================
   1. Neutralização da tela do continente
   ========================================================================== */

.game-card-continente {
    width: 100% !important;
    max-width: none !important;
    min-height: 100vh;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.screen-continente {
    width: 100%;
    min-height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: transparent !important;
}

/* ==========================================================================
   2. Tela principal
   ========================================================================== */

.tela-paises {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    margin: 0 auto;
    padding: 18px 16px 22px;
    box-sizing: border-box;

    background-image:
        url('../img/fundos/fundo-continentes.webp'),
        linear-gradient(to bottom, #fbf7ec 0%, #ebe0be 100%);
    background-size: cover;
    background-position: center center;
    background-repeat: repeat-y;

    color: #17356f;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ==========================================================================
   3. Cabeçalho
   ========================================================================== */

.paises-header {
    width: min(100%, 1040px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(120px, 1fr) auto minmax(120px, 1fr);
    align-items: center;
    gap: 12px;
}

.paises-banner {
    display: block;
    width: min(70vw, 420px);
    max-height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 6px 10px rgba(48, 34, 12, 0.16));
}

.paises-top-btn {
    border: 1px solid rgba(163, 130, 72, 0.22);
    border-radius: 999px;
    background: rgba(255, 250, 236, 0.76);
    color: #17356f;
    font-family: inherit;
    font-size: 0.76rem;
    font-weight: 900;
    min-height: 38px;
    padding: 7px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    box-shadow: 0 5px 12px rgba(55, 35, 10, 0.06);
    backdrop-filter: blur(2px);
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.paises-top-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 250, 236, 0.92);
    box-shadow: 0 8px 16px rgba(55, 35, 10, 0.09);
}

.paises-voltar-btn {
    justify-self: start;
}

/* ==========================================================================
   4. Botão do passaporte no topo
   ========================================================================== */

.paises-passaporte-btn {
    justify-self: end;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-height: auto !important;
    transform: translateX(8px);
}

.paises-passaporte-btn img {
    display: block;
    width: 78px;
    max-width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 5px 10px rgba(48, 34, 12, 0.16));
    transition: transform 0.16s ease, filter 0.16s ease;
}

.paises-passaporte-btn:hover img {
    transform: translateY(-1px) scale(1.02);
    filter: drop-shadow(0 7px 12px rgba(48, 34, 12, 0.2));
}

/* ==========================================================================
   5. Frase de apoio
   ========================================================================== */

.paises-frase {
    margin: 14px auto 18px;
    color: #17356f;
    font-size: 0.92rem;
    font-weight: 850;
    text-align: center;
    line-height: 1.35;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 250, 236, 0.58);
    border: 1px solid rgba(163, 130, 72, 0.12);
    box-shadow: 0 5px 14px rgba(55, 35, 10, 0.04);
    backdrop-filter: blur(2px);
}

/* ==========================================================================
   6. Grid de países
   ========================================================================== */

.paises-conteudo {
    width: min(100%, 1040px);
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.grid-paises,
.lista-paises {
    width: min(100%, 760px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 230px));
    justify-content: center;
    gap: 34px 42px;
}

.item-pais {
    border: none;
    background: transparent;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
    width: 100%;
    max-width: 220px;
    justify-self: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    font-family: inherit;
    color: #17356f;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.item-pais:hover,
.item-pais:focus-visible {
    transform: translateY(-4px) scale(1.04);
    filter: brightness(1.03);
    outline: none;
}

.imagem-pais-wrap {
    width: 100%;
    max-width: 210px;
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.imagem-pais {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 10px 14px rgba(41, 28, 10, 0.18));
    transition: transform 0.2s ease, filter 0.2s ease;
}

.item-pais:hover .imagem-pais {
    transform: scale(1.04);
    filter:
        drop-shadow(0 14px 18px rgba(41, 28, 10, 0.24)) drop-shadow(0 0 18px rgba(255, 210, 90, 0.18));
}

.nome-pais {
    margin-top: 8px;
    color: #14336f;
    font-size: 1rem;
    font-weight: 900;
    text-align: center;
}

.progresso-pais {
    margin-top: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(246, 239, 218, 0.82);
    border: 1px dashed rgba(130, 92, 34, 0.24);
    color: #6b5a35;
    font-size: 0.7rem;
    font-weight: 800;
}

/* ==========================================================================
   7. Rodapé do continente
   Delegado ao rodape-unificado.css — aqui só o wrapper posicional.
   ========================================================================== */

.continente-rodape {
    width: min(94vw, 320px);
    margin: 16px auto 0;
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

/* ==========================================================================
   8. Responsividade
   ========================================================================== */

@media (max-width: 620px) {
    .tela-paises {
        padding: 14px 14px 18px;
    }

    .paises-header {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "banner banner"
            "voltar passaporte";
        gap: 10px;
    }

    .paises-banner {
        grid-area: banner;
        width: min(88vw, 340px);
        margin: 0 auto;
    }

    .paises-voltar-btn {
        grid-area: voltar;
        justify-self: stretch;
    }

    .paises-passaporte-btn {
        grid-area: passaporte;
        justify-self: end;
        transform: translateX(4px);
    }

    .paises-top-btn {
        font-size: 0.66rem;
        padding: 7px 8px;
    }

    .paises-passaporte-btn img {
        width: 68px;
    }

    .paises-frase {
        margin: 12px auto 16px;
        font-size: 0.78rem;
    }

    .grid-paises,
    .lista-paises {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
        gap: 22px 18px;
    }

    .item-pais {
        max-width: 170px;
    }

    .imagem-pais-wrap {
        max-width: 150px;
        height: 122px;
    }

    .nome-pais {
        font-size: 0.9rem;
    }

    .progresso-pais {
        font-size: 0.62rem;
        padding: 3px 8px;
    }
}

@media (max-width: 360px) {

    .grid-paises,
    .lista-paises {
        grid-template-columns: 1fr;
        width: min(100%, 240px);
    }
}

@media (orientation: landscape) and (min-width: 768px) {
    .tela-paises {
        padding: 22px 32px;
    }

    .paises-banner {
        width: min(42vw, 430px);
    }

    .grid-paises,
    .lista-paises {
        grid-template-columns: repeat(3, minmax(170px, 230px));
        gap: 38px;
    }

    .item-pais {
        max-width: 240px;
    }

    .imagem-pais-wrap {
        max-width: 230px;
        height: 185px;
    }
}

@media (orientation: landscape) and (max-width: 767px) {
    .tela-paises {
        min-height: 100vh;
        padding: 10px 14px 12px;
    }

    .paises-header {
        grid-template-columns: minmax(110px, 1fr) auto minmax(110px, 1fr);
        gap: 8px;
    }

    .paises-banner {
        width: min(36vw, 230px);
        max-height: 70px;
    }

    .paises-top-btn {
        min-height: 32px;
        font-size: 0.58rem;
        padding: 5px 8px;
    }

    .paises-passaporte-btn {
        transform: translateX(4px);
    }

    .paises-passaporte-btn img {
        width: 62px;
    }

    .paises-frase {
        margin: 6px auto 8px;
        font-size: 0.66rem;
        padding: 5px 10px;
    }

    .grid-paises,
    .lista-paises {
        grid-template-columns: repeat(2, minmax(120px, 170px));
        gap: 18px;
    }

    .item-pais {
        max-width: 160px;
    }

    .imagem-pais-wrap {
        max-width: 145px;
        height: 110px;
    }

    .nome-pais {
        font-size: 0.78rem;
        margin-top: 5px;
    }

    .progresso-pais {
        font-size: 0.56rem;
        padding: 3px 7px;
    }
}