/* ================================================================ */
/* Estils UB 'responsive' 
	per a pàgines estàtiques amb comportament 'responsive'.
	-------------------------------------------------------------
	Author: Entorns Web - Universitat de Barcelona
	[JG]
	-------------------------------------------------------------
	Version: Versió 1.1 - Passat per Beautify [http://codebeautify.org/css-beautify-minify]
	Version: Versió 1.2 - Modificacions diverses [./versions-i-millores.txt]
	-------------------------------------------------------------
	Date: 2017-04-07
	Modified: 2017-06-01
  ================================================================= */

/* ================================================================ */
/* ================================================================ */
/*  Configuració 'flex' inicial dels blocs: */
.wrapper {
  display: -webkit-box;
  display: -moz-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-flow: row wrap;
  flex-flow: row wrap;
  text-align: center;
  background-color: #fff;
}
/* We tell all items to be 100% width */
.header, .main, .nav, .aside, .footer {
  flex: 1 100%;
  text-align: left;
}

.wrapper > * {
  flex: 1 100%;
  text-align: left;
}

/* We rely on source order for desktop-first approach
 * in this case:
	 * 1. header
	 * 2. nav
	 * 3. main
	 * 4. aside
	 * 5. footer
 */
.header {
  flex: 1 1 100%;
  order: 1;
}

.main {
  flex: 3 1 60%; /* 3 1 0; */ /* Solucionat problema IE? [2017-07-14]. */
  order: 3;
  text-align: left;
}

.aside {
  flex: 1 1 auto;
  display: flex;
}

.aside-1, .nav {
  flex: 1 0 20%; /* 1 0 0%; */ /* Solucionat problema IE? [2017-07-14]. */
  order: 2;
  display: flex;
  flex-flow: column wrap;
}

.aside-2 {
  flex: 1 1 0%;
  order: 4;
  display: flex;
  flex-flow: column wrap;
}

.footer {
  flex: 1 1 100%;
  order: 5;
  display: flex;
  flex-flow: row wrap;
  align-items: stretch;
}



/* ================================================================ */
/* ================================================================ */
/*  Configuració general inicial dels blocs: */
.wrapper {
  margin: 0 auto 15px;
  width: 1280px;
}

.header {
}

.main {
  min-height: 400px;
  padding: 1em;
}

.aside {
}

.aside-1, .nav {
  max-width: 200px;
  /* margin-top: 15px; */
}

.aside-2 {
  margin-right: .5em;
}

.footer {
  font-size: .9em;
}

/* 1 - .header: -------------------------------------------- */
/* 1 - .header. -------------------------------------------- */


/* 2 - .aside-1 .nav: -------------------------------------------- */
/* 2 - .aside-1 .nav. -------------------------------------------- */


/* 3 - Blocs de .main: -------------------------------------------- */
/* 3 - Blocs de .main. -------------------------------------------- */


/* 4 - Blocs d' .aside-2: -------------------------------------------- */
.aside-2 .destacats { order: 1; }
.aside-2 .tinteressa { order: 2; }
.aside-2 .nuvol { order: 3; }
.aside-2 .docs-relacionats { order: 4; }
/* 4 - Blocs d' .aside-2: -------------------------------------------- */

/* 5 - Blocs de .footer: -------------------------------------------- */
.footer .media {
  flex: 1 1 100%;
  order: 1;
  text-align: right;
}

.footer .data {
  flex: 3 1 0;
  order: 2;
}

.footer .excel {
  flex: 1 1 0;
  order: 3;
  text-align: right;
}
/* 5 - Blocs de .footer. -------------------------------------------- */


/* ================================================================ */
/* ================================================================ */
/*  Mediaqueries per a diferents configuracions: */

/* ------------------------------------------------------------- */
/* Tauletes grans i pantalles petites: */
@media only screen and (max-width: 1280px) {
/* (max-width: 960px) { */	/* and (min-width: 801px) */
  .wrapper {
    box-shadow: none;
    margin: 0 auto;
    padding: 0; /* none; */
    width: 100%;
  }

  #top02 {
		 /* background: rgba(0, 0, 0, 0) url("../css/css_img/bkgrounds/franja_2-top02-ub-2015.png") no-repeat scroll left bottom; */
    background-size: auto 5px;
  }

  #top {
    /* padding: 50px 0 0 9px; */
    background: url(../css/css_img/bkgrounds/logobarra_home.png) no-repeat scroll 25px -5px;
    background-size: 226px;
  }

  #top img {
    height: 60px;
    margin: 5px 0;
  }
}

/* ------------------------------------------------------------- */
/* Tauletes normals i mòbils horitzontals: */
@media only screen and (max-width: 800px) {
	/* and (min-width: 641px) */
	/* .wrapper {
		 box-shadow: none;
		 margin: none;
		 padding: none;
		 width: 100%;
	} */
	/* .main {
		flex: 2 0;
	} */
  .aside-1, .nav {
    max-width: none;
  }

  .nav {
    flex: 1 0 100%;
    position: inherit;
    right: auto;
    margin-right: 0;
    /* margin-top: 5px; */
  }

  .aside-2 {
    flex: 1 0;
  }

  #top02 {
    background-size: auto 5px;
  }

  #top {
    /* padding: 50px 0 0 10px; */
    background: url(../css/css_img/bkgrounds/logobarra_home.png) no-repeat scroll 25px -5px;
    background-size: 226px;
  }

  #top img {
    height: 50px;
    margin: 13px 0;
  }

  #side-nav {
    padding: 1px 0; /* 0 4px 0; */ /* Menú horitzontal en 2 files (2017-06-16). */
    width: 100%; /* 98%; */ /* Menú horitzontal en 2 files (2017-06-16). */
	 margin: -1em 0 0;  /* Menú horitzontal en 2 files (2017-06-16). */
  }

  .menu-nav {
    width: auto;
    height: auto; /* 60px; */ /* Menú horitzontal en 2 files (2017-06-16). */
    align-items: center;
    flex-flow: row wrap; /* row nowrap; */ /* Menú horitzontal en 2 files (2017-06-16). */
    padding: 0 1px;
    margin: 1px;
  }
	/* .menu-nav .submenu:hover > span {
		display: flex;
	} */
  .menu-nav .submenu .menu-nav {
    margin-top: 5px;
    position: absolute;
    z-index: 1000;
  }

  #side-nav li.submenu:hover:before {
    content: none;
  }

  .menu-nav li {
	/* align-self: auto; */
	flex: 1 1 15%; /* 1 0 auto; */ /* Menú horitzontal en 2 files (2017-06-16). */
	height: 50px;
	min-width: 50px;
	min-height: 0;
	width: auto;
	text-align: center;
  }

  .menu-nav li a,
  .menu-nav li span {
    height: auto;
  }

  .side-block {
    display: none;
  }

  .side-block {
    display: none;
  }

  .tinteressa ul {
	 margin: 0 0.5em 1em 0.8em;
  }
  .nuvol ul.nuvol-paraules {
    font-size: 1.1em;
    padding: .5em;
  }

  .nuvol-paraules li {
    line-height: 2em;
  }

  .footer .excel {
    display: none;
  }

  .footer ul.data {
    padding-bottom: 10px;
    padding-top: 16px;
  }
  
  .flex-item {
	  font-size: 1.6em;
	  height: 120px;
  }
  
}

/* ------------------------------------------------------------- */
/* Dispositius mitjans-petits: */
@media only screen and (max-width: 640px) {
	/* and (min-width: 461px)  */
  #serveis {
    display: none;
  }

  #top02 {
    height: 70px;
  }

  #top {
    /* padding: 72px 0 0 10px; */
    background: url(../css/css_img/bkgrounds/logobarra_home.png) no-repeat scroll 25px -5px;
    background-size: 209px;
  }

  #top img {
    margin: 10px 0;
  }

  #top03 h2, #top03 span.logo-facultat {
    font-size: 1.8em;
  }

  .nav {
	 margin-top: 22px;
  }

  #side-nav {
	 margin: 0;  /* Menú horitzontal en 2 files (2017-06-16). */
  }
  .menu-nav li {
	 flex: 1 1 20%; /* 1 0 auto; */ /* Menú horitzontal en 2 files (2017-06-16). */
  }
  
  .footer ul.data {
    padding-top: 6px;
  }
}

/* ------------------------------------------------------------- */
/* Mòbils verticals: */
@media only screen and (max-width: 460px) {
  body {
    font-size: .8em;
  }

  .wrapper {
    box-shadow: none;
    margin: 0;
    padding: 0;
    width: 100%;
  }

  .main {
    flex: 2 100%;
  }

  .nav {
    order: 2;
    flex: unset;
    position: absolute;
    right: 1em;
    width: 75%;
  }

  .aside-2 .destacats {
    order: 2;
  }

  .aside-2 .tinteressa {
    order: 3;
  }

  .aside-2 .nuvol {
    order: 4;
  }

  .aside-2 .docs-relacionats {
    order: 1;
  }

  #top01 {
    display: none;
  }

  #top02 {
    background: none;
    height: 60px;
  }

  #top {
    padding: 30px 2px;
    background: url(../css/css_img/bkgrounds/logobarra_home.png) no-repeat scroll 25px -5px;
    background-size: 205px;
  }

  #top img {
    margin: 1px 0;
  }

  #top03 h2 {
    margin-top: 2%;
  }

  .main {
    padding: 0 1em;
  }

  #side-nav {
    position: absolute;
    top: 0;
    right: 1em; /* 5px; */
    width: 75%;
  }

  #side-nav label {
    display: block;
    position: relative;
    float: right;
    background: #eee;
    border: 0.15em solid rgba(60, 60, 60, 0.2);
    border-radius: 4px;
    font-size: 1.1em;
    padding: 0.45em;
    margin: 0 -12px;
    min-height: 2.25em;
    height: 32px;
    width: 40px;
	 top: -1em;
  }

  #side-nav label::after {
    content: "≡";
    color: #555;
    font-size: 2.5em;
    position: absolute;
    right: 16px;
    top: 14px;
  }

  #side-nav input[type="checkbox"]:checked ~ label {
    width: 103%;
    background: #555;
    border-radius: 0;
  }

  #side-nav input[type="checkbox"]:checked ~ label::after {
    color: #eee;
  }

  #side-nav input[type="checkbox"]:checked ~ ul {
    display: block;
  }

  #side-nav li::before {
    content: none;
  }

  #side-nav li.submenu::before {
    content: none;
  }

  .menu-nav .submenu .menu-nav {
    margin-top: 0;
    position: relative;
  }

  #side-nav li li:after {
    content: "›";
    font: 1.4em sans-serif;
    position: absolute;
    right: .8em;
  }

  #side-nav input[type="checkbox"]:checked ~ ul > li {
    opacity: 0.8;
    text-align: left;
    width: 100%;
  }

  #side-nav input[type="checkbox"]:checked ~ ul > li.languages {
    background-color: #fefefe;
    text-align: right;
  }

  #side-nav input[type="checkbox"]:checked ~ ul > li.languages a:after,
  #side-nav input[type="checkbox"]:checked ~ ul > li.languages span:after {
    content: " ";
    margin: 0 1em;
  }
  #side-nav input[type="checkbox"]:checked ~ ul > li.languages a,
  #side-nav input[type="checkbox"]:checked ~ ul > li.languages span {
    margin: 1em;
  }

  #side-nav input[type="checkbox"]:checked ~ ul > li::after {
    content: "›";
    font: bold 1.4em sans-serif;
    position: absolute;
    right: 0.25em;
	 margin-top: -.2em;
  }

  #side-nav input[type="checkbox"]:checked ~ ul > li.submenu::after {
    content: "»";
  }

  #side-nav ul {
    display: none;
		/* width: 75%; */
    height: auto;
    align-items: flex-start;
    flex-flow: column nowrap;
    padding: 1px 0;
    margin: 0 -12px;
  }

  #side-nav ul ul {
    display: none;
  }

  #side-nav li:hover ul {
    display: flex;
  }

  .menu-nav .submenu:hover > span {
    display: none;
  }

  .menu-nav li.capcalera {
    display: block;
  }

  .menu-nav li.capcalera span {
    display: block;
    height: 24px;
    padding: 10px;
    background: #aaa url(css_img/icons/boto_menu.png) no-repeat scroll right top;
    color: #fff;
    text-align: left;
    font-size: 1.2em;
    font-weight: bold;
  }

  .menu-nav li {
    height: auto;
    min-width: 0;
    min-height: 40px;
    width: 100%;
  }

  .menu-nav li.languages {
    display: block;
	 min-height: 20px;
  }

  .menu-nav .submenu .menu-nav {
    width: auto;
  }

  .tinteressa, .nuvol, .docs-relacionats {
    border-top: 4px solid #ddd;
    background: none;
    margin: 1em auto;
    padding-bottom: 0;
  }

  .aside-2 .tinteressa ul,
  .aside-2 .nuvol ul,
  .aside-2 .docs-relacionats ul {
    background: none;
    border-radius: 4px;
    box-shadow: 2px 2px 5px 1px #ddd;
    margin: 0 0.5em 0 1.5em;
    padding: 1em .5em 0.5em 0.5em;
  }

  .nuvol ul.nuvol-paraules {
    font-size: 1.2em;
  }

  .tinteressa h2, .nuvol h2, .docs-relacionats h2 {
    line-height: 1em;
    margin-bottom: 0;
    padding-top: .0;
  }

  .footer .media {
    background: none;
    padding-top: 1em;
    height: 50px;
  }

  .footer .media ul {
    float: none;
    height: 40px;
    margin: 0 20%;
    text-align: unset;
  }

  .footer .media ul li:first-child {
    margin-right: 2em;
    padding-top: 0;
  }

  .footer .media ul li {
	 margin-right: 2em;
  }

  .flex-item {
	 font-size: 1.2em;
	 height: 60px;
  }
}