/* 기본 스타일 */
.slider-container {
  cursor: pointer;
  position: relative;
  display: flex;
  width: 75%; /* 전체 폭 대비 크기 축소 */
  margin: 20px auto;
  margin-top: 20px; /* 상단 여백 추가 */
  max-width: 1300px; /* 최대 너비 축소 */
  overflow: hidden;
  border-radius: 6px;
  max-height: 1000px; /* 기본 높이 축소 */
  height: 50%; /* 높이를 부모에 맞춤 */
}
.slider-parents {
  cursor: pointer;
  position: relative;
  display: flex;
  width: 100%; /* 전체 폭 대비 크기 축소 */
  margin: 20px auto;
  margin-top: 60px; /* 상단 여백 추가 */

  overflow: hidden;
  border-radius: 6px;
  max-height: 1000px; /* 기본 높이 축소 */
  height: 50%; /* 높이를 부모에 맞춤 */
}
.slider {
  display: flex;
  align-items: center;
  transition: transform 0.3s ease-in-out;
  width: 100%;
}

.slide {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2열 */
  grid-template-rows: repeat(2, 1fr); /* 2행 */
  gap: 8px; /* 간격 축소 */
  width: 100%;
  flex-shrink: 0;

  box-sizing: border-box;
}

.card {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  /* padding: 5px; 패딩 축소 */
  background: #f4f4f4;
  /* padding-right: 200px; 오른쪽 여백 추가 */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* 그림자 축소 */
  text-align: left;
  gap: 10px; /* 이미지와 텍스트 간격 축소 */
}

.card .image-container {
  flex-shrink: 0;
  width: 40%; /* 이미지 영역 비율 축소 */
  height: 80%;
  aspect-ratio: 4 / 3; /* 4:3 비율로 축소 */
  background: #eaeaea;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  border-radius: 4px;
}

.card .image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card .text-container {
  flex-grow: 1;
}

.card .text-container h3 {
  font-size: 10px; /* 텍스트 크기 축소 */
  margin-bottom: 6px;
}

.card .text-container p {
  font-size: 8px;
  color: #555;
}

/* 버튼 스타일 */
.slider-btn {
  position: absolute;
  /* top: 50%; */
  transform: translateY(600%);
  background: rgba(0, 0, 0, 0.4); /* 버튼 색상 약간 투명 */
  color: white;
  border: none;
  padding: 8px; /* 버튼 크기 축소 */
  cursor: pointer;
  z-index: 1000;
  border-radius: 50%;
}

.slider-btn.prev {
  left: 8px;
}

.slider-btn.next {
  right: 8px;
}

.slider-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

/* 기본 스타일 유지 */

/* 반응형 스타일 */
@media (max-width: 1024px) {
  .slide {
    grid-template-columns: repeat(2, 1fr); /* 2열 */
    grid-template-rows: repeat(2, 1fr); /* 2행 */
    gap: 6px;
  }

  .card {
    width: 95%;
    padding: 6px;
    gap: 8px;
  }

  .card .image-container {
    width: 40%;
    aspect-ratio: 4 / 3;
  }

  .card .text-container h3 {
    font-size: 10px;
  }

  .card .text-container p {
    font-size: 8px;
  }
  .slider-btn {
    transform: translateY(400%);
  }
}

@media (max-width: 768px) {
  .slide {
    display: grid;
    grid-template-columns: 1fr; /* 한 열에 하나씩 배치 */
    grid-template-rows: repeat(3, auto); /* 카드 개수에 맞게 높이 자동 설정 */
    gap: 24px; /* 카드 간격 */
  }

  .card {
    display: grid;
    grid-template-columns: 30% 70%; /* 이미지와 텍스트 비율 */
    width: 95%; /* 카드 너비 조정 */
    background-color: #f9f9f9;
    border-radius: 8px; /* 둥근 모서리 */
    padding: 10px; /* 카드 내부 패딩 */
    gap: 20px; /* 이미지와 텍스트 간격 */
    align-items: center; /* 수직 정렬 */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 카드 그림자 */
    height: 120px; /* 카드 높이 조정 */
  }

  .card .image-container {
    width: 100%; /* 이미지 컨테이너 너비 */
    aspect-ratio: 4 / 3; /* 이미지 비율 */
    overflow: hidden;
    border-radius: 8px;
  }

  .card .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 이미지 비율 유지 */
  }

  .card .text-container {
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center; /* 텍스트 수직 가운데 정렬 */
  }

  .card .text-container h3 {
    font-size: 12px; /* 제목 크기 조정 */
    margin-bottom: 5px;
    color: #000; /* 글자색 기본값 */
  }

  .card .text-container p {
    font-size: 10px; /* 본문 글자 크기 조정 */
    color: #555; /* 글자색 기본값 */
    margin: 0;
  }
  .slider-btn {
    transform: translateY(725%);
  }
}

@media (max-width: 480px) {
  .slide {
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(3, auto);
    gap: 20px; /* 카드 간격 조정 */
  }

  .card {
    grid-template-columns: 35% 65%; /* 이미지와 텍스트 비율 */
    padding: 8px;
    gap: 20px;
    height: 100px; /* 카드 높이 낮춤 */
  }

  .card .image-container {
    aspect-ratio: 4 / 3;
  }

  .card .text-container h3 {
    font-size: 10px; /* 제목 크기 조정 */
  }

  .card .text-container p {
    font-size: 8px; /* 본문 글자 크기 조정 */
  }
  .slider-btn {
    transform: translateY(600%);
  }
}

@media (max-width: 360px) {
  .slide {
    gap: 20px;
  }

  .card {
    grid-template-columns: 40% 60%;
    padding: 6px;
    gap: 10px;
    height: 90px; /* 카드 높이 더 낮춤 */
  }

  .card .image-container {
    aspect-ratio: 16 / 10;
  }

  .card .text-container h3 {
    font-size: 9px; /* 제목 크기 조정 */
  }

  .card .text-container p {
    font-size: 7px; /* 본문 글자 크기 조정 */
  }
  .slider-btn {
    transform: translateY(525%);
  }
}
