/* ═══════════════════════════════════════════════
   PF DOST — Modern Light Theme
   ═══════════════════════════════════════════════ */
:root {
  --primary:       #1a3355;
  --primary-light: #23477a;
  --accent:        #e8821a;
  --accent-light:  #FF9933;
  --green:         #14803c;
  --bg:            #f0f4f8;
  --card:          #ffffff;
  --text:          #1a2332;
  --text-muted:    #5a6a7e;
  --border:        #dde5ef;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 1px 3px rgba(0,0,0,0.06), 0 4px 14px rgba(0,0,0,0.07);
  --shadow-md:     0 4px 20px rgba(0,0,0,0.12);
  --t:             0.2s ease;
  --font:         -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  margin: 0;
  line-height: 1.6;
}

/* ── TOP BAR ── */
.top-bar {
  position: sticky;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  z-index: 999;
  min-height: 54px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  border-bottom: 3px solid var(--accent-light);
}
.top-bar a {
  color: rgba(255,255,255,0.88);
  font-weight: 600;
  font-size: 0.87rem;
  text-decoration: none;
  margin: 0 2px;
  padding: 6px 12px;
  border-radius: 6px;
  transition: var(--t);
  letter-spacing: 0.1px;
}
.top-bar a:hover { background: rgba(255,255,255,0.13); color: #fff; }
.top-bar .site-brand {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.3px;
}
.top-bar .logout-link {
  color: var(--accent-light) !important;
  font-weight: 700;
}

/* ── LAYOUT ── */
.main-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 20px;
  display: flex;
  gap: 22px;
  align-items: flex-start;
}

/* ── SECTION HEADINGS ── */
h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
h2::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 20px;
  background: linear-gradient(to bottom, var(--accent-light), var(--accent));
  border-radius: 2px;
}

/* ── PRIMARY BUTTON ── */
.button {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%) !important;
  color: #fff !important;
  font-weight: 700;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  padding: 10px 20px;
  border: none;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--t);
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(232,130,26,0.38);
  letter-spacing: 0.3px;
  margin-bottom: 16px;
}
.button:hover {
  background: linear-gradient(135deg, var(--accent) 0%, #c96800 100%) !important;
  transform: translateY(-1px);
  box-shadow: 0 5px 16px rgba(232,130,26,0.48);
}

/* ── CATEGORY STRIP ── */
.category-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}
.category-strip a {
  background: var(--card) !important;
  color: var(--text-muted) !important;
  font-weight: 600;
  font-size: 0.78rem;
  border-radius: 20px;
  padding: 5px 14px;
  border: 1.5px solid var(--border);
  text-decoration: none !important;
  transition: var(--t);
  white-space: nowrap;
}
.category-strip a:hover {
  border-color: var(--accent-light);
  color: var(--accent) !important;
  background: #fff8f0 !important;
}
.category-strip a.active {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(26,51,85,0.25);
}

/* ── SEARCH BAR ── */
input[type="text"], input[type="search"], input[type="email"], input[type="password"] {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-size: 0.88rem;
  font-family: var(--font);
  color: var(--text);
  background: var(--card);
  transition: var(--t);
  outline: none;
}
input[type="text"]:focus, input[type="search"]:focus,
input[type="email"]:focus, input[type="password"]:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,51,85,0.1);
}
input[type="submit"], button[type="submit"] {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 9px 20px;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: var(--font);
  cursor: pointer;
  transition: var(--t);
}
input[type="submit"]:hover, button[type="submit"]:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

/* ── POST CARDS ── */
.post {
  background: var(--card);
  padding: 16px 18px;
  border-radius: var(--radius);
  margin-bottom: 11px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: var(--t);
}
.post:hover {
  box-shadow: var(--shadow-md);
  border-color: #c0d0e6;
  transform: translateY(-1px);
}
.post-title {
  font-size: 0.93rem;
  font-weight: 700;
  margin-bottom: 5px;
  line-height: 1.4;
}
.post-title a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--t);
}
.post-title a:hover { color: var(--accent); }

.post-snippet {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 10px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-meta {
  color: var(--text-muted);
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.post-meta a { color: var(--primary-light); font-weight: 600; text-decoration: none; }
.post-meta a:hover { text-decoration: underline; }

.vote-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.vote-buttons button {
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--bg);
  padding: 3px 10px 3px 7px;
  border-radius: 20px;
  transition: var(--t);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font);
}
.vote-buttons button:hover {
  background: #fff8f0;
  border-color: var(--accent-light);
  color: var(--accent);
}

/* ── PAGINATION ── */
.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 20px 0;
  justify-content: center;
}
.pagination a {
  background: var(--card) !important;
  color: var(--primary) !important;
  font-weight: 600;
  font-size: 0.84rem;
  border-radius: var(--radius-sm);
  padding: 7px 13px;
  border: 1.5px solid var(--border);
  text-decoration: none !important;
  transition: var(--t);
}
.pagination a:hover, .pagination a.active {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary);
}

/* ── SIDEBAR ── */
aside, .sidebar { min-width: 230px; max-width: 260px; flex-shrink: 0; }

.pf-resources-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.pf-resources-card h3 {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent-light);
  display: flex;
  align-items: center;
  gap: 6px;
}

.side-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  background: var(--bg) !important;
  color: var(--primary) !important;
  font-weight: 700;
  font-size: 0.82rem;
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  text-decoration: none !important;
  margin-bottom: 9px;
  transition: var(--t);
  letter-spacing: 0.2px;
}
.side-button:hover {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: var(--primary);
  box-shadow: 0 3px 10px rgba(26,51,85,0.2);
  transform: translateY(-1px);
}
.side-button:last-child { margin-bottom: 0; }

.news-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-top: 0;
}
.news-box h3 {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-light);
}
.news-box a { color: var(--primary); text-decoration: none; font-size: 0.83rem; }
.news-box a:hover { color: var(--accent); }

/* ── FORM PAGES ── */
textarea, select {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 14px;
  font-family: var(--font);
  font-size: 0.88rem;
  color: var(--text);
  background: var(--card);
  transition: var(--t);
  outline: none;
}
textarea:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,51,85,0.1);
}

/* ── NOTIFICATION BELL ── */
#notif-bell { cursor: pointer; font-size: 1.3rem; position: relative; }
#notif-count {
  position: absolute;
  top: -6px; right: -8px;
  background: #e53e3e;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 50%;
  width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
}
#notif-dropdown {
  position: absolute;
  right: 0; top: 110%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  width: 280px;
  max-height: 340px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}
#notif-dropdown.show { display: block; }
#notif-list a {
  display: block;
  padding: 10px 14px;
  font-size: 0.82rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  transition: var(--t);
}
#notif-list a:hover { background: var(--bg); }

/* ── GENERAL LINKS ── */
a { color: var(--primary); transition: var(--t); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .main-container { padding: 14px 12px; gap: 14px; }
  aside, .sidebar { max-width: 100%; min-width: 0; }
}
@media (max-width: 700px) {
  .main-container { flex-direction: column; }
  .top-bar { padding: 10px 16px; min-height: auto; }
  .top-bar a { font-size: 0.82rem; padding: 5px 8px; }
}

/* ═══ SHARE BAR (post cards) ═══ */
/* ─── Share Buttons – compact icon-only ─── */
.post-share {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e8edf2;
}
.share-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-light, #6b7c93);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-right: 2px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  transition: transform .15s, opacity .15s;
  padding: 0;
  line-height: 1;
}
.share-btn:hover { transform: scale(1.15); opacity: .85; }
.share-wa  { background: #25D366; color: #fff; }
.share-x   { background: #000;    color: #fff; font-size: 12px; font-weight: 700; font-family: serif; }
.share-fb  { background: #1877F2; color: #fff; }
.share-tg  { background: #229ED9; color: #fff; }
.share-copy { background: #f0f4f8; color: #1a3355; border: 1px solid #d1dae6; }

/* ─── Share + Rating card (view_post) ─── */
.share-rating-card {
  background: #f8fafc;
  border: 1px solid #e8edf2;
  border-radius: var(--radius, 12px);
  padding: 16px 20px;
  margin: 18px 0;
}
.share-rating-card h4 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary, #1a3355);
}
.stars-wrap { display: flex; gap: 4px; margin-bottom: 6px; }
.star-btn {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #ccc;
  padding: 0;
  transition: color .15s, transform .1s;
  line-height: 1;
}
.star-btn:hover, .star-btn.lit { color: #f5a623; }
.star-btn:hover { transform: scale(1.2); }
.rating-feedback { font-size: 12px; color: #6b7c93; min-height: 16px; margin-bottom: 10px; }
.rating-divider { border: none; border-top: 1px solid #e8edf2; margin: 12px 0; }
.share-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

/* ─── Calc share row ─── */
#calcShareRow {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

/* ─── Calc star rating ─── */
#calcStars .calc-star {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: #ccc;
  padding: 0;
  transition: color .15s, transform .1s;
  line-height: 1;
}
#calcStars .calc-star:hover,
#calcStars .calc-star.lit { color: #f5a623; }
#calcStars .calc-star:hover { transform: scale(1.2); }

/* ─── Action-row share button (calculator) ─── */
.btn-action.btn-share {
  background: var(--primary, #1a3355);
  color: #fff;
  border: none;
  cursor: pointer;
}
.btn-action.btn-share:hover { background: var(--accent, #e8821a); }
