/*--------------------- Header stylings ---------------------*/

html {
  scroll-behavior: smooth;
}

.default-page {
  max-width: 800px;
  padding: 0 30px;
  margin: 50px auto;
}

.default-page--404 {
  margin: 100px auto 300px;
}

.default-page--404 .btn {
  padding: 20px 40px;
  margin-top: 50px;
}

.default-page p {
  line-height: 1.6em;
  margin: 15px 0;
}

.default-page h1 {
  font-size: 44px;
}

.default-page h2, .default-page h3 {
  margin: 30px 0 5px;
}

/* ===== End nav ===== */

.text {
  display: flex;
  align-items: center;
  top: 0;
  right: 0;
  bottom: 0;
  background-color: #272727ad;
}

.text a {
  width: 46px;
  height: 100%;
  background: #3B5998;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 13px;
  transition: all .2s;
}

.text a:hover {
  background: #2c4272;
}

.text svg {
  fill: #fff;
}

/* ===== container of h1 etc ===== */

.page-top {
  max-width: 480px;
  background: rgb(102,0,0);
  background: linear-gradient(0deg, rgba(102,0,0,0.7) 0%, rgba(237,32,36,0.7) 100%);
  min-height: 580px;
  left: 120px;
  padding: 50px;
  padding-top: 90px;
  transition: all .3s;
}

.page-top a {
  color: white;
  transition: 0.3s ease;
}

.page-top:hover {
  opacity: .65;
}

.page-top h1:after {
  margin: 20px 0;
}

.page-top__summary {
  font-size: 1em;
  line-height: 1.6em;
}

.review-small {
  text-transform: uppercase;
  font-size: 0.75em;
  letter-spacing: 0.2em;
  font-weight: 700;
}

h1 {
  font-size: 3.75em;
  margin: 20px 0;
  font-weight: 600;
  transition: all .3s;
}

.underline {
  position: relative;
}

.underline:after {
  position: relative;
  display: block;
  content: '';
  height: 2px;
  width: 65px;
  background: #EB1F22;
  margin: 10px 0;
}

/* ===== main styling ===== */

body {
  font-family: 'Source Sans Pro', sans-serif;
}

.hero-article {
  background-size: cover;
  background-position: center;
}

.flex-container {
  display: flex;
  justify-content: space-between;
}

figure {
  margin: 2em 25px 1em 0;
}

.popular-news-story {
  margin: 2em 0.5em;
}

.popular-news__article-story {
  margin: 2em 0.5em;
}

.flex-main h3 {
  font-size: 30px;
  padding-bottom: 12px;
  margin-bottom: 0.7em;
}

/* ===== bookmark / share / like widgets ===== */

.widget-container {
  display: flex;
  flex-direction: column;
  background-color: #EB1F22;
  top: 0;
  right: 0;
  padding: 0.6em;
}

.widget-container svg {
  height: 20px;
  fill: white;
  width: 9px;
  padding-top: 5px;
}

.widget-container p {
  font-family: 'Source Sans Pro';
  font-size: 12px;
}

.widget-container__wrapper {
  border-bottom: 1px solid rgba(255, 255, 255, 0.699);
  padding-bottom: 0.2em;
}

.widget-container__wrapper:last-child {
  border-bottom: none;
}

/* ===== Features ===== */

section.features {
  padding-bottom: 5px;
  margin-bottom: 1%;
  display: flex;
  flex-direction: column;
  margin: 0 auto 25px 0;
  font-weight: 400;
}

div.features {
  padding-right: 25px;
}

.features__image-container {
  position: relative;
  width: 100%;
  padding-bottom: 57%;
  overflow: hidden;
}

.features__image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-position: center;
  background-size: cover;
  transition: all .3s;
}

.features__pagination {
  text-align: center;
}

.features__pagination a {
  display: inline-block;
  background-color: #f0f0f0;
  /* outline: none;
  border: none; */
  font-weight: 500;
  border-radius: 0.3em;
  color: #999999;
  padding: 20px 40px;
  margin: 10px;
  width: 175px;
  transition: all .2s;
}

.features__pagination .review-small {
  margin-top: 25px;
  font-size: 14px;
}

.features__pagination a:hover {
  background-color: rgba(170, 170, 170, 0.781);
  color: #fff;
}

.features a:hover .features__image {
  transform: scale(1.12);
}

.features h3 {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 1em;
  padding: 28px 0 35px;
  font-weight: 700;
}

.features-wrapper__line {
  top: -25%;
  border-bottom: 2px solid #EB1F22;
  width: 10%;
  margin-bottom: 0.8em;
  padding: 0;
}

.features .widget-container {
  top: 0;
  right: 0;
}

.features h2 {
  font-weight: bolder;
  font-size: 30px;
  color: black;
  transition: all .2s;
  max-width: 650px;
}

.features a:hover h2 {
  color: #EB1F22;
}

.features .caption {
  padding: 20px 0;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5em;
  max-width: 80%;
}

.features hr {
  background: rgb(230, 230, 230);
}

.features--archive {
  margin: 70px 0 40px;
}

.features--archive h3.underline {
  padding: 20px 0 35px;
}

.button-container {
  margin: 0 auto;
}

.btn-more-stories {
  background-color: rgba(224, 224, 224, 0.781);
  outline: none;
  border: none;
  font-weight: 580;
  border-radius: 0.3em;
  color: grey;
  padding: 20px 150px;
  display: inline-block;
  transition: ease .2s;
}

.btn-more-stories:hover {
  background-color: rgba(170, 170, 170, 0.781);
  color: white;
}

/* ===== site-aside stylings ===== */

.flex-container--main {
  display: flex;
  align-items: flex-start;
}

.main-articles figure {
  margin: 20px 0 60px;
  border-bottom: 1px solid #cccccc;
}

.main-articles figcaption {
  max-width: 715px;
  margin: 35px 0;
}

.flex-container--main aside {
  background-color: #f0f0f0;
}

aside h3:not(.fc--white) {
  font-size: 1em;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.latest-news__article {
  margin-top: 22px;
  border-bottom: 1px solid rgb(200, 200, 200);
}

.latest-news__article:last-child {
  border-bottom: none;
}

.latest-news__article a {
  color: #000;
}

.latest-news__article a:hover {
  text-decoration: none;
}

.latest-news__article h4 {
  transition: all .2s;
}

.latest-news__article a:hover h4 {
  color: #EB1F22;
}

.latest-news__article h4 {
  font-size: 18px;
  line-height: 1.5em;
  margin: 10px 0;
}

.latest-news__article p {
  padding-bottom: 1em;
  margin-bottom: 1em;
  font-size: 1.1em;
}

/* ===== Popular section ===== */

.popular-news {
  margin-top: 40px;
}

.popular-news .underline:first-child {
  margin-bottom: 40px;
}

.popular-news__article {
  flex: 1;
  max-width: 100%;
}

.popular-news__article .caption:hover h3 {
  color: #EB1F22;
}

.popular-news__article .caption h3 {
  font-weight: 450;
  letter-spacing: 0em;
  margin-bottom: 1em;
  text-transform: capitalize;
  padding: 10px 0;
  font-size: 1.25em;
  transition: ease .3s;
}

.popular-news__article .caption {
  background-color: #141414c9;
  bottom: 0%;
  line-height: 1.4em;
  padding: 1em 2em;
  top: 40%;
  right: 0%;
  left: 5%;
}

.popular-news__article .review-small {
  color: #EB1F22;
  font-size: 0.8em;
  text-transform: uppercase;
}

.popular-news__article .widget-container {
  right: 0;
}

/* ===== site-footer stylings ===== */

.site-footer {
  display: block;
  background-color: #000;
}

.site-footer h4 {
  font-weight: 550;
  padding: 2em;
}

.site-footer form {
  border-bottom: rgba(49, 49, 49, 0.849);
}

.site-footer input {
  padding: 0.4em;
  border: none;
  border-bottom: 1px solid rgba(124, 124, 124, 0.534);
  outline: none;
  background-color: transparent;
  display: block;
  margin: 0.3em auto;
  font-family: 'Source Sans Pro', sans-serif;
}

.site-footer input[type="email"] {
  width: 20em;
  font-size: 14px;
}

div.wpcf7-response-output {
  background: #111;
  width: 50%;
  margin: 0 auto 40px;
  padding: 20px;
  border-radius: 10px;
  color: #fff;
}

.site-footer input[type="submit"] {
  font-size: 0.9em;
  background-color: rgb(49, 49, 49);
  padding: 15px 40px;
  border-radius: 25px;
  border: 1px solid transparent;
  margin: 5px auto 10px;
  cursor: pointer;
  transition: ease .3s;
}

.site-footer input[type="submit"]:hover {
  border: 1px solid #EB1F22;
  background-color: transparent;
}

.site-footer__logo {
  width: 150px;
  height: auto;
  top: 0;
  left: 0;
  padding: 30px;
}

.site-footer__site-map {
  border-top: 1px solid #141414c9;
}

.site-footer__site-map ul li {
  display: inline-block;
  padding: 10px 15px;
  font-size: 12px;
}

.site-footer__site-map a {
  color: white;
  transition: ease .3s;
}

.site-footer__site-map a:hover {
  color: #EB1F22;
}

.site-footer__copyright {
  color: rgb(119, 119, 119);
  display: block;
  padding: 10px;
  font-size: 0.7em;
}

/* =========== SECOND PAGE =========== */

/* === Article information === */

.article-information {
  max-width: 75%;
  text-align: left;
  border-bottom: 1px solid rgba(220, 220, 220, 0.534);
  display: block;
  margin-bottom: 1em;
  font-size: 0.85em;
  font-weight: 550;
  padding: 1em 0.6em;
}

.article-information__date {
  margin-right: 1.3em;
}

.article-information__platform {
  padding-right: 0.5em;
  margin-right: 0.5em;
}

.article-information :not(:first-child):not(:last-child) {
  border-right: 1px solid rgba(124, 124, 124, 0.534);
}

.site-content--article {
  margin: 3em 5em;
}

.site-content--article .top-articles {
  margin: 0 -3em;
}

.review-article {
  margin: 30px 0 0;
  max-width: 810px;
}

.review-article--review-small {
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.2em;
  font-weight: 650;
  margin-bottom: 1em;
}

.review-article h2 {
  font-size: 35px;
  font-weight: 700;
  padding-bottom: 0.5em;
}

.review-article h2:after {
  margin: 20px 0 0;
}

.review-article__top-p {
  font-size: 1.3em;
  font-weight: 300;
  margin-bottom: 1.3em;
  line-height: 30px;
}

.review-article__top-footnote {
  font-size: 0.9em;
  padding-right: 10px;
  font-weight: 400;
  margin-bottom: 3em;
}

.footnote__author-social {
  padding: 5px;
}

.review-article__top-footnote a {
  border-left: 1px solid rgba(124, 124, 124, 0.534);
  padding-left: 5px;
  color: #EB1F22;
}

.article-heading {
  margin: 0 2em 2em 1em;
}

.review-article__image-container {
  width: 100%;
  padding-bottom: 57%;
  background-size: cover;
  background-position: center;
}

.review-article__main-image img {
  width: 100%;
  margin-left: -2em;
}

.review-article__main-copy {
  font-size: 16px;
  line-height: 26px;
  padding: 30px 25px 30px 45px;
  max-width: 800px;
}

.review-article__main-copy p {
  margin: 20px 0;
}

.review-article__main-copy img {
  width: calc(100% + 45px);
  height: auto;
  margin: 25px 0 25px -45px;
}

.flex-container--main .aside--article {
  margin: -3em -6em 0 6em;
}

.popular-news__graphic {
  width: 100%;
  height: 400px;
}

.popular-news__graphic--sm {
  background: url('../images/spiderman.png') center no-repeat;
  background-size: cover;
}

.top-articles--article {
  margin: 0 -3em;
}

.top-articles--article h2 {
  margin: 1em 0 1em 1em;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 1.1em;
}

.top-articles--article .caption {
  background-color: #141414c9;
  bottom: 0;
  line-height: 1.4em;
  padding: 1em 2em;
  top: 50%;
  right: 0%;
}

.top-articles--article .review-small {
  color: #EB1F22;
  margin-bottom: 0.5em;
}

.flex-item--article .caption {
  right: 0%;
  left: 5%;
}

.flex-item--article h3 {
  font-weight: 450;
  margin-bottom: 1em;
}

.flex-item--article .widget-container {
  right: 0;
}

.overlay {
  display: none;
}

.open-btn {
  display: none;
}

a {
  color: inherit;
}

/* ====== Media Queries ====== */

@media screen and (min-width: 300px) and (max-width: 650px) {
  .features .widget-container {
    position: static;
    flex-direction: row;
    /* Safari and Edge */
    justify-content: space-around;
  }
  .popular-news__article-container {
    display: block;
  }
  .flex-container .flex-item {
    padding: 0 0;
  }
  .site-footer {
    padding-bottom: 20px;
  }
}

/* Fixing top-article breaking at 500px */

@media screen and (min-width: 550px) and (max-width: 900px) {
  .flex-container {
    margin: 0 auto;
  }
  .popular-news__article-container {
    display: flex;
    flex-wrap: wrap;
  }
  .popular-news__article figure:first-child {
    flex: 100%;
  }
  .popular-news__article {
    flex: 1 50%;
  }
}

/* ===== Small screen ===== */

@media screen and (min-width:250px) and (max-width: 900px) {
  .site-nav--article ul li a {
    display: none;
  }
  .site-nav--article ul li {
    padding: 20px;
    height: 46px;
  }
  /* start mobile nav */
  .page-nav__mob-menu {
    transition: ease .2s
  }
  /* Mobile nav styling ends */
  .article-information__platform {
    margin-right: 0;
    padding-left: 0.1em;
  }

  .main-articles--archive {
    margin: 3em 0em;
  }

  .flex-item, .flex-item--article {
    flex: 50%;
    padding: 0 10px;
    margin-right: 20px;
  }
  .flex-main, .flex-main--article {
    flex: 100%;
  }
  .top-articles {
    display: block;
    margin: 0;
  }
  .top-articles--article h2 {
    margin: 3em 0 1em 2em;
  }
  .flex-item figure {
    width: 100%;
    height: auto;
    display: block;
  }
  .flex-item img {
    width: 100%;
  }
  section.features {
    max-width: 100%;
  }
  .features .caption {
    max-width: 100%;
  }
  .features img {
    width: 100%;
  }
  .btn-more-stories {
    padding: 20px 75px;
  }
  .popular-news__article .caption h3 {
    font-weight: 450;
    letter-spacing: 0em;
    margin-bottom: 0.5em;
    text-transform: capitalize;
    padding: 0.5em 0;
    font-size: 1.25em;
  }
  .site-footer__logo {
    margin: 0 auto;
    padding: 0;
    position: static;
    width: 15%;
    height: auto;
  }
}

/* "popular" articles fit the screen */

@media screen and (min-width: 360px) {
  .top-articles--article h2 {
    margin: 3em 1em 0;
  }
}

@media screen and (min-width: 425px) {
  .flex-item .caption {
    right: 0;
  }
}

@media screen and (max-width: 600px) {
  .features h2 {
    font-size: 24px;
  }
}

@media screen and (min-width: 601px) and (max-width: 1023px) {
  .flex-item .caption {
    bottom: 0;
    right: 0;
    top: 40%;
  }
  section.features {
    max-width: 100%;
  }
  .popular-news__article .caption h3 {
    padding: 0.5em 0;
  }
}

/* making the latest and popular articles flex for smaller screens */

@media screen and (min-width: 768px) {
  .features .widget-container {
    right: 0;
  }
  .features figure img {
    max-width: 100%;
  }
}

@media screen and (min-width: 769px) {
  .top-articles figure img {
    width: 100%;
  }
  .flex-item .caption {
    bottom: 0%;
  }
}

/* Tablet screens */

@media screen and (min-width: 1024px) and (max-width: 1250px) {
  .flex-container {
    flex-wrap: wrap;
  }
  .flex-item {
    flex: 1 25%;
  }
  .flex-item--article {
    flex: 1 25%;
  }
  .flex-main {
    flex: 1 50%;
  }
  .popular-news__article .caption {
    top: 40%;
    left: 5%;
  }
  section.features {
    max-width: 100%;
  }
}

@media screen and (min-width: 1251px) {
  .flex-item--article {
    flex: 1 33%;
  }
  .popular-news__article .caption {
    top: 50%;
    left: 5%;
  }
  section.features {
    max-width: 100%;
  }
  h1.underline:after {
    width: 65px;
  }
}

/* ===== Larger / over 1366px ===== */

@media screen and (min-width: 1366px) {
  .top-articles img {
    width: 100%;
  }
  .flex-item .caption {
    right: 0;
    left: 5%;
  }
  .main-articles img {
    width: 100%;
  }
  .features .widget-container {
    right: 0%;
  }
  .popular-news__article .caption {
    right: 0%;
  }
  .popular-news__article .widget-container {
    right: 0%;
  }
  .flex-item--article img {
    width: 100%;
  }
  .popular-news__article .caption {
    top: 40%;
    left: 5%;
  }
  section.features figcaption {
    font-size: 1.2em;
  }
}

/* ===== iMac screen ===== */

@media screen and (min-width: 1665px) {
  .popular-news__article .caption {
    right: 0%;
  }
  .popular-news__article .widget-container {
    right: 0%;
  }
  .underline:after {
    width: 65px;
  }
}

/* ===== Articles page ===== */

@media screen and (min-width: 318px) {
  .article-information {
    max-width: 100%;
  }
  .article-information__flex-container {
    display: flex;
  }
  .site-content--article {
    margin: 0 0em 0em 0em;
  }
  .review-article__main-image img {
    margin-left: 0;
  }
  .flex-container--main .aside--article {
    margin: 0;
  }
  .popular-news__article img {
    max-width: 100%;
  }
  .top-articles--article {
    margin: 0;
  }
  .flex-item--article img {
    width: 100%;
  }
}

/* ===== Widget container article small screen ====== */

@media screen and (min-width: 318px) and (max-width: 550px) {
  .review-article__main-image img {
    margin-left: 0;
  }
  .review-article__image-container .widget-container {
    position: static;
    flex-direction: row;
    /* space-around works within safari and edge */
    justify-content: space-around;
  }
}

@media screen and (min-width: 470px) and (max-width: 571px) {
  .popular-news__article {
    max-width: 100%;
    margin: 0 auto;
  }
}

@media screen and (min-width: 572px) and (max-width: 900px) {
  .popular-news__article {
    margin: 0 auto;
  }
  .main-articles--article {
    margin: 3em 1em 3em 1em;
  }
}

@media screen and (min-width: 768px) {
  .main-articles--article {
    margin: 3em 0em;
    flex: 75%;
  }
}

@media screen and (max-width: 549px) {
  .flex-container--article {
    margin: 0 0 0 1em;
  }
}

@media screen and (min-width: 901px) {
  .article-heading {
    margin: 0 2em 2em 4em;
  }
  .top-articles--article {
    margin: 0 2em
  }
  .flex-container--article {
    margin: 0 0 2em 1em;
  }
}

@media screen and (min-width: 901px) and (max-width: 1023px) {
  .flex-main {
    flex: 1 33%;
  }
  .flex-item, .flex-item--article {
    flex: 1 33%;
  }
}

@media screen and (min-width: 1024px) and (max-width: 1250px) {
  .flex-container {
    flex-wrap: wrap;
  }
  .popular-news__article .caption {
    top: 40%;
    left: 5%;
  }
  .flex-item--article {
    flex: 1 25%;
  }
  .flex-main--article {
    flex: 1 50%;
  }
}

@media screen and (min-width: 1251px) {
  .flex-item--article {
    flex: 1 25%;
  }
  .flex-main--article {
    flex: 1 50%;
  }
  .popular-news__article .caption {
    top: 50%;
    left: 5%;
  }
}

.flex-item__graphic {
  height: 400px;
  width: 100%;
  background-size: cover;
  background-position: center;
}

.flex-item:last-child figure {
  margin-right: 0;
}

/* ===== This will make the popular articles truncated ===== */

.popular-news__article .caption p {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  line-height: 1.3em;
  max-height: 4em;
  -webkit-line-clamp: 3;
}

@media screen and (min-width: 1800px) {
  .review-article__main-image {
    max-width: 90%;
  }
}

/*---------------------------------------------------------*/
/* Added Styles */
@media screen and (max-width: 960px) {
  div.features {
    padding-right: 0;
  }

  .flex-container--main {
    flex-direction: column;
    width: 100%;
  }

  .main-articles {
    width: 100%;
  }
}
