body {
  margin: 0px;
  min-width: 360px;
}

a {
  text-decoration: none;
}

a.grid-item-link {
  text-decoration: none;
  color: inherit;
}

a.grid-item-link:hover,
a.grid-item-link:visited,
a.grid-item-link:active {
  text-decoration: none;
  color: inherit;
}

* {
  font-family: Pretendard !important;
  box-sizing: border-box;
}

header {
  position: fixed;
  top: 0;
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #e7e7e7;
  z-index: 1000;
}

.header-wrap {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 40px;
  height: 58px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  font-size: 36px;
  font-weight: bold;
  color: #212121;
  text-decoration: none;
}

.search {
  position: relative;
  width: 180px;
  /* 검색창 전체 너비 */
}

.search-box {
  width: 100%;
  position: relative;
}

.search input {
  width: 100%;
  padding: 10px 15px 10px 40px;
  /* 왼쪽 패딩을 늘려 아이콘 공간 확보 */
  border: 1px solid #ddd;
  border-radius: 20px;
  font-size: 14px;
  background-color: #F1F3F5;
  outline: none;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 15px;
  /* 왼쪽에서 15px 떨어진 위치 */
  transform: translateY(-50%);
  width: 20px;
  /* 아이콘 크기 */
  height: 20px;
  cursor: pointer;
}


/* Main Content 스타일 */
main {
  max-width: 1440px;
  min-width: 360px;
  margin-top: 58px;
  padding: 20px 120px;
  margin-left: auto;
  margin-right: auto;
}

.section1 {
  display: flex;
  justify-content: center;
  margin-bottom: 80px;
}

.content-wrap {
  max-width: 1440px;
  margin-bottom: 80px;
}

.category {
  margin-bottom: 52px;
}

.category ul {
  padding-inline-start: initial;
  display: flex;
  list-style: none;

  width: 100%;
  flex-wrap: wrap;
  gap: 8px;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  white-space: nowrap;
  margin-bottom: 20px;
}

.category ul li a {
  background-color: #F2F3F7;
  border-radius: 12px;
  display: block;
  padding: 14px 24px !important;
  font-size: 18px;
  font-weight: 400;
  line-height: 14px;
  letter-spacing: -0.035px;
  border-radius: 24px;
  width: fit-content;
  color: #868E96 !important;
}

.category a {
  color: #212121;
  text-decoration: none;
}

.category .active a {
  font-weight: bold;
  color: #fff !important;
  border-radius: 1000px;
  background-color: #343A40;
}


.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-auto-rows: auto;
  gap: 24px;
}

.grid-item.fade-in {
  display: block; 
  opacity: 1;
}

.image-box {
  width: 100%;
  height: 228px;
  position: relative;
  background: #f8f8f8;
  border-radius: 12px;
}

.image-box img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 12px;
}

/* <a> 태그 초기 상태 */
.grid-container a {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* <a> 태그가 보일 때 */
.grid-container a.fade-in {
  display: block;
  opacity: 1;
}

.clip {
  width: fit-content;
  border-radius: 12px;
  background: #F2F3F7;
  border-radius: 1000px;
  padding: 5px 10px;
  color: #868E96;
  font-style: normal;
  font-weight: 400;
  line-height: 14px;
  letter-spacing: -0.035px;
  font-size: 14px;
}

.text-content {
  padding: 20px 5px 0 5px;
}

.text-content h3 {
  color: #343A40;
  font-size: 20px;
  font-weight: 600;
  line-height: 30px;
  margin: 0;
  margin-top: 20px;
}

.text-content p {
  color: #8D96A1;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 21px;
}

.time {
  color: #868E96;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 14px;
  letter-spacing: -0.035px;
}

/* Footer 스타일 */
footer {
  padding: 60px 100px 80px 100px;
  border-top: 1px solid #E9ECEF;
  background: #F8F9FA;
}

.footer-wrap {
  max-width: 1440px;
}

.footer-title {
  color: #000;
  font-size: 15px;
  font-style: normal;
  font-weight: 600;
  line-height: 24px;
  /* 160% */
  letter-spacing: -0.075px;
}

.footer-text {
  color: #868E96;
  font-size: 13px;
  font-style: normal;
  font-weight: 400;
  line-height: 20.8px;
  /* 160% */
  letter-spacing: -0.05px;
}

img.background-image{
  border-radius: 16px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
  main {
    max-width: 1440px;
    min-width: 360px;
    margin-top: 58px;
    padding: 40px 20px;
  }

  .section1 {
    margin-bottom: 28px;
  }

  .image-wrapper img {
    width: 100%;
  }

  .header-wrap {
    padding: 0 15px;
  }

  .content-wrap {
    padding: 0px 0px 40px;
  }

  .category {
    margin-bottom: 40px;
  }

  .category ul {
    margin-block-start: 0;
    margin-block-end: 0;
  }

  .grid-container {
    grid-template-columns: repeat(2, 1fr);
    padding-bottom: 110px;
  }

  footer {
    padding: 40px 20px 80px;
  }
}

@media (max-width: 480px) {
  .grid-container {
    grid-template-columns: 1fr;
  }
}