/* ============================================================
   COMPONENTS.CSS
   Courses · Gallery · Testimonials · Foreign · Contact · Modal
   ============================================================ */


/* ============================================================
   COURSES
   ============================================================ */

.courses {
  background: var(--bg-warm);
  padding: var(--section-pad);
}

.courses h2 {
  max-width: var(--max-width);
  margin: 0 auto var(--space-2xl);
  padding: 0 5%;
}

.course-group {
  max-width: var(--max-width);
  margin: 0 auto var(--space-2xl);
  padding: 0 5%;
}

.course-group h3 {
  font-size: var(--text-lg);
  color: var(--text-heading);
  border-bottom: 3px solid var(--accent);
  display: inline-block;
  padding-bottom: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.course-container {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
}

/* Card */
.course-card {
  flex: 1 1 calc(33.333% - var(--space-lg));
  min-width: 280px;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--ease), box-shadow var(--ease);
}

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

.card-image-wrapper {
  width: 100%;
  border-bottom: 1px solid var(--border-light);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-lg);
  text-align: center;
}

.card-body h4 {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--primary);
}

.card-body p {
  flex-grow: 1;
  font-size: var(--text-sm);
  color: var(--text-light);
}

.btn-card {
  margin-top: var(--space-xs);
  padding: 9px 28px;
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background var(--ease), color var(--ease);
}

.btn-card:hover {
  background: var(--accent);
  color: var(--text-inverse);
}


/* ============================================================
   GALLERY
   ============================================================ */

.gallery {
  background: var(--bg-muted);
  padding: var(--section-pad);
}

.gallery h2 {
  max-width: var(--max-width);
  margin: 0 auto var(--space-lg);
  padding: 0 5%;
}

.gallery-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 5%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
}

.gallery-item {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.gallery-item img {
  width: 100%;
  height: 190px;
  object-fit: cover;
}

.gallery-item figcaption {
  padding: var(--space-sm) var(--space-md);
  font-weight: 500;
  color: var(--primary);
  font-size: var(--text-sm);
}


/* ============================================================
   TESTIMONIALS
   ============================================================ */

.testimonial {
  background: var(--bg-warm);
  padding: var(--section-pad);
}

.testimonial h2 {
  max-width: var(--max-width);
  margin: 0 auto var(--space-md);
  padding: 0 5%;
}

.testimonial-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 5%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md);
}

.testimonial-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-xs);
}

.testimonial-head {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  flex-shrink: 0;
}

.testimonial-meta h4 {
  color: var(--primary);
  margin-bottom: 2px;
}

.testimonial-course {
  font-size: var(--text-sm);
  color: var(--accent);
}

.testimonial-stars {
  color: #e6a817;
  letter-spacing: 2px;
  margin-bottom: var(--space-sm);
}

.testimonial-review {
  color: var(--text-mid);
  font-size: var(--text-sm);
}


/* ============================================================
   FOREIGN EMPLOYMENT
   ============================================================ */

.foreign {
  background: var(--primary);
  color: var(--text-inverse);
  text-align: center;
  padding: var(--section-pad);
}

.foreign-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-xl) 5%;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.foreign h2 {
  color: var(--accent-mid);
  margin-bottom: var(--space-md);
}

.foreign-content p {
  font-size: var(--text-md);
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: var(--space-md);
}

.countries {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.country-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 500;
  white-space: nowrap;
}


/* ============================================================
   CONTACT
   ============================================================ */

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-xl);
  margin-top: var(--space-lg);
}

.contact-info {
  padding: var(--space-lg);
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.contact-info h3 {
  color: var(--primary);
  margin-bottom: var(--space-md);
}

.contact-info p {
  margin-bottom: var(--space-md);
  color: var(--text-body);
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-sm);
  color: var(--text-body);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: var(--text-base);
  color: var(--text-body);
  background: var(--white);
  transition: border-color var(--ease), box-shadow var(--ease);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-mid);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group textarea {
  resize: vertical;
}


/* ============================================================
   COURSE MODAL
   ============================================================ */

.course-modal {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  z-index: 1200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease);
}

.course-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.course-modal-box {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 260px;
  width: 100%;
  max-width: 860px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  opacity: 0;
  transform: translateY(var(--space-lg));
  transition: opacity var(--ease), transform var(--ease);
}

.course-modal.open .course-modal-box {
  opacity: 1;
  transform: translateY(0);
}

.course-modal-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 50%;
  font-size: var(--text-sm);
  color: var(--text-mid);
  cursor: pointer;
  z-index: 10;
  transition: background var(--ease);
}

.course-modal-close:hover {
  background: var(--border);
}

/* Left panel */
.modal-left {
  padding: var(--space-2xl) var(--space-lg) var(--space-2xl) var(--space-xl);
  border-right: 1px solid var(--border-light);
  overflow-y: auto;
}

.modal-tag {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.modal-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text-heading);
  line-height: 1.25;
  margin-bottom: var(--space-md);
}

.modal-desc {
  font-size: var(--text-sm);
  color: var(--text-mid);
  line-height: 1.75;
  margin-bottom: var(--space-lg);
}

.modal-section-heading {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--primary);
  margin-bottom: var(--space-sm);
}

.modal-learn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

.modal-learn-item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: 10px var(--space-sm);
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-body);
  line-height: 1.4;
}

.modal-learn-item .check {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  border-radius: 50%;
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-inverse);
}

.modal-career-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.modal-career-pill {
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-mid);
}

/* Right panel */
.modal-right {
  display: flex;
  flex-direction: column;
  padding: var(--space-2xl) var(--space-lg);
  background: var(--bg-light);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.modal-price-block {
  margin-bottom: var(--space-lg);
}

.modal-price-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: var(--space-xs);
}

.modal-price {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.modal-info-list {
  margin-bottom: var(--space-lg);
}

.modal-info-list li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: var(--space-sm) 0;
  border-bottom: 1px solid var(--border-light);
}

.modal-info-list li:first-child {
  padding-top: 0;
}

.info-key {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text-light);
}

.info-val {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-body);
}

.modal-apply-btn {
  display: block;
  width: 100%;
  padding: 13px 0;
  margin-top: auto;
  background: var(--accent);
  color: var(--text-inverse);
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-base);
  font-weight: 700;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  transition: background var(--ease), transform var(--ease);
}

.modal-apply-btn:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}
