/* ===== Happy Customers: Employer / Jobseeker testimonials + "How You Feel" form ===== */

:root {
  --tm-green: #00843D;
  --tm-green-dark: #00502A;
  --tm-gold: #fcd34d;
  --tm-gold-2: #f59e0b;
  --tm-ink: #14232b;
  --tm-muted: #5f6f78;
  --tm-line: #e3eaee;
}

.tm-page {
  background: #f4f8f6;
}

/* ---------- Hero banner (same Saudi skyline treatment as the other banners) ---------- */
.tm-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  min-height: 210px;
  margin: 24px 0 0;
  padding: 32px 40px;
  border-radius: 18px;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(0, 80, 42, 0.94) 0%, rgba(0, 80, 42, 0.8) 32%, rgba(0, 80, 42, 0.35) 58%, rgba(0, 80, 42, 0) 78%),
    url('../assets/saudi15.png') no-repeat right center / cover;
  box-shadow: 0 20px 44px -18px rgba(0, 80, 42, 0.55);
}
.tm-hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--tm-gold) 0%, var(--tm-gold-2) 25%, #00D47E 60%, rgba(0, 140, 86, 0) 100%);
}
.tm-hero__text {
  position: relative;
  z-index: 1;
  max-width: 620px;
}
.tm-hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(252, 211, 77, 0.45);
  color: var(--tm-gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.tm-hero h1 {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem);
  font-weight: 800;
  line-height: 1.15;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
}
.tm-hero p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.95;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}
.tm-hero__cta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--tm-gold) 0%, var(--tm-gold-2) 100%);
  color: #00391f;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tm-hero__cta:hover {
  color: #00391f;
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
}

/* The tab bar sits under the hero on these pages */
.tm-page .testimonial-subnav {
  background: transparent;
  border-bottom: 0;
}

/* ---------- Testimonial cards (markup comes from curd/curd_testimonial.php) ---------- */
.tm-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding: 8px 0 48px;
}
.tm-grid .testimonial-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 26px 24px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--tm-line);
  border-top: 4px solid var(--tm-green);
  box-shadow: 0 12px 30px -16px rgba(0, 57, 42, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.tm-grid .testimonial-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 44px -18px rgba(0, 57, 42, 0.35);
}
/* Big quote mark in the corner */
.tm-grid .testimonial-card::before {
  content: '\201C';
  position: absolute;
  top: 6px;
  right: 20px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 84px;
  line-height: 1;
  color: rgba(0, 132, 61, 0.12);
  pointer-events: none;
}
/* Quote first, author underneath */
.tm-grid .testimonial-text {
  order: 1;
  flex: 1;
  margin-bottom: 20px;
  padding-right: 40px;
  color: #33444d;
  font-size: 15px;
  line-height: 1.7;
  font-style: italic;
}
.tm-grid .client-info {
  order: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--tm-line);
}
.tm-grid .client-info img {
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  margin: 0;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px var(--tm-gold), 0 6px 14px rgba(0, 0, 0, 0.15);
}
.tm-grid .client-name {
  color: var(--tm-ink);
  font-weight: 700;
  font-size: 16px;
}
.tm-grid .client-role {
  color: var(--tm-green);
  font-size: 13px;
  font-weight: 600;
}

/* Loading + empty states */
.tm-state {
  grid-column: 1 / -1;
  padding: 56px 24px;
  border-radius: 18px;
  background: #fff;
  border: 1px dashed #c9d8d0;
  text-align: center;
  color: var(--tm-muted);
}
.tm-state__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: #e6f5ec;
  color: var(--tm-green);
  font-size: 26px;
}
.tm-state h3 {
  margin: 0 0 6px;
  color: var(--tm-ink);
  font-size: 1.15rem;
  font-weight: 700;
}
.tm-state p {
  max-width: 420px;
  margin: 0 auto 18px;
  font-size: 14px;
}
.tm-state .tm-hero__cta {
  box-shadow: 0 8px 18px rgba(245, 158, 11, 0.35);
}

/* ---------- "How You Feel" form ---------- */
.tm-form-wrap {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 24px;
  padding: 8px 0 48px;
}
.tm-aside {
  align-self: start;
  padding: 28px 26px;
  border-radius: 18px;
  background: linear-gradient(160deg, #00592e 0%, #00391f 100%);
  color: #fff;
  box-shadow: 0 16px 36px -18px rgba(0, 57, 42, 0.6);
}
.tm-aside h3 {
  margin: 0 0 16px;
  font-size: 1.15rem;
  font-weight: 700;
}
.tm-aside ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.tm-aside li {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.88);
}
.tm-aside li i {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(252, 211, 77, 0.18);
  color: var(--tm-gold);
  font-size: 13px;
}
.tm-aside li strong {
  display: block;
  color: #fff;
}

.tm-form {
  padding: 28px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--tm-line);
  box-shadow: 0 12px 30px -16px rgba(0, 57, 42, 0.25);
}
.tm-form .tm-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.tm-field {
  margin-bottom: 18px;
}
.tm-field > label,
.tm-label {
  display: block;
  margin-bottom: 7px;
  color: var(--tm-ink);
  font-size: 13.5px;
  font-weight: 600;
}
.tm-field .req {
  color: #dc3545;
}
.tm-input-icon {
  position: relative;
}
.tm-input-icon i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa8b0;
  font-size: 14px;
}
.tm-form input[type="text"],
.tm-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #d5dfe4;
  border-radius: 12px;
  background: #fbfdfc;
  color: var(--tm-ink);
  font-size: 14.5px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.tm-input-icon input[type="text"] {
  padding-left: 40px;
}
.tm-form input[type="text"]:focus,
.tm-form textarea:focus {
  outline: none;
  border-color: var(--tm-green);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 132, 61, 0.12);
}
.tm-form textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.6;
}
.tm-counter {
  margin-top: 6px;
  text-align: right;
  color: #9aa8b0;
  font-size: 12px;
}

/* "I am a" choice cards */
.tm-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.tm-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.tm-choice label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 14px 16px;
  border: 1.5px solid #d5dfe4;
  border-radius: 14px;
  background: #fbfdfc;
  color: var(--tm-ink);
  font-weight: 600;
  font-size: 14.5px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.tm-choice label i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: #e6f5ec;
  color: var(--tm-green);
}
.tm-choice label:hover {
  border-color: var(--tm-green);
}
.tm-choice input:checked + label {
  border-color: var(--tm-green);
  background: #effaf4;
  box-shadow: 0 0 0 4px rgba(0, 132, 61, 0.12);
}
.tm-choice input:checked + label i {
  background: var(--tm-green);
  color: #fff;
}
.tm-choice input:focus-visible + label {
  outline: 3px solid rgba(0, 132, 61, 0.35);
  outline-offset: 2px;
}

/* Photo picker with round preview */
.tm-photo,
.tm-field > label.tm-photo {
  display: flex;
  margin: 0;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  border: 1.5px dashed #c9d8d0;
  border-radius: 14px;
  background: #fbfdfc;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.tm-photo:hover {
  border-color: var(--tm-green);
  background: #f3fbf6;
}
.tm-photo__preview {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  overflow: hidden;
  border-radius: 50%;
  background: #e6f5ec;
  color: var(--tm-green);
  font-size: 20px;
}
.tm-photo__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tm-photo__text strong {
  display: block;
  color: var(--tm-ink);
  font-size: 14px;
}
.tm-photo__text span {
  display: block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--tm-muted);
  font-size: 12px;
}
.tm-photo input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.tm-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 6px;
  padding: 14px 20px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #00a866 0%, #00843D 55%, #00592e 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 12px 24px -10px rgba(0, 132, 61, 0.6);
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.tm-submit:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}
.tm-submit:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
  .tm-grid { grid-template-columns: repeat(2, 1fr); }
  .tm-form-wrap { grid-template-columns: 1fr; }
  .tm-aside { order: 2; }
}
@media (max-width: 640px) {
  .tm-hero {
    min-height: 0;
    margin-top: 14px;
    padding: 24px 20px;
    border-radius: 14px;
  }
  .tm-hero p { font-size: 13.5px; }
  .tm-hero__cta { width: 100%; justify-content: center; }
  .tm-grid { grid-template-columns: 1fr; gap: 16px; }
  .tm-form { padding: 20px 16px; }
  .tm-form .tm-row { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .tm-grid .testimonial-card,
  .tm-hero__cta,
  .tm-submit { transition: none; }
}
