@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,300;0,400;0,700;1,400&display=swap');


/*
https://material.io/resources/color/#!/?view.left=1&view.right=1

primari: #6c2270 / W
light: #9c509f / B
dark: #3e0044 / W
*/


html {
    font-family: 'Raleway', sans-serif;
    color: #404040;
}

p, dl, ul, ol{
    color: #828282;
    line-height: 1.5em;
}

body {
    margin: 0;
}

header > div, section, article, footer > div {
    width: 90vw;
    margin: 0 auto;
    max-width: 1080px;
}

main img {
    max-width: 100%;
}

figure {
    margin: 0;
}

.tlf {
    font-size: 1.3rem;
    color:#ffffff;
    font-weight: bold;
    background-color: #6c2270;
    padding: .5em;
    border-radius: 1em;
}

.tlf::before {
    content: '\f095';
    font-family: 'Font Awesome 5 Free';
    margin-right: .5em;
}

/* HEADER */
header#index {
    background-image: url('../images/portada.jpg');
    background-size: cover;
    background-position: center;
    height: 100vh;
    min-height: 500px;
}

header div.topbar {
    min-height: 100px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding-top: 1em;
}

header div.topbar > * {
    flex: 1;
    text-align: center;
}

header div.topbar nav {
    flex: 3;
}

header div.topbar nav i {
    display: none;
}

header div img {
    max-width: 100px;
}

header nav ul {
    padding: 0;
    list-style-type: none;
    display:flex;
    justify-content: space-evenly;
}

header nav li a {
    font-weight: bold;
    text-decoration: none;
    color: #6c2270;
}

header#index h1 {
    width: 50%;
    margin-top: 20%;
    font-size: 5rem;
    color: #ffffff;
    text-shadow: 0 0 1em #6c2270;
}

@media (max-width: 992px) {
    header#index h1 {
        font-size: 4rem;
    }

    header div.topbar nav {
        flex: 0 0 100%;
        width: 100%;
        position: relative;
        order: -1;
        text-align: left;
    }

    header div.topbar nav i{
        display: block;
        font-size: 2rem;
        color:#6c2270;
    }

    header div.topbar nav i:hover{
        cursor: pointer;
        color: #3e0044;
    }

    header div.topbar nav ul {
        visibility: hidden;
        opacity: 0;
        
        position: absolute;
        flex-direction: column;
        background-color: #ffffff;
        margin: 0;
    }

    header div.topbar nav ul.visible {
        visibility: visible;
        opacity: 1;
        transition: visibility 0s, opacity 0.5s linear;

        width: 500px;
        max-width: 100%;
    }

    header div.topbar nav ul li {
        display: flex;
        flex-direction: column;
        padding: .7em;
    }
}

/* MAIN */
section {
    display: grid;
    grid-template-columns: 1fr;
    grid-gap: 1.5em;
    margin: 5em auto;
}

section > h2 {
    grid-column: 1 / -1;
    text-align: center;
}

h2 {
    font-size: 3rem;
}

h3 {
    font-size: 1.5rem;
}

h3 i.fa {
    font-size: 2rem;
}

@media (min-width: 768px) {
    section {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 992px) {
    section.lg {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

.parallax {
    height: 35vh;
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
}

.parallax1 {
	background-image: url(../images/parallax.jpg);
}

.parallax2 {
	background-image: url(../images/parallax2.jpg);
}

#equip {
    text-align: center;
}
#equip img {
    width: 60%;
    border-radius: 20%;
}

#serveis-wrapper {
    position:relative;
    padding: 10vh 0;
}

#serveis-wrapper::before {
    position: absolute;
    content: '';
    background-image: url(../images/serveis-bg.jpg);
    background-repeat: no-repeat;
    background-size: cover;
    top:0;
    bottom:0;
    right:0;
    left:0;
    width:auto;
    height:auto;
    z-index: -3;
    opacity: .5;
}

#serveis {
    color: #ffffff;
    background-image: linear-gradient(#3e0044, #9c509f);
    padding: 3vw;
    border-radius: 2em;
}

#serveis p {
    color: #ffffff;
}

#contacte > div {
    position: relative;
    border: 2px solid #6c2270;
    border-radius: 1em;
    padding: 1em 2em;
    font-size: 1.2em;

    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
}

#contacte > div > h3 {
    position: absolute;
    margin: 0;
    padding: 0.2em;
    top: -20px;
    left: -8px;
    background-color: #ffffff;
}

#contacte #direccio {
    grid-column: 1 / -1;
}

#contacte dl {
    display:grid;
    grid-template-columns: 1fr 1fr;
    grid-row-gap: 1em;
}
#contacte dl dd {
    text-align: right;
}

#map {
    height: 50vh;
    min-height: 500px;
    border-radius: 1em;
}

/* PEU */
footer {
    background-color: #3e0044;
    padding: 1em;
}

footer > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

footer > div > *{
    flex: 1;
    text-align: center;
}

footer ul {
    list-style-type: none;
    padding: 0;
}
footer .social li {
    display: inline;
}
footer .social i{
    font-size: 2rem;
    padding: 0 .5em;
    color: #ffffff;
}

footer a {
    color:#828282;
    text-decoration: none;
}

footer a:hover{
    color: #9c509f;
}