/* 병원 페이지 */
.hospital-page {
  padding: 40px 0;
}

.hospital-list {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-bottom: 40px;
}

/* 병원 이벤트 목록 */
.hospital-events {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 20px;
}

.hospital-item {
  display: flex;
  flex-direction: row;
  background: #fff;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  margin-bottom: 20px;
  height: 250px;
}

.hospital-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.hospital-image {
  width: 50%;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  aspect-ratio: 2/1;
}

.hospital-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  position: absolute;
  top: 0;
  left: 0;
}

.hospital-item:hover .hospital-image img {
  transform: scale(1.05);
}

.hospital-info {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
}

.hospital-name {
  font-weight: 600;
  color: #222;
  margin-bottom: 8px;
  line-height: 1.3;
  font-size: 1.35rem;
  margin-top: 4px;
}

.hospital-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.tag {
  display: inline-block;
  padding: 6px 14px;
  background: #f0eeff;
  color: #4d3dbf;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}

.info-bottom {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  margin-top: auto;
  gap: 10px;
}

.info-bottom .event {
  color: #4d3dbf;
  font-size: 14px;
  font-weight: 500;
  text-align: right;
}

/* rating-common 관련 스타일은 common.css로 이동했습니다 */

.hospital-buttons {
  display: flex;
  gap: 10px;
  font-size: 0.9rem;
}

.hospital-btn {
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
}

.detail-btn {
  background: #4d3dbf;
  color: #fff;
  border: 1px solid #4d3dbf;
}

.detail-btn:hover {
  background: #3f31a0;
}

.consult-btn {
  background: #fff;
  color: #4d3dbf;
  border: 1px solid #4d3dbf;
  font-size: 0.9rem;
}

.consult-btn:hover {
  background: #f9f8ff;
}

@media screen and (max-width: 768px) {
  .hospital-item {
    flex-direction: column;
    height: auto;
  }

  .hospital-image {
    width: 100%;
    aspect-ratio: 2/1;
  }

  .hospital-info {
    width: 100%;
    padding: 16px;
  }

  .hospital-location {
    margin-bottom: 4px;
  }

  .hospital-name {
    font-size: 1.1rem;
    margin-bottom: 8px;
  }

  .hospital-tags {
    margin-bottom: 12px;
    gap: 6px;
  }

  .tag {
    padding: 4px 10px;
    font-size: 12px;
  }

  .info-bottom {
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
  }

  .info-bottom .event {
    font-size: 13px;
  }

  .hospital-buttons {
    width: 100%;
  }

  .hospital-btn {
    padding: 8px 14px;
    font-size: 13px;
    flex: 1;
    text-align: center;
  }
}

@media screen and (max-width: 480px) {
  .hospital-image {
    height: 160px;
  }

  .hospital-info {
    padding: 16px;
  }

  .info-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .hospital-buttons {
    width: 100%;
  }
}

/* 정렬 옵션 */
.sort-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
}

.sort-btn {
  padding: 8px 15px;
  background: #f7f7f7;
  border: 1px solid #eee;
  border-radius: 20px;
  color: #666;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 10px;
}

.sort-btn:hover {
  background: #f0f0f0;
  color: #4d3dbf;
}

.sort-btn.active {
  background: #4d3dbf;
  color: #fff;
  border-color: #4d3dbf;
}

.event-count {
  color: #666;
  font-weight: 500;
}

/* 필터 섹션 */
.filter-section {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.filter-group {
  position: relative;
}

.filter-btn {
  padding: 10px 15px;
  background: #f7f7f7;
  border: 1px solid #eee;
  border-radius: 5px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.filter-btn::after {
  content: '\f107';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  margin-left: 8px;
  font-size: 12px;
}

.filter-options {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  width: 200px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 5px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  z-index: 10;
  margin-top: 5px;
  padding: 10px 0;
}

.filter-group:hover .filter-options {
  display: block;
}

.filter-option {
  padding: 8px 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-option:hover {
  background: #f7f7f7;
}

.filter-option.active {
  color: #4d3dbf;
  font-weight: 500;
}

/* 병원 페이지 관련 페이지네이션 추가 스타일은 common.css에서 관리합니다 */

.event-info {
  flex: 1;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* 카테고리 필터 스타일 */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 30px;
}

.category-filter {
  padding: 8px 16px;
  background: #f7f7f7;
  border: 1px solid #eee;
  border-radius: 20px;
  color: #666;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-filter:hover {
  background: #f0f0f0;
  color: #4d3dbf;
}

.category-filter.active {
  background: #4d3dbf;
  color: #fff;
  border-color: #4d3dbf;
}

@media screen and (max-width: 768px) {
  .category-filters {
    gap: 8px;
    margin: 15px 0 25px;
    overflow-x: auto;
    padding-bottom: 5px;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
  }

  .category-filters::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }

  .category-filter {
    padding: 6px 12px;
    font-size: 13px;
    white-space: nowrap;
  }
}

/* 모달 관련 스타일은 common.css로 이동되었습니다 */

/* 이벤트 페이지 추가 스타일 */
.hospital-event-item .info-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}

.hospital-event-item .hospital-buttons {
  display: flex;
  gap: 8px;
}

.hospital-event-item .hospital-btn {
  padding: 6px 12px;
  font-size: 13px;
}

@media screen and (max-width: 768px) {
  .hospital-event-item .info-bottom {
    flex-direction: row;
    align-items: center;
  }

  .hospital-event-item .hospital-btn {
    padding: 5px 10px;
    font-size: 12px;
  }
}

.dropdown-sort {
  position: relative;
  display: inline-block;
}

.sort-dropdown-btn {
  padding: 8px 15px;
  background: #4d3dbf;
  border: 1px solid #4d3dbf;
  border-radius: 20px;
  color: #fff;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-dropdown-btn i {
  font-size: 12px;
}

.sort-dropdown-btn:hover {
  background: #3e31a0;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: 160px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  z-index: 1;
  border-radius: 8px;
  padding: 8px 0;
  right: 0;
  top: 100%;
  margin-top: 8px;
}

.dropdown-content.show {
  display: block;
}

.sort-item {
  padding: 8px 16px;
  text-decoration: none;
  display: block;
  color: #666;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.sort-item:hover {
  background-color: #f8f8f8;
  color: #4d3dbf;
}

.sort-item.active {
  color: #4d3dbf;
  font-weight: 500;
  background-color: #f0eeff;
}
