*,
*::before,
*::after {
  box-sizing: border-box;
}

main {
  padding: 0 4%;
  font-family: "Poppins";
}

.blog {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;

  .view-more {
    border: solid 1px #89B6D2;
    transition: all 0.1s;
    padding: 10px 24px;
    background-color: white;
    margin: 50px 0;
    color: #002147;

    &:hover {
      cursor: pointer;
      background-color: #222222;
      color: white;
    }
  }

  .journal-container {
    margin-top: 64px;
    border-radius: 10px;
    width: 100%;
    max-width: 1178px;
    height: 446px;
    background-image: url("../assets/images/blog.png");
    background-position: center;
    background-size: cover;
    display: flex;
    align-items: end;
    margin-bottom: 124px;

    .journal {
      width: 512px;
      margin-left: 48px;
      padding: 36px 36px 0 36px;
      background-color: white;
      font-weight: 300;
      text-align: justify;
      border-top-left-radius: 10px;
      border-top-right-radius: 10px;

      .journal-top {
        display: flex;
        align-items: center;
        gap: 16px;
        padding-bottom: 24px;

        .profile-image {
          width: 46px;
        }

        .top-profile {
          display: flex;
          flex-direction: column;
          gap: 6px;

          .name {
            color: #222222;
            font-weight: bold;
            font-size: 16px;
          }

          .social {
            display: flex;
            align-items: center;
            gap: 8px;
          }
        }
      }

      .journal-title {
        font-size: 20px;
        font-weight: bold;
        color: #222222;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 24px;
      }
    }
  }

  .some-info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 36px;
    color: #222222;
    width: 100%;
    max-width: 1178px;
    margin: 0 auto;
    padding: 0 16px;

    .info-cards {
      display: flex;
      flex-direction: column;

      .info-title {
        font-size: 18px;
        font-weight: 600;
        margin-bottom: 24px;
      }

      .info-image {
        width: 100%;
        height: 214px;
        background-color: #D9D9D9;
        border-radius: 7px;
        margin-bottom: 22px;
      }

      .info-tag {
        display: flex;
        align-items: center;
        gap: 14px;
        color: #777777;
        margin-bottom: 16px;

        .publisher {
          display: flex;
          align-items: center;
          gap: 8px;
          font-size: 14px;

          img {
            width: 16px;
          }
        }

        .publish-date {
          display: flex;
          align-items: center;
          gap: 8px;
          font-size: 14px;

          img {
            width: 12px;
          }
        }

        .separation {
          width: 1px;
          height: 14px;
          background-color: #777777;
        }
      }

      .info-description {
        font-size: 14px;
        font-weight: 300;
      }
    }
  }
}

footer {
  .footer-top {
    background-color: #0a2240;
    color: #fff;
    padding: 60px 0;
    text-align: center;

    .logo {
      margin-bottom: 30px;

      img {
        height: 60px;
        filter: brightness(0) invert(1);
      }
    }

    .footer-tagline {
      max-width: 700px;
      margin: 0 auto 30px;
      line-height: 1.8;
    }

    .newsletter {
      display: flex;
      max-width: 500px;
      margin: 0 auto;

      input {
        flex: 1;
        padding: 12px 15px;
        border: none;
        font-family: Arial, Helvetica, sans-serif;
      }

      button {
        background-color: #c6a052;
        color: #fff;
        padding: 12px 25px;
        font-weight: bold;

        &:hover {
          background-color: #b08a40;
        }
      }
    }
  }

  .footer-bottom {
    background-color: #081c35;
    color: #fff;
    padding: 20px 0;
    font-size: 14px;

    .container {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .social-links {
      a {
        color: #fff;
        margin-right: 15px;

        &:hover {
          color: #c6a052;
        }
      }
    }

    .contact-info {
      span {
        margin-right: 20px;
      }
    }

    .language-footer {
      a {
        color: #fff;
        margin-right: 15px;

        &:hover {
          color: #c6a052;
        }
      }
    }

    .copyright {
      opacity: 0.7;
    }
  }
}

/* Tablet styles */
@media (max-width: 1024px) {
  .blog {
    .journal-container {
      height: auto;
      min-height: 400px;
      margin-bottom: 80px;

      .journal {
        width: 90%;
        max-width: 500px;
        margin-left: 5%;
      }
    }

    .some-info-cards {
      grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
      gap: 24px;
    }
  }
}

/* Mobile styles */
@media (max-width: 768px) {
  main {
    padding: 0 2%;
  }

  .blog {
    .journal-container {
      margin-top: 32px;
      height: auto;
      min-height: 300px;
      margin-bottom: 60px;
      background-position: center top;

      .journal {
        width: 95%;
        margin-left: 2.5%;
        padding: 24px 24px 0 24px;

        .journal-top {
          gap: 12px;
          padding-bottom: 16px;

          .profile-image {
            width: 36px;
          }

          .top-profile {
            .name {
              font-size: 14px;
            }
          }
        }

        .journal-title {
          font-size: 18px;
          padding-bottom: 16px;
        }

        .journal-text {
          font-size: 13px;
          line-height: 1.5;
        }
      }
    }

    .some-info-cards {
      grid-template-columns: 1fr;
      gap: 32px;
      padding: 0 8px;

      .info-cards {
        .info-title {
          font-size: 16px;
          margin-bottom: 16px;
        }

        .info-image {
          height: 180px;
          margin-bottom: 16px;
        }

        .info-tag {
          gap: 10px;
          margin-bottom: 12px;

          .publisher, .publish-date {
            font-size: 12px;

            img {
              width: 14px;
            }
          }
        }

        .info-description {
          font-size: 13px;
          line-height: 1.5;
        }
      }
    }

    .view-more {
      padding: 12px 20px;
      margin: 40px 0;
      font-size: 14px;
    }
  }
}

/* Small mobile styles */
@media (max-width: 480px) {
  .blog {
    .journal-container {
      margin-top: 24px;
      margin-bottom: 40px;

      .journal {
        width: 98%;
        margin-left: 1%;
        padding: 20px 20px 0 20px;

        .journal-title {
          font-size: 16px;
          flex-direction: column;
          align-items: flex-start;
          gap: 12px;
        }
      }
    }

    .some-info-cards {
      padding: 0 4px;

      .info-cards {
        .info-image {
          height: 160px;
        }
      }
    }
  }
}

/* Footer responsive adjustments */
@media (max-width: 768px) {
  footer {
    .footer-top {
      padding: 40px 20px;

      .newsletter {
        flex-direction: column;
        gap: 10px;

        input, button {
          width: 100%;
        }
      }
    }

    .footer-bottom {
      padding: 15px 20px;

      .container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
      }

      .contact-info span {
        display: block;
        margin: 5px 0;
      }
    }
  }
}