/*
    1)  Disseny de les interficies
    2)  HTML
    3)  Media queries
    4)  Grid
    5)  Definir el tema (colors etc...)

*/
@import url('https://fonts.googleapis.com/css?family=Alata|Lato&display=swap');

main {
    margin: 0 auto;
    overflow: auto;
}
body {
    margin: 0;
    background-image: url(../img/fons4.jpg);
    background-size: cover;
}

img {
    width: 100px;
    height: 100px;
}
a img {
    width: 30px;
    height: 20px;
}
.w20{
    width: 20%;
}

a.socjo img {
    width: 35px;
    height: 25px;
}

th, td {
    padding-bottom: 10px;

}

nav.logo img{
    height: 70px;
    width: 70px;
    padding-right: 20px;
}
nav.logo{
    grid-area: logo;
    display: grid;
    text-align: left;
    grid-template-columns: 0.3fr 1fr;
}
nav.menu{
  height: 100%;
  width: 0px;
  position: fixed;
  z-index: 1;
  top: 0;
  right: 0;
  background-color: #111;
  overflow-x: hidden;
  transition: 0.5s;
  padding-top: 60px;
}

nav.menu a {
  padding: 8px 8px 8px 32px;
  text-decoration: none;
  font-size: 28px;
  color: #818181;
  display: block;
  transition: 0.3s;
}

nav.menu a:hover {
  color: #f1f1f1;
}

nav.menu .tancar {
  position: absolute;
  top: 0;
  right: 25px;
  font-size: 36px;
  margin-left: 50px;
}
header{
    display: grid;
    grid-template-columns: 0.4fr 1fr;
    grid-template-areas:
        "logo menu";
    height: 80px;
    background-color: white;
    padding-left: 33px;
    padding-right: 33px;
    padding-top: 33px;
}
header nav.menu li.sessio a{
    display: inline-block;
}
header nav.menu li.sessio a.text{
    margin-left: 4px;
    margin-right: 4px;
}
header nav.menu li.sessio a img.perfil{
    height: 25px;
}
header nav.menu li.sessio a img{
    height: 25px;
}

section{
    background-color: white;
    padding-left: 33px;
    padding-right: 33px;
}
.menuicona{
    text-align: right;
    grid-area: menu;
    line-height: 40px;
    padding: 0 20px;
    display: inline-block;

}
.tbanner {
    grid-area: banner;
    text-align: center;
    font-size: 65px;
    font-family: Arial;
}
#banner{
    background-image: url(../img/fons3.jpg);
    height: 400px;
    background-repeat: no-repeat;
    background-size: cover;
    color: white;
    display: grid;
    grid-template-columns: 15% 1fr 15%;
    grid-template-rows: 1fr 1fr 1fr;
    grid-template-areas:
        ". . ."
        ". banner ."
        ". . .";
}
.tcoets {
    grid-area: titol;

}
#coets {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
        "titol";
}
#coets p{
    text-align: center;
}

#coets img{
    width: 100%;
    height: 400px;
}
#info {
    text-align: center;
    display: grid;
    grid-template-columns: 1fr;
}

#info iframe{
    width: 100%;
    height: 250px;
}

#news {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas: "titol";
}
#news h4{
    text-align: center;
}
#news p{
    text-align: left;
}
#news img{
    width: 100%;
    height: 300px;
}
table {
    width: 800px;
    background: #34495E;
    color: #fff;
    border-radius: .4em;
}
div.scroll {
    grid-area: taula;
    overflow:scroll;
    width:100%;
}
#taula {
    display: grid;
    grid-template-columns: 5% 1fr 1fr 5%; 
    grid-template-areas: "titol titol titol titol"
        ". taula taula . ";
}
tr {
    border-top: 1px solid #ddd;
    border-bottom: 1px solid #ddd;
    border-color: lighten(#34495E, 10%);
}
td:first-child {
    padding-top: .5em;
}
td:last-child {
    padding-bottom: .5em;
}

td:before {
    font-weight: bold;
    width: 6.5em; 
    display: inline-block;
}
th, td {
    margin: .5em 1em;
    padding: 0.5em !important; 

}
th, td:before {
    color: #dd5;
}
p,span{
    font-family: 'Lato', sans-serif;
}
h1,h2,h3,h4,h5{
    font-weight: bold;
    font-family: 'Alata', sans-serif;
    font-size: 1.2em;
}
footer{
    padding-top: 20px;
    background-color: white;
    padding-left: 33px;
    padding-right: 33px;
    padding-bottom: 33px;
}
    div.idiomas img:hover{
        width: 35px;
        height: 25px;
    }

@media (min-width: 1281px) {
    
    footer{
        padding-top: 20px;
        background-color: white;
        padding-left: 33px;
        padding-right: 33px;
        padding-bottom: 33px;
        display: grid;
        grid-template-areas:
        "p idioma";

    }
    footer p {
        grid-area: p;
    }
    footer div.idiomas {
        grid-area: idioma;
        text-align: right;
        margin: 16px 0px;
    }
    div.idiomas img{
        padding-left: 20px;
        text-align: center;
    }
    
    main {
        width: 1160px;
    }
    header{
        grid-template-columns: 0.3fr 1fr;
    }
    header nav.menu{
        top: auto;
        right: auto;
        z-index: auto;
        position:static;
        overflow-x: auto;
        padding: 0px;
        width: 100%;
        grid-area: menu;
        display: grid;
        text-align: right;
        background-color: white;
    }
    header nav.menu li {
        line-height: 40px;
        list-style: none;
        padding: 0 10px;
        display: inline-block;
        border: 1.5px solid white;
        border-bottom: 2px solid white;
    }
    header nav.menu li:last-child{
        margin-right: 2px;
    }
    header nav.menu a{
        padding: 0px 4px 4px 1px;
        font-size: 16px;
        color: black;
    }    
    header nav.menu a.registreinici{
        color: black;
    }
    header nav.menu li.registreinici{
        border: 1.5px solid #7FEAFF;
        border-bottom: 2px solid #7FEAFF;
        background-color: #7FEAFF;
        border-radius: 2px;
        cursor: pointer;

    }
    header nav.menu li.sessio{
        border-radius: 2px;
        border: 1.5px solid white;
        border-bottom: 2px solid aquamarine;
    }
    header nav.menu li:hover {
        color: #fefefe;
        border-radius: 2px;
        border: 1.5px solid;
        border-bottom: 2px solid aquamarine;
    }
    header nav.menu a:hover {
        color:deeppink;
    }
    header nav.menu li.registreinici:hover {
        border-radius: 0px;
        border-radius: 2px;
        border-bottom: 2px solid white;
        box-shadow: 0 0 0 1px white, 0 0 0 2px #27AE60;
    }
    .menuicona{
        visibility: hidden;
    }
    .tancar{
        visibility: hidden;
    }
    .tbanner {
        font-size: 65px;
    }
    #banner{
        height: 400px;
        grid-template-columns: 15% 1fr 15%;
        grid-template-rows: 1fr 1fr 1fr;
        grid-template-areas:
            ". . ."
            ". banner ."
            ". . .";
    }

    #coets {
        grid-template-columns: 1fr 1fr 1fr 1fr;
        grid-template-areas:
            "titol titol titol titol";
    }
    
    #coets img{
        width: 90%;
        height: 200px;
    }

    #info {
        grid-template-columns: 1fr 1fr;
    }

    #info iframe{
        width: 95%;
        height: 250px;
    }
    
    #news {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: "titol titol";
    }
    #news img{
        width: 95%;
        height: 300px;
    }
    #taula {
        grid-template-columns: 10% 1fr 1fr 10%; 

    }
    table {
        width: 100%;
    }
    div.scroll {
        overflow:hidden;
    }

}


@media (min-width: 768px) and (max-width: 1281px){
    #msform {
        width: 100%;
    }
    main {
        width: 90%;
        max-width: 1100px;
    }
    
    #coets {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 0.5fr;
        grid-template-areas:
            "titol titol";
    }
    
    #coets img{
        width: 95%;
        height: 300px;
        max-height: 300px;
    }
    .tbanner {
        font-size: 65px;
    }
    #banner{
        height: 400px;
        grid-template-columns: 15% 1fr 15%;
        grid-template-rows: 1fr 1fr 1fr;
        grid-template-areas:
            ". . ."
            ". banner ."
            ". . .";
    }
    #info {
        grid-template-columns: 1fr;
    }

    #info iframe{
        width: 95%;
        height: 400px;
    }
    #news {
        grid-template-columns: 1fr;
        grid-template-areas: "titol";
    }
    #news img{
        width: 95%;
        height: 400px;
    }
    table{
        width: 1000px;
    }

}
#registre{
    background-color: transparent;
}
#registre img{
    width: auto;
    height: auto;
}

/*CSS Formulari*/


#msform {
	margin: 50px auto;
	text-align: center;
	position: relative;
}
#msform fieldset {
	background: white;
	border: 0 none;
	border-radius: 3px;
	box-shadow: 0 0 15px 1px rgba(0, 0, 0, 0.4);
	padding: 20px 30px;
	box-sizing: border-box;
	width: 80%;
	margin: 0 10%;
	
	/*stacking fieldsets above each other*/
	position: relative;
}
/*Hide all except first fieldset*/
#msform fieldset:not(:first-of-type) {
	display: none;
}
/*inputs*/
input,textarea, select{
	padding: 15px;
	border: 1px solid #ccc;
	border-radius: 3px;
	margin-bottom: 10px;
    margin-top: 10px;
	width: 100%;
	box-sizing: border-box;
	font-family: montserrat;
	color: #2C3E50;
	font-size: 13px;
}
/*buttons*/
.action-button {
	width: 100px;
	background: #27AE60;
	font-weight: bold;
	color: white;
	border: 0 none;
	border-radius: 1px;
	cursor: pointer;
	padding: 10px 5px;
	margin: 10px 5px;
}
.action-button:hover, .action-button:focus {
	box-shadow: 0 0 0 2px white, 0 0 0 3px #27AE60;
}
/*headings*/
.fs-title {
	font-size: 15px;
	text-transform: uppercase;
	color: #2C3E50;
	margin-bottom: 10px;
}
.fs-subtitle {
	font-weight: normal;
	font-size: 13px;
	color: #666;
	margin-bottom: 20px;
}
/*progressbar*/
#progressbar {
	margin-bottom: 30px;
	overflow: hidden;
	/*CSS counters to number the steps*/
	counter-reset: step;
}
#progressbar li {
	list-style-type: none;
	color: white;
	text-transform: uppercase;
	font-size: 9px;
	width: 33.33%;
	float: left;
	position: relative;
}
#progressbar li:before {
	content: counter(step);
	counter-increment: step;
	width: 20px;
	line-height: 20px;
	display: block;
	font-size: 10px;
	color: #333;
	background: white;
	border-radius: 3px;
	margin: 0 auto 5px auto;
}
/*progressbar connectors*/
#progressbar li:after {
	content: '';
	width: 100%;
	height: 2px;
	background: white;
	position: absolute;
	left: -50%;
	top: 9px;
	z-index: -1; /*put it behind the numbers*/
}
#progressbar li:first-child:after {
	/*connector not needed before the first step*/
	content: none; 
}
/*marking active/completed steps green*/
/*The number of the step and the connector before it = green*/
#progressbar li.active:before,  #progressbar li.active:after{
	background: #27AE60;
	color: white;
}

#preguntagenere input[type="radio"]{
    width: auto;
    margin-left: 15px;
}

#preguntaestudis input{
    width: auto;
    text-align: left;
}
#preguntaestudis label{
    text-align: left;
}
span.error{
    color: red;
}
.error{
    color: red;
}
span.verd{
    color: springgreen;
    font-weight: bold;
}

/*estils xat*/
section#comentari form{
    padding-top: 20px;
    margin: 0;
    display: grid;
    grid-template-columns:2fr 0.75fr 0.4fr 0.4fr;
    grid-template-areas: 
    "a b c d";
}
section#comentari input, section#comentari select, section#comentari button,section#comentari textarea{
    width: 98%;
    margin: 0;
}
.item1 {
    grid-area: a;
}
.item2 {
    grid-area: b;
    height: 75%;
    width: 90% !important; 

}
.item3 {
    grid-area: c;
    height: 75%;
    width: 85% !important; 

}
.item4 {
    grid-area: d;
    height: 75%;
    width: 85% !important;
}

.area-comentarios ul{
  list-style: none;
}

.area-comentarios ul{
  display: block;
  overflow: hidden;
  position: relative;
overflow:scroll;
height: 650px;
  width: 90%;
  margin: auto;
  padding: 1% 2%;
}

.unico-comentario{
  display: block;
  clear: both;
}

.unico-comentario .conteudo{
  display: block;
  width: 100%;
  padding: 0.5%;
}

.unico-comentario .conteudo p{
  margin: 0;
}

.normal .conteudo, .children .conteudo{
  max-width: 40%;
  word-wrap: break-word;
  margin-bottom: 20px;
  position: relative;
  padding: 10px 20px;
  color: white;
  border-radius: 25px;
  clear:both;
  font: 100 13px 'Open Sans', sans-serif;
}

.children .conteudo{
  background: #00BCD4; 
  color: white; 
  float: right;
  clear: none;
  border-bottom-right-radius: 20px 0px\9;
}
.children .conteudo a{
  color: #006064; 
  text-decoration: none;
  cursor: pointer;
}
.children .conteudo:before{
  content: "";
  position: absolute;
  z-index: 1;
  bottom: -2px;
  right: -8px;
  height: 19px;
   border-right: 20px solid #00BCD4; 
  border-bottom-left-radius: 16px 14px;
  -webkit-transform: translate(0, -2px);
  transform: translate(0, -2px);
  border-bottom-left-radius: 15px 0px\9;
  transform: translate(-1px, -2px)\9;
}
.children .conteudo:after{
  content: "";
  position: absolute;
  z-index: 1;
  bottom: -2px;
  right: -42px;
  width: 12px;
  height: 20px;
  background: white; /*cor de fundo*/
  border-bottom-left-radius: 10px;
  -webkit-transform: translate(-30px, -2px);
  transform: translate(-30px, -2px);
}

.normal .conteudo{
  background: #F8BBD0; /*cor do balão 2*/
  color: #424242; /*cor da fonte do bação 2 */
  float: left;
  clear:none;
  border-bottom-left-radius: 30px 0px\9;
}
.normal .conteudo a{
  color: #D81B60;
  text-decoration: none;
  cursor: pointer;
}
.normal .conteudo:before{
  content: "";
  position: absolute;
  z-index: 2;
  bottom: -2px;
  left: -7px;
  height: 19px;
  border-left: 20px solid #F8BBD0; /*cor do balão 2*/
  border-bottom-right-radius: 16px 14px;
  -webkit-transform: translate(0, -2px);
  transform: translate(0, -2px);
  border-bottom-right-radius: 15px 0px\9;
  transform: translate(-1px, -2px)\9;
}
.normal .conteudo:after{
  content: "";
  position: absolute;
  z-index: 2;
  bottom: -2px;
  left: 4px;
  width: 26px;
  height: 20px;
  background: white; /*cor de fundo*/
  border-bottom-right-radius: 10px;
  -webkit-transform: translate(-30px, -2px);
  transform: translate(-30px, -2px);
}

.avatar img{
  border-radius: 50%;
  border: 1px solid white;
  padding: 2px;
  background: white;
}

.normal .avatar{
  float:left;
  margin-right: 10px;
}

.children .avatar{
  float:right;
  margin-left: 10px;
}

