/* ==============================
   PUBLIC PROFILE MODAL (FINAL)
   ============================== */

#publicProfileModal.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(25,33,104,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 99999;
}

/* Modal shell */
#publicProfileModal .modal-shell {
  background: rgba(255,255,255,0.95);
  border: 6px solid var(--accent-red);
  border-radius: 28px;
  max-width: 1400px;
  width: 100%;
  max-height: 94vh;
  overflow: hidden;
  position: relative;
  box-shadow: 0 40px 100px rgba(0,0,0,.6);
  display: flex;
  flex-direction: column;
}

/* Close */
#publicProfileModal .modal-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  font-size: 2.6rem;
  background: none;
  border: none;
  cursor: pointer;
}

/* Header */
#publicProfileModal .modal-header {
  padding: 2.5rem 4rem 0;
}

#publicProfileModal .profile-avatar {
  position: absolute;
  top: 2.2rem;
  right: 4rem;
  width: 200px;
  height: 200px;
  border: 6px solid var(--accent-red);
  border-radius: 50%;
  overflow: hidden;
}

#publicProfileModal .profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Body */
#publicProfileModal .modal-body {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 3rem;
  padding: 2rem 4rem 3.5rem;
  overflow-y: auto;
}

/* Bio */
#publicProfileModal .bio-box {
  border: 5px solid var(--accent-red);
  border-radius: 14px;
  padding: 1.8rem;
  max-height: 420px;
  overflow-y: auto;
}

/* Before / After */
#publicProfileModal .before-after {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

#publicProfileModal .before-after img {
  width: 200px;
  height: 280px;
  object-fit: cover;
  border-radius: 16px;
  border: 5px solid var(--accent-red);
}

/* Specializations */
#publicProfileModal .specialization-box {
  border: 4px solid var(--accent-red);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

/* Languages */
.language-tag {
  background: var(--accent-red);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  margin-right: 6px;
}

/* Social */
.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 1rem 0;
}

.social-icon {
  text-decoration: none;
  font-weight: 700;
}

/* Certificate */
#certificateContainer img {
  max-width: 260px;
  border: 4px solid var(--accent-red);
  border-radius: 12px;
}

/* CTA */
.book-btn-fixed {
  position: absolute;
  bottom: 1.8rem;
  right: 3rem;
  background: var(--accent-red);
  color: #fff;
  padding: 1rem 3rem;
  border-radius: 999px;
  font-weight: 800;
  border: none;
  cursor: pointer;
}

/* ====================================================
   MODAL LAYOUT LOCK — GRID + IMAGE CONSTRAINTS
   FINAL / RENDER-SAFE
   ==================================================== */

/* Force modal shell sizing */
#publicProfileModal .modal-shell {
  max-width: 1400px;
  width: 100%;
}

/* 🔒 LOCK THE GRID */
#publicProfileModal .modal-body {
  display: grid !important;
  grid-template-columns: 1.1fr 0.9fr !important;
  gap: 3rem !important;
  align-items: start;
}

/* Prevent children from blowing out grid cells */
#publicProfileModal .modal-body > div {
  min-width: 0;
}

/* ---------------- IMAGE CONSTRAINTS ---------------- */

/* Avatar */
#publicProfileModal .profile-avatar {
  width: 200px !important;
  height: 200px !important;
}

#publicProfileModal .profile-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* Before / After */
#publicProfileModal .before-after {
  display: flex;
  gap: 1.5rem;
}

#publicProfileModal .before-after img {
  width: 200px !important;
  height: 280px !important;
  object-fit: cover !important;
}

/* Certificate */
#publicProfileModal #certificateContainer img {
  max-width: 260px !important;
  height: auto !important;
}

/* Absolute safety net */
#publicProfileModal img {
  max-width: 100% !important;
}


