/* ==========================================================================
   PRIAHUB — VERIFIED Q&A KNOWLEDGE DIRECTORY STYLES
   Namespace: .ph-*
   ========================================================================== */

:root {
  --ph-bg: #f8fafc;
  --ph-card-bg: #ffffff;
  --ph-primary: #0284c7;
  --ph-primary-hover: #0369a1;
  --ph-primary-light: #f0f9ff;
  --ph-accent: #10b981;
  --ph-accent-light: #ecfdf5;
  --ph-border: #e2e8f0;
  --ph-border-light: #f1f5f9;
  --ph-text-main: #0f172a;
  --ph-text-muted: #64748b;
  --ph-text-subtle: #94a3b8;
  --ph-radius-sm: 8px;
  --ph-radius-md: 14px;
  --ph-radius-lg: 20px;
  --ph-shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --ph-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.ph-body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--ph-bg);
  color: var(--ph-text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* NAVBAR */
.ph-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--ph-border);
  padding: 16px 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.ph-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ph-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ph-text-main);
}

.ph-brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #0284c7 0%, #10b981 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 800;
  font-size: 16px;
}

.ph-brand-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.ph-brand-tagline {
  font-size: 11px;
  color: var(--ph-text-muted);
  font-weight: 600;
  text-transform: uppercase;
}

.ph-nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.ph-nav-links a {
  font-size: 14px;
  font-weight: 600;
  color: var(--ph-text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.ph-nav-links a:hover, .ph-nav-links a.ph-active {
  color: var(--ph-primary);
}

/* HERO SEARCH STRIP */
.ph-hero-search-section {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #ffffff;
  padding: 48px 24px 40px;
  text-align: center;
}

.ph-hero-search-inner {
  max-width: 760px;
  margin: 0 auto;
}

.ph-hero-badge {
  display: inline-block;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.ph-hero-title {
  font-size: 30px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.ph-hero-desc {
  font-size: 15px;
  color: #94a3b8;
  margin-bottom: 24px;
}

.ph-search-bar-wrap {
  position: relative;
  max-width: 640px;
  margin: 0 auto 20px;
}

.ph-search-input {
  width: 100%;
  padding: 16px 20px 16px 50px;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.95);
  font-size: 15px;
  font-family: inherit;
  color: var(--ph-text-main);
  outline: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.ph-search-input:focus {
  background: #ffffff;
  border-color: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.25);
}

.ph-search-icon {
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
}

/* TAG FILTER CHIPS */
.ph-tag-chips {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.ph-tag-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ph-tag-btn:hover, .ph-tag-btn.ph-tag-active {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
}

/* MAIN LAYOUT WRAPPER */
.ph-main-container {
  max-width: 1200px;
  margin: 36px auto 60px;
  padding: 0 24px;
  width: 100%;
  flex: 1;
}

.ph-directory-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 28px;
}

/* QA FEED CARDS */
.ph-qa-feed {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ph-qa-card {
  background-color: var(--ph-card-bg);
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius-lg);
  padding: 28px;
  box-shadow: var(--ph-shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ph-qa-card:hover {
  box-shadow: var(--ph-shadow-md);
}

.ph-qa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.ph-cat-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #0284c7;
  background-color: #f0f9ff;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid #bae6fd;
}

.ph-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #10b981;
  background-color: #ecfdf5;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid #a7f3d0;
}

.ph-question-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--ph-text-main);
  line-height: 1.4;
  margin-bottom: 14px;
}

.ph-answer-preview {
  font-size: 14px;
  color: #334155;
  line-height: 1.7;
  margin-bottom: 16px;
}

.ph-answer-detail-box {
  background-color: #f8fafc;
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius-md);
  padding: 18px 20px;
  margin: 16px 0;
  display: none;
}

.ph-answer-detail-box.ph-expanded {
  display: block;
}

.ph-answer-detail-box h5 {
  font-size: 14px;
  font-weight: 700;
  color: var(--ph-text-main);
  margin-bottom: 8px;
}

.ph-answer-detail-box ul {
  padding-left: 18px;
  font-size: 13px;
  color: #475569;
}

.ph-answer-detail-box li {
  margin-bottom: 6px;
}

.ph-qa-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--ph-border-light);
  padding-top: 14px;
  margin-top: 14px;
}

.ph-expert-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ph-expert-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #0284c7;
}

.ph-expert-name {
  font-size: 12px;
  font-weight: 700;
  color: var(--ph-text-main);
}

.ph-expert-title {
  font-size: 11px;
  color: var(--ph-text-muted);
}

.ph-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ph-btn-toggle {
  background: none;
  border: 1px solid var(--ph-border);
  padding: 6px 12px;
  border-radius: var(--ph-radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--ph-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.ph-btn-toggle:hover {
  background-color: var(--ph-primary-light);
}

.ph-btn-vote {
  background: none;
  border: 1px solid #cbd5e1;
  padding: 6px 12px;
  border-radius: var(--ph-radius-sm);
  font-size: 12px;
  font-weight: 700;
  color: var(--ph-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
}

.ph-btn-vote:hover, .ph-btn-vote.ph-voted {
  background-color: #ecfdf5;
  border-color: #10b981;
  color: #059669;
}

/* RIGHT SIDEBAR */
.ph-sidebar-widget {
  background-color: var(--ph-card-bg);
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius-lg);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--ph-shadow-sm);
}

.ph-widget-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--ph-text-main);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--ph-border-light);
}

.ph-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ph-stat-box {
  background-color: #f8fafc;
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius-md);
  padding: 14px;
  text-align: center;
}

.ph-stat-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--ph-primary);
  margin-bottom: 2px;
}

.ph-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--ph-text-muted);
}

.ph-trending-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ph-trending-item a {
  font-size: 13px;
  font-weight: 600;
  color: var(--ph-text-main);
  text-decoration: none;
  line-height: 1.4;
  display: block;
  transition: color 0.2s ease;
}

.ph-trending-item a:hover {
  color: var(--ph-primary);
}

/* GENERIC SUBPAGE CARD */
.ph-subpage-card {
  background-color: var(--ph-card-bg);
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius-lg);
  padding: 40px;
  box-shadow: var(--ph-shadow-sm);
  margin-bottom: 32px;
}

.ph-subpage-card h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--ph-text-main);
  margin-bottom: 8px;
}

.ph-subpage-card h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--ph-text-main);
  margin: 28px 0 12px;
}

.ph-subpage-card p {
  font-size: 14px;
  color: #334155;
  line-height: 1.8;
  margin-bottom: 16px;
}

.ph-subpage-card ul, .ph-subpage-card ol {
  margin-bottom: 20px;
  padding-left: 20px;
}

.ph-subpage-card li {
  margin-bottom: 8px;
  font-size: 14px;
  color: #334155;
}

/* FORMS */
.ph-form-group {
  margin-bottom: 20px;
}

.ph-form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--ph-text-main);
}

.ph-form-input, .ph-form-textarea, .ph-form-select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius-sm);
  font-family: inherit;
  font-size: 14px;
  background-color: #ffffff;
}

.ph-form-input:focus, .ph-form-textarea:focus, .ph-form-select:focus {
  outline: none;
  border-color: var(--ph-primary);
  box-shadow: 0 0 0 3px var(--ph-primary-light);
}

.ph-btn-primary {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  color: #ffffff;
  border: none;
  padding: 12px 24px;
  border-radius: var(--ph-radius-sm);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.ph-btn-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
}

/* FOOTER */
.ph-footer {
  background-color: #ffffff;
  border-top: 1px solid var(--ph-border);
  padding: 32px 28px;
  margin-top: auto;
}

.ph-footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.ph-footer-links {
  display: flex;
  gap: 20px;
  list-style: none;
  flex-wrap: wrap;
}

.ph-footer-links a {
  font-size: 13px;
  color: var(--ph-text-muted);
  text-decoration: none;
}

.ph-footer-links a:hover {
  color: var(--ph-primary);
}

.ph-footer-copy {
  font-size: 12px;
  color: var(--ph-text-subtle);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
  .ph-directory-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .ph-hero-title {
    font-size: 22px;
  }
  
  .ph-hero-search-section {
    padding: 32px 16px;
  }
  
  .ph-main-container {
    padding: 0 16px;
  }
}
