:root{
  --bg:#f6f8fc;
  --panel:#ffffff;
  --text:#0f172a;
  --soft:#64748b;
  --line:#e2e8f0;
  --blue:#0b5cff;
  --blue-dark:#1d4ed8;
  --shadow-soft:0 10px 28px rgba(15,23,42,.06);
  --shadow-card:0 8px 22px rgba(15,23,42,.06);
  --shadow-modal:0 20px 60px rgba(15,23,42,.22);
}

*{
  box-sizing:border-box;
}

html, body{
  margin:0;
  padding:0;
}

body{
  font-family:Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.05), transparent 30%),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
  color:var(--text);
}

.container{
  max-width:1240px;
  margin:0 auto;
  padding:24px 24px 56px;
}

/* header */

.community-header{
  margin-bottom:14px;
}

.community-brand{
  display:inline-flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:inherit;
}

.community-logo{
  width:52px;
  height:52px;
  object-fit:contain;
  display:block;
}

.community-brand-copy{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.community-eyebrow{
  font-size:10px;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--soft);
  font-weight:700;
}

.community-brand-name{
  font-size:18px;
  font-weight:800;
  letter-spacing:-0.02em;
  color:var(--text);
}

/* hero */

.hero.hero-card{
  position:relative;
  overflow:hidden;
  background:linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  border:1px solid var(--line);
  border-radius:22px;
  padding:28px 32px;
  margin-bottom:22px;
  box-shadow:var(--shadow-soft);
}

.hero.hero-card::after{
  content:"";
  position:absolute;
  right:-18px;
  top:-18px;
  width:140px;
  height:140px;
  background:radial-gradient(circle, rgba(37,99,235,.10), transparent 72%);
  pointer-events:none;
}

.hero-copy{
  position:relative;
  z-index:1;
  max-width:680px;
}

.hero-kicker{
  display:inline-block;
  font-size:11px;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--blue-dark);
  font-weight:800;
  margin-bottom:10px;
}

.hero h1{
  margin:0;
  font-size:clamp(30px, 4vw, 48px);
  line-height:1.04;
  letter-spacing:-0.035em;
  max-width:12ch;
}

.subtitle{
  margin:14px 0 0;
  max-width:620px;
  font-size:17px;
  line-height:1.65;
  color:var(--soft);
}

.hero-actions{
  margin-top:18px;
}

/* buttons */

.join-btn,
.btn{
  border:none;
  cursor:pointer;
  transition:all .2s ease;
}

.join-btn{
  padding:11px 16px;
  border-radius:12px;
  background:var(--blue);
  color:#fff;
  font-weight:700;
  font-size:14px;
  box-shadow:0 8px 20px rgba(11,92,255,.18);
}

.join-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 12px 24px rgba(11,92,255,.22);
}

.btn{
  margin-top:12px;
  padding:8px 12px;
  border-radius:9px;
  background:var(--blue);
  color:#fff;
  font-size:12px;
  font-weight:600;
}

/* filters */

.filters{
  display:flex;
  flex-direction:column;
  gap:10px;
  background:rgba(255,255,255,.82);
  backdrop-filter:blur(8px);
  border:1px solid var(--line);
  border-radius:18px;
  padding:16px;
  margin-bottom:28px;
  box-shadow:var(--shadow-soft);
}

.filters input{
  width:100%;
  padding:12px 14px;
  border-radius:12px;
  border:1px solid #d7e0ea;
  font-size:14px;
  background:#fff;
  outline:none;
}

.filters input:focus{
  border-color:#93c5fd;
  box-shadow:0 0 0 4px rgba(59,130,246,.08);
}

.filter-chips{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.filter-chips span{
  padding:7px 12px;
  border-radius:999px;
  background:#f1f5f9;
  font-size:12px;
  cursor:pointer;
  font-weight:600;
  color:#334155;
}

.filter-chips span.active{
  background:var(--blue);
  color:#fff;
}

/* sections */

.featured-section{
  margin-top:28px;
  margin-bottom:36px;
}

.featured-section.hidden{
  display:none;
}

.all-consultants-section{
  margin-top:12px;
}

.section-header{
  margin-bottom:14px;
}

.section-header h2{
  margin:0 0 6px 0;
  font-size:28px;
  line-height:1.2;
  letter-spacing:-0.02em;
}

.section-header p{
  margin:0;
  color:var(--soft);
  font-size:15px;
}

/* grid cards */

.grid{
  display:grid;
  grid-template-columns:repeat(4, 1fr);
  gap:24px;
}

.card{
  background:#fff;
  border-radius:16px;
  padding:18px 16px;
  text-align:center;
  box-shadow:var(--shadow-card);
  transition:all .2s ease;
  border:1px solid #edf2f7;
}

.card:hover{
  transform:translateY(-4px);
  box-shadow:0 12px 28px rgba(15,23,42,.08);
}

.card img{
  width:78px;
  height:78px;
  border-radius:50%;
  margin-bottom:12px;
  object-fit:cover;
}

.card-avatar{
  width:78px;
  height:78px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  color:white;
  font-weight:700;
  font-size:20px;
  margin:0 auto 12px;
}

.name{
  font-weight:700;
  font-size:15px;
  margin-bottom:4px;
}

.title{
  font-size:13px;
  color:var(--soft);
  min-height:32px;
}

.rating{
  color:#f59e0b;
  font-size:14px;
  margin-top:6px;
}

.rating span{
  color:#b45309;
  font-weight:600;
  margin-left:4px;
}

.exp{
  font-size:12px;
  margin-top:6px;
  color:#334155;
}

.tags{
  margin-top:10px;
  min-height:48px;
}

.tags span{
  background:#eef2ff;
  color:#4338ca;
  padding:3px 8px;
  border-radius:999px;
  font-size:11px;
  margin:2px;
  display:inline-block;
}

.badge.verified{
  display:inline-block;
  margin-left:6px;
  font-size:11px;
  color:#10b981;
}

.badge-featured{
  display:inline-flex;
  align-items:center;
  margin-left:8px;
  padding:3px 8px;
  border-radius:999px;
  background:#fef3c7;
  color:#92400e;
  border:1px solid #fcd34d;
  font-size:11px;
  font-weight:800;
  vertical-align:middle;
}

.strength-mini{
  margin-top:6px;
  font-size:12px;
  font-weight:700;
  color:#2563eb;
}

.featured-grid .card{
  border:1px solid #fde68a;
  box-shadow:0 12px 28px rgba(15,23,42,.08);
}

/* cta */

.cta{
  margin-top:42px;
  padding:28px;
  border-radius:18px;
  background:linear-gradient(135deg, #eff6ff, #eef2ff);
  border:1px solid #dbeafe;
  text-align:left;
}

.cta h2{
  margin:0 0 8px 0;
  font-size:26px;
}

.cta p{
  margin:0 0 16px 0;
  color:var(--soft);
  max-width:760px;
}

/* modal */

.modal.hidden{
  display:none !important;
}

body.modal-open{
  overflow:hidden;
}

.modal{
  position:fixed;
  inset:0;
  z-index:9999;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  padding:24px 16px;
  box-sizing:border-box;
}

.modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.45);
  backdrop-filter:blur(2px);
}

.modal-card{
  position:relative;
  z-index:2;
  width:min(760px, 100%);
  max-height:calc(100vh - 48px);
  margin:0 auto;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  box-sizing:border-box;
  background:#fff;
  border-radius:18px;
  box-shadow:var(--shadow-modal);
  padding:22px;
}

.modal-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:18px;
}

.modal-header h3{
  margin:0;
  font-size:22px;
}

.modal-close{
  border:none;
  background:transparent;
  font-size:28px;
  line-height:1;
  cursor:pointer;
  color:#64748b;
}

/* form */

.join-form{
  display:grid;
  gap:14px;
}

.form-row{
  display:grid;
  gap:6px;
}

.form-row label{
  display:block;
  font-size:13px;
  margin-bottom:6px;
  color:#334155;
  font-weight:600;
}

.form-row input,
.form-row textarea,
.join-form select{
  width:100%;
  box-sizing:border-box;
  border:1px solid #dbe3ee;
  border-radius:12px;
  padding:12px 14px;
  font:inherit;
  outline:none;
  background:#f8fafc;
  font-size:14px;
  transition:all .2s ease;
  appearance:none;
}

.form-row input:focus,
.form-row textarea:focus,
.join-form select:focus{
  border-color:#2563eb;
  background:#fff;
  box-shadow:0 0 0 3px rgba(37,99,235,.1);
}

.join-form select{
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 10px center;
  background-size:16px;
}

.form-grid-2{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.phone-row{
  display:grid;
  grid-template-columns:110px 1fr;
  gap:8px;
}

.field-note{
  font-size:11px;
  color:#64748b;
  font-weight:500;
}

.modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:4px;
}

.btn-secondary-lite{
  padding:10px 14px;
  border:1px solid #dbe3ee;
  border-radius:10px;
  background:#fff;
  color:#334155;
  cursor:pointer;
  font-weight:600;
}

/* skill ui */

.skill-suggestions{
  border:1px solid #dbe3ee;
  border-radius:12px;
  background:#fff;
  box-shadow:0 10px 24px rgba(15,23,42,.08);
  max-height:180px;
  overflow-y:auto;
  margin-top:6px;
}

.skill-suggestion-item{
  padding:10px 12px;
  cursor:pointer;
  font-size:14px;
}

.skill-suggestion-item:hover{
  background:#f8fafc;
}

.skill-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:10px;
  min-height:16px;
}

.skill-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:7px 10px;
  background:#eef2ff;
  color:#3730a3;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
}

.skill-chip button{
  border:none;
  background:transparent;
  cursor:pointer;
  color:#3730a3;
  font-size:14px;
  line-height:1;
  padding:0;
}

/* success */

.join-success{
  text-align:center;
  padding:40px 20px;
}

.success-icon{
  width:64px;
  height:64px;
  margin:0 auto 20px;
  background:linear-gradient(135deg, #4caf50, #2ecc71);
  color:white;
  font-size:32px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  animation:popIn .4s ease;
}

@keyframes popIn{
  0%{
    transform:scale(.5);
    opacity:0;
  }
  100%{
    transform:scale(1);
    opacity:1;
  }
}

.join-success h3{
  margin-bottom:10px;
}

.join-success p{
  color:#666;
  line-height:1.5;
}

#joinSuccessState.hidden,
.join-success[hidden]{
  display:none !important;
}

/* misc */

.pill{
  display:inline-block;
  background:#eef2ff;
  color:#4338ca;
  padding:6px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  margin:4px 6px 0 0;
}

#highlights{
  padding-left:18px;
}

#highlights li{
  margin-bottom:6px;
}

/* responsive */

@media (max-width:1100px){
  .grid{
    grid-template-columns:repeat(2, 1fr);
  }
}

@media (max-width:700px){
  .container{
    padding:18px 16px 40px;
  }

  .community-logo{
    width:46px;
    height:46px;
  }

  .community-brand-name{
    font-size:16px;
  }

  .hero.hero-card{
    padding:22px 20px 20px;
    border-radius:18px;
  }

  .hero h1{
    font-size:34px;
    max-width:9ch;
  }

  .subtitle{
    font-size:16px;
  }

  .grid{
    grid-template-columns:1fr;
  }

  .cta{
    padding:20px;
  }

  .form-grid-2{
    grid-template-columns:1fr;
  }

  .phone-row{
    grid-template-columns:1fr;
  }

  .modal{
    padding:12px;
  }

  .modal-card{
    width:100%;
    max-height:calc(100vh - 24px);
    border-radius:16px;
    padding:18px;
  }
}

.community-brand-row{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:14px;
}

.community-brand-logo{
  width:48px;
  height:48px;
  object-fit:contain;
  display:block;
}

.community-brand-copy{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.community-brand-kicker{
  font-size:10px;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:#64748b;
  font-weight:700;
}

.community-brand-name{
  font-size:16px;
  font-weight:800;
  letter-spacing:-0.02em;
  color:#0f172a;
}
