/* =========================================================
   INTRODUCAO-ILHA.CSS — MOBILE-FIRST
   Navegando no Mundo da Matemática
   ---------------------------------------------------------
   Regra:
   - A introdução da ilha segue a moldura mobile/app.
   - Desktop usa o mesmo visual mobile centralizado.
   - Landscape recebe apenas ajuste compacto.
========================================================= */


/* =========================================================
   TELA PRINCIPAL
========================================================= */

#tela-introducao-ilha {
    width: 100%;
    max-width: 100%;

    min-height: auto;

    z-index: 2;
    text-align: center;

    overflow-x: hidden;
    box-sizing: border-box;
}


/* =========================================================
   CAIXA PRINCIPAL
========================================================= */

.intro-ilha-box,
.intro-ilha-mobile-style {
    position: relative;

    width: 100%;
    max-width: 100%;

    margin: 0 auto;
    padding: 0 0 18px;

    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;

    overflow: visible;
    box-sizing: border-box;
}

.intro-ilha-box::before {
    display: none;
}

.intro-ilha-hero,
.intro-topo-conteudo,
.intro-missoes,
.intro-escolha-rota,
.intro-ilha-acoes {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 100%;

    box-sizing: border-box;
}


/* =========================================================
   HERO / BANNER DA ILHA
========================================================= */

.intro-ilha-hero {
    margin: 0 auto 8px;

    display: flex;
    justify-content: center;
    align-items: center;

    overflow: hidden;
}

.banner-introducao-ilha {
    display: block;

    width: min(315px, 88vw);
    max-width: 100%;
    height: auto;

    margin: 0 auto;

    object-fit: contain;
    filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.14));
}


/* =========================================================
   ÁREA: ILHA + ESTELA + BALÃO
========================================================= */

.intro-topo-conteudo {
    margin: 4px auto 10px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;

    overflow: visible;
}

.intro-ilha-visual {
    display: none;
}

.intro-ilha-img {
    display: block;

    width: min(300px, 90%);
    max-width: 100%;
    height: auto;

    object-fit: contain;
    filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.16));
}

.intro-fala-area {
    width: min(340px, 94vw);
    max-width: 100%;

    margin: 0 auto 10px;

    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 8px;

    overflow: visible;
    box-sizing: border-box;
}

.intro-tutor-img {
    display: block;

    width: 96px;
    max-width: 28vw;
    height: auto;

    margin: 0;

    object-fit: contain;
    flex-shrink: 0;

    filter: drop-shadow(0 6px 7px rgba(0, 0, 0, 0.16));
}

.intro-balao-tutor {
    position: relative;

    width: min(190px, 58vw);
    max-width: 190px;
    min-width: 0;

    padding: 10px 12px;

    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    border: 3px solid rgba(184, 107, 47, 0.45);

    box-shadow: 0 5px 0 rgba(184, 107, 47, 0.18);

    color: var(--ocean-dark);

    font-size: 0.72rem;
    font-weight: 850;
    line-height: 1.28;
    text-align: center;

    box-sizing: border-box;
}

.intro-balao-tutor::before {
    content: "";
    position: absolute;

    left: -17px;
    right: auto;
    top: 50%;

    transform: translateY(-50%);

    border-width: 10px 17px 10px 0;
    border-style: solid;
    border-color: transparent rgba(184, 107, 47, 0.45) transparent transparent;
}

.intro-balao-tutor::after {
    content: "";
    position: absolute;

    left: -12px;
    right: auto;
    top: 50%;

    transform: translateY(-50%);

    border-width: 8px 13px 8px 0;
    border-style: solid;
    border-color: transparent rgba(255, 255, 255, 0.96) transparent transparent;
}

#intro-fala-tutor,
.intro-balao-tutor p {
    margin: 0;
}


/* =========================================================
   BANNER DE MISSÕES
========================================================= */

.intro-missoes {
    margin: 10px auto 16px;

    display: flex;
    justify-content: center;
    align-items: center;

    text-align: center;
    overflow: hidden;
}

.banner-missoes-ilha {
    display: block;

    width: min(360px, 94vw);
    max-width: 100%;
    height: auto;

    margin: 0 auto;

    object-fit: contain;
}


/* =========================================================
   ESCOLHA DE ROTA
========================================================= */

.intro-escolha-rota {
    margin: 0 auto;
}

.intro-escolha-rota h3 {
    margin: 6px auto 10px;

    color: var(--primary-blue-dark);

    font-size: 1.08rem;
    font-weight: 950;
    text-align: center;
}

.intro-rotas-grid {
    width: 100%;
    max-width: 100%;

    margin: 0 auto 12px;

    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;

    box-sizing: border-box;
}

.intro-rota-card {
    position: relative;

    width: min(300px, 86vw);
    max-width: 100%;
    min-width: 0;

    margin: 0 auto;
    padding: 10px 12px;

    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 10px;

    border-radius: 20px;
    background: rgba(255, 250, 235, 0.96);
    border: 3px solid rgba(74, 144, 226, 0.72);

    box-shadow: 0 7px 0 rgba(74, 144, 226, 0.24);

    color: var(--ocean-dark);

    text-align: left;
    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease;

    box-sizing: border-box;
}

.intro-rota-card:hover {
    transform: translateY(-2px);
}

.intro-rota-card.selecionado {
    background: rgba(255, 248, 224, 0.98);
    border-color: rgba(230, 126, 34, 0.95);

    box-shadow:
        0 8px 0 rgba(230, 126, 34, 0.35),
        0 10px 20px rgba(230, 126, 34, 0.14);
}

.intro-rota-card.selecionado::after {
    content: "✓";
    position: absolute;

    right: 9px;
    top: 50%;

    width: 28px;
    height: 28px;

    display: grid;
    place-items: center;

    transform: translateY(-50%);

    border-radius: 50%;
    background: var(--orange);
    color: #ffffff;

    font-size: 1rem;
    font-weight: 950;

    box-shadow: 0 4px 0 #b9550e;
}

.intro-rota-icone {
    width: 48px;
    height: 48px;

    display: grid;
    place-items: center;

    border-radius: 50%;
    background: #fff7df;
    border: 3px solid rgba(230, 126, 34, 0.32);

    box-shadow:
        inset 0 2px 8px rgba(255, 255, 255, 0.65),
        0 5px 0 rgba(184, 107, 47, 0.18);
}

.intro-rota-icone img {
    width: 38px;
    height: 38px;

    display: block;
    object-fit: contain;
}

.intro-rota-texto {
    min-width: 0;
    padding-right: 28px;
}

.intro-rota-texto strong {
    display: block;

    margin-bottom: 3px;

    color: var(--primary-blue-dark);

    font-size: 0.96rem;
    line-height: 1.05;
    font-weight: 950;
}

.intro-rota-texto p {
    margin: 0 0 2px;

    color: var(--orange);

    font-size: 0.76rem;
    line-height: 1.1;
    font-weight: 950;
}

.intro-rota-texto small {
    display: block;

    color: var(--ocean-dark);

    font-size: 0.68rem;
    line-height: 1.15;
    font-weight: 850;
}


/* =========================================================
   BOTÕES
========================================================= */

.intro-ilha-acoes {
    margin-top: 6px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 9px;
}

.btn-intro-secundario,
.btn-intro-principal {
    max-width: 100%;

    border-radius: 999px;

    cursor: pointer;
    font-weight: 950;

    transition: transform 0.2s ease, box-shadow 0.2s ease;

    box-sizing: border-box;
}

.btn-intro-principal {
    width: min(290px, 84vw);
    min-width: 0;

    padding: 12px 20px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    border: 3px solid rgba(255, 190, 92, 0.95);
    background: linear-gradient(180deg, #ff9b2f, #ef7414);
    color: #ffffff;

    font-size: 0.98rem;

    box-shadow:
        0 6px 0 #b9550e,
        0 8px 16px rgba(0, 0, 0, 0.2);
}

.btn-intro-secundario {
    width: min(250px, 76vw);
    min-width: 0;

    padding: 10px 18px;

    border: 3px solid rgba(74, 144, 226, 0.32);
    background: rgba(255, 255, 255, 0.88);
    color: var(--primary-blue-dark);

    font-size: 0.88rem;

    box-shadow: 0 5px 0 rgba(74, 144, 226, 0.22);
}

.icone-zarpar {
    width: 22px;
    height: 22px;

    display: block;

    object-fit: contain;
    flex-shrink: 0;

    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.18));
}

.btn-intro-secundario:hover,
.btn-intro-principal:hover {
    transform: translateY(-2px);
}

.btn-intro-secundario:active,
.btn-intro-principal:active {
    transform: translateY(3px);
}


/* =========================================================
   TELAS MUITO ESTREITAS — PORTRAIT
========================================================= */

@media (max-width: 360px) and (orientation: portrait) {
    .banner-introducao-ilha {
        width: min(295px, 88vw);
    }

    .intro-fala-area {
        width: min(315px, 94vw);
        gap: 6px;
    }

    .intro-tutor-img {
        width: 90px;
        max-width: 28vw;
    }

    .intro-balao-tutor {
        width: 178px;
        max-width: 178px;

        padding: 9px 10px;

        font-size: 0.68rem;
    }

    .banner-missoes-ilha {
        width: min(320px, 94vw);
    }

    .intro-rota-card {
        width: min(286px, 86vw);
        grid-template-columns: 50px minmax(0, 1fr);
    }
}


/* =========================================================
   MOBILE LANDSCAPE — COMPACTO FUNCIONAL
========================================================= */

@media (max-height: 520px) and (orientation: landscape) {
    #tela-introducao-ilha {
        width: 100%;
        max-width: 100%;
    }

    .intro-ilha-box {
        padding: 0 0 14px;
    }

    .intro-ilha-hero {
        margin: 0 auto 6px;
    }

    .banner-introducao-ilha {
        width: min(420px, 62vw);
        max-width: 420px;
    }

    .intro-topo-conteudo {
        margin: 4px auto 8px;
    }

    .intro-fala-area {
        width: min(620px, 92vw);

        margin: 6px auto 10px;
        gap: 14px;
    }

    .intro-tutor-img {
        width: 108px;
        max-width: 20vw;
    }

    .intro-balao-tutor {
        width: min(360px, 58vw);
        max-width: 360px;

        padding: 12px 16px;

        border-radius: 22px;

        font-size: 0.86rem;
        line-height: 1.32;
    }

    .banner-missoes-ilha {
        width: min(430px, 76vw);
        max-width: 430px;
    }

    .intro-escolha-rota h3 {
        margin: 6px auto 8px;

        font-size: 1.12rem;
    }

    .intro-rotas-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;

        margin-bottom: 12px;
    }

    .intro-rota-card {
        width: 100%;

        grid-template-columns: 56px minmax(0, 1fr);

        padding: 12px 14px;
    }

    .intro-rota-icone {
        width: 50px;
        height: 50px;
    }

    .intro-rota-icone img {
        width: 40px;
        height: 40px;
    }

    .intro-rota-texto {
        padding-right: 28px;
    }

    .intro-rota-texto strong {
        font-size: 0.98rem;
    }

    .intro-rota-texto p {
        font-size: 0.8rem;
    }

    .intro-rota-texto small {
        font-size: 0.72rem;
    }

    .intro-ilha-acoes {
        flex-direction: row-reverse;
        gap: 12px;

        margin-top: 4px;
    }

    .btn-intro-principal {
        width: auto;
        min-width: 240px;

        padding: 11px 22px;

        font-size: 0.98rem;
    }

    .btn-intro-secundario {
        width: auto;
        min-width: 190px;

        padding: 10px 20px;

        font-size: 0.9rem;
    }
}