/* Google Fonts: IBM Plex Sans Thai */
@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Thai:wght@200;300;400;500;600;700&display=swap');

:root {
  --primary: #C41563;
  --primary-light: #FFEDF4;
  --primary-hover: #a10f50;
  --accent: #02A99D;
  --accent-light: #E0F7FA;
  --text-dark: #2D3748;
  --text-muted: #718096;
  --bg-card: #FFFFFF;
  --border-light: #F0E6EA;
  --line-color: #06C755;
  --fb-color: #0084FF;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 8px;
  --shadow-sm: 0 4px 12px rgba(196, 21, 99, 0.06);
  --shadow-md: 0 10px 25px rgba(0, 0, 0, 0.08);
}

body {
  font-family: "IBM Plex Sans Thai", -apple-system, BlinkMacSystemFont, sans-serif !important;
  color: var(--text-dark);
  background-color: #FCF9FA;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

.course-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px 60px 20px;
}

/* Hero Section */
.hero-banner {
  background: linear-gradient(135deg, #FFF0F5 0%, #FFE4ED 100%);
  border: 1px solid #FFD6E5;
  border-radius: var(--radius-lg);
  padding: 3.5em 2em 3em 2em;
  text-align: center;
  margin-bottom: 2em;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.hero-badge {
  display: inline-block;
  background-color: var(--primary);
  color: #FFFFFF;
  font-size: 0.9em;
  font-weight: 600;
  padding: 0.35em 1.2em;
  border-radius: 50px;
  margin-bottom: 1em;
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: 2.8em;
  font-weight: 700;
  color: var(--primary);
  margin: 0.2em 0 0.4em 0;
  line-height: 1.25;
}

.hero-subtitle {
  font-size: 1.35em;
  color: #4A5568;
  font-weight: 400;
  max-width: 750px;
  margin: 0 auto 1.5em auto;
}

.hero-price-tag {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #FFFFFF;
  padding: 0.8em 1.8em;
  border-radius: 50px;
  border: 2px solid var(--primary);
  color: var(--primary);
  font-size: 1.25em;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(196, 21, 99, 0.12);
}

/* Studio & Venue Card */
.studio-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2.2em;
  margin-bottom: 2.5em;
  box-shadow: var(--shadow-sm);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.2em;
}

.section-icon {
  width: 36px;
  height: 36px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2em;
}

.section-title {
  font-size: 1.7em;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0;
}

.studio-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2em;
  align-items: start;
}

.studio-info h3 {
  font-size: 1.4em;
  color: var(--primary);
  margin: 0 0 0.5em 0;
}

.studio-desc {
  color: var(--text-muted);
  font-size: 1.05em;
  margin-bottom: 1.2em;
}

.studio-address {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 500;
  margin-bottom: 1.5em;
  color: #2D3748;
}

.btn-map {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary);
  color: #FFFFFF !important;
  text-decoration: none;
  padding: 0.6em 1.4em;
  border-radius: 50px;
  font-weight: 600;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-map:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.hours-box {
  background: #FAF7F8;
  border: 1px dashed #E2D3D8;
  border-radius: var(--radius-md);
  padding: 1.5em;
}

.hours-box h4 {
  margin: 0 0 1em 0;
  font-size: 1.15em;
  color: var(--primary);
}

.hours-item {
  display: flex;
  justify-content: space-between;
  padding: 0.6em 0;
  border-bottom: 1px solid #ECE3E6;
  font-size: 1.02em;
}

.hours-item:last-child {
  border-bottom: none;
}

.hours-item b {
  color: #2D3748;
}

.studio-features {
  margin-top: 1.5em;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.feature-pill {
  background: #F4EFF2;
  color: #4A5568;
  font-size: 0.9em;
  font-weight: 500;
  padding: 0.4em 1em;
  border-radius: 50px;
}

/* Matrix Explanation Section */
.matrix-section {
  margin-bottom: 3em;
}

.matrix-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5em;
  margin-top: 1.2em;
}

.matrix-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.8em;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease;
}

.matrix-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.matrix-card.onsite {
  border-left: 5px solid var(--primary);
}

.matrix-card.online {
  border-left: 5px solid var(--accent);
}

.matrix-badge {
  display: inline-block;
  font-size: 0.85em;
  font-weight: 700;
  padding: 0.3em 0.9em;
  border-radius: 50px;
  margin-bottom: 0.8em;
}

.matrix-card.onsite .matrix-badge {
  background: var(--primary-light);
  color: var(--primary);
}

.matrix-card.online .matrix-badge {
  background: var(--accent-light);
  color: var(--accent);
}

.matrix-card h3 {
  font-size: 1.35em;
  margin: 0 0 0.6em 0;
  color: var(--text-dark);
}

.matrix-options {
  list-style: none;
  padding: 0;
  margin: 1em 0 0 0;
}

.matrix-options li {
  padding: 0.6em 0;
  border-bottom: 1px dashed #E2E8F0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.98em;
}

.matrix-options li:last-child {
  border-bottom: none;
}

/* Course Catalog Grid */
.catalog-section {
  margin-bottom: 3em;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5em;
  margin-top: 1.5em;
}

.course-card {
  background: #FFFFFF;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: #FFC0D6;
}

.course-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #F7FAFC;
  background-size: cover;
  background-position: center;
  position: relative;
}

.sale-pill {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--primary);
  color: #FFFFFF;
  font-size: 0.78em;
  font-weight: 700;
  padding: 0.25em 0.8em;
  border-radius: 50px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.course-body {
  padding: 1.2em;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.course-title {
  font-size: 1.15em;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0 0 0.5em 0;
  line-height: 1.4;
  height: 2.8em;
  overflow: hidden;
}

.course-price-wrap {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding-top: 0.8em;
  border-top: 1px solid #F0E6EA;
}

.price-current {
  font-size: 1.35em;
  font-weight: 700;
  color: var(--primary);
}

.price-original {
  font-size: 0.95em;
  color: var(--text-muted);
  text-decoration: line-through;
}

.card-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 0.8em;
}

.btn-enroll-online {
  background: var(--primary);
  color: #FFFFFF !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.92em;
  padding: 0.7em;
  border-radius: var(--radius-sm);
  text-align: center;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-enroll-online:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-line-inquire {
  background: #FFFFFF;
  color: var(--line-color) !important;
  border: 1px solid #C8F0D7;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85em;
  padding: 0.5em;
  border-radius: var(--radius-sm);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s;
}

.btn-line-inquire:hover {
  background: #F0FBF4;
}

/* Member Portal Banner */
.member-banner {
  background: linear-gradient(135deg, #02A99D 0%, #0088B2 100%);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 2.2em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3em;
  box-shadow: var(--shadow-sm);
}

.member-banner h3 {
  margin: 0 0 0.3em 0;
  font-size: 1.5em;
  color: #FFFFFF;
}

.member-banner p {
  margin: 0;
  opacity: 0.9;
  font-size: 1.05em;
}

.btn-member {
  background: #FFFFFF;
  color: #02A99D !important;
  text-decoration: none;
  padding: 0.8em 1.8em;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.05em;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.2s ease;
}

.btn-member:hover {
  transform: scale(1.04);
}

/* Call to Action Buttons */
.cta-container {
  display: flex;
  justify-content: center;
  gap: 1.2em;
  margin: 2.5em 0;
  flex-wrap: wrap;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0.9em 2em;
  border-radius: 50px;
  color: #FFFFFF !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.2em;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  transition: all 0.2s ease;
}

.cta-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

.cta-line {
  background-color: var(--line-color);
}

.cta-msg {
  background-color: var(--fb-color);
}

.cta-btn img {
  height: 26px;
  width: 26px;
}

/* Course Image Gallery */
#courseImages {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 2em 0;
}

#courseImages img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  object-fit: cover;
}

/* ============================================================
   Checkout & Slip Upload Modal
============================================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  box-sizing: border-box;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-light);
  transform: translateY(20px) scale(0.98);
  transition: transform 0.25s ease;
  position: relative;
  padding: 2em;
  box-sizing: border-box;
}

.modal-overlay.active .modal-card {
  transform: translateY(0) scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  font-size: 1.6em;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.modal-close-btn:hover {
  color: var(--primary);
}

.modal-header {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 1em;
  margin-bottom: 1.2em;
}

.modal-title {
  font-size: 1.35em;
  font-weight: 700;
  color: var(--primary);
  margin: 0;
}

/* Package Selection Options */
.pkg-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 1.5em;
}

.pkg-option {
  border: 2px solid #E2E8F0;
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  background: #FFFFFF;
}

.pkg-option.selected {
  border-color: var(--primary);
  background: #FFF5F8;
}

.pkg-option-title {
  font-size: 0.95em;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.pkg-option-price {
  font-size: 1.25em;
  font-weight: 700;
  color: var(--primary);
}

.pkg-option-desc {
  font-size: 0.8em;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Form Fields */
.form-group {
  margin-bottom: 1em;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 0.9em;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.form-label .req {
  color: #EF4444;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.98em;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(196, 21, 99, 0.1);
}

/* Payment QR Display */
.payment-box {
  background: #FAF7F8;
  border: 1px dashed #E2D3D8;
  border-radius: var(--radius-md);
  padding: 1.2em;
  text-align: center;
  margin-bottom: 1.5em;
}

.qr-image {
  width: 170px;
  height: auto;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  margin: 8px 0;
}

.biller-text {
  font-size: 0.85em;
  color: var(--text-muted);
  margin-top: 5px;
}

/* Upload Dropzone */
.slip-dropzone {
  border: 2px dashed #CBD5E1;
  border-radius: var(--radius-md);
  padding: 1.5em;
  text-align: center;
  background: #FFFFFF;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 1.5em;
  position: relative;
}

.slip-dropzone:hover {
  border-color: var(--primary);
  background: #FFF9FB;
}

.slip-preview {
  max-height: 180px;
  max-width: 100%;
  border-radius: 8px;
  margin-top: 10px;
  display: none;
}

/* Submit Button */
.btn-submit {
  width: 100%;
  background: var(--primary);
  color: #FFFFFF;
  border: none;
  padding: 14px;
  border-radius: 50px;
  font-family: inherit;
  font-size: 1.1em;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(196, 21, 99, 0.25);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.status-alert {
  padding: 12px;
  border-radius: 10px;
  font-size: 0.92em;
  margin-bottom: 1em;
  display: none;
}

.status-alert.error {
  background: #FEE2E2;
  color: #991B1B;
  display: block;
}

.status-alert.success {
  background: #D1FAE5;
  color: #065F46;
  display: block;
}

/* Responsive */
@media (max-width: 900px) {
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .studio-grid, .matrix-grid, .studio-photos-grid {
    grid-template-columns: 1fr !important;
  }
  #courseImages {
    grid-template-columns: repeat(3, 1fr);
  }
  .member-banner {
    flex-direction: column;
    text-align: center;
    gap: 1.5em;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: 2.1em;
  }
  .catalog-grid {
    grid-template-columns: 1fr;
  }
  #courseImages {
    grid-template-columns: repeat(2, 1fr);
  }
  .cta-container {
    flex-direction: column;
  }
  .cta-btn {
    width: 100%;
    box-sizing: border-box;
  }
  .pkg-selector {
    grid-template-columns: 1fr;
  }
}