/* Site stylesheet */
* { box-sizing: border-box; }
body { 
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif; 
  line-height: 1.6; 
  margin: 0; 
  padding: 16px; 
  color: #333; 
  background-color: #f8f9fa;
  max-width: 1200px;
  margin: 0 auto;
}

/* Container and Layout */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 12px;
}

.header h1 {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 700;
}

.subtitle {
  margin: 0.5rem 0 0;
  font-size: 1.2rem;
  opacity: 0.9;
}

/* Messages */
.message {
  padding: 1rem 1.5rem;
  margin: 1rem 0;
  border-radius: 8px;
  font-weight: 500;
  border-left: 4px solid;
}

.message.success {
  background-color: #d4edda;
  color: #155724;
  border-left-color: #28a745;
}

.message.error {
  background-color: #f8d7da;
  color: #721c24;
  border-left-color: #dc3545;
}

.message.info {
  background-color: #d1ecf1;
  color: #0c5460;
  border-left-color: #17a2b8;
}

/* Typography */
h1 { margin: 0 0 20px; font-size: 28px; color: #2c3e50; text-align: center; }
h2 { margin: 24px 0 12px; font-size: 22px; color: #34495e; border-bottom: 2px solid #3498db; padding-bottom: 8px; }
h3 { margin: 0 0 1.5rem; font-size: 1.3rem; color: #2c3e50; font-weight: 600; }

/* Registration Form */
.registration-form {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  margin: 2rem 0;
}

.form-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e9ecef;
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  padding: 0.75rem 1rem;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #667eea;
  background: white;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
  color: #6c757d;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

/* Payment Methods */
.payment-methods {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.payment-option {
  cursor: pointer;
}

.payment-option input[type="radio"] {
  display: none;
}

.payment-card {
  padding: 1.5rem;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  text-align: center;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.payment-option input[type="radio"]:checked + .payment-card {
  border-color: #667eea;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.payment-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.payment-name {
  font-weight: 600;
  font-size: 1.1rem;
  display: block;
  margin-bottom: 0.25rem;
}

.payment-desc {
  font-size: 0.9rem;
  opacity: 0.8;
}

.mbw-field {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

/* Terms and Submit */
.terms-section {
  text-align: center;
  padding: 1rem 0;
}

.terms-checkbox {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.95rem;
  color: #495057;
}

.terms-checkbox input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid #e9ecef;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.terms-checkbox input[type="checkbox"]:checked + .checkmark {
  background: #667eea;
  border-color: #667eea;
}

.terms-checkbox input[type="checkbox"]:checked + .checkmark::after {
  content: "✓";
  color: white;
  font-weight: bold;
  font-size: 14px;
}

.terms-checkbox a {
  color: #667eea;
  text-decoration: none;
}

.terms-checkbox a:hover {
  text-decoration: underline;
}

.form-actions {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid #e9ecef;
}

.submit-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 1rem 3rem;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
  position: relative;
  overflow: hidden;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.submit-btn:active {
  transform: translateY(0);
}

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

.btn-loading {
  display: none;
}

.submit-btn.loading .btn-text {
  display: none;
}

.submit-btn.loading .btn-loading {
  display: inline;
}

/* Mobile Responsiveness for New Form */
@media (max-width: 768px) {
  .container {
    padding: 10px;
  }
  
  .header {
    padding: 1.5rem 1rem;
  }
  
  .header h1 {
    font-size: 2rem;
  }
  
  .subtitle {
    font-size: 1rem;
  }
  
  .registration-form {
    padding: 1.5rem;
    margin: 1rem 0;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .payment-methods {
    grid-template-columns: 1fr;
  }
  
  .payment-card {
    padding: 1rem;
  }
  
  .submit-btn {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    width: 100%;
  }
  
  .terms-checkbox {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 8px;
  }
  
  .header {
    padding: 1rem 0.5rem;
  }
  
  .header h1 {
    font-size: 1.8rem;
  }
  
  .registration-form {
    padding: 1rem;
  }
  
  .form-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
  }
  
  .form-group input,
  .form-group textarea {
    padding: 0.625rem 0.75rem;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .payment-card {
    padding: 0.875rem;
  }
  
  .payment-icon {
    font-size: 1.5rem;
  }
  
  .submit-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }
}
h4 { margin: 16px 0 8px; font-size: 16px; color: #34495e; }
p { margin: 12px 0; }
ul, ol { margin: 12px 0 20px 20px; }
li { margin: 6px 0; }

/* Form styling */
fieldset {
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
  background: white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
legend {
  font-weight: bold;
  color: #2c3e50;
  padding: 0 10px;
  font-size: 16px;
}
label {
  display: block;
  margin: 12px 0;
  font-weight: 500;
  color: #34495e;
}
input[type="text"], input[type="email"], input[type="tel"], select {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  margin-top: 4px;
  transition: border-color 0.3s;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus, select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}
input[type="checkbox"], input[type="radio"] {
  margin-right: 8px;
  transform: scale(1.2);
}
button {
  background: #3498db;
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  width: 100%;
  margin: 20px 0;
}
button:hover:not(:disabled) {
  background: #2980b9;
}
button:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
}

/* Course selection */
#courseList {
  list-style: none;
  margin: 0;
  padding: 0;
}
#courseList li {
  margin: 8px 0;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 2px solid transparent;
  transition: all 0.3s;
}
#courseList li:hover {
  background: #e9ecef;
  border-color: #3498db;
}
#courseList label {
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  font-weight: normal;
}

/* Warning message */
#courseWarning {
  background: #fff3cd;
  border: 2px solid #ffeaa7;
  padding: 16px;
  margin: 16px 0;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
#courseWarning strong {
  color: #856404;
  display: block;
  margin-bottom: 8px;
}
#selectedCourses {
  margin: 8px 0;
  color: #856404;
}
#totalAmount {
  margin-top: 8px;
  font-size: 18px;
  color: #856404;
}

/* Status message */
#status {
  padding: 12px;
  border-radius: 6px;
  margin: 16px 0;
  font-weight: 500;
}
#status:not(:empty) {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

/* Introduction section */
.introduction {
  background: white;
  padding: 24px;
  border-radius: 12px;
  margin: 20px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border: 2px solid #e1e8ed;
}
.introduction h2 {
  color: #2c3e50;
  margin-bottom: 16px;
}
.introduction p {
  margin-bottom: 12px;
  line-height: 1.6;
}

/* Courses section */
.courses-section h2 {
  margin: 32px 0 20px 0;
  text-align: center;
  color: #2c3e50;
}

/* Course tabs */
.courses-container {
  margin: 20px 0;
}
.course-tab {
  background: white;
  border: 2px solid #e1e8ed;
  border-radius: 12px;
  margin: 16px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  overflow: hidden;
  transition: all 0.3s ease;
}
.course-tab:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  border-color: #3498db;
}
.course-header {
  padding: 20px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-bottom: 1px solid #dee2e6;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.course-header h2 {
  margin: 0;
  color: #2c3e50;
  font-size: 20px;
  flex: 1;
  min-width: 200px;
}
.course-quick-info {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin: 8px 0;
}
.course-quick-info span {
  background: #3498db;
  color: white;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
}
.course-price {
  background: #e74c3c !important;
  font-weight: bold;
}
.expand-btn {
  background: #27ae60;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.expand-btn:hover, .expand-btn:active {
  background: #229954;
}
.course-content {
  display: none;
}
.course-content.expanded {
  display: block;
}
.course-quick {
  padding: 20px;
  background: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
}
.course-full {
  padding: 20px;
  background: white;
}
.course-full h3 {
  color: #2c3e50;
  margin-top: 20px;
  margin-bottom: 12px;
}
.course-full h3:first-child {
  margin-top: 0;
}

/* Responsive design */
@media (max-width: 768px) {
  body { padding: 12px; }
  h1 { font-size: 24px; }
  h2 { font-size: 20px; }
  fieldset { padding: 16px; margin: 16px 0; }
  input[type="text"], input[type="email"], input[type="tel"], select {
    padding: 10px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  button { padding: 12px 24px; }
  .course-header {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .course-header h2 {
    min-width: auto;
    margin-bottom: 12px;
  }
  .course-quick-info {
    justify-content: center;
    margin: 12px 0;
  }
  .expand-btn {
    width: 100%;
    margin-top: 12px;
  }
}

@media (max-width: 480px) {
  body { padding: 8px; }
  h1 { font-size: 22px; }
  h2 { font-size: 18px; }
  fieldset { padding: 12px; }
  #courseList li { padding: 8px; }
  .course-header {
    padding: 16px;
  }
  .course-quick, .course-full {
    padding: 16px;
  }
  .course-quick-info {
    flex-direction: column;
    gap: 8px;
  }
  .course-quick-info span {
    width: 100%;
    text-align: center;
  }
}
