/* ---------- CSS RESET ---------- */

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- CUSTOM VARIABLES ---------- */

:root {
  /* ----- COLORS ----- */

  /* PRIMARY */
  --soft-orange: hsl(35, 77%, 62%);
  --soft-red: hsl(5, 85%, 63%);

  /* NEUTRAL */
  --off-white: hsl(36, 100%, 99%);
  --grayish-blue: hsl(233, 8%, 79%);
  --dark-grayish-blue: hsl(236, 13%, 42%);
  --very-dark-blue: hsl(240, 100%, 5%);

  /* ----- TYPOGRAPHY ----- */

  /* FONT FAMILY */
  --ff: "Inter", sans-serif;

  /* FONT SIZE */
  --fs: 15px;

  /* FONT WEIGHT */
  --fw-regular: 400;
  --fw-bold: 700;
  --fw-extra-bold: 800;
}

/* ---------- GENERAL STYLING ---------- */

body {
  color: var(--dark-grayish-blue);
  background-color: var(--off-white);

  font-family: var(--ff);
  font-size: var(--fs);
  line-height: 1.7;

  max-width: 1200px;
  margin: 0 auto;
}

a {
  color: var(--dark-grayish-blue);
  text-decoration: none;
}

h1 {
  color: var(--very-dark-blue);

  font-size: 2.5rem;
  font-weight: var(--fw-extra-bold);
  line-height: 1.3;

  margin: 0.5rem 0;
}

h2 {
  color: var(--soft-orange);

  font-size: 1.75rem;
  font-weight: var(--fw-bold);
  line-height: 1.3;

  margin: 0.5rem 0;
  margin-bottom: 1.75rem;
}

h3 {
  color: var(--off-white);

  font-size: 1.25rem;
  font-weight: var(--fw-extra-bold);
  line-height: 1.3;

  margin-bottom: 0.35rem;
}

h3 a {
  color: var(--off-white);
}

h3 a:hover {
  color: var(--soft-orange);
}

h4 {
  color: var(--very-dark-blue);

  font-size: 1.15rem;
  font-weight: var(--fw-extra-bold);
  line-height: 1.3;

  margin-bottom: 0.35rem;
}

h4 a {
  color: var(--very-dark-blue);
}

h4 a:hover {
  color: var(--soft-red);
}

hr {
  margin: 1.75rem 0;
}

.hidden {
  display: none;
}

/* ---------- NAVIGATION BAR ---------- */

nav {
  display: flex;
  justify-content: space-between;

  margin: 2rem 1rem 0;
}

ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
}

/* li {
  display: inline;
} */

.website-logo {
  height: 30px;
  width: auto;
}

.website-logo,
.mobile-menu-icon,
.close-mobile-menu-icon {
  color: var(--very-dark-blue);
}

.desktop-nav {
  display: none;
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  color: var(--soft-red);
}

/* ----- MOBILE NAVIGATION ----- */

.mobile-nav {
  position: absolute;
  top: 0;
  right: 0;
  width: 75%;
  height: 100vh;

  background-color: var(--off-white);
  padding: 9rem 2rem;
  box-shadow: 0 3rem 5rem rgba(0, 0, 0, 0.3);
  z-index: 10;

  font-size: 1.25rem;
  line-height: 2.5;
}

.mobile-nav a {
  color: var(--very-dark-blue);
}

.close-mobile-menu-icon {
  position: absolute;
  top: 0;
  right: 0;

  margin: 2rem 1rem 0;
  z-index: 11;
}

/* ---------- MAIN SECTION ---------- */

main {
  margin: 2rem 1rem 0;
}

.read-more-btn {
  display: block;

  color: var(--off-white);
  background-color: var(--soft-red);

  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: 3px;

  border: none;

  margin: 1.5rem 0;
  padding: 0.8rem 2rem;

  cursor: pointer;
}

.read-more-btn:hover {
  background-color: var(--very-dark-blue);
}

.mobile-header-image {
  display: block;
}

.desktop-header-image {
  display: none;
}

/* ---------- 'NEW' SECTION ---------- */

.section-new {
  color: var(--grayish-blue);
  background-color: var(--very-dark-blue);

  margin: 4rem 0;
  padding: 1.25rem;
}

/* ---------- 'OTHERS' SECTION ---------- */

.news-block {
  display: flex;
  gap: 1.25rem;

  margin-bottom: 2.5rem;
}

.news-img {
  width: 100px;
}

.news-number {
  color: var(--grayish-blue);
  margin: 0;
  margin-bottom: 0.35rem;
}

/* ---------- ATTRIBUTION ---------- */

.attribution {
  text-align: center;
}

.attribution a {
  color: var(--soft-red);
}

.attribution a:hover {
  color: var(--very-dark-blue);
}

/* ---------- MEDIA QUERIES ---------- */

@media (min-width: 768px) {
  /* ---------- NAVIGATION BAR ---------- */

  nav {
    display: flex;
    justify-content: space-between;

    margin: 3rem 2rem 0;
  }

  ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
  }

  li {
    display: inline;
    margin-right: 1.75rem;
  }

  li:last-child {
    margin-right: 0;
  }

  .mobile-nav,
  .mobile-menu-icon {
    display: none;
  }

  .desktop-nav {
    display: block;
  }

  /* ---------- MAIN SECTION ---------- */

  main {
    margin: 3rem 2rem 0;
  }

  .mobile-header-image {
    display: none;
  }

  .desktop-header-image {
    display: block;
  }
}

@media screen and (min-width: 1024px) {
  /* ---------- GENERAL STYLING ---------- */

  body {
    font-size: 1rem;
  }

  h1 {
    color: var(--very-dark-blue);

    font-size: 3rem;
    font-weight: var(--fw-extra-bold);
    line-height: 1.15;

    margin: 0;
  }

  /* ---------- MAIN SECTION ---------- */

  .desktop-header {
    display: flex;
    gap: 2rem;
  }

  .hero-content {
    display: flex;
    gap: 2rem;

    margin-top: 2rem;
  }

  .text-and-button {
    padding-left: 2rem;
  }

  .read-more-btn {
    margin-top: 2.5rem;
    margin-bottom: 0;
  }

  /* ---------- 'NEW' SECTION ---------- */

  .section-new {
    width: 70%;
    margin: 0;
  }

  /* ---------- 'OTHERS' SECTION ---------- */
  .section-others {
    display: flex;
    gap: 2rem;
    margin-top: 4rem;
  }

  .news-block {
    flex: 1 1 0;
  }
}
