/*
  - This page was made for the Frontend Mentor challenge (https://www.frontendmentor.io/solutions/i-made-the-blogr-page-without-using-grid-2iAEEohdD)
  - Author: Leonardo Meza (https://github.com/leonardomeza87)
  - Twitter: (https://twitter.com/leonardomeza87)
*/
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Primary */
  --cta-text: hsl(356, 100%, 66%);
  --cta-hover-bg: hsl(355, 100%, 74%);
  --headings: hsl(208, 49%, 24%);
  --headings-blue: hsl(212, 22%, 46%);
  --sub-menu: hsl(195, 29%, 95%);

  /* Neutral */
  --white-text: hsl(0, 0%, 100%);
  --footer-text: hsl(240, 2%, 79%);
  --body-copy: hsl(207, 13%, 34%);
  --footer-bg: hsl(240, 10%, 16%);
  --box-shadow: rgba(0, 0, 0, 0.2);

  /* Gradient */
  --cta-button-light-red: hsl(13, 100%, 72%);
  --cta-button-red: hsl(353, 100%, 62%);
  --body-gray-blue: hsl(237, 17%, 21%);
  --body-gray-desaturated-blue: hsl(237, 23%, 32%);

  /* Font size */
  --body-copy-size: 16px;

  /* Fonts */
  --overpass: "Overpass", sans-serif;
  --ubuntu: "Ubuntu", sans-serif;
}

html {
  overflow-x: hidden;
}

body {
  width: 100vw;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  background-color: var(--white-text);
}

/* Intro */

.intro {
  height: 600px;
  width: 100%;
  background: linear-gradient(
    to bottom right,
    var(--cta-button-light-red),
    var(--cta-button-red)
  );
  border-radius: 0 0 0 100px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  position: relative;
}

/* Pattern */

.start-pattern {
  width: 100%;
  height: 100%;
  position: absolute;
  overflow: hidden;
  border-radius: 0 0 0 100px;
}
.start-pattern img {
  position: relative;
  top: -226px;
  left: -320px;
  height: 214%;
}

/* Header */

header {
  padding: 48px 24px 64px;
  height: 160px;
  width: 100%;
  flex-shrink: 0;
}

.header {
  width: 100%;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: relative;
  z-index: 1000;
}

.fixed {
  position: fixed;
  top: 0;
  left: 0;
  padding: 4px 24px;
  background: linear-gradient(
    to right,
    var(--cta-button-light-red),
    var(--cta-button-red)
  );
}

.fixed nav {
  padding: 18px 24px 64px;
  height: 100vh;
  top: 56px;
}

.fixed nav .menu {
  padding: 12px 24px;
}
.fixed nav .menu .btn-container {
  padding: 12px 24px 0;
  margin-top: 16px;
}

.logo {
  height: 48px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.logo img {
  height: 70%;
}

.menu-buttons {
  height: 48px;
  width: 48px;
  background: none;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  overflow: hidden;
}

nav {
  position: absolute;
  z-index: 1000;
  top: 126px;
  left: 0;
  width: 100%;
  padding: 0 24px 64px;
  overflow-x: hidden;
  transition: transform 0.2s ease-in-out;
}

/* Menu */

ul {
  list-style: none;
}
.menu {
  width: 100%;
  font-family: var(--overpass);
  font-weight: 300;

  background-color: var(--white-text);
  border-radius: 6px;
  box-shadow: 0 16px 24px 0 var(--box-shadow);
  padding: 24px;
}
.hidden-menu {
  transform: translateX(100vw);
}
.menu-item {
  width: 100%;
}

/* Menu Link */

.menu-link {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
.menu-link:hover h3 {
  text-decoration: underline;
}
.menu-link h3 {
  padding: 10px;
  margin-bottom: 8px;
  text-align: center;
  color: var(--headings);
  transition: color 0.2s ease-in-out;
}
.little-arrow {
  display: block;
  position: relative;
  top: -7px;
  left: 0;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  border-right: 2px solid var(--cta-hover-bg);
  border-bottom: 2px solid var(--cta-hover-bg);
  transition-property: transform, top;
  transition-duration: 0.2s;
  transition-timing-function: ease-in-out;
}
.menu-link.active h3 {
  color: var(--headings-blue);
}
.menu-link.active .little-arrow {
  top: -5px;
  transform: rotate(-135deg);
}

/* Sub menu*/

.sub-menu {
  background-color: var(--sub-menu);
  width: 100%;
  font-family: var(--overpass);
  font-weight: 600;
  border-radius: 6px;
  padding: 17px 16px 16px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.sub-menu li {
  width: 100%;
  padding: 12px;
  text-align: center;
  font-size: 16px;
  line-height: 16px;
  color: var(--headings-blue);
  cursor: pointer;
  border-radius: 4px;
  transition-property: background-color, color;
  transition-duration: 0.2s;
  transition-timing-function: ease-in-out;
}
.sub-menu li:hover {
  color: var(--headings);
  background-color: var(--white-text);
}

.hidden {
  display: none;
}

/* Menu BTN Container*/

.btn-container {
  margin-top: 24px;
  border-top: 1px solid #dfdfdf;
  padding: 24px 0 0 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.btn-container button {
  width: 138px;
  height: 46px;
  border-radius: 24px;
  background-color: transparent;
  border: none;
  font-size: 18px;
  line-height: 18px;
  color: var(--headings);
  font-family: var(--overpass);
  font-weight: 600;
  margin-bottom: 8px;
  cursor: pointer;
}
.btn-container button:hover {
  text-decoration: underline;
}
.btn-container .cta {
  height: 48px;
  background: linear-gradient(
    to right,
    var(--cta-button-light-red),
    var(--cta-button-red)
  );
  color: var(--white-text);
  font-family: var(--ubuntu);
  font-weight: 500;
  transition: box-shadow 0.2s ease-in-out;
}
.btn-container .cta:hover {
  text-decoration: none;
  box-shadow: 0 6px 10px 0 var(--box-shadow);
}

/* Initial Text*/

.intro h1 {
  width: 90%;
  font-size: 36px;
  font-family: var(--overpass);
  color: var(--white-text);
  text-align: center;
  margin-top: 40px;
  padding: 0 8px;
  font-weight: 600;
  position: relative;
  z-index: 100;
  cursor: default;
}
.intro h2 {
  width: 90%;
  margin: 14px 0 32px;
  font-weight: 300;
  font-family: var(--overpass);
  color: var(--white-text);
  text-align: center;
  padding: 0 24px;
  font-size: 16px;
  letter-spacing: 1px;
  position: relative;
  z-index: 100;
  cursor: default;
}

/* CTA Buttons*/

.cta-buttons {
  padding-top: 8px;
  height: 50%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
  z-index: 100;
}
.cta-buttons button {
  width: 136px;
  height: 48px;
  border: none;
  border-radius: 24px;
  margin: 8px;
  background-color: var(--white-text);
  color: var(--cta-text);
  font-family: var(--ubuntu);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition-property: color, background-color;
  transition-duration: 0.2s;
  transition-timing-function: ease-in-out;
}
.cta-buttons button:hover {
  background-color: var(--cta-hover-bg);
  color: var(--white-text);
}
.cta-buttons .empty {
  background-color: transparent;
  border: 1px solid var(--white-text);
  color: var(--white-text);
  transition-property: color, background-color;
  transition-duration: 0.2s;
  transition-timing-function: ease-in-out;
}
.cta-buttons .empty:hover {
  background-color: var(--white-text);
  color: var(--cta-hover-bg);
}

/* Content 1 */

.content-1 {
  width: 100%;
  padding: 102px 0;
  margin-bottom: 104px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
}
.content-1 h2 {
  font-size: 28px;
  color: var(--headings);
  font-family: var(--overpass);
  font-weight: 600;
  text-align: center;
  margin-bottom: 42px;
}
.content-1 .container {
  width: 100%;
}
.content-1 .img-container {
  margin-bottom: 26px;
  width: 100%;
  display: flex;
  justify-content: center;
  overflow-x: hidden;
}
.content-1 .img-container .mobile {
  display: block;
}
.content-1 .img-container .desktop {
  display: none;
}
.content-1 .text-container {
  font-family: var(--overpass);
  padding: 22px;
  text-align: center;
  max-height: 999999px; /* Fix the issue in Chrome Mobile with desktop view */
}
.content-1 .text-container h3 {
  margin-bottom: 14px;
  font-size: 28px;
  padding: 0 8px;
  color: var(--headings);
}
.content-1 .text-container p {
  margin-bottom: 42px;
  font-size: 16px;
  color: var(--body-copy);
  letter-spacing: 0.6px;
  line-height: 28px;
}

.text-container * {
  width: 100%;
}

/* Content 2 */

.content-2 {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  background: linear-gradient(
    to bottom,
    var(--body-gray-blue),
    var(--body-gray-desaturated-blue)
  );

  border-radius: 0 100px 0 100px;
  position: relative;
  margin-bottom: 60px;
}
.content-2 .pattern {
  width: 100%;
  height: 100%;
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;
  border-radius: 0 100px 0 100px;
  overflow: hidden;
}
.content-2 .pattern img {
  width: 604px;
  position: relative;
  top: -242px;
}
.content-2 .img-container {
  position: absolute;
  top: -186px;
  z-index: 100;
  overflow-x: hidden;
}
.content-2 .img-container,
.content-2 .img-container img {
  width: 100%;
  max-width: 375px;
}
.content-2 .text-container {
  width: 100%;
  padding: 218px 22px 22px;
  font-family: var(--overpass);
  font-size: 16px;
  text-align: center;
  position: relative;
  z-index: 100;
  max-height: 999999px; /* Fix the issue in Chrome Mobile with desktop view */
}
.content-2 .text-container h3 {
  margin-bottom: 16px;
  font-size: 40px;
  padding: 0 8px;
  color: var(--white-text);
}
.content-2 .text-container p {
  margin-bottom: 92px;
  font-size: 16px;
  color: var(--white-text);
  letter-spacing: 0.6px;
  line-height: 28px;
}

/* Content 3 */

.content-3 {
  margin-bottom: 28px;
}
.content-3,
.content-3 .img-container,
.content-3 .text-container {
  width: 100%;
}
.content-3 .img-container {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
  overflow-x: hidden;
}
.content-3 .img-container .mobile {
  display: block;
}
.content-3 .img-container .desktop {
  display: none;
}

.content-3 .text-container {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  font-family: var(--overpass);
  padding: 26px;
  max-height: 999999px; /* Fix the issue in Chrome Mobile with desktop view */
}
.content-3 .text-container h3 {
  margin-bottom: 24px;
  font-size: 28px;
  padding: 0 8px;
  color: var(--headings);
}
.content-3 .text-container p {
  margin-bottom: 40px;
  font-size: 16px;
  color: var(--body-copy);
  letter-spacing: 0.6px;
  line-height: 28px;
}

/* Footer */
footer {
  width: 100%;
  background-color: var(--footer-bg);
  border-radius: 0 100px 0 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  padding: 72px 0 0;
}

.footer-logo {
  margin-bottom: 74px;
}

.footer-menu {
  color: var(--white-text);
  font-family: var(--ubuntu);
  font-weight: 500;
  font-size: 18px;
  text-align: center;
  margin-bottom: 48px;
  width: 80%;
}

.footer-menu .footer-menu-item {
  cursor: default;
}

.footer-sub-menu {
  margin-top: 26px;
}
.footer-sub-menu li {
  padding: 6px;

  color: var(--footer-text);
  font-weight: 400;
  font-size: 18px;
  cursor: pointer;
}
.footer-sub-menu li:hover {
  color: var(--white-text);
}

/* Attribution */

.attribution {
  width: 100%;
  background-color: var(--footer-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px;
}
.attribution p {
  text-align: center;
  color: var(--white-text);
  font-family: var(--ubuntu);
  padding: 6px;
  cursor: default;
}
.attribution p a {
  color: var(--white-text);
  font-family: var(--ubuntu);
  padding: 6px;
  transition: color 0.2s ease-in-out;
}
.attribution p a:hover {
  color: var(--cta-button-red);
}

/* Media Query 960px */

@media screen and (min-width: 961px) {
  /* Intro */

  .intro {
    background: linear-gradient(
      to right,
      var(--cta-button-light-red),
      var(--cta-button-red)
    );
  }
  .start-pattern img {
    top: -210%;
    left: -65%;
    height: 500%;
  }

  header {
    padding: 48px 100px 64px;
  }

  .logo {
    margin-right: 16px;
  }
  .logo img {
    height: 84%;
  }

  nav {
    position: static;
    padding: 0;
    overflow: visible;
    padding-left: 24px;
  }

  /* Menu */

  .menu {
    display: flex;
    justify-content: flex-start;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    background-color: transparent;
    position: relative;
  }
  .menu-buttons {
    display: none;
  }
  .menu .menu-item {
    position: relative;
    width: min-content;
    padding: 0 16px;
  }

  /* BTN Container */

  .btn-container {
    border: none;
    flex-direction: row;
    margin: 0;
    padding: 0;
    position: absolute !important;
    right: 0;
  }
  .btn-container button {
    margin: 0;
    color: var(--white-text);
    font-family: var(--ubuntu);
    font-size: 16px;
  }
  .btn-container .cta {
    background: var(--white-text);
    color: var(--cta-button-red);
    transition-property: background-color, color;
    transition-duration: 0.2s;
    transition-timing-function: ease-in-out;
  }
  .btn-container .cta:hover {
    box-shadow: none;
    background: var(--cta-hover-bg);
    color: var(--white-text);
  }
  .btn-container .empty {
    width: 116px;
  }

  /* Menu Link */

  .menu-link {
    height: 48px;
  }
  .menu-link h3 {
    margin: 0;
    color: var(--white-text);
    font-family: var(--ubuntu);
    font-size: 16px;
    padding: 0 10px 0 0;
  }
  .menu-link .little-arrow {
    border-right: 2px solid var(--white-text);
    border-bottom: 2px solid var(--white-text);
    top: -2px;
  }
  .menu-link.active h3 {
    color: var(--white-text);
    text-decoration: underline;
  }
  .menu-link.active .little-arrow {
    top: 0;
  }

  /* Sub Menu */

  .sub-menu {
    position: absolute;
    left: 0;
    width: 170px;
    background-color: var(--white-text);
    font-family: var(--ubuntu);
    padding: 20px 0;
    box-shadow: 0 16px 24px 0 var(--box-shadow);
  }
  .sub-menu li {
    width: 100%;
    text-align: left;
    color: var(--body-gray-blue);
    font-weight: 400;
    padding-left: 24px;
  }
  .sub-menu li:hover {
    color: var(--body-gray-blue);
    font-weight: 500;
  }

  /* Initial Text*/
  .intro h1 {
    margin-top: 78px;
    font-size: 60px;
  }
  .intro h2 {
    font-size: 18px;
    margin-bottom: 48px;
  }

  /* CTA Buttons*/

  .cta-buttons {
    padding: 0;
  }
  .cta-buttons button {
    margin-top: 0;
  }

  /* Content 1*/
  .content-1 {
    padding: 132px 0;
    margin-bottom: 0;
  }
  .content-1 h2 {
    font-size: 42px;
    margin-bottom: 84px;
  }
  .content-1 .container {
    display: flex;
    flex-direction: row-reverse;
    width: 100%;
  }
  .content-1 .text-container {
    padding: 22px 6px 22px 80px;
    text-align: left;
    width: 50%;
  }
  .content-1 .text-container h3 {
    padding: 0;
    margin-bottom: 24px;
  }
  .content-1 .text-container p {
    margin-bottom: 76px;
  }
  .content-1 .img-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    overflow-x: visible;
    position: relative;
    width: 50%;
  }
  .content-1 .img-container .mobile {
    display: none;
  }
  .content-1 .img-container .desktop {
    display: block;
    height: 160%;
    position: absolute;
    top: -38%;
    left: 86px;
  }

  /* Content 2*/
  .content-2 {
    margin-bottom: 64px;
    background: linear-gradient(
      to right,
      var(--body-gray-blue),
      var(--body-gray-desaturated-blue)
    );
  }
  .content-2 .pattern {
    justify-content: flex-start;
  }
  .content-2 .pattern img {
    width: 1040px;
    left: -15%;
    top: -135%;
  }
  .content-2 .text-container {
    padding: 64px 5% 14px 51%;
    text-align: left;
  }
  .content-2 .text-container h3 {
    padding: 0;
  }
  .content-2 .text-container p {
    padding-right: 2%;
    margin-bottom: 48px;
  }
  .content-2 .img-container {
    left: 0;
    top: -68px;
  }
  .content-2 .img-container,
  .content-2 .img-container img {
    max-width: 500px;
  }

  /* Content 3 */
  .content-3 {
    display: flex;
    margin-bottom: 106px;
  }
  .content-3 .img-container .mobile {
    display: none;
  }
  .content-3 .img-container .desktop {
    display: block;
  }

  .content-3 .text-container {
    width: 50%;
    text-align: left;
    padding: 164px 6% 0 0;
  }
  .content-3 .text-container h3 {
    padding: 0;
  }
  .content-3 .img-container {
    width: 50%;
  }
  .content-3 .img-container img {
    position: relative;
    height: 100%;
    left: -50%;
  }

  /* Footer */

  footer {
    flex-direction: row;
    padding: 74px 6% 0;
    align-items: flex-start;
  }
  .footer-logo {
    margin-right: 10%;
  }
  .footer-menu-item {
    padding: 0 10%;
  }
  .footer-menu {
    text-align: left;
    width: 20%;
    min-width: 140px;
    margin-right: 8%;
  }
  .footer-sub-menu li {
    padding: 6px 10%;
  }

  /* Attribution */
  .attribution {
    flex-direction: row;
  }
}

/* Media Query 1200px */

@media screen and (min-width: 1200px) {
  /* Intro */

  .start-pattern img {
    top: -230%;
    left: -33%;
    height: 540%;
  }

  header {
    padding: 48px 168px 64px;
  }

  /* Initial Text*/

  .intro h1 {
    margin-top: 72px;
    font-size: 64px;
  }

  /* Content 1*/

  .content-1 {
    padding: 162px 0;
  }
  .content-1 .text-container {
    padding: 22px 6px 22px 168px;
  }

  /* Content 2*/

  .content-2 {
    margin-bottom: 118px;
  }
  .content-2 .text-container {
    padding: 110px 9% 14px 51%;
  }
  .content-2 .text-container p {
    margin-bottom: 92px;
  }
  .content-2 .img-container {
    left: 4%;
  }

  .content-2 .img-container,
  .content-2 .img-container img {
    max-width: 554px;
  }

  /* Content 3 */

  .content-3 .text-container {
    padding: 190px 12% 0 0;
  }
  .content-3 .img-container img {
    left: -23%;
  }

  /* Footer */

  footer {
    padding: 74px 12% 0;
  }
  .footer-logo {
    margin-right: 16%;
  }
  .footer-menu {
    margin-right: 14%;
  }
}

/* Media Query 1300px */

@media screen and (min-width: 1300px) {
  /* Content 2*/

  .content-2 .img-container {
    left: 8.5%;
  }
}
