#especialistes {
    background-image: url('../res/fons-especialistes.jpg');
    overflow-x: hidden;
}

/* Locked block and content: centred in the page */
#esp_bloqueig, #esp_contingut {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    text-align: center;
}
#esp_bloqueig {
    width: min(90%, 30rem);
}
#esp_contingut {
    /* Not wider than the screen, and not taller (16:9) than the space between menu and footer */
    width: min(90%, 960px, (100vh - 220px) * 16 / 9);
}

/* Lock icon (Material Symbols), coloured with the accent colour */
.esp_cadenat {
    display: block;
    width: 56px;
    height: 56px;
    margin: 0 auto 10px;
    background-color: var(--main-color);
    -webkit-mask: url("../res/icona-cadenat.svg") no-repeat center / contain;
    mask: url("../res/icona-cadenat.svg") no-repeat center / contain;
}
#esp_bloqueig .esp_txt, #esp_contingut .esp_txt {
    font-family: var(--font-main);
    color: white;
    font-size: 18px;
    line-height: 1.5;
    text-align: center;
    margin: 0 0 28px;
}
#esp_contingut .esp_txt {
    font-size: 28px;
    margin: 0;
}
.esp_txt em {
    color: var(--main-color);
    font-style: normal;
    font-weight: 700;
}

/* Password form: button under the input, same width; button like the shop buttons */
#esp_form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.esp_input {
    min-width: 0;
    padding: 10px 20px;
    font-family: var(--font-main);
    font-size: 18px;
    color: white;
    background-color: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.6);
    border-radius: 30px;
    outline: none;
    transition: border-color 0.25s ease;
}
.esp_input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}
.esp_input:focus {
    border-color: var(--main-color);
}
.esp_bt {
    padding: 10px 26px;
    font-family: var(--font-main);
    font-size: 18px;
    font-weight: bold;
    color: var(--main-color);
    background-color: transparent;
    border: 2px solid var(--main-color);
    border-radius: 30px;
    cursor: pointer;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.esp_bt:hover, .esp_bt:focus-visible {
    background-color: var(--main-color);
    color: var(--main-contrast);
    transform: translateY(-2px);
}
.esp_bt:disabled {
    opacity: 0.6;
    cursor: wait;
}
#esp_bloqueig .esp_error {
    min-height: 1.5em;
    margin: 12px 0 0;
    font-family: var(--font-main);
    font-size: 16px;
    color: var(--main-color);
    text-align: center;
}
/* Only for screen readers */
.esp_amagat {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

/* Link with the look of the button */
.esp_enllac {
    display: inline-block;
    text-decoration: none;
    font-size: 22px;
    padding: 14px 36px;
}

/* Log out: yellow underlined word, at the bottom and centred (above the footer) */
.esp_sortir {
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    width: fit-content;
    margin: 0 auto;
    padding: 4px 8px;
    background: none;
    border: 0;
    font-family: var(--font-main);
    font-size: 18px;
    color: var(--main-color);
    text-decoration: underline;
    text-underline-offset: 4px;
    cursor: pointer;
    animation: fade-up 0.8s ease-out 0.3s both;
}
.esp_sortir:hover, .esp_sortir:focus-visible {
    color: white;
}

/* Video: 16:9 and responsive */
.esp_video {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 6px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Elements appear one after the other */
.esp_cadenat, #esp_bloqueig .esp_txt, #esp_form, #esp_contingut > * {
    animation: fade-up 0.8s ease-out both;
}
#esp_bloqueig .esp_txt { animation-delay: 0.1s; }
#esp_form { animation-delay: 0.2s; }

/* Wrong password: the form shakes */
@keyframes esp-shake {
    0%, 100% { translate: 0; }
    25% { translate: -8px 0; }
    75% { translate: 8px 0; }
}
#esp_form.esp_mal {
    animation: esp-shake 0.3s ease-in-out;
}

@media screen and (max-width: 40rem) {
    #esp_bloqueig .esp_txt {
        font-size: 16px;
    }
    .esp_bt {
        background-color: var(--main-color);
        color: var(--main-contrast);
    }
    /* Content a little higher, so it does not touch the social icons */
    #esp_bloqueig, #esp_contingut {
        top: 45%;
    }
}
