@import './index.css' layer(index);

.cta {
  background-color: var(--accent-color);

  &:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    background-color: white;
  }
}

header {
  min-height: auto;
  position: relative;
  background-image: url(./images/baniere9.jpeg);

  video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .text {
    text-transform: uppercase;
    padding-block: 4rem;
    font-size: 6rem;
    font-weight: 400;
    position: relative;
    display: none;
  }
}

.magazines {
  line-height: 2;
  .featured__mag {
    display: flex;
    justify-content: center;
    gap: 4rem;

    .img {
      flex: 1 1 50%;
      display: flex;
      flex-direction: column;
      align-items: start;
      gap: 1.4rem;

      img {
        object-fit: contain;
      }

      div {
        align-self: stretch;
        display: flex;
        justify-content: center;
        align-items: center;
      }
    }

    .text {
      flex: 1 1 50%;
      color: black;

      .mag__title {
        text-align: center;
        margin-block: 2rem;
        text-transform: uppercase;

        span {
          font-weight: bolder;
        }
      }

      .description {
        text-align: justify;

        p {
          margin-block: 1rem;
        }
      }
    }
  }

  .all__mags {
    margin-block: 6rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-content: center;
    column-gap: 4rem;
    row-gap: 4rem;

    .mag {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 1rem;

      .img {
        img {
          vertical-align: middle;
          object-position: 50% 50%;
          height: 800px;

          @media screen and (max-width: 768px) {
            & {
              height: auto;
            }
          }
        }
      }
    }
  }
}

@media screen and (max-width: 1024px) {
  .magazines {
    .featured__mag {
      align-items: center;
      .img {
        align-items: center;

        .btn {
          transform: translateX(0);
        }
      }
    }
  }
}

@media screen and (max-width: 768px) {
  .magazines {
    .featured__mag {
      flex-direction: column;
      .img {
        align-items: center;
        .btn {
          transform: translate(0);
        }
      }
    }
  }
}

@media screen and (max-width: 425px) {
  .magazines {
    .all__mags {
      margin-block: 6rem;
      grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
      row-gap: 4rem;
      .mag {
        .img {
          img {
            vertical-align: middle;
            object-position: 50% 50%;
            height: auto;
          }
        }
      }
    }
  }
}
