/*************************************************************
                        CUSTOM CODE
                  "Bom Dia" custom styles
--------------------------------------------------------------
NOTES FOR DEVELOPERS:
- Use tabs of two spaces for best reading experience
--------------------------------------------------------------
  INDEX
  1.      Header - mobile menu override
  2.      Footer - social icons override
  3.      Home
  3.2.    Instagram section
  4.      Single Post
  4.1.    Make sidebar ad unit show up again
  4.2.    Single Post: Colunistas
  4.2.1.  Single Post: Colunistas - author section override
  4.2.1.  Single Post: Colunistas - Aviso Colunistas
  4.3.    Single Post: Mais Lidas (2 grid) of top posts
  5.      Últimas Notícias
  5.1     Últimas Notícias - full width wrapper
  6.      Lower nav
  7.      Logo Bom Dia 20 anos
--------------------------------------------------------------
  CODE STARTS HERE
*------------------------------------------------------------
  1.      Header - mobile menu override
-------------------------------------------------------------*/
@media only screen and (max-width: 1054px) {
  html body header nav #menutogglemobile {
    display: block;
    width: 50px;
    color: white;
    font-size: 30px;
    text-align: center;
    line-height: 30px;
    float: left;
    margin-top: 2px;
    position: relative;
  }

  #menutogglemobile:after {
    font-weight: 600;
    display: block;
    content: "MENU";
    font-size: 17px;
    color: #FFF;
    height: 10px;
    position: absolute;
    top: 14px;
    line-height: 8px;
    right: -45px;
  }
}

/*------------------------------------------------------------
  2.    Footer - social icons override
-------------------------------------------------------------*/
/* To compensate for removing the .fm icon */
html body footer .footer-column #social-menu li {
  margin-left: 0.1em;
}


/*------------------------------------------------------------
  3.    Home
  3.1.  Colunistas Section: tweak the title
-------------------------------------------------------------*/
.midcontent.opinion {
  margin-top: 30px;
  margin-bottom: 30px;
  padding-top: 20px;
  padding-bottom: 40px;
}

.midcontent.opinion h3 {
  font-size: 1.25em;
}
.midcontent.opinion article a>div .post-author {
  margin-bottom: 2px;
}

/*------------------------------------------------------------
  3.2.    Instagram section
-------------------------------------------------------------*/
.midcontent.instagram {
  display: block !important;
}

@media screen and (max-width: 650px) {
  .midcontent.instagram .sbi_item {
    width: 50% !important;
  }
}

@media screen and (max-width: 650px) {
  .midcontent.instagram .instagram-account-name {
    text-align: center;
    display: block !important;
  }
}

@media only screen and (max-width: 1023px) {
  .midcontent.instagram {
    padding-top: 30px;
    padding-bottom: 30px;
  }
}

@media only screen and (min-width: 1024px) {
  .midcontent.instagram {
    padding-top: 40px;
    padding-bottom: 60px;
    margin-top: 30px;
    margin-bottom: 30px;
  }
}

/*------------------------------------------------------------
  4.      Single Post
  4.1.    Make sidebar ad unit show up again
-------------------------------------------------------------*/
@media only screen and (max-width: 1054px) {
	html body.single .sidebar {
    display: block !important;
    position: relative !important;
    width: 90% !important;
		top: 0 !important;
		margin-left: auto;
		margin-right: auto;
		min-width: none !important;
	}

	html body.single .sidebar > div{
		margin: 20px auto !important;
		display: block;
		text-align: center;
	}
}

/**
*/
/*
html body .wrapper.page .content .post-author .post-author-photo {
	margin: 0 auto 5px auto;
}
*/


/*------------------------------------------------------------
  4.2.1.    Single Post: Colunistas - author section override
-------------------------------------------------------------*/
@media only screen and (max-width: 650px) {
  html body .wrapper.page .content .post-author {
    margin-bottom: 15px;
    max-width: 100%;
  }
}

@media only screen and (min-width: 651px) {
  html body .wrapper.page .content .post-author {
    max-width: 250px;
  }
}

html body .wrapper.page .content .post-author {
  display: block;
  width: 100%;
}

html body .wrapper.page .content .post-author:after {
  content: "";
  display: table;
  clear: both;
}

html body .wrapper.page .content .post-author .post-author-photo {
  float: left;
  width: 50px;
  height: 50px;
  margin-right: 10px;
}

html body .wrapper.page .content .post-author .post-author-photo img {
  width: 50px;
  height: 50px;
}

html body .wrapper.page .content .post-author .post-author-meta-wrapper {
  float: left;
  max-width: 80%;
  display: flex;
  flex-direction: column;
  height: 50px;
  justify-content: center;
}

@media only screen and (min-width: 650px) {
  html body .wrapper.page .content .post-author .post-author-meta-wrapper {
    max-width: 190px;
  }
}

html body .wrapper.page .content .post-author .post-author-name {
  text-align: left;
  color: #222;
  font-size: 16px;
  margin-bottom: 3px;
}

html body .wrapper.page .content .post-author .post-author-bio {
  text-align: left;
  color: #222;
  font-size: 14px;
}

/*------------------------------------------------------------
  4.2.1.  Single Post: Colunistas - Aviso Colunistas
-------------------------------------------------------------*/
html body .wrapper.page .content .aviso-colunistas {
  text-align: center;
  padding: 20px 20px 22px 20px;
  background-color: #e5e5e5;
  color: #222;
  font-style: italic;
  font-size: 1.17em;
  font-weight: bold;
  line-height: 1.2em;
}


/*------------------------------------------------------------
  4.3.    Single Post: Mais Lidas (2 grid) of top posts
-------------------------------------------------------------*/
@media screen and (max-width: 767px) {
  .toprelatedposts{
    padding: 20px 0 0 0;
  }

  .toprelatedposts h3 {
    text-transform:uppercase;
    color: #b9252c;
    font-size:1.5em;
    margin-top: 0;
  }

  .toprelatedposts h4{
    margin-top: 5px;
    margin-bottom: 10px;
    line-height: 18px;
  }

  .toprelatedposts ul{
    margin: 0 auto;
    position: relative;
  }
  .toprelatedposts li{
    float: left;
    margin: 0;
    width: 50%;
    box-sizing: border-box;
  }

  .toprelatedposts li:nth-child(odd){
    padding-right: 7px;
  }

  .toprelatedposts li:nth-child(even){
    padding-left: 7px;
  }

  .toprelatedposts .imagewrapper{
    padding-bottom: 66.7%;
    position: relative;
  }

  .toprelatedposts .imagewrapper img{
    position: absolute;
    left:0px;
    top:0px;
    width:100%;
    max-width: 100%;
    height:100%;
  }

  /* Hide the mais lidas old style on mobile */
  html body .wrapper.page .sidebar h2:first-child,
  html body .sidebar .wpp-list {
    display: none;
  }

}

@media screen and (min-width: 768px) {
  .toprelatedposts {
    display: none;
  }
}

/*------------------------------------------------------------
  5.      Últimas Notícias
  5.1     Últimas Notícias - full width wrapper
-------------------------------------------------------------*/
.homepage.customlistings .post-header h1 {
  text-align: center;
  text-transform: uppercase;
}

@media screen and (max-width: 767px) {
  .homepage.customlistings .post-header h1 {
    font-size: 1.5em;
    margin-bottom: 0;
  }
}
/*------------------------------------------------------------
  6.      Lower nav
-------------------------------------------------------------*/
@media screen and (max-width: 650px) {
  .lower-nav {
    background-color: #ebebeb;
    text-align: center;
    top: 50px;
    position: relative;
  }

  .lower-nav li {
    display: inline-block;
  }

  .lower-nav li a {
    /*color: #FFF;*/
    font-weight: bold;
    font-size: 14px;
    margin-left: 8px;
    margin-right: 8px;
    line-height: 34px;
    text-transform: uppercase;
  }

  .lower-nav-desktop {
    display: none;
  }

}

@media screen and (min-width: 651px) {
  .lower-nav {
    display: none;
  }

  .lower-nav-desktop {
    text-align: center;
    top: 50px;
    position: relative;
    z-index: -1;
    width: 312px;
    margin-left: auto;
    position: relative;
    top: 50px;
    margin-right: 0px;
  }

  header.sticky .lower-nav-desktop {
    top: 8px;
  }

  .lower-nav-desktop li {
    padding-left: 5px;
    padding-right: 5px;
    display: inline-block;
    background-color: #ebebeb;
    margin-right: 5px;
  }

  .lower-nav-desktop li:hover {
    background-color: #b9252c;
  }

  .lower-nav-desktop li a {
    /*color: #FFF;*/
    font-weight: bold;
    font-size: 14px;
    margin-left: 8px;
    margin-right: 8px;
    line-height: 34px;
    text-transform: uppercase;
  }

  .lower-nav-desktop li:hover a {
    color: #FFF;
  }

}

/* Add to the top spacing to prevent ad ovrerlap */
@media only screen and (max-width: 767px) {
  html body .lbwrapper.wrapper {
    /*margin-top: 124px;*/
    margin-top: 114px;
  }
}

/*------------------------------------------------------------
  7.      Logo Bom Dia 20 anos
-------------------------------------------------------------*/
html body header,
html body header.sticky {
  height: 160px;
}

html body header #logo {
  background-image: url('../img/bom-dia-20-anos.svg');
  background-repeat: no-repeat;
  background-size: 100% auto;
  height: 110px;
  margin-top: 8px;
  width: 200px;
  margin-left: 14px;
}

.icon-bomdia:before {
  content: "";
}

html body header #logo h1 span,
html body header.sticky #logo span {
  top: 82px;
  font-size: 16.8px;
  right: auto;
  left: 0;
}

/* Overrides the top fixed nav on mobile */
@media screen and (max-width: 650px) {
  .lower-nav {
    top: 80px
  }

  html body header #logo {
    width: 160px;
    height: 63px;
    margin-left: 14px;
    margin-top: 5px;
  }

  html body header,
  html body header.sticky {
    height: 120px;
  }
}

@media screen and (min-width: 650px) {
  .lower-nav-desktop,
  header.sticky .lower-nav-desktop {
    top: 70px;
    z-index: 1;
  }
}

/* Pull the wrapper down to not cover the ads */
html body .lbwrapper.wrapper {
  margin-top: 160px;
}
