html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    font-size: 14px;
    font-family: 'Poppins', sans-serif;
}
main {
    position: relative;
    display: flex;
    width: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
footer {
    display: flex;
    background-color: #912b6f;
    padding: 4rem 2rem;
    align-items: center;
    justify-content: space-around;
    flex-direction: row;
    color: white;
}
footer a {
    color: white;
    font-weight: 300;
    font-size: 1rem;
}
footer .social {
    display: flex;
    align-items: center;
}
footer .social a {
    background-color: white;
    padding: 0.75rem;
    border-radius: 10rem;
    line-height: 1rem;
    font-size: 1rem;
    box-sizing: border-box;
    color: #912b6f;
    font-weight: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}
footer .social a svg {
    width: 1rem;
    height: 1rem;
}
footer .group {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}
footer .group.links a {
    font-size: 0.8rem;
    margin: 0.5rem 0;
}
#background {
    position: fixed;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    height: 100vh;
    background-image: url(https://s3.eu-west-1.amazonaws.com/media.valmesa.com/data/riesgos-medioambientales/pt/img/background_pt.jpg);
    background-size: cover;
    background-position: top;
    background-repeat: no-repeat;
    filter: brightness(0.75);
    z-index: -1;
}
#background span {
    font-size: 0.6rem;
    font-weight: 300;
    color: white;
    position: absolute;
    right: 0;
    bottom: 0;
    margin: 1rem;
    opacity: 0.5;
}
.logo {
    width: 12rem;
    height: 12rem;
    background-image: url(https://s3.eu-west-1.amazonaws.com/media.valmesa.com/data/riesgos-medioambientales/pt/img/logo.png);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    filter: brightness(10) drop-shadow(0 0 1rem black);
    -webkil-filter: brightness(10) drop-shadow(0 0 1rem black);
}
.logo:hover {
    filter: brightness(1) drop-shadow(0 0 1rem black);
    -webkil-filter: brightness(1) drop-shadow(0 0 1rem black);
}
section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    padding: 8vh 4rem;
    box-sizing: border-box;
    z-index: 0;
    background: white;
}
a.button,
button,
input[type="submit"] {
    padding: 1rem 4rem;
    background: #912b6f;
    border-radius: 0.25rem;
    color: white;
    text-decoration: none;
    text-transform: uppercase;
    text-align: center;
    font-size: 1rem;
    font-weight: 400;
    transition: 0.2s ease filter;
    cursor: pointer;
}
a.button:hover,
button:hover,
input[type="submit"]:hover {
    filter: saturate(1.5);
}
input[type="checkbox"] {
    width: auto;
    margin: 0.25rem 0.5rem 0 0;
}
h1 {
    color: white;
    font-size: 3rem;
    line-height: 4rem;
    margin: 0;
    box-sizing: border-box;
    font-weight: 600;
    text-shadow: 0 0 1rem black;
    text-align: center;
    margin: 0 0 3rem 0;
}
h2 {
    color: #912d6e;
    font-size: 2rem;
    margin: 0;
    text-align: center;
}
a {
    color: #b5bdc4;
    text-decoration: none;
    transition: 0.2s ease filter;
}
a:hover {
    filter: brightness(1.5);
}
p {
    color: white;
    font-size: 1.5rem;
    font-weight: 300;
    text-align: center;
}
p a {
    color: inherit;
    font-weight: 400;
    text-decoration: underline;
}
section.hidden {
    display: none;
}
section > .content {
    width: 100%;
    max-width: 50rem;
    min-height: 84vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
section > .content.full {
    max-width: none;
}
section > .column {
    width: 45%;
    align-items: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
/* Main */
section#main {
    background: rgb(0 0 0 / 50%);
    backdrop-filter: blur(0.1rem);
    -webkit-backdrop-filter: blur(0.1rem);
}
section#main .content {
    justify-content: space-between;
}
section#main h2 {
    font-size: 1.5rem;
    text-shadow: 0 0 1rem black;
    color: white;
    font-weight: 400;
}
section#main p {
    margin: 2rem 0 0;
    font-size: 0.9rem;
    color: white;
    text-shadow: 0 0 1rem black;
    font-weight: 300;
    text-align: center;
    line-height: 1.25rem;
}
section#main a {
    color: white;
    text-align: center;
    text-decoration: underline;
}
section#main a.button {
    text-decoration: none;
}
section#main .cta {
    color: #92d922;
    text-align: center;
    text-decoration: none;
    padding: 0.5rem 1rem;
    box-sizing: border-box;
    background: rgb(0 0 0 / 33%);
    border-radius: 0.25rem;
    backdrop-filter: blur(1rem);
    -webkit-backdrop-filter: blur(1rem);
    font-weight: 400;
    font-size: 0.8rem;
    margin-top: 2rem;
}
section#main p {
    text-shadow: 0 0 1rem black;
}
/* Map */
section#map {
    height: 100vh;
    align-items: normal;
    justify-content: normal;
    box-sizing: border-box;
    overflow: hidden;
    background-color: rgb(255 255 255 / 80%);
    backdrop-filter: blur(1rem);
    -webkit-backdrop-filter: blur(1rem);
    padding: 0;
}
section#map .content {
    display: block;
    width: 100%;
    height: 100%;
    max-width: unset;
}
section#map .loading {
    position: absolute;
    width: 100%;
    height: 100vh;
    background: hsl(0deg 0% 0% / 50%);
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    backdrop-filter: blur(2rem);
    -webkit-backdrop-filter: blur(2rem);
    animation: loading 2s linear 0s infinite alternate;
}
section#map .loading.disabled {
    display: none;
}
section#map .form {
    position: absolute;
    z-index: 100;
    background: rgb(0 0 0 / 50%);
    backdrop-filter: blur(2rem);
    -webkit-backdrop-filter: blur(2rem);
    padding: 1rem 2rem;
    box-sizing: border-box;
    margin: 1rem;
    border-radius: 0.25rem;
    text-align: center;
    color: white;
    font-weight: 300;
}

section#map .legend {
    position: absolute;
    right: 50px;
    z-index: 100;
    background: rgb(0 0 0 / 50%);
    backdrop-filter: blur(2rem);
    -webkit-backdrop-filter: blur(2rem);
    padding: 1rem 2rem;
    box-sizing: border-box;
    margin: 1rem;
    border-radius: 0.25rem;
    text-align: center;
    color: white;
    font-weight: 300;
}

section#map .legend #legend-title {
    margin: 0 0 10px;
}

section#map .legend div span {
    border-radius: 50%;
    display: inline-block;
    height: 10px;
    margin-right: 20px;
    margin-top: 10px;
    width: 4rem;
}

section#map .legend div .circle{
    width: 0.66rem;
}

section#map .form .fields {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
}
section#map .form select {
    font-size: 0.8rem;
    font-family: inherit;
    width: 100%;
    color: #696f74;
    border: 1px #696f74 solid;
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    text-transform: capitalize;
    max-width: 10rem;
}
section#map .form .field {
    margin-right: 2rem;
}
section#map .form button {
    padding: 0.5rem 2rem;
    margin: 0;
    font-size: 0.9rem;
    line-height: 0.9rem;
}
section#map .form button.disabled {
    background-color: #aaaaaa;
    cursor: pointer;
}
section#map .contact {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 500;
    background: rgb(0 0 0 / 50%);
}
section#map .contact.disabled {
    display: none;
}
section#map .contact .contact-content {
    background: rgb(255 255 255 / 75%);
    backdrop-filter: blur(2rem);
    -webkit-backdrop-filter: blur(2rem);
    max-width: 40rem;
    padding: 3rem;
    box-sizing: border-box;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
section#map .contact #close-contact {
    background: transparent;
    color: #666666;
    padding: 0;
    margin: 0;
    position: absolute;
    top: 1rem;
    right: 1rem;
}
section#map .contact p {
    font-size: 1rem;
    color: #222222;
    margin: 2rem 0;
}
section#map .contact input {
    font-size: 0.8rem;
    font-family: inherit;
    font-weight: 300;
    width: 20rem;
    color: #696f74;
    border: 1px #696f74 solid;
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    text-transform: capitalize;
    margin: 0.5rem 0;
}
section#map .contact button {
    margin-top: 2rem;
}
/* Contacto */
section#contact {
    flex-direction: row;
    justify-content: space-around;
    background-color: white;
    backdrop-filter: blur(1rem);
    -webkit-backdrop-filter: blur(1rem);
}
section#contact > .column {
    width: 40%;
}
section#contact p {
    color: #222222;
    font-size: 1rem;
    font-weight: 300;
    text-align: center;
    line-height: 1.5rem;
    text-align: left;
    margin: 2rem 0 0;
}
section#contact a.button {
    margin-top: 2rem;
}
section#contact .image {
    position: relative;
    width: 40vh;
    height: 60vh;
    max-width: 100%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 1rem;
    box-shadow: 0 0 2rem rgb(0 0 0 / 25%);
    background-image: url(https://s3.eu-west-1.amazonaws.com/media.valmesa.com/data/consultoria-energetica/img/contact.jpg);
}
section#contact .image span {
    font-size: 0.6rem;
    font-weight: 300;
    color: white;
    position: absolute;
    right: 0;
    bottom: 0;
    margin: 1rem;
    opacity: 0.5;
}

/* Mapbox */
.mapboxgl-popup {
    position: absolute;
    left: 0;
    top: 0;
    margin: 8rem 1rem 1rem;
    max-width: none !important;
    transform: none !important;
    z-index: 200;
}
.mapboxgl-popup h3 {
    text-align: center;
    margin: 0;
}
.mapboxgl-popup .fields {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}
.mapboxgl-popup .fields .field {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    box-sizing: border-box;
}
.mapboxgl-popup .fields .field .key {
    font-weight: 300;
}
.mapboxgl-popup .fields .field .value {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    box-sizing: border-box;
    border-radius: 0.25rem;
    font-size: 1rem;
    font-weight: 700;
    color: white;
}
.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip {
    border-top-color: #912b6f !important;
    display: none;
}
.mapboxgl-popup-anchor-top .mapboxgl-popup-tip {
    border-bottom-color: #912b6f !important;
    display: none;
}
.mapboxgl-popup-content {
    display: flex;
    flex-direction: column;
    background-color: rgb(255 255 255 / 90%);
    padding: 3rem 1rem 1rem;
    box-sizing: border-box;
    border: 2px solid #912b6f;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    overflow: hidden;
}
.mapboxgl-popup .image {
    position: relative;
    width: 100%;
    height: 10rem;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #cccccc;
    border-radius: 0.5rem;
}
.mapboxgl-popup .image span {
    font-size: 0.6rem;
    line-height: 0.6rem;
    font-weight: 300;
    color: white;
    position: absolute;
    right: 0;
    bottom: 0;
    margin: 0.5rem;
    opacity: 0.5;
    text-shadow: 0 0 0.5rem black;
}
.mapboxgl-popup table {
    margin: 1rem 0;
}
.mapboxgl-popup tr td.key {
    padding-right: 1rem;
    color: #666666;
}
.mapboxgl-popup tr.value td {
    padding-top: 1rem;
    font-weight: 600;
    font-size: 1.25rem;
}
.mapboxgl-popup td a {
    color: #912b6f;
}
.mapboxgl-popup .count-content {
    display: flex;
    align-items: center;
    justify-content: center;
}
.mapboxgl-popup .count {
    display: inline-block;
    width: auto;
    background: #999999;
    padding: 0.25rem 1rem;
    box-sizing: border-box;
    border-radius: 1rem;
    font-size: 0.6rem;
    color: white;
    text-align: center;
    margin-bottom: 1rem;
}
.mapboxgl-popup .copy {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 300;
    color: #aaaaaa;
}
.mapboxgl-popup .copy a {
    color: #912b6f;
}
.mapboxgl-ctrl-icon {
    margin: 0;
}
.mapboxgl-popup-close-button {
    background-color: #912b6f;
    padding: 0.5rem 1rem;
    border-radius: 0 0 0 0.5rem;
    font-size: 1rem;
    border: 0;
    margin: 0;
    z-index: 1;
}
.mapboxgl-popup-close-button:hover {
    background-color: #912b6f;
}

iframe .mapboxgl-popup .copy {
    display: inline-block;
}
iframe .mapboxgl-popup .consult {
    display: none;
}

@media (max-width: 992px) {
    section#figures .content {
        flex-direction: column;
        justify-content: space-around;
    }
    section p {
        font-size: 1rem !important;
        line-height: 1.5rem !important;
    }
    section > .column {
        width: 100% !important;
        display: flex;
        align-items: center;
        flex-direction: column;
    }
    section#simulator .result svg {
        display: none;
    }
    section#contact {
        flex-direction: column;
    }
    section#contact .image {
        margin-bottom: 4rem;
    }
    footer {
        flex-direction: column;
    }
    footer > a {
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    section#map .legend {
        left: 0;
        top: 120px;
        right: auto;
    }

    section {
        padding: 4vh 2rem;
    }
    section#main a.button {
        margin: 2rem 0;
    }
    section#main p {
        font-size: 1.25rem !important;
    }
    h1 {
        font-size: 2.5rem;
        line-height: 3rem;
        margin-bottom: 2rem;
    }
    .logo {
        width: 6rem;
        height: 5rem;
        margin-bottom: 2rem;
    }
}

@keyframes loading {
    from {
        background-color: rgb(0 0 0 / 50%);
    }
    to {
        background-color: rgb(0 0 0 / 90%);
    }
}
