/*
Theme Name:     Feedback toolkit theme (Blogrid child)
Description:    Tema Child per il tema Blogrid
Author:         METID - Politecnico di Milano
Author URI:     http://www.metid.polimi.it
Template:       blogrid
Version:        0.1.0
*/

/* ------------------------------------------------------------------------------------------------------------------------------
colors
-------------------------------------------------------------------------------------------------------------------------------*/

:root {
  --primary: #39c3dd;
  --darker: #037C91;
  --gray-dark: #3f3f3f;
  --hover-bg-color: rgba(0,0,0,0.6);
  --gray-light: #efefef;
  --gray-lighter: #faf9f9; /* body bg */
}

a { color:var(--darker); }
a:hover { color: var(--primary); }

blockquote {
  background: var(--primary);
  border-left-color: var(--darker);
}

::-moz-selection { background: var(--primary); }
::selection { background: var(--primary); }

/* ------------------------------------------------------------------------------------------------------------------------------
override outlines when focused
-------------------------------------------------------------------------------------------------------------------------------*/

a:active, a:focus {
  outline: auto;
}

/* ------------------------------------------------------------------------------------------------------------------------------
buttons
-------------------------------------------------------------------------------------------------------------------------------*/

button, a.button, input[type=button], input[type=reset], input[type=submit], .search-form .search-submit, .error404 input.search-submit, .search-no-results input.search-submit, .page-numbers li a, .page-numbers.current, a.wp-block-button__link {
  border-radius: 0;
  background: black;
  transition: all 300ms ease-in-out;
  text-transform: uppercase;
  padding: 12px 32px;
  font-size: 14px;
}

button:hover, a.button:hover, input[type=button]:hover, input[type=reset]:hover, input[type=submit]:hover, .search-form .search-submit:hover, .error404 input.search-submit:hover, .search-no-results input.search-submit:hover, .page-numbers li a:hover, .page-numbers.current, a.wp-block-button__link:hover {
  background: var(--hover-bg-color);
}

button:active, button:focus, a.button:active, a.button:focus, input[type=button]:active, input[type=button]:focus, input[type=reset]:active, input[type=reset]:focus, input[type=submit]:active, input[type=submit]:focus, a.wp-block-button__link:active, a.wp-block-button__link:focus {
  border:0;
  outline:0;
  background: var(--hover-bg-color);
}

a.button {
  display: inline-block;
  text-decoration: none;
  color:white;
  font-weight:700;
  line-height: 1.5;
}

.page-numbers li a, .page-numbers.current {
  box-shadow:none;
  color:white;
  opacity:1;
}

a.wp-block-button__link {
  font-weight: 700;
}

/* ------------------------------------------------------------------------------------------------------------------------------
general structure
-------------------------------------------------------------------------------------------------------------------------------*/

html {
  scroll-behavior:smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body.admin-bar {
  min-height: calc(100vh - 32px);
}

.site {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.site-content {
  overflow: hidden;
  margin-top: -8px;
}

.site-footer {
  margin: auto auto 0 auto;
}

.sheader {
  margin-bottom:0;
}

/* ------------------------------------------------------------------------------------------------------------------------------
navigation
-------------------------------------------------------------------------------------------------------------------------------*/

@media screen and (max-width: 1023px){
  .main-navigation {
    display: block;
  }
}

@media screen and (max-width: 767px){
  .main-navigation ul li.menu-item-202 {
    display: none;
  }
}

.top-nav-wrapper {
  min-height: 67px;
}

.top-nav-wrapper .content-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  max-width: 36%;
}

.main-navigation ul li a, .main-navigation ul li.current-menu-item>a {
  font-size: 16px;
  font-weight: 700;
}

.main-navigation ul#primary-menu > li.current-menu-item > a:after, .main-navigation ul#primary-menu > li > a:hover:after {
  display: block;
  position: absolute;
  height: 2px;
  width: 40px;
  content: ' ';
  background: var(--hover-bg-color);
  margin-top: 7px;
}

.main-navigation ul.pmenu>li:first-child a {
  padding-left: 16px;
}

.main-navigation ul#primary-menu > li.wpglobus-selector-link > a:after {
  display:none;
}

#primary-menu {
  margin-right: -1rem;
}

.site-header ul ul {
  min-width: unset;
}

ul.sub-menu {
  box-shadow: 0 2px 2px rgba(0,0,0,.05);
}

ul.sub-menu:hover .sub_menu_item_wpglobus_menu_switch a {
  opacity: .5;
}

ul.sub-menu:hover .sub_menu_item_wpglobus_menu_switch a:hover {
  opacity: 1;
}

.wpglobus-current-language > a {
  pointer-events:none;
}

/* ------------------------------------------------------------------------------------------------------------------------------
home header and about page
-------------------------------------------------------------------------------------------------------------------------------*/

.bottom-header-wrapper {
  background-color: var(--primary);
  color: #000;
  margin-bottom:0;
  margin-top: -8px;
}

.bottom-header-wrapper h1, .error404 h1, .search-no-results h1, .archive .page-header h1, .search-results h1.page-title {
  font-family: 'Amatic SC', cursive;
  font-size: 2.8em;
  margin-bottom: 10px;
  line-height: 1em;
}

.bottom-header-wrapper p.subtitle, .fancy-border h2, article h3 {
  font-family: 'Neucha', cursive;
  margin-top:5px;
}

.bottom-header-wrapper p.subtitle {
  font-size: 1.5em;
  line-height: 1.2em;
}

.fancy-border h2, article h3 {
  font-size: 1.6em;
  line-height: 1.2em;
}

.bottom-header-wrapper .swidgets-wrap, .blocks-wrapper {
  text-align: center;
}

.swidgets-wrap {
  box-shadow: none;
  background:transparent;
  padding: 30px 0;
}

.header-widget .textwidget h1 {
  text-align: center;
}

.blocks-wrapper {
  display: block; /*reset flexbox for scheme*/
}

@media(max-width:1023px) {
  .wp-block-column.fancy-border {
    background-color:var(--gray-light);
    padding: 2em 1em 1.25em;
  }

  .wp-block-column.fancy-border:last-child {
    margin-bottom: 2em;
  }

  .blocks-wrapper > div.fancy-border:nth-child(2) {
    padding-top: 2em;
  }
}

@media(min-width: 1024px) {
  .blocks-wrapper {
    grid-template-columns: 1fr 1fr 1fr 1fr;
    display: grid;
    grid-column-gap: 30px;
  }

  .fancy-border {
    background-color:transparent;
    background-image:url('img/border.png');
    background-size:100%;
    background-repeat: no-repeat;
    padding: 15px;
    text-align: left;
  }
}

@media(max-width: 1023px) {
  .header-widget .textwidget h2 {
    text-align: center;
  }

  .header-widget .textwidget {
    display: flex;
    flex-direction: column;
  }

  a.button.toanchor {
    align-self: center;
    margin-bottom: 40px;
  }

  .blocks-wrapper {
    order:4;
  }

  .bottom-header-wrapper p.subtitle {
    margin-bottom: 20px;
  }
}

.gutter-small figure {
  margin:0;
}

@media (min-width: 600px){
  .gutter-small .wp-block-column:not(:last-child) {
    margin-right: 0;
  }

  .gutter-small .wp-block-column:not(:first-child), .gutter-small .wp-block-column:nth-child(2n) {
    margin-left: 0;
  }
}

.quotes-wrapper .wp-block-column {
  display: flex;
  flex-direction: column;
}

.quotes-wrapper .wp-block-column blockquote {
  flex:1;
}

@media (min-width: 600px){
  .quotes-wrapper.wp-block-columns {
    flex-wrap: nowrap;
  }
}


/* ------------------------------------------------------------------------------------------------------------------------------
filters and taxonomies
-------------------------------------------------------------------------------------------------------------------------------*/

.second-widget, .taxonomies {
  background-color: var(--gray-light);
  display: inline-block;
  width: 100%;
  margin-bottom: 30px;
}

.taxonomies {
  padding: 30px 0;
}

.widget ul li {
  border-bottom:0;
  padding:0;
}

form label {
  text-transform: none;
}

.searchandfilter {
  overflow: hidden;
}

.searchandfilter label {
  display: flex;
}

.searchandfilter ul, .taxonomies ul {
  margin-left: 0;
  margin-bottom: 0;
}

.taxonomies ul {
  list-style-type: none;
  padding-left: 0;
}

@media(min-width:701px) {
  .taxonomies ul {
    display: inline-block;
    width: 100%;
    margin-left: -15px;
    margin-right: -15px;
  }
}

.searchandfilter > div > ul > li, .taxonomies li {
  padding-bottom:15px;
}

.searchandfilter h4, .taxonomies h4 {
  margin-top:0;
  text-transform: uppercase;
  font-weight: 900;
  font-size: 16px;
}

.filter {
  margin-bottom: 0;
  text-align: right;
}

.filter a {
  background-color: var(--darker);
  height: 40px;
  border-radius: 50%;
  width: 40px;
  display: inline-block;
  text-align: center;
  line-height: 2.4;
  color: white;
}

.filter a:hover {
  background-color: var(--primary);
}

#filters.fullwidth-header {
  margin-right: unset;
}

@media (min-width: 701px) {
  .searchandfilter, .taxonomies {
    margin: 0 -15px;
  }

  .searchandfilter > div > ul > li, .taxonomies li {
    width: 33.3333%;
    padding: 0 15px;
  }

  p.filter {
    display:none;
  }
}

@media(max-width:700px) {
  .searchandfilter>div>ul {
    max-height: 0;
    opacity:0;
    transition: all .3s ease-in-out;
  }

  #filters {
    background-color:transparent;
    transition: all .3s ease-in-out;
    margin-bottom:0;
  }

  #filters.opened {
    background-color: var(--gray-light);
    margin-bottom: 30px;
  }

  #filters.opened .searchandfilter>div>ul {
    max-height:1000px;
    opacity:1;
  }

  #filters.opened .filter a {
    background-color: var(--primary);
  }
}

.searchandfilter > div > ul > li:last-child {
  margin-top: 15px;
}

@media (min-width: 701px){
  .taxonomy-wrapper {
      width: 33.3333%;
      padding: 0 15px;
      float: left;
  }
}

/* ------------------------------------------------------------------------------------------------------------------------------
filter checkboxes
-------------------------------------------------------------------------------------------------------------------------------*/

input[type='checkbox'] {
  position: absolute;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
  clip: rect(1px, 1px, 1px, 1px);
}

input[type='checkbox'] + span {
  position: relative;
  display: inline-block;
}

/* Create a custom checkbox */
input[type='checkbox'] + span::before {
  content:'';
  position: relative;
  display: inline-block;
  margin-right: 10px;
  height: 20px;
  width: 20px;
  background-color: var(--hover-bg-color);
}

input[type='checkbox'] + span:hover::before {
  background-color: var(--darker);
}

input[type='checkbox']:checked + span::before {
  background-color: var(--primary);
}

/* Create the checkmark/indicator */
input[type='checkbox']:checked + span::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 3px;
  width: 7px;
  height: 11px;
  border: solid white;
  border-width: 0 3px 3px 0;
  -webkit-transform: rotate(45deg);
  -ms-transform: rotate(45deg);
  transform: rotate(45deg);
}

input[type='checkbox']:focus + span::before {
  outline: #5d9dd5 solid 1px;
  box-shadow: 0 0px 8px #5e9ed6;
}

/* ------------------------------------------------------------------------------------------------------------------------------
search
-------------------------------------------------------------------------------------------------------------------------------*/

.fbox.no-results {
  padding:0;
}

input[type=search] {
  padding:10px;
}

.error404 #main .search-form label, .search-no-results #main .search-form label, .search-form label {
  border: 0;
  margin-right: -5px;
  float:none;
}

.error404 input.search-submit, .search-no-results input.search-submit {
  border:0;
  color:white;
}

.error404 main#main, .search-no-results section.fbox.no-results.not-found {
  background:transparent;
}

.no-results {
  text-align: center;
}

/* ------------------------------------------------------------------------------------------------------------------------------
posts grid
-------------------------------------------------------------------------------------------------------------------------------*/

.featured-thumbnail div {
  height:0;
  padding-bottom:100%;
  background-size:cover;
  background-position: center;
  transition: all .3s ease-in-out;
}

.blogposts-list:hover .featured-thumbnail div, .blogposts-list:focus .featured-thumbnail div {
  transform: scale(1.2);
}

@media (min-width: 1050px) {
  .blogposts-list:nth-of-type(3n-1):last-of-type {
    margin-right: auto;
    margin-left: 5%;
  }
}

article {
  position:relative;
}

.grid-header.entry-header {
  position:absolute;
  top:20%;
  left:0;
  background-color: var(--primary);
}

.grid-header.entry-header h2.entry-title {
  margin-bottom:0;
  font-size: 18px;
  text-transform: uppercase;
  font-weight: 900;
}

.grid-header.entry-header h2.entry-title a {
  padding: 10px;
  display: inline-block;
  color:black;
  text-align: left;
  font-family: 'Lato', 'helvetica neue', helvetica, arial;
}

h2.entry-title a:hover, h2.entry-title a:active {
  font-size: inherit;
  font-weight: inherit;
}

/* ------------------------------------------------------------------------------------------------------------------------------
site footer
-------------------------------------------------------------------------------------------------------------------------------*/

.site-footer {
  background: var(--primary);
}

@media(max-width: 900px) {
  .footer-column-three {
    padding-bottom:0;
  }

  .footer-column-three:last-child {
    padding-bottom: 50px;
  }
}

.footer-column-three .widget {
  margin-bottom: 30px;
}

.footer-column-three p {
  color: black;
}

.footer-column-three h3 {
  letter-spacing: 0;
}

.footer-column-three a {
  color:black;
}

.footer-column-three h3:after {
  background: var(--hover-bg-color);
}

.footer-column-three h3, span.tagline1 {
  font-family: 'Neucha', cursive;
  color:black;
  font-size: 25px;
  text-transform: none;
}

span.tagline2 {
  font-family: 'Amatic SC', cursive;
  font-size: 40px;
  display: block;
  line-height: 1;
}

span.tagline2:after {
  display: block;
  height: 2px;
  width: 40px;
  content: ' ';
  background: var(--hover-bg-color);
  margin-top: 16px;
}

#menu-footer-menu {
  margin-left: 0;
  font-size: 16px;
}

.twitter:before {
  font-family: FontAwesome;
  content: "\f099";
}

.facebook:before {
  font-family: FontAwesome;
  content: "\f09a";
}

a.twitter, a.facebook {
  text-decoration: none;
  font-size: 28px;
  color: black;
  margin-right: 15px;
}

a:hover.twitter, a:hover.facebook {
  color:var(--hover-bg-color);
}

.widget_media_image h3.widget-title { /*eu disclaimer*/
  color:#2a4493;
  font-size: 16px;
  font-family: inherit;
}

.widget_media_image h3.widget-title:after {
  display: none;
}

.widget_media_image {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
}

.widget_media_image .swidget {
  margin-bottom: 0;
}

.widget_media_image img {
  width: 86px;
  height: 58px!important;
  margin-right: 15px;
}

/* ------------------------------------------------------------------------------------------------------------------------------
single post page
-------------------------------------------------------------------------------------------------------------------------------*/

article h2 {
  font-family: 'Amatic SC', cursive;
  font-size: 40px;
  line-height: 1.1;
}

.single article.fbox {
  padding-top:0;
}

.single article .entry-content {
  padding-top: 4%;
}

.single article .entry-content, .page .entry-content, .hover-box p {
  font-size: 18px;
}

@media(max-width:1023px) {
  .single article .entry-content, .page .entry-content, .hover-box p {
    font-size: 16px;
  }
}

.featured-content {
  width: 100%;
}

.activity-field {
  margin-bottom: 2em;
}

.fullwidth-header {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  background-size:cover;
  background-position:center;
}

.hover-wrapper {
  width: 1180px;
  max-width: 90%;
  margin: 0 auto;
  padding: 3% 0;
}

.hover-box {
  background-color: rgba(255,255,255,0.8);
}

.hover-box p {
  padding: 20px 30px;
  margin-bottom: 0;
}

.single h1.entry-title {
  margin-bottom: 0px;
  padding: 15px 30px;
  background-color: var(--primary);
  font-family: 'Amatic SC', cursive;
  text-align: left;
  font-size: 40px;
}

.single h1.entry-title, .fbox h1, .fbox h2, .fbox h3 {
  color: black;
}

.nav-links .nav-next, .nav-links .nav-previous {
  background: transparent;
}

@media(min-width:1024px) {
  .hover-box {
    width: 66%;
  }
}

@media(max-width:700px) {
  .single-activity article.fbox, .page article.fbox {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    padding-left: 5%;
    padding-right: 5%;
  }

  .single-activity article.fbox {
    margin-top: -40px;
  }

  article .entry-content {
    font-size: 18px;
  }

  .site-main .post-navigation {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    background-size:cover;
    background-position:center;
  }
}

.activity-divider {
  flex-wrap: nowrap;
}

.activity-divider figure {
  margin: .6em 0;
}

.activity-divider .wp-block-column:first-child {
  flex-basis: 40px;
  margin-right: 0;
}

.activity-divider .wp-block-column:last-child {
  flex-basis: 60%;
}

.posts-entry .entry-content p:last-child {
  margin-bottom: 1.5em;
}

@media(max-width: 1023px) {
  .activity-divider .wp-block-column:last-child {
    flex-basis: 100%;
  }
}

@media(max-width: 599px) {
  .activity-divider .wp-block-column:last-child {
    margin-left:5%;
  }
}

.wp-block-column li {
    margin-bottom: .7em;
}
