/* ============================================================
   ACHIEVERS PAGE – Polished UI
   Font: Playfair Display (headings) + DM Sans (body)
   ============================================================ */

:root {
  --teal-primary:  #27d6c5;
  --teal-deep:     #0d9488;
  --teal-light:    #e0faf7;
  --teal-mid:      #5eead4;
  --blue-accent:   #00beef;
  --gold:          #f59e0b;
  --gold-light:    #fef3c7;
  --gold-mid:      #fcd34d;
  --text-dark:     #1a2e2b;
  --text-mid:      #3d5652;
  --text-muted:    #6b8c87;
  --border-color:  #b2e8e2;
  --card-bg:       #ffffff;
  --page-bg:       #f4f7f8;
  --radius-card:   20px;
  --radius-sm:     10px;
  --shadow-card:   0 2px 16px rgba(13, 148, 136, 0.1), 0 1px 4px rgba(0,0,0,0.05);
  --shadow-hover:  0 12px 40px rgba(13, 148, 136, 0.24), 0 3px 10px rgba(0,0,0,0.08);
}

/* ---- Base ---- */
body {
  overflow-x: hidden;
  background: var(--page-bg);
  font-family: 'DM Sans', Arial, sans-serif;
  padding: 0;
  margin: 0;
  color: var(--text-dark);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.head {
  width: 100%;
  min-height: 88vh;
  padding: 2rem 5rem;
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 4.5rem;
  background: var(--page-bg);
  box-sizing: border-box;
}

.head-l { width: 42%; flex-shrink: 0; }

.head-l img {
  width: 100%;
  max-height: 62vh;
  object-fit: cover;
  border-radius: 0 72px 0 72px;
  border: 2px solid var(--border-color);
  box-shadow: 0 10px 48px rgba(13, 148, 136, 0.18);
}

.head-r { width: 44%; }

.hero-eyebrow {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--teal-deep);
  background: var(--teal-light);
  border: 1px solid var(--teal-mid);
  padding: 5px 18px;
  border-radius: 20px;
  margin-bottom: 1.2rem;
}

.head-r h1 {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--text-dark);
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0.4rem 0 1rem;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.head-r p {
  font-weight: 400;
  color: var(--text-mid);
  font-size: 15px;
  line-height: 1.8;
  padding-left: 1.2rem;
  border-left: 3px solid var(--teal-mid);
  margin: 0;
}

/* ============================================================
   ACHIEVERS SECTION WRAPPER
   ============================================================ */
.achieve-main {
  width: 100%;
  padding: 4rem 2rem 5rem;
  background: linear-gradient(135deg, #1fb6a8 0%, #00b8e8 100%);
  position: relative;
  overflow: hidden;
  box-sizing: border-box;
}

/* Dot texture overlay */
.achieve-main::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.13) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
  z-index: 0;
}

/* ── Section Heading ── */
.achieve-heading {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  z-index: 1;
}

.achieve-heading-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--teal-deep);
  background: rgba(255,255,255,0.92);
  border: 1.5px solid rgba(255,255,255,0.5);
  padding: 5px 20px;
  border-radius: 20px;
  margin-bottom: 0.9rem;
  backdrop-filter: blur(4px);
}

.achieve-heading-badge i { color: var(--gold); }

.achieve-main h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.1rem;
  color: #fff;
  font-weight: 700;
  text-align: center;
  text-shadow: 0 2px 12px rgba(0,0,0,0.13);
  margin: 0;
  letter-spacing: -0.3px;
}

/* ── Cards Grid ── */
.achieve-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.8rem;
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
}

/* ============================================================
   ACHIEVER CARD
   ============================================================ */
.achieve-inner {
  position: relative;
  width: calc(25% - 1.8rem);
  min-width: 200px;
  max-width: 255px;
  background: var(--card-bg);
  padding: 1.8rem 1.3rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1.5px solid rgba(255,255,255,0.75);
  overflow: hidden;
  opacity: 0;
  transform: translateY(22px);
  animation: cardReveal 0.5s ease forwards;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@keyframes cardReveal {
  to { opacity: 1; transform: translateY(0); }
}

.achieve-inner:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

/* Top gradient stripe */
.card-glow {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--teal-primary), var(--blue-accent));
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}

/* ── Avatar ── */
.avatar-wrap {
  position: relative;
  width: 92px;
  height: 92px;
  margin: 0 auto 1rem;
  cursor: pointer;
}

.avatar-wrap img {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
  border: 3px solid var(--teal-light);
  box-shadow: 0 3px 12px rgba(13,148,136,0.18);
}

.avatar-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px dashed var(--teal-mid);
  z-index: 0;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.45s ease;
  transform: scale(0.88);
}

.achieve-inner:hover .avatar-wrap img { transform: scale(1.08); }
.achieve-inner:hover .avatar-ring     { opacity: 1; transform: scale(1) rotate(45deg); }

/* Name */
.achieve-inner h4 {
  font-family: 'Playfair Display', serif;
  color: var(--text-dark);
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 0.5rem;
  line-height: 1.2;
}

/* Title chip below name */
.card-title-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--gold);
  background: var(--gold-light);
  border: 1px solid var(--gold-mid);
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 0.7rem;
}

.card-title-chip i { font-size: 9px; }

/* Bio preview */
.card-bio {
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 1.2rem;
  flex: 1;
  /* Clamp to 3 lines — modal shows full text */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* View button */
.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: linear-gradient(135deg, var(--teal-primary), var(--teal-deep));
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 22px;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: opacity 0.2s, transform 0.2s;
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.35);
}

.view-btn:hover { opacity: 0.88; transform: scale(1.05); }

/* ============================================================
   OVERLAY / MODAL
   ============================================================ */
.overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(5, 28, 26, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 1rem;
  box-sizing: border-box;
}

.overlay-content {
  background-color: #fff;
  padding: 2.4rem 2.2rem 2rem;
  border-radius: 24px;
  box-shadow: 0 28px 70px rgba(0,0,0,0.22);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  scroll-behavior: smooth;
  position: relative;
  text-align: center;
  animation: overlayFadeIn 0.28s ease;
}

@keyframes overlayFadeIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.close-btn {
  position: absolute;
  top: 1.1rem; right: 1.1rem;
  background: #fbe9e7;
  border: none;
  color: #c62828;
  width: 36px; height: 36px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
  z-index: 2;
}
.close-btn:hover { background: #ffcdd2; }

/* Modal avatar */
.modal-avatar-wrap {
  margin: 0 auto 1.2rem;
  width: 100px; height: 100px;
  position: relative;
}

.modal-avatar-wrap::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--teal-mid);
  opacity: 0.6;
}

.modal-avatar-wrap img {
  width: 100px; height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--teal-light);
  box-shadow: 0 6px 20px rgba(13,148,136,0.22);
  position: relative;
  z-index: 1;
}

/* Badge */
.overlay-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--teal-deep);
  background: var(--teal-light);
  border: 1px solid var(--teal-mid);
  padding: 4px 16px;
  border-radius: 20px;
  margin-bottom: 0.8rem;
}
.overlay-badge i { color: var(--gold); }

.overlay-content h3 {
  font-family: 'Playfair Display', serif;
  color: var(--text-dark);
  font-weight: 700;
  font-size: 22px;
  margin: 0 0 1rem;
  line-height: 1.25;
  text-align: center;
}

/* Meta chips */
.overlay-meta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 0;
}

.overlay-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-mid);
  background: var(--page-bg);
  border: 1px solid var(--border-color);
  padding: 5px 13px;
  border-radius: 20px;
}

.overlay-meta-chip .fa-user {
  padding: 5px 6px;
  background: var(--teal-light);
  color: var(--teal-deep);
  border-radius: 6px;
  font-size: 11px;
}

.overlay-meta-chip .fa-location-dot {
  padding: 5px 7px;
  background: #fbe9e7;
  color: #c62828;
  border-radius: 6px;
  font-size: 11px;
}

.overlay-divider {
  height: 1px;
  background: var(--border-color);
  margin: 1.3rem 0;
}

/* ── Modal bio: raw HTML from DB ── */
.modal-bio {
  text-align: left;
}

.modal-bio p {
  color: var(--text-mid);
  font-size: 15px;
  line-height: 1.8;
  margin: 0 0 1rem;
  text-align: left;
}

.modal-bio p:last-child { margin-bottom: 0; }

.modal-bio strong {
  color: var(--text-dark);
  font-weight: 600;
}

.modal-bio a {
  color: var(--teal-deep);
  text-decoration: underline;
  text-decoration-color: var(--teal-mid);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media screen and (max-width: 1100px) {
  .achieve-inner { width: calc(33% - 1.8rem); }
}

@media screen and (max-width: 830px) {
  .head {
    flex-direction: column;
    gap: 2rem;
    padding: 1rem 1.4rem 2.5rem;
    min-height: auto;
    padding-top: 4.5rem;
  }

  .head-l { width: 100%; }
  .head-l img { max-width: 100%; border-radius: 0 48px 0 48px; }
  .head-r { width: 96%; margin: auto; }
  .head-r h1 { font-size: 1.7rem; }
  .head-r p { font-size: 14px; }

  .achieve-main { padding: 2.5rem 1rem 3.5rem; }
  .achieve-main h3 { font-size: 1.5rem; }
  .achieve-grid { gap: 1.1rem; }
  .achieve-inner { width: calc(50% - 1.1rem); min-width: 150px; }
}

@media screen and (max-width: 540px) {
  .achieve-inner { width: 88%; max-width: 320px; }
  .overlay-content { padding: 1.8rem 1.3rem 1.5rem; }
}

@media screen and (max-width: 500px) {
  nav { height: 65px; }
  .toggle i { margin-top: -0.23rem; line-height: 10px; }
}