/* ================================================================
   Expert Profile — Full View CSS
   File: themes/theme_acbf/css/expert-profile.css

   Add to theme_acbf.libraries.yml:

   global-styling-and-scripts:
     css:
       theme:
         css/expert-profile.css: {}
   ================================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --ep-green:   #1dac4b;
  --ep-green2:  #17923e;
  --ep-gold:    #e8c16a;
  --ep-gold2:   #f0d080;
  --ep-ink:     #1C1C2E;
  --ep-ink2:    #2d2d4a;
  --ep-cream:   #F7F5F0;
  --ep-muted:   #6B6B7A;
  --ep-border:  #E8E4DC;
  --ep-white:   #ffffff;
  --ep-shadow:  0 4px 24px rgba(28,28,46,.08);
  --ep-radius:  14px;
}

/* ── PAGE BACKGROUND ───────────────────────────────────────── */
.ep-body {
  padding: 40px 0 64px;
}

/* ================================================================
   HERO
   ================================================================ */
.ep-hero {
  background: linear-gradient(135deg, #ffffff 0%, #e1e1e1 55%, #effff4 100% 100%) !important;
  position: relative;
  overflow: hidden;
  padding: 40px 40px 0;
  margin-bottom: 0;
  margin-top: 30px;
  border-radius: 10px;
      border: 1px solid #dfdfdf;
    box-shadow: var(--box-shadow-md);
        position: sticky;
    z-index: 1;
    top: 100px;
}
.sub-title-option{
  /* display: flex; */
    align-items: center;
    justify-content: start;
    gap: 10px;
}
.ep-hero-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(232,193,106,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,193,106,.05) 1px, transparent 1px);
  background-size: 52px 52px;
  pointer-events: none;
}
.ep-hero-orb-1 {
  position: absolute; top: -100px; right: -80px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(232,193,106,.14) 0%, transparent 65%);
  border-radius: 50%; pointer-events: none;
}
.ep-hero-orb-2 {
  position: absolute; bottom: -60px; left: 5%;
  width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(29,172,75,.16) 0%, transparent 65%);
  border-radius: 50%; pointer-events: none;
}

/* ── Hero top row ──────────────────────────────────────────── */
.ep-hero-top {
  display: flex;
  align-items: self-start;
  gap: 28px;
  padding-bottom: 32px;
  position: relative;
  z-index: 2;
}

/* ── Avatar ────────────────────────────────────────────────── */
.ep-avatar-wrap {
  position: relative;
  width: 120px; height: 120px;
  flex-shrink: 0;
}
.ep-avatar-wrap img,
.ep-avatar-wrap .field--name-field-profile-photo img {
  width: 120px !important;
  height: 120px !important;
  border-radius: 50% !important;
  object-fit: contain !important;
  border: 1px solid var(--primary);
  box-shadow: 0 8px 32px rgba(0,0,0,.35) !important;
  display: block;
}
.ep-initials {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ep-gold), var(--ep-green));
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; font-weight: 700; color: #fff;
  border: 4px solid rgba(232,193,106,.5);
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
  letter-spacing: -1px;
}
.ep-verified {
  position: absolute; bottom: 2px; right: 2px;
  width: 26px; height: 26px;
  background: var(--ep-green, #1dac4b);
  border: 2px solid #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: 700;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}

/* ── Hero info ─────────────────────────────────────────────── */
.ep-hero-info { flex: 1; min-width: 0; display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;}

.ep-name {
  font-size: 28px;
  font-weight: 700; color: var(--text-primary);
  margin: 0 0 6px; line-height: 1.15;
  letter-spacing: -.3px;
}
/* Title + verified badge on one baseline. Works whether the badge is a
   child of .ep-name or a sibling inside .ep-name-row. */
.ep-name-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.ep-name-row .ep-name { margin-bottom: 0; }

/* Small edit-profile icon button (admin only) */
.ep-edit-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: rgba(0,0,0,.05);
  border: 1px solid rgba(0,0,0,.12);
  color: #4a5a68;
  font-size: 13px;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}
.ep-edit-btn:hover {
  background: var(--btn-primary, #1aaa4b);
  border-color: var(--btn-primary, #1aaa4b);
  color: #fff;
}

/* Hero sub-title: org / designation / expertise as a tidy vertical list */
.sub-title-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  margin-bottom: 14px;
}
.sub-title-option .ep-org {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: #4a5a68;
}
.sub-title-option .ep-org a { color: var(--ep-green, #1dac4b); }
.sub-title-option .ep-org i { color: #8a97a3; width: 16px; text-align: center; }

/* Views + moderation status row */
.ep-meta-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.ep-view-count {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600;
  color: #4a5a68;
  background: rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 20px;
  padding: 5px 14px;
  cursor: default;
}
.ep-verified-badge {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  font-size: 20px;
  line-height: 1;
  color: #1d9bf0;
}
.ep-name .ep-verified-badge { margin-left: 8px; font-size: .68em; }
.ep-verified-badge i { display: block; }
.ep-designation {
  font-size: 15px; color: #4a5a68;
  margin-bottom: 4px; font-weight: 400;
}
.ep-title-meta {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 8px 0 0;
  padding: 0;
}
.ep-title-meta li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #3a4a58;
}
.ep-title-meta li i {
  color: #0eab4b;
  font-size: 12px;
}
.ep-org {
  font-size: 14px; color: var(--ep-muted);
  font-weight: 600; margin-bottom: 16px;
}
.ep-org i { margin-right: 5px; }

/* Expertise badges in hero */
.ep-hero-badges { margin-bottom: 18px; }
.ep-hero-badge {
  display: inline-flex; align-items: center;
  background: rgba(232,193,106,.12);
  border: 1px solid rgba(232,193,106,.28);
  color: var(--ep-gold);
  font-size: 12px; font-weight: 600;
  padding: 4px 12px; border-radius: 99px;
  margin: 0 6px 6px 0;
}

/* Action buttons */
.ep-hero-actions {
  display: flex; align-items: center;
  flex-wrap: wrap; gap: 8px;
}
.ep-btn {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 16px; font-weight: 600;
  padding: 8px 18px; border-radius: 8px;
  text-decoration: none; transition: all .2s;
  border: none; cursor: pointer;
  font-family: inherit;
  min-height: 42px;
  justify-content: center;
}
.ep-btn:hover{
  background-color: #525252 !important;
  color: #ffffff !important;
}
.ep-btn-outline {
    background: rgb(150 150 150 / 63%);
    border: 1px solid var(--gray-border);
    color: #ffffff;
    border-radius: 50px;
    min-width: 55px;
}
.ep-btn-outline:hover {
  background: rgb(181, 255, 220);
  color: #fff; text-decoration: none;
}
.ep-btn-icon {
  width: 36px; height: 36px; padding: 0;
  justify-content: center;
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.7);
  border-radius: 8px;
}
.ep-btn-icon:hover {
  background: rgba(232,193,106,.15);
  border-color: rgba(232,193,106,.35);
  color: var(--ep-gold);
  text-decoration: none;
}

/* ── Stats strip ───────────────────────────────────────────── */
.ep-stats-strip {
  display: flex;
  border-top: 1px solid rgba(255,255,255,.08);
  position: relative; z-index: 2;
}
.ep-stat {
  flex: 1;
  padding: 16px 20px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,.07);
}
.ep-stat:last-child { border-right: none; }
.ep-stat-num {
  display: block;
  font-size: 20px; font-weight: 700;
  color: var(--ep-gold); line-height: 1;
  margin-bottom: 4px;
}
.ep-stat-label {
  display: block;
  font-size: 10px; font-weight: 600;
  letter-spacing: .09em; text-transform: uppercase;
  color: rgba(255,255,255,.38);
}

/* ================================================================
   SIDEBAR CARDS
   ================================================================ */
.ep-card {
  background: var(--ep-white);
  border-radius: var(--ep-radius);
  box-shadow: var(--ep-shadow);
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--ep-border);
}
.ep-card-head {
  padding: 16px 24px;
  font-size: 18px; font-weight: 700;
  color: #000;
  display: flex; align-items: center; gap: 8px;
  position: relative;
  border-bottom: 1px solid var(--ep-border);
}

.ep-card-head::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--ep-gold), var(--ep-green));
    border-radius: 0 2px 2px 0;
}

.ep-card-body { padding: 18px; }

/* Contact rows */
.ep-contact-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--ep-border);
  justify-content: stretch;
}
.ep-contact-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.ep-contact-icon {
  width: 32px; height: 32px;
  background: #dffde8;
  border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}

.ep-contact-icon i { color: #1dac4b; }
.ep-contact-label {
  font-size: 10px; font-weight: 600;
  color: var(--ep-muted); line-height: 1; margin-bottom: 3px;
  text-wrap: nowrap;
}
.ep-contact-value {
  font-size: 14px; color: var(--ep-ink); font-weight: 500;
  word-break: break-all; line-height: 1.4;
}
.ep-contact-value a {
  color: var(--ep-green); text-decoration: none;
}
.ep-contact-value a:hover { text-decoration: underline; }

/* Expertise tags in sidebar */
.ep-tag {
  display: inline-flex; align-items: center;
  background: rgba(29,172,75,.08);
  border: 1px solid rgba(29,172,75,.2);
  color: var(--ep-green);
  font-size: 12px; font-weight: 600;
  padding: 5px 12px; border-radius: 50px;
  margin: 0 6px 6px 0;
}

/* Address body */
.ep-address-body {
  font-size: 14px; color: var(--ep-muted);
  line-height: 1.7;
}
.ep-address-body .field--name-field-address { font-size: 14px; }

/* Documents */
.ep-card-body .file a,
.ep-card-body .file--mime-text-plain a {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ep-green); font-weight: 600; font-size: 14px;
  text-decoration: none;
}
.ep-card-body .file a:hover { color: var(--ep-green2); }

/* ================================================================
   MAIN CONTENT SECTIONS
   ================================================================ */
.ep-section {
  background: var(--ep-white);
  border-radius: var(--ep-radius);
  box-shadow: var(--ep-shadow);
  margin-bottom: 20px;
  overflow: hidden;
  border: 1px solid var(--ep-border);
}

.ep-section-head {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--ep-border);
  position: relative;
}
.ep-section-head::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--ep-gold), var(--ep-green));
  border-radius: 0 2px 2px 0;
}
.ep-section-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, rgba(232,193,106,.12), rgba(29,172,75,.08));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.ep-section-title {
  font-size: 18px; font-weight: 700;
  color: var(--ep-ink); margin: 0; line-height: 1.2;
  letter-spacing: -.2px;
}

.ep-section-body {
  padding: 24px;
  font-size: 15px; line-height: 1.8;
  color: #4A4A5A;
}
.ep-section-body p { margin-bottom: 12px; }
.ep-section-body p:last-child { margin-bottom: 0; }
.ep-section-body ul { padding-left: 18px; }
.ep-section-body li { margin-bottom: 6px; }
.ep-section-body strong { color: var(--ep-ink); }
.ep-section-body em { color: var(--ep-green); }

/* ── Download file link inside section body ────────────────── */
.ep-section-body .file a {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--ep-green); font-weight: 600; font-size: 14px;
  text-decoration: none;
}
.ep-section-body .file a:hover { color: var(--ep-green2); }

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 991px) {
  .ep-hero { padding: 40px 0 0; }
  .ep-hero-top { flex-direction: column; align-items: center; text-align: center; gap: 20px; padding-bottom: 28px; }
  .ep-hero-badges { justify-content: center; display: flex; flex-wrap: wrap; }
  .ep-hero-actions { justify-content: center; }
  .ep-name { font-size: 26px; }
}

@media (max-width: 576px) {
  .ep-stats-strip { flex-wrap: wrap; }
  .ep-stat { flex: 0 0 50%; }
  .ep-stat:nth-child(2) { border-right: none; }
  .ep-section-body { padding: 18px; }
  .ep-card-body { padding: 14px; }
}

/* ── Admin status badge ──────────────────────────────── */
.ep-status-badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 700; letter-spacing: .4px;
  padding: 5px 12px; border-radius: 20px;
  text-transform: uppercase;
}
.ep-status--published  { background: rgba(34,197,94,.15);  color: #15803d; border: 1px solid rgba(34,197,94,.4); }
.ep-status--draft      { background: rgba(234,179,8,.15);  color: #a16207; border: 1px solid rgba(234,179,8,.4); }
.ep-status--archived   { background: rgba(100,116,139,.14); color: #475569; border: 1px solid rgba(100,116,139,.35); }
.ep-status--blocked    { background: rgba(239,68,68,.14);  color: #b91c1c; border: 1px solid rgba(239,68,68,.4); }
.ep-status--review     { background: rgba(99,102,241,.14); color: #4338ca; border: 1px solid rgba(99,102,241,.4); }
.ep-status--default    { background: rgba(0,0,0,.05); color: #4a5a68; border: 1px solid rgba(0,0,0,.15); }



