/* 
* Surgery Menu CSS
* Common styles for surgery listing pages (eyes, nose, skin, etc.)
*/

/* Surgery detail page container */
.surgery-detail-page {
  padding-top: 40px;
}

.surgery-detail-page .container {
  padding: 24px 80px;
}

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

/* Left section with back button and title */
.left-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #f5f5f5;
  color: #333;
  transition: all 0.2s ease;
}

.back-btn:hover {
  background-color: #e0e0e0;
}

.back-btn i {
  font-size: 16px;
}

.page-title {
  font-size: 20px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

/* Dropdown sort styling */
.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: 14px;
  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: 0px 8px 16px 0px rgba(0, 0, 0, 0.15);
  z-index: 10;
  border-radius: 8px;
  padding: 8px 0;
  right: 0;
  top: 100%;
  margin-top: 8px;
  overflow: hidden;
}

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

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

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

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

/* Original sort button styles (keeping for reference) */
.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 */
.event-count {
  font-weight: 600;
  margin-bottom: 20px;
}

/* Hospital events list */
.hospital-events-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Hospital event item */
.hospital-event-item {
  display: flex;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
  height: 250px; /* Increased height for better proportions */
}

.hospital-event-item:hover {
  transform: translateY(-5px);
}

/* Event image container */
.event-image {
  position: relative;
  width: 50%; /* Take up half of the card */
  flex-shrink: 0;
  overflow: hidden;
  background-color: #e0e0e0; /* Gray background */
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 2 / 1; /* Fixed 2:1 aspect ratio */
}

.event-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
}

.event-image::after {
  content: '병원 배너';
  font-size: 18px;
  color: #777;
  font-weight: 500;
  z-index: 1;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
}

.event-image:empty::after {
  opacity: 0.8; /* Only visible when no image is present */
}

/* Event information */
.event-info {
  flex: 1;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 50%; /* Take up half of the card */
}

/* Add inner containers to maintain proper spacing */
.event-info > div:first-child {
  margin-bottom: 10px;
}

.event-info > div:last-child {
  margin-top: auto;
}

.hospital-location {
  font-size: 18px;
  color: #000;
  font-weight: 400;
  margin-bottom: 4px;
}

.event-title {
  font-size: 24px;
  font-weight: 600;
  color: #000;
  margin-bottom: 0;
  line-height: 1.4;
}

/* Price information */
.price-info {
  display: flex;
  align-items: center;
}

.price-info .price {
  font-weight: 600;
  color: #4d3dbf;
  font-size: 24px;
}

.price-info .price-before {
  text-decoration: line-through;
  color: #999;
  font-size: 14px;
  margin-right: 8px;
}

/* Rating common */
.rating-common {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 12px;
}

.rating-common .stars {
  color: #ffca00;
  font-size: 16px;
}

.rating-common .score {
  font-size: 16px;
  color: #333;
  font-weight: 500;
}

.rating-common .score span {
  font-size: 14px;
  font-weight: normal;
  color: #666;
}

.rating-common .reviews {
  font-size: 14px;
  color: #666;
}

/* Responsive styles */
@media screen and (max-width: 1200px) {
  .surgery-detail-page .container {
    padding: 20px 40px;
  }
}

@media screen and (max-width: 1024px) {
  .surgery-detail-page .container {
    padding: 20px 40px;
  }
}

@media screen and (max-width: 768px) {
  /* Sort options */
  .sort-options {
    gap: 8px;
    padding: 15px 0;
    overflow-x: visible;
  }

  /* Left section responsive */
  .left-section {
    gap: 10px;
  }

  .back-btn {
    width: 32px;
    height: 32px;
  }

  .back-btn i {
    font-size: 14px;
  }

  .page-title {
    font-size: 18px;
  }

  .sort-btn {
    padding: 6px 16px;
    font-size: 14px;
    white-space: nowrap;
  }

  /* Dropdown sort responsive */
  .sort-dropdown-btn {
    padding: 6px 12px;
    font-size: 13px;
  }

  .dropdown-content {
    right: 0;
    min-width: 140px;
  }

  .sort-item {
    padding: 10px 14px;
    font-size: 13px;
  }

  .event-count {
    font-size: 20px;
  }

  /* Hospital event item */
  .hospital-event-item {
    flex-direction: column;
    height: auto;
  }

  .event-image {
    width: 100%;
    height: 200px; /* Increased height for mobile */
    aspect-ratio: 2/1; /* Horizontal 2:1 ratio for image */
  }

  .event-image::after {
    font-size: 16px;
  }

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

  /* Add this to ensure the rating and bottom info stays properly aligned */
  .event-info > div:last-child {
    display: flex;
    flex-direction: column;
  }

  .rating-common {
    justify-content: flex-end;
  }

  .event-title {
    font-size: 16px;
  }

  .rating-common .stars {
    font-size: 14px;
  }

  .rating-common .score {
    font-size: 14px;
  }

  .rating-common .score span {
    font-size: 12px;
  }

  /* Pagination */
  .pagination {
    margin-top: 30px;
  }

  .page-btn,
  .page-number {
    min-width: 28px;
    height: 28px;
    font-size: 13px;
  }
}

@media screen and (max-width: 600px) {
  .surgery-detail-page .container {
    padding: 20px 20px;
  }
}

@media screen and (max-width: 480px) {
  /* Sort options */
  .sort-options {
    padding: 12px 0;
    justify-content: space-between;
  }

  /* Left section responsive */
  .left-section {
    gap: 8px;
  }

  .back-btn {
    width: 28px;
    height: 28px;
  }

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

  .page-title {
    font-size: 16px;
  }

  .sort-btn {
    padding: 5px 14px;
    font-size: 13px;
  }

  /* Dropdown sort responsive */
  .sort-dropdown-btn {
    padding: 5px 10px;
    font-size: 12px;
  }

  .dropdown-content {
    min-width: 120px;
  }

  .sort-item {
    padding: 8px 12px;
    font-size: 12px;
  }

  .event-count {
    font-size: 18px;
  }

  /* Hospital event item */
  .hospital-event-item {
    flex-direction: column;
  }

  .event-image {
    height: 180px; /* Maintain the ratio but slightly smaller */
  }

  .event-image::after {
    font-size: 15px;
  }

  .event-info {
    padding: 15px;
  }

  /* Ensure consistent structure */
  .event-info > div:last-child {
    display: flex;
    flex-direction: column;
  }

  .hospital-location {
    font-size: 13px;
    margin-bottom: 6px;
  }

  .event-title {
    font-size: 16px;
    margin-bottom: 10px;
  }

  .price-info .price-before {
    font-size: 10px;
    text-decoration: line-through;
    color: #999;
    margin-right: 4px;
  }

  .price-info .price {
    font-size: 16px;
    font-weight: 600;
    color: #4d3dbf;
  }

  /* Pagination */
  .pagination {
    margin-top: 30px;
  }

  .page-btn,
  .page-number {
    min-width: 28px;
    height: 28px;
    font-size: 13px;
  }

  .rating-common {
    justify-content: flex-end;
    margin-top: 8px;
  }
}

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

  .event-image {
    width: 100%;
    height: 160px; /* Maintain the ratio but smaller for tiny screens */
    aspect-ratio: 2/1;
    min-height: auto;
  }

  .event-info {
    width: 100%;
    padding: 10px;
  }

  /* Ensure consistent structure */
  .event-info > div:last-child {
    display: flex;
    flex-direction: column;
  }

  .hospital-location {
    font-size: 12px;
    margin-bottom: 3px;
  }

  .event-title {
    font-size: 14px;
    margin-bottom: 5px;
    line-clamp: 2;
    -webkit-line-clamp: 2;
  }

  .price-info {
    margin-bottom: 6px;
    display: flex;
    align-items: center;
  }

  .price-info .discount {
    font-size: 12px;
    color: #4d3dbf;
    font-weight: 600;
    margin-right: 6px;
    background-color: transparent;
    padding: 0;
    border-radius: 0;
  }

  .price-info .price-before {
    font-size: 10px;
  }

  .price-info .price {
    font-size: 13px;
  }

  .rating-common {
    justify-content: flex-end;
    margin-top: 4px;
  }

  .rating-common .stars,
  .rating-common .score {
    font-size: 12px;
  }
}
