/* http://meyerweb.com/eric/tools/css/reset/
   v2.0 | 20110126
   License: none (public domain)
*/

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 100%;
  font: inherit;
  vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
  display: block;
}
body {
  line-height: 1;
}
ol, ul {
  list-style: none;
}
blockquote, q {
  quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
  content: '';
  content: none;
}
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/*----------- Page structure -------------------------------------------------*/

html, body {
  height: 100%;
  background: #FFFFCC;
}

body {
  color: #000000;
  font-family: Helvetica, Arial, sans-serif;
  /*font-family: Palatino, Palatino Linotype, Georgia, Serif;*/
  font-size: 0.938em;
  line-height: 1.2em;
  padding: 0 0.3em;
  /* flex container */
  display: -webkit-flex;
  display: flex;
  -webkit-flex-flow: column nowrap;
  flex-flow: column nowrap;
}

body > * { flex: 0 0 auto; width: 100%; margin: auto; }

@media (min-width: 55em) {
  body { width: 55em; margin: 0 auto; }
}

/*---------- body > main ------------------------------------------------------*/

body > main {
  flex: 1 0 auto; /* -grow:1 (takes most of the available space) */
  margin: 1em 0; padding: 0 0.3em; width: calc(100% - 0.6em);
}

body > main h2 { font-size: 135%; margin-bottom: 0.8em; line-height: 1.2em; }
body > main h3 { font-size: 120%; margin-bottom: 0.7em; line-height: 1.2em; }
body > main h4 { font-size: 110%; margin-bottom: 0.7em; line-height: 1.2em; }

body > main td { padding: 0.2em; } /* must be removed */

/*---------- body > others ------------------------------------------------------*/

#frm_warn {
  margin: 0 auto 0.5em auto;
  padding: 0.6em 0;
  border-radius: 0.5em;
  box-shadow: inset -1px 1px 8px #FFA500;
  background: #FFFFAA;
  background: -webkit-gradient(linear, center top, center bottom, from(#FFFFAA), to(#FFFFCC));
  background: -moz-linear-gradient(100% 100% 90deg, #FFFFCC, #FFFFAA);
}
@media (min-width: 28em) {
  #frm_warn { display: -webkit-flex; display: flex; -webkit-flex-flow: row wrap; flex-flow: row wrap; }
  #frm_warn > * { flex: 1 1 auto; text-align: center; }
}
#frm_warn > * { line-height: 1.3em; }
#frm_warn > * > span { margin: 0 0.3em; }
#frm_warn > * > span:nth-child(1) { margin-left: 0.8em; }
#frm_warn > * > span:nth-child(2) { margin-right: 0.8em; font-weight: bold; }

#htmlmemory { display: none; }

/*---------- body > footer ------------------------------------------------------*/

body > footer {
  padding-top: 0.2em; padding-bottom: 0.5em;
  border-radius: 0.5em;
  font-size: 90%;
  background: #FFC300;
  background: -webkit-gradient(linear, 0% 45%, 0% 100%, from(#FFC300), to(#FFFFAA));
  background: -moz-linear-gradient(20% 100% 90deg, #FFFFAA, #FFC300);
  display: -webkit-flex; display: flex; -webkit-flex-flow: row wrap; flex-flow: row wrap;
}

body > footer > * { flex: 1 1 100%; margin: 0.3em 0.5em; text-align: center; }
body > footer > *.fifty { flex: 1 1 40%; }
@media (min-width: 24em) {
  body > footer > * { flex: 1 1 auto; }
  body > footer > *:nth-child(odd) { text-align: left; }
  body > footer > *:nth-child(even) { text-align: right; }
}
@media (min-width: 32em) {
  body > footer > * { flex: 1 1 calc(50% - 2.4em); margin: 0.3em 1.2em; }
}

/*---------- body > header ------------------------------------------------------*/

header {
  flex: 0 0 6em;
  display: -webkit-flex;
  display: flex;
  -webkit-flex-flow: row nowrap;
  flex-flow: row nowrap;
}

header .left {
  flex: 1 1 auto;
  order: 1;
  /*height: auto;*/ height: 5.9em;
  background: url('../img/pinochiaro1.png') no-repeat top left;
  background-size: 95% 95%;
}
@media (max-width: 31.25em) { /* < 500px */
  header .left {
    background: url('../img/pinochiaro_230_83.png') no-repeat top left;
    background-size: 95% 95%;
  }
}
header .left a {
  display: block;
  background: transparent;
  width: 100%;
  height: 100%;
}

header > .right {
  flex: 0 1 auto;
  order: 2;
  height: auto;
  margin-top: 0.375em;
  margin-right: 0.375em;
  background: #FFFFCC;
  background: -webkit-gradient(linear, center top, center bottom, from(#FFFFCC), to(#FFF81F));
  background: -moz-linear-gradient(100% 100% 90deg, #FFF81F, #FFFFCC);
}
header > .right > div {
  font-family: Verdena,Tahoma,sans-serif;
  text-align: center;
  margin-top: 2.4em;
  padding: 0.4em;
}
header > .right > div a {
  color: #FF0000;
  font-weight: bold;
  font-size: 120%;
  letter-spacing: 1px;
}
header > .right > div a:hover {
  background: #FFC300;
}

/*---------- body > nav ------------------------------------------------------*/

#nav {
  font-family: Verdena,Tahoma,sans-serif;
  background: #FFF81F;
  background: -webkit-gradient(linear, center top, center bottom, from(#FFF81F), to(#FFC300));
  background: -moz-linear-gradient(100% 100% 90deg, #FFC300, #FFF81F);
  border-radius: 0.5em;
}

#nav > ul > li > ul {
  z-index: 99;
}

#nav > ul > li > ul > li {
  margin: 0.3em;
  padding: 0.1em 0.3em;
  border: 1px dotted #FF0000;
  border-radius: 0.4em;
}

#nav > ul > li > ul > table.teams {
  border-collapse: separate;
  border-spacing: 0.1em 0.3em;
}
#nav > ul > li > ul > table.teams tr td {
  padding: 0.1em 0.3em;
  border: 1px dotted #FF0000;
  border-radius: 0.4em;
}

#nav > ul > li > ul > li *.righted {
  margin-right: 0.4em;
}
#nav > ul > li > ul > li *.spaced {
  padding-left: 0.3em; padding-right: 0.3em;
}
#nav > ul > li > ul > li.two > *:first-child {
  font-weight: bold; color: #104FE3;
}
#nav > ul > li > ul > li.two > *:not(:last-child) {
  margin-bottom: 0.15em;
}

/* menu: large screen */
@media ( min-width: 40em ) /* 640px */
{
  #nav > a, #nav button.hidden {
    display: none;
  }

	#nav > ul > li {
    position: relative;
    height: 100%;
    font-size: 130%;
    font-weight: bold;
    padding: 0.4em 1.7%;
    color: #FF0000;
    float: left;
  }
  #nav > ul > li:hover {
    background: #FFC300;
  }

  #nav > ul > li > * {
    font-size: 70%;
    line-height: 1.4em;
    padding-left: 0;
    padding-right: 0;
    color: #000000;
    font-weight: normal;
  }

  #nav > ul > li > ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
  }
  #nav li.menu_section:hover > ul {
    display: inline-block;
  }

  #nav > ul > li > ul {
    border: 1px solid #FFA500;
    border-top: 0;
    border-bottom-left-radius: 0.5em;
    border-bottom-right-radius: 0.5em;
    box-shadow: -1px 1px 5px #FFA500;
    background: #FFFFAA;
    padding-top: 0.3em;
    padding-bottom: 0.3em;
  }

  #nav > ul > li > ul > * {
    padding-left: 0.4em;
    padding-right: 0.4em;
    white-space: nowrap;
  }

} /* menu: large screen */

/* menu: narrow screen */
@media ( max-width: 40em ) /* max: 640px */
{
	#nav {
    position: relative;
    top: auto;
    left: auto;
  }

  #nav > a, #nav > button {
    width: 3em;
    height: 3em;
    text-align: left;
    text-indent: -9999px;
    position: relative;
  }
  #nav > a {
    display: none;
  }
  #nav > button {
    background: transparent; border: 0; outline: 0;
  }
  #nav > a:before, #nav > a:after, #nav > button:before, #nav > button:after {
    position: absolute;
    border: 2px solid #FF0000;
    top: 35%;
    left: 25%;
    right: 25%;
    content: '';
  }
  #nav > a:after, #nav > button:after {
    top: 60%;
  }
  #nav > a:hover, #nav > button:hover {
    background: #FFC300;
  }

  #nav:not( :target ) > a:first-of-type,
  #nav:target > a:last-of-type {
    display: block;
  }

  #nav > ul {
    display: none;
  }
  #nav:target > ul {
    display: block;
  }
  #nav > ul > li {
    color: #FF0000;
    background: #FFFFAA;
    font-size: 125%;
    line-height: 1.5em;
    width: 97%;
    padding-left: 1%;
    padding-right: 1%;
    border: 1px solid #FFC300;
    float: none;
  }
  #nav > ul > li > * {
    color: #000000;
    font-size: 85%;
    line-height: 1.3em;
  }

  #nav > ul > li > ul {
    display: none;
    padding-left: 1.3em;
    padding-bottom: 0.8em;
    top: 100%;
  }
  #nav li.menu_section:hover > ul {
    display: block;
    left: 0;
    right: 0;
  }

} /* menu: narrow screen */

/*---------- cookie bar ------------------------------------------------------*/

#cookie-bar {background:#111111; height:auto; line-height:20px; color:#eeeeee; text-align:center; padding:3px 0;}
#cookie-bar.fixed {position:fixed; top:0; left:0; width:100%;}
#cookie-bar.fixed.bottom {bottom:0; top:auto;}
#cookie-bar p {margin:0; padding:0;}
#cookie-bar a {color:#ffffff; display:inline-block; border-radius:3px; text-decoration:none; padding:0 6px; margin-left:8px;}
#cookie-bar .cb-enable {background:#007700;}
#cookie-bar .cb-enable:hover {background:#009900;}
#cookie-bar .cb-disable {background:#990000;}
#cookie-bar .cb-disable:hover {background:#bb0000;}
#cookie-bar .cb-policy {background:#0033bb;}
#cookie-bar .cb-policy:hover {background:#0055dd;}
