/* ========================================
   Programs Section Styles
   ======================================== */
.programs {
  padding: 80px 0;
  background: #f8f6f3;
  text-align: center;
}

.programs h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  margin-bottom: 30px;
  color: #8b6f47;
  text-align: center;
  font-weight: 400;
  background: #f5ede4;
  padding: 15px 30px;
  border-radius: 30px;
  display: inline-block;
}

.programs-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(2, 180px);
  gap: 15px;
  height: 375px;
}

.program-card {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  will-change: transform;
}

/* Specific positioning for 7 cards in 4x2 grid - optimized layout */
.program-card:nth-child(1) {
  grid-column: 1;
  grid-row: 1;
}

.program-card:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

.program-card:nth-child(3) {
  grid-column: 3;
  grid-row: 1;
}

.program-card:nth-child(4) {
  grid-column: 4;
  grid-row: 1;
}

.program-card:nth-child(5) {
  grid-column: 1;
  grid-row: 2;
}

.program-card:nth-child(6) {
  grid-column: 2 / 4;
  grid-row: 2;
}

/* Last card goes to the end */
.program-card:nth-child(7) {
  grid-column: 4;
  grid-row: 2;
}

.program-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  will-change: transform;
}

.program-card:hover img {
  transform: scale(1.05);
}

.program-card .card-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
  padding: 15px;
  color: white;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.program-card .card-content h3,
.special-card .card-content h3 {
  font-family: "Roboto", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  line-height: 1.2;
  word-wrap: break-word;
  max-width: 90%;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.program-card .card-overlay {
  position: absolute;
  bottom: 20px;
  right: 20px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.program-card .plus-icon,
.special-card .plus-icon {
  display: inline-block;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #8b6f47;
  font-weight: bold;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  will-change: transform;
}

.program-card .plus-icon:hover,
.special-card .plus-icon:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.program-card:hover .card-overlay .plus-icon,
.special-card:hover .card-overlay .plus-icon {
  transform: scale(1.08);
}

/* ========================================
   Special Programs Section
   ======================================== */
.special-programs {
  padding: 80px 0;
  background: #f8f6f3;
  text-align: center;
}

.special-programs h2 {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  margin-bottom: 30px;
  color: #8b6f47;
  text-align: center;
  font-weight: 400;
  background: #f5ede4;
  padding: 15px 30px;
  border-radius: 30px;
  display: inline-block;
}

.special-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 180px);
  gap: 15px;
}

.special-card {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  will-change: transform;
}

/* 3x2 grid layout - cards auto-fit in order */

.special-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
  will-change: transform;
}

.special-card:hover img {
  transform: scale(1.05);
}

.special-card .card-overlay {
  position: absolute;
  bottom: 20px;
  right: 20px;
  opacity: 1;
  transition: opacity 0.3s ease;
}

/* Special Programs와 Programs 카드의 통일된 card-content 스타일 */
.special-card .card-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.2));
  padding: 15px;
  color: white;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
