@import url("https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap");

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

h3 {
  text-wrap: pretty;
  font-size: 1.2rem;
}

body {
  font-family: "Montserrat", sans-serif;
  display: grid;
  max-width: 1200px;
  margin: 0 auto;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-areas:
    "header header header"
    "main main aside";
  container-type: inline-size;
  container-name: body;
}

img {
  max-width: 100%;
  height: 100%;
  object-fit: cover;
}

svg {
  width: 16px;
  height: 16px;
}

/* Header */

header {
  grid-area: header;
  display: grid;
  justify-content: start;
  gap: 15px;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 50px 70px 50px;
  grid-template-areas:
    "search search search"
    "logo logo logo"
    "nav nav nav";
  border-bottom: 4px double #333;
}

main {
  grid-area: main;
  border-right: 1px solid #979797;
  margin-top: 1rem;
  padding-right: 1rem;
}

article {
  display: grid;
  /* gap: 20px; */
  grid-template-columns: 35% 65%;
  border-bottom: 1px solid #333;
  padding-top: 1rem;
  padding-bottom: 2.5rem;
}

main article:last-child {
  border-bottom: none;
}

article img {
  padding-left: 2rem;
}

.buttons {
  grid-area: search;
}

.lang-nav {
  padding-right: 70px;
}

.lang-nav > ul > *:hover {
  cursor: pointer;
  border: 1px solid #333;
  border-radius: 10px;
}

.login-buttons > * {
  transition: all 0.3s;
}

.login-buttons > *:hover {
  cursor: pointer;
  background-color: #333;
}

.mobile-header {
  display: none;
}

.main-header {
  grid-area: logo;
}

.main-nav {
  grid-area: nav;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-bottom: 0.2rem;
}

.main-nav nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.4rem;
}

.main-nav nav ul li:hover {
  cursor: pointer;
  border-bottom: 1px solid #333;
}

.main-nav .vertical-line {
  border-left: 1px solid #dfdfdf;
  height: 16px;
  margin: 0px 10px 0px;
}

header .buttons {
  justify-content: space-between;
  align-items: center;
  min-height: 24px;
  margin-top: 3px;
  position: relative;
}

header nav ul {
  display: block;
  list-style: none;
  letter-spacing: 1.4px;
  text-align: center;
  padding-top: 4px;
}

.lang-nav ul li {
  font-size: 0.7rem;
}

header nav ul li {
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
}

header nav ul li a {
  text-decoration: none;
  color: #333;
  padding: 7px 8px 6px;
}

.search-section {
  position: absolute;
  top: 4px;
  left: 0;
}

.search-section a {
  padding: 8px 9px 9px;
  margin-left: -8px;
}

.login-buttons {
  position: absolute;
  top: 4px;
  right: 0;
  display: flex;
  gap: 16px;
}

.login-buttons button {
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.05rem;
  padding: 8px 12px;
  font-weight: 600;
  border: none;
  border-radius: 4px;
  background-color: rgb(86, 123, 149);
  color: #fff;
  cursor: pointer;
}

.main-header {
  display: grid;
  grid-template-areas: "today logo stock";
  grid-template-columns: 20% 60% 20%;
  justify-items: stretch;
  justify-content: space-between;
  align-items: center;
  /* padding-block: 26px; */
  /* width: clamp(6rem, 80vw, 1200px); */
  /* margin: 0 auto; */
}

.main-p-section {
  grid-area: today;
}

.main-header p {
  font-size: 0.875rem;
  color: #333;
}

.stock {
  width: 100%;
  text-align: end;
  grid-area: stock;
}

.logo {
  display: block;
  margin: 0 auto;
  padding-right: 5rem;
  grid-area: logo;
}

.logo svg {
  width: 500px;
  height: 65px;
}

.stock span {
  font-size: 0.875rem;
  color: #ee0000;
}

.fa-chevron-down {
  font-size: 0.7rem;
  color: #979797;
}

/* Main */

.news-text section + section {
  border-top: 1px solid #dfdfdf;
  margin-top: 1rem;
  padding-top: 1rem;
}

.news-text h3 {
  font-size: 1rem;
  color: #333;
}

.news-text p {
  padding-top: 0.5rem;
  font-size: 0.9rem;
}

.news-text address {
  font-size: 0.8rem;
  color: #333;
  margin-top: 0.3rem;
}

.news-image figcaption {
  font-size: 0.63rem;
  color: #333;
  text-align: end;
}

.links-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  margin-block: 0.5rem;
  width: 92%;
}

.links-between a {
  font-size: 0.74rem;
  font-weight: 600;
  color: #333;
  text-decoration: none;
}

.links-between a + a {
  font-weight: unset;
}

.links-between.sections {
  display: grid;
  align-items: start;
  width: 100%;
  margin-top: 1.2rem;
  grid-template-columns: 1fr 1fr;
  /* grid-template-rows: 0.7fr 1fr; */
  gap: 0.8rem;
  grid-template-areas:
    "one two"
    "three three";
}

.links-between.sections > section:nth-child(2) {
  border-left: 1.2px solid #dfdfdf;
  padding-inline: 1.2rem;
}

.links-between.sections > section:last-child {
  grid-area: three;
  display: flex;
  align-items: start;
  border-block: 1.2px solid #979797;
  padding-block: 1.2rem;
}

.links-between.sections > section:last-child img {
  height: 91px;
  margin-right: 0.5rem;
}

.links-between.sections > section h3 {
  font-size: 0.8rem;
  padding-block: 0.2rem;
  color: #333;
}

.links-between.sections > section address {
  all: unset;
  font-size: 0.75rem;
  color: #333;
}

.links-between.sections > section:last-child h3 {
  font-size: 0.9rem;
  padding-block: 0.2rem;
  color: #333;
}

.links-between.sections > section:last-child p {
  font-size: 0.8rem;
  color: #333;
}

.links-between.sections > section:last-child address {
  font-size: 0.7rem;
  color: #333;
}

/* Aside */

aside {
  grid-area: aside;
  display: grid;
  gap: 0.5rem;
  padding: 1rem;
  height: fit-content;
  container-type: inline-size;
  container-name: aside;
}

aside article:last-child {
  border-bottom: none;
}

.small-two-news {
  display: grid;
  gap: 0rem;
  grid-template-columns: 50% 50%;
  padding-bottom: 4rem;
  position: relative;
}

.small-two-news :is(img, h3) {
  width: calc(100% - 0.3rem);
  font-size: 0.8rem;
}

.small-two-news address {
  font-size: 0.7rem;
  color: #333;
  margin-top: 0.3rem;
}

.next-buttons {
  position: absolute;
  bottom: 15px;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.2rem;
}

.next-buttons button {
  all: unset;
  display: block;
  height: 26px;
  width: 26px;
  cursor: pointer;
}

.next-buttons svg {
  transition: fill 0.2s;
}

.next-buttons button:disabled {
  cursor: auto;
}

.next-buttons button:hover:not(:disabled) svg {
  fill: #dfdfdf;
}

.next-buttons svg {
  width: 26px;
  height: 26px;
  fill: var(--color-background-primary, #ffffff);
}

.next-buttons button:nth-of-type(1) {
  transform: rotate(180deg);
}

.next-buttons svg path {
  stroke: var(--color-stroke-primary, #121212);
}

.next-buttons button:disabled path {
  stroke: #dfdfdf;
}

.opinions {
  all: unset;
  padding-top: 0;
}

.opinions h3 {
  font-size: 1rem;
  color: #333;
}

.opinion {
  display: grid;
  gap: 0rem;
  justify-items: stretch;
  align-items: center;
  grid-template-columns: 80% 20%;
  padding-block: 1rem;
  border-bottom: 1px solid #dfdfdf;
}

.opinion .opinion-text > *:not(h4) {
  text-transform: uppercase;
}

.opinion-image {
  width: fit-content;
  height: fit-content;
  margin-left: auto;
}

.opinion img[big] {
  width: 152px;
  height: 152px;
}

.opinion img[mid] {
  width: 91px;
  height: 91px;
}

.opinion:has(img[big]) {
  grid-template-columns: 50% 50%;
  align-items: start;
}
.opinion:has(img[mid]) {
  grid-template-columns: 70% 30%;
  align-items: start;
}

.opinion:has(section:only-child) {
  grid-template-columns: 1fr;
}

.opinion img {
  height: 40px;
  margin-left: auto;
}

/* .opinions h3 {
  font-size: 0.9rem;
  color: #333;
} */

.opinion figcaption {
  font-size: 0.8rem;
  color: #333;
}

.opinion address {
  font-size: 0.8rem;
  color: #333;
  margin-top: 0.3rem;
}

.opinion-text h4 {
  padding-block: 0.2rem;
}

.play-button {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.play-button svg {
  width: 26px;
  height: 26px;
  fill: var(--color-background-primary, #ffffff);
}

.play-button svg path {
  fill: var(--color-stroke-primary, #121212);
}

.opinion + .small-two-news figcaption {
  font-size: 0.8rem;
  letter-spacing: 0.1rem;
  text-transform: uppercase;
  text-align: start;
  margin-bottom: 0.2rem;
}

@media (max-width: 1350px) {
  body {
    width: 90%;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "header header"
      "main main"
      "aside aside";
  }

  header {
    grid-template-rows: 50px 130px 80px;
  }

  .mobile-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-column: 1 / -1;
    justify-items: stretch;
    margin-bottom: 2rem;
  }

  .mobile-header a {
    padding: 1rem;
  }

  .mobile-header i {
    color: black;
  }

  .mobile-header a:last-child {
    text-align: end;
  }

  main article img {
    width: 100%;
  }

  header {
    width: 100%;
  }

  main {
    border-right: none;
  }

  .buttons {
    display: none;
  }

  aside article:not(article[class]) .news-image {
    padding-right: 1rem;
  }
}

@media (max-width: 1200px) {
  header {
    grid-template-rows: 80px 130px 80px;
  }
  .main-header {
    padding-bottom: 2rem;
    grid-template-columns: 100%;
    grid-template-areas:
      "logo logo logo"
      "today today today";
  }

  .logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-right: 0;
    width: 80%;
    margin-top: 1.1rem;
  }

  .logo a {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .logo svg {
    width: 100%;

    height: 50px;
  }

  .main-p-section {
    width: 100%;
    text-align: center;
    padding-block: 1rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
  }

  .stock {
    display: none;
  }

  aside article img {
    padding-left: 0;
  }
}

@media (max-width: 840px) {
  header {
    grid-template-rows: 30px 100px;
  }

  main article {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  main article img {
    padding-left: 0;
    width: 100%;
  }

  .main-nav {
    display: none;
  }

  .main-nav ul {
    padding-bottom: 2rem;
  }
}

@media (max-width: 400px) {
  header {
    grid-template-rows: 30px 100px 150px;
  }

  .main-nav ul {
    padding-bottom: 3.5rem;
    row-gap: 1rem;
  }
}

@container aside (max-width: 400px) {
  aside article {
    display: grid;
    gap: 1rem;
    padding-bottom: 0.3rem;
    grid-template-columns: 1fr;
  }

  aside article img {
    padding-left: 0;
    height: fit-content;
  }

  aside article .news-text {
    height: fit-content;
  }
}
/* Footer */
.footer {
    background-color: #f7f7f7;
    padding: 40px 20px 20px;
    border-top: 1px solid #e2e2e2;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h5 {
    font-size: 14px;
    text-transform: uppercase;
    margin-bottom: 15px;
    color: #333;
}

.footer-section a {
    display: block;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 10px;
}

.footer-section a:hover {
    text-decoration: underline;
}

.footer-bottom {
    max-width: 1200px;
    margin: 30px auto 0;
    padding-top: 20px;
    border-top: 1px solid #e2e2e2;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-bottom a {
    color: #666;
    text-decoration: none;
    font-size: 12px;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

