/* --------------------------------------------------
   RESET & BASE
-------------------------------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

main {
  margin-top: 80px;
}

.sub-fv {
  width: 100%;
  height: 350px;
  background: url('../images/source_image/news-fv-img.jpeg');
  background-size: cover;
  background-position: center;
  position: relative;
}

.page-title {
  position: absolute;
  left: 0;
  bottom: 20px;
  width: 350px;
  height: 80px;
  background-color: #6CD3FF;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 40px;
  font-weight: 800;
  color: #00425D;
  font-family: "DM Sans Bold";
}


.news {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 100px;
  margin: 0 auto;
  background-color: #ffffff;
}

.news-title {
  padding-left: 200px;
}

.news-list {
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  gap: 35px;
  margin: 0 auto;
  padding-block: 50px;
}

.news-item {
  display: flex;
  align-items: center;
  gap: 50px;
}

.banner {
  width: 350px;
  height: 220px;
  position: relative;
}

.banner>img {
  width: inherit;
  height: inherit;
  object-fit: cover;
}

.banner img:nth-child(2) {
  position: absolute;
  width: 90px;
  height: 75px;
  top: 0;
  right: 0;
}

.news-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 25px;
}

.posted-date {
  display: flex;
  gap: 20px;
  align-items: center;
}

.posted-date p {
  font-size: 24px;
  font-family: 'Zen Maru Gothic', sans-serif;
  font-weight: 800;
  color: #D28F13;
}

.posted-date span {
  width: fit-content;
  padding-inline: 15px;
  padding-block: 5px;
  font-size: 16px;
  font-weight: 900;
  color: #ffffff;
  text-align: center;
  background-color: #D28F13;
}

.news-content p {
  font-size: 20px;
  line-height: 1.5;
}

.banner {
  width: 350px;
  height: 220px;
  position: relative;
}

.banner>img {
  width: inherit;
  height: inherit;
  object-fit: cover;
}

.banner img:nth-child(2) {
  position: absolute;
  width: 90px;
  height: 75px;
  top: 0;
  right: 0;
}

@media(max-width:975px) {
  .news-list {
    padding-inline: 50px;
  }

  .news-title {
    padding-left: 50px;
  }

  .news-item {
    gap: 20px;
  }

  .footer-container {
    padding-inline: 0;
  }
}

@media(max-width:725px) {
  .news-content p {
    font-size: 12px;
  }

  .news-content {
    gap: unset;
    justify-content: space-between;
  }

  .news {
    padding-bottom: 0px;
  }

  .banner {
    width: 200px;
    height: 150px;
  }
}

@media(max-width:640px) {
  .news-list {
    padding-inline: 20px;
  }

  .news-item {
    gap: 10px;
  }

  .banner {
    width: 150px;
    height: 150px;
  }

  .posted-date span {
    padding-inline: 10px;
  }
}

@media(max-width:440px) {

  header,
  .news-list {
    padding-inline: 10px;
  }

  .news {
    padding-block: 20px;
  }
}

/* ------ Clickable News Item Styling ------ */
.news-item {
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.35s ease, opacity 0.35s ease;
  transform: translateY(0);
  border-radius: 12px;
  cursor: pointer;
}

.news-item .banner > img:first-child {
  transition: transform 0.45s ease, filter 0.35s ease;
}

.news-item:hover {
  transform: translateY(-4px) translateX(8px);
  opacity: 1;
  box-shadow: 0 12px 28px rgba(0, 66, 93, 0.16);
}

.news-item:hover .banner > img:first-child {
  filter: brightness(1.03) saturate(1.05);
  transform: scale(1.03);
}

.news-item:focus-visible {
  outline: 3px solid #6CD3FF;
  outline-offset: 4px;
}

.news-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
}

.news-modal.open {
  display: flex;
}

.news-modal-content {
  position: relative;
  background: #fff;
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  border-radius: 12px;
  animation: fadeIn 0.3s ease;
}

.news-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: #00425D;
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.news-modal-banner {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 20px;
}

.news-modal-date {
  font-size: 14px;
  color: #666;
  margin-bottom: 8px;
}

.news-modal-title {
  font-size: 28px;
  color: #00425D;
  margin-bottom: 16px;
  line-height: 1.4;
}

.news-modal-body {
  font-size: 16px;
  line-height: 1.8;
  color: #333;
}

.news-modal-body p {
  margin-bottom: 16px;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}