/* =========================================
   BLOG & REVIEWS — final, de-duplicated styles
   ========================================= */

/* --- Base --- */
body{
  font-family:'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height:1.6;
}
.navbar-brand{ font-weight:700; font-size:1.5rem; }

/* ---------- Hero ---------- */
.hero{
  background:url('../images/bg1.jpeg') no-repeat center center/cover;
  color:#fff; padding:120px 0; position:relative; overflow:hidden;
}
.hero .container{ position:relative; z-index:1; }
.hero::after{
  content:""; position:absolute; inset:0; background:rgba(0,0,0,.42);
}
.hero::before{
  content:""; position:absolute; inset:0;
  background:url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="8" height="8"><circle cx="4" cy="4" r="1" fill="rgba(255,255,255,.12)"/></svg>') repeat;
  opacity:.12;
}

/* ---------- Section titles / partitions ---------- */
.py-5{ padding:3.5rem 0 !important; position:relative; }
.py-5::after{
  content:""; position:absolute; left:50%; bottom:-1px; transform:translateX(-50%);
  width:min(88%,1080px); height:1px;
  background:linear-gradient(90deg,transparent,rgba(0,0,0,.08),transparent);
}
.py-5 h3{
  position:relative; display:inline-block; padding-bottom:.35rem; margin-bottom:1.25rem;
  text-align: center;
}
.py-5 h3::after{
  content:""; position:absolute; left:50%; transform:translateX(-50%); bottom:-6px;
  width:92px; height:3px; border-radius:3px;
  background:linear-gradient(90deg,#667eea,#764ba2);
}

/* ---------- Card look (shared) ---------- */
.card{
  border:1px solid #e9eef6;
  border-radius:16px;
  background:#fff;
  box-shadow:0 10px 28px rgba(0,0,0,.08);
  transition:transform .22s ease, box-shadow .22s ease;
}
.card:hover{ transform:translateY(-6px); box-shadow:0 18px 40px rgba(0,0,0,.14); }

/* ---------- Review form ---------- */
#reviewForm{
  background:rgba(255,255,255,.92);
  border:1px solid rgba(0,0,0,.06);
  border-radius:18px; padding:22px 20px;
  box-shadow:0 12px 30px rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.6);
  backdrop-filter:saturate(120%) blur(2px);
}
#reviewForm .form-label{ font-weight:700; }
#reviewForm .form-control{
  border-radius:.7rem; border:1px solid rgba(0,0,0,.12);
  box-shadow:none; transition:border-color .15s ease, box-shadow .15s ease;
}
#reviewForm .form-control:focus{
  border-color:#667eea; box-shadow:0 0 0 .22rem rgba(102,126,234,.2);
}
#reviewForm .btn.btn-primary{
  background:linear-gradient(45deg,#667eea,#764ba2);
  border:none; border-radius:28px; padding:12px 26px; font-weight:600;
  transition:transform .2s ease, filter .2s ease;
}
#reviewForm .btn.btn-primary:hover{ transform:translateY(-1px) scale(1.02); filter:brightness(1.05); }
#formMessage{ margin-top:.75rem; }

/* ---------- Star rating ---------- */
.star-rating{
  display:inline-flex; flex-direction:row-reverse; gap:.3rem;
  font-size:2rem; cursor:pointer; user-select:none;
}
.star-rating input{ display:none; }
.star-rating label{ color:#d9d9d9; transition:color .22s ease, transform .18s ease; line-height:1; padding:2px; }
.star-rating label:hover,
.star-rating label:hover ~ label{ color:#ffdd66; transform:scale(1.08); }
.star-rating input:checked ~ label{ color:#ffc107; }

/* ---------- Reviews grid (right column) ---------- */
/* grid shows ~6 cards (2 rows x 3 cols on desktop),
   container itself scrolls when more reviews load */
.reviews-scroller{
  max-height:700px;          /* desktop */
  overflow-y:auto;
  padding-right:6px;         /* room for scrollbar */
}
@media (max-width: 991.98px){ .reviews-scroller{ max-height:600px; } }
@media (max-width: 575.98px){ .reviews-scroller{ max-height:520px; } }

/* grid itself */
#reviewsContainer{
  display:grid; 
  gap:1.2rem;
  grid-template-columns:repeat(auto-fill, minmax(300px, 1fr));
  align-items:stretch;
}

/* ---------- UNIFORM review cards (fixed size + inner scroll) ---------- */
#reviewsContainer .card{
  /* fixed, uniform box */
  height: 280px;                   /* same as home */
  display:flex; flex-direction:column;
  border-radius:18px; overflow:hidden;
}
#reviewsContainer .card-body{
  display:flex; flex-direction:column; flex:1; padding:18px 20px;
}
#reviewsContainer .card-title{ font-weight:800; margin-bottom:.35rem; }
#reviewsContainer .card-subtitle{ margin-bottom:.5rem; color:#d1a53f !important; }

/* scrollable quote area — scrollbar is visible so users know there’s more */
#reviewsContainer .card-text{
  position:relative;
  background:#f9fbff;
  border:1px solid #eef2f7;
  border-radius:12px;
  padding:14px 16px 14px 44px;
  margin:0 0 10px;
  color:#3b4251; line-height:1.6;

  max-height:140px;               /* fits inside 280px card */
  overflow-y:auto;                /* inner vertical scroll */
  scrollbar-width:thin;           /* Firefox */
}
#reviewsContainer .card-text::-webkit-scrollbar{ width:8px; }
#reviewsContainer .card-text::-webkit-scrollbar-thumb{
  background:rgba(120,130,160,.45);
  border-radius:8px;
}
#reviewsContainer .card-text::-webkit-scrollbar-thumb:hover{
  background:rgba(120,130,160,.65);
}

/* subtle opening quote */
#reviewsContainer .card-text::before{
  content:"“"; position:absolute; left:12px; top:2px;
  font-size:44px; line-height:1; color:#a9b4c9; font-weight:700;
}

#reviewsContainer small.text-muted{
  display:block; margin-top:6px; color:#6b7280 !important; font-size:.85rem;
}

/* ---------- Minor helpers ---------- */
.section-alt{ background:#f8fafc; }

@media (max-width: 992px){
  .hero{ padding:96px 0; }
}
@media (max-width: 576px){
  .hero{ padding:72px 0; }
  .star-rating{ font-size:1.75rem; }
  #reviewForm{ padding:18px 16px; }
}
 
/* blog cards shell (re-uses your card look) */
#blogList .card { min-height: 220px; }
#blogList .excerpt {
  max-height: 96px;
  overflow: auto;
  scrollbar-width: thin;
}
#blogList .excerpt::-webkit-scrollbar { width: 8px; }
#blogList .excerpt::-webkit-scrollbar-thumb { background: rgba(120,130,160,.35); border-radius: 8px; }
/* ===== Community feed (LinkedIn-ish) ===== */
.composer .avatar { width:40px;height:40px;border-radius:50%; background:#e5e9f5; }
.avatar-sm { width:36px;height:36px;border-radius:50%; background:#e5e9f5; }

.feed-list { display:flex; flex-direction:column; gap:14px; }

.feed-card{
  border:1px solid #e9eef6; border-radius:16px; background:#fff;
  box-shadow:0 10px 28px rgba(0,0,0,.06);
  transition:transform .18s ease, box-shadow .18s ease;
}
.feed-card:hover{ transform:translateY(-2px); box-shadow:0 14px 36px rgba(0,0,0,.10); }

.feed-head{ padding:14px 16px 0; }
.feed-meta{ color:#6b7280; font-size:.9rem; }
.feed-body{ padding:10px 16px 0; }
.feed-desc{ color:#475569; }
.feed-tags{ padding:8px 16px 0; display:flex; flex-wrap:wrap; gap:8px; }
.tag-chip{
  font-size:.8rem; padding:.22rem .5rem; border-radius:999px;
  border:1px solid #e4e8f3; background:#f7f9ff; color:#475569;
}
.feed-actions{
  display:flex; gap:10px; align-items:center; justify-content:space-between;
  padding:12px 16px; border-top:1px solid #eef2f7;
}
.feed-actions .btn-sm{ border-radius:999px; }

.feed-skeleton{
  border:1px solid #e9eef6; border-radius:16px; padding:16px; background:#fff;
}
.skel-line{ height:12px; background:linear-gradient(90deg,#eef2f7,#f7f9ff,#eef2f7);
  background-size:200% 100%; animation:shimmer 1.4s infinite; border-radius:6px; margin:8px 0;
}
@keyframes shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}

@media (max-width:576px){
  .feed-actions{ flex-wrap:wrap; gap:8px; }
}
.h3{
  text-align: center;
}
/* --- Scrollable feed area (show ~6 posts, rest scroll) --- */
.feed-scroller {
  max-height: 720px;   /* desktop: ~6 cards */
  overflow-y: auto;
  padding-right: 6px;  /* room for scrollbar */
}

@media (max-width: 991.98px) {
  .feed-scroller { max-height: 600px; }
}
@media (max-width: 575.98px) {
  .feed-scroller { max-height: 520px; }
}

/* custom scrollbar */
.feed-scroller::-webkit-scrollbar { width: 8px; }
.feed-scroller::-webkit-scrollbar-thumb {
  background: rgba(120,130,160,.35);
  border-radius: 8px;
}
.feed-scroller::-webkit-scrollbar-thumb:hover {
  background: rgba(120,130,160,.55);
}
.community-header {
  text-align: center; /* ✅ section ke andar sab center */
  margin-bottom: 2rem;
}

.section-title {
  position: relative;
  display: inline-block;
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 1rem;
  overflow: hidden;
}

.section-title::after {
  content: "";
  display: block;
  width: 0;   /* start with 0 */
  height: 4px;
  border-radius: 2px;
  margin: 8px auto 0;
  background: linear-gradient(90deg, #6a11cb, #2575fc);
  animation: underlineGrow 1s ease forwards;
}

@keyframes underlineGrow {
  from {
    width: 0;
  }
  to {
    width: 140px;  /* final width */
  }
}

.section-subtitle {
  font-size: 1rem;
  color: #555;
  max-width: 700px;
  margin: 0 auto; /* ✅ center the paragraph also */
}
body.modal-open {
  overflow: hidden;
}
/* --- BLOG READER THEME FIXES (put at very end) --- */

/* kill any section/card overlays behind the post area */
section.py-5,
#postWrap {
  background: transparent !important;
}
section.py-5::before,
section.py-5::after {
  display: none !important;
}

/* make all text in the reader area readable on dark themes */
#postWrap,
#postWrap p,
#postWrap .lead,
#postWrap h1, #postWrap h2, #postWrap h3,
#postWrap span,
#postWrap .small,
#postWrap .text-muted {
color: #161719ff !important;}
#postWrap .text-muted { opacity: .8; }

/* buttons + like count visibility */
#postWrap #likeCount { color:#0e1011ff  !important; }
#postWrap .btn-outline-success,
#postWrap .btn-outline-secondary,
#postWrap .btn-outline-primary {
color: #161719ff !important;  border-color: #9aa4b2 !important;
}
#postWrap .btn-outline-success:hover,
#postWrap .btn-outline-secondary:hover,
#postWrap .btn-outline-primary:hover {
  color: #0b111a !important;
  background: #dfe6f1 !important;
  border-color: #dfe6f1 !important;
}

/* keep the form fields white (so you can see typed text) */
#postWrap input.form-control,
#postWrap textarea.form-control {
  background: #ffffff !important;
color: #161719ff !important;  border-color: #cfd6df !important;
}

/* ensure the share dropdown is a white card */
#shareMenu {
  background: #ffffff !important;
  color: #222 !important;
  border: 1px solid rgba(0,0,0,.08) !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.15) !important;
}
#shareMenu a { color: #222 !important; }
/* Paragraph formatting stays */
/* Make sure bold/italic render as expected inside post body */
#postContent b,
#postContent strong {
  font-weight: 700 !important;
  color: inherit !important;
}
#postContent i,
#postContent em {
  font-style: italic !important;
  color: #161719ff !important;
}
/* Lists look clean */
#postContent ul, 
#postContent ol { 
  padding-left: 1.25rem; 
  margin: .6rem 0; 
}
/* Ensure consistent blog content background */
#postContent {
  background: transparent !important;
color: #161719ff !important;}

#postContent * {
  background: transparent !important;
color: #161719ff !important;}
/* Quill box ko form-control jaisa look dene ke liye */
#pEditor .ql-container {
  height: 100%;
  border-radius: .5rem;
}
#pEditor .ql-toolbar {
  border-top-left-radius: .5rem;
  border-top-right-radius: .5rem;
}
#pEditor .ql-container.ql-snow {
  border-bottom-left-radius: .5rem;
  border-bottom-right-radius: .5rem;
}
/* Create section styling */
#community-create .card { border-radius: 16px; }

/* Quill editor fixed height + internal vertical scroll */
#pEditor {
  height: 420px;                     /* adjust as you like */
  border: 1px solid #ced4da;
  border-radius: .5rem;
  background: #fff;
}
#pEditor .ql-container {
  height: calc(420px - 42px);        /* 42px ≈ toolbar height */
  overflow-y: auto;
  border-bottom-left-radius: .5rem;
  border-bottom-right-radius: .5rem;
}
#pEditor .ql-toolbar {
  border-top-left-radius: .5rem;
  border-top-right-radius: .5rem;
}

/* Feed scrolling (unchanged) */
.feed-scroller { max-height: 720px; overflow-y: auto; padding-right: 6px; }
@media (max-width: 992px){ .feed-scroller{ max-height: 600px; } }
@media (max-width: 576px){ .feed-scroller{ max-height: 520px; } }
/* === Blog Page Background Sections === */

/* === Brand-aligned background styling for blog.html === */

/* Hero (top banner) */

/* Alternate light purple background sections */
.section-alt {
  background: #f8f6ff; /* soft purple tint to match brand */
}

/* Ensure global base stays white */
.blog-page {
  background-color: #ffffff;
}

/* Section separation */
section + section {
  border-top: 1px solid rgba(123, 47, 247, 0.06); /* subtle purple divider */
}

/* Card polish */
.card {
  background-color: #fff;
  border: none;
  box-shadow: 0 4px 20px rgba(123, 47, 247, 0.06);
  border-radius: 1rem;
}

/* Optional heading underline accent */
.section-title::after {
  background: linear-gradient(90deg, #7b2ff7, #f107a3);
}

/* Optional CTA or button hover refinement */
.btn-primary:hover {
  background: linear-gradient(90deg, #7b2ff7, #f107a3);
  border-color: transparent;
  box-shadow: 0 0 10px rgba(123,47,247,0.3);
}
