* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

:focus {
    outline: 0
}

img {
    border: none;
    display: block
}

ol,
ul {
    list-style: none
}

a {
    text-decoration: none;
    cursor: pointer !important
}

iframe {
    display: none !important;
    position: absolute !important;
    border: none !important;
    width: 0 !important;
    height: 0 !important
}

html {
    font-size: 62.5%;
    -webkit-text-size-adjust: 100%;
    position: relative
}

body {
    font-family: Arial, sans-serif;
    color: #333;
    line-height: 1.3;
    font-size: 1.6rem;
    background: #fff url(g4232-1790849305537.jpg) no-repeat center center;
    background-size: contain;
}

.wrap {
    position: relative;
    height: 100vh;
    min-height: 400px;
    display: flex;
    /* Alinha o conteúdo à base do ecrã */
    align-items: flex-end; 
    /* Empurra o conteúdo para cima (aprox. 1/3 do fundo) */
    padding-bottom: 22vh; 
    justify-content: center;
}

.step-block {
    display: none;
    max-width: 400px;
    width: 96%;
    background: rgba(0, 0, 0, 0.75);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    color: #fff;
    border-radius: 5px;
}

.step-item {
    display: none
}

.step-item.visible {
    display: block
}

.highlight {
    color: #ffc107
}

.popup-block {
    background: rgba(0, 0, 0, 0.75);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    color: #fff;
    max-width: 400px;
    width: 96%;
    border-radius: 5px;
}

.popup-block p {
    padding-bottom: 1rem
}

.popup-header {
    font-size: 2.4rem;
    padding: 2rem 1rem;
    color: white;
    text-align: center
}

.popup-content {
    padding: 2rem 2rem 1rem;
    position: relative
}

.popup-btn {
    background-color: #24AC0E;
    color: #fff;
    display: inline-block;
    text-align: center;
    font-weight: bold;
    border-radius: 3px;
    cursor: pointer;
    height: 6rem;
    line-height: 5.6rem;
    width: 40%;
    min-width: 120px;
    transition: all 0.2s linear;
    font-size: 2rem;
    border: 2px solid #fff;
    text-transform: uppercase
}

.popup-btn:hover {
    opacity: 0.8
}

.popup-buttons-block {
    text-align: center;
    padding: .5rem 0 1.5rem
}

.loader-overlay {
    display: none;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0
}

/* Removemos o pseudo-elemento antigo que o forçava para o centro */
.loader-overlay:before {
    display: none;
}

.loader-block {
    background: rgba(0, 0, 0, 0.75);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    color: #fff;
    border-radius: 5px;
    max-width: 400px;
    width: 96%;
    padding: 2rem;
    text-align: left;
    
    /* Posição absoluta para igualar a posição do .wrap infalivelmente */
    position: absolute;
    bottom: 22vh;
    left: 50%;
    transform: translateX(-50%);
}

.loader-title {
    font-size: 2.8rem;
    width: 60%
}

/* --- Animação do Pin de Mapa --- */
.pin-wrapper {
    position: absolute;
    right: 15%;
    top: 50%;
    width: 40px;
    height: 40px;
    margin-top: -20px; 
}

.pin-loader {
    width: 26px;
    height: 26px;
    border-radius: 50% 50% 50% 0; 
    border: 5px solid #fff; 
    position: absolute;
    left: 50%;
    margin-left: -13px; 
    transform: rotate(-45deg);
    animation: bounce 0.45s infinite alternate ease-in-out;
}

.pin-pulse {
    width: 20px;
    height: 8px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    position: absolute;
    left: 50%;
    margin-left: -10px;
    bottom: -15px;
    animation: pulse 0.45s infinite alternate ease-in-out;
}

@keyframes bounce {
    0% { transform: translateY(-20px) rotate(-45deg); }
    100% { transform: translateY(0px) rotate(-45deg); }
}

@keyframes pulse {
    0% { transform: scale(0.5); opacity: 0.3; }
    100% { transform: scale(1.2); opacity: 1; }
}

@media screen and (max-width: 420px) {
    .pin-wrapper {
        right: 10%;
        transform: scale(0.8);
    }
}

.step-header {
    text-align: center;
    padding: 2rem 1rem;
    font-size: 2.4rem;
    color: white;
    line-height: 1
}

.pagination-block {
    text-align: center
}

.pagination-item {
    display: inline-block;
    margin: 0 0.5rem;
    font-size: 2.2rem;
    height: 3.5rem;
    line-height: 3.5rem
}

.step-number {
    text-align: center;
    border-radius: 50%;
    color: rgba(49, 49, 134, 0.8);
    background: #fff;
    width: 3.5rem
}

.step-number.active {
    background-color: #24AC0E;
    color: #fff
}

.age-step .question-title {
    text-align: center
}

.step-content {
    padding: 2rem 2rem 1rem
}

.step-content p {
    margin-bottom: 1rem
}

.question-title {
    margin-bottom: 1rem
}

.question-notice {
    text-align: center
}

.checkbox-block {
    margin-top: 2rem
}

.checkbox-item {
    position: relative;
    padding: 0 0 0 4.5rem;
    margin-bottom: 2rem;
    text-align: left;
    line-height: 3rem;
    cursor: pointer;
    transition: all 0.3s linear
}

.checkbox-item:before {
    content: "";
    position: absolute;
    width: 3rem;
    height: 3rem;
    border: 1px solid #d3cfc8;
    top: 0;
    left: 0;
    line-height: 2.2rem;
    color: #fff;
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 1.6rem;
    text-align: center
}

.checkbox-item.checked:before {
    background-color: #32C26B
}

.checkbox-item.checked:after {
    content: '';
    display: block;
    position: absolute;
    top: .1rem;
    left: .9rem;
    border: .6rem solid #fff;
    border-left: 0;
    border-top: 0;
    width: .8rem;
    height: 1.7rem;
    transform: rotate(45deg)
}

.buttons-block {
    text-align: center;
    padding: .5rem 0 1.5rem;
    font-size: 0
}

.step-btn {
    background-color: #24AC0E;
    display: inline-block;
    width: 40%;
    min-width: 100px;
    margin: 0 1rem;
    height: 6rem;
    line-height: 5.6rem;
    cursor: pointer;
    transition: all 0.3s linear;
    border-radius: 6px;
    font-size: 2rem;
    color: #fff;
    text-transform: uppercase;
    font-weight: bold;
    border: 2px solid #fff;
}

.step-btn:hover {
    opacity: 0.9
}

.no-btn {
    background-color: #404040
}

.submit-btn {
    width: 65%;
    font-size: 1.6rem
}

@media (max-width: 800px) {
    html {
        font-size: 55%
    }
    .step-btn {
        width: 90%;
        margin: 0.5rem 0
    }
}

@media (max-width:800px) {
    body {
        font-family: Helvetica, Arial, sans-serif;
        color: #333;
        line-height: 1.3;
        font-size: 1.6rem;
        background: #fff url(g4232-1790849305537.jpg) no-repeat center center;
        background-size: cover;
        background-position: center;
    }

    .fade-in {
        animation: fadeIn 0.4s ease-in-out forwards;
    }

    /* Se quiseres empurrar UM POUCO MAIS para baixo apenas no telemóvel, podes ajustar o padding-bottom aqui */
    .wrap {
        padding-bottom: 20vh; 
    }
    .loader-block {
        bottom: 20vh;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.step-btn {
    word-wrap: break-word;
    white-space: normal;
}