/* BPFS document sections */
.doc-section {
  background: white;
  padding: 2rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  scroll-margin-top: 1rem;
}

.doc-section h2 {
  color: var(--primary);
  border-right: 4px solid var(--accent);
  padding-right: 0.75rem;
  margin-bottom: 1.25rem;
  font-size: 1.35rem;
}

.doc-section h3 {
  color: var(--accent);
  margin: 1.25rem 0 0.75rem;
  font-size: 1.05rem;
}

.doc-section p {
  margin-bottom: 0.75rem;
  text-align: justify;
}

.doc-section ul,
.doc-section ol {
  margin: 0.5rem 1.5rem 1rem 0;
}

.doc-section li { margin-bottom: 0.4rem; }

.doc-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.88rem;
}

.doc-section th,
.doc-section td {
  border: 1px solid var(--border);
  padding: 0.55rem 0.75rem;
  text-align: right;
  vertical-align: top;
}

.doc-section th {
  background: var(--primary);
  color: white;
}

.doc-section tr:nth-child(even) { background: #f1f3f5; }

.highlight-box {
  background: #e8f5f0;
  border-right: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  margin: 1rem 0;
}

.warning-box {
  background: #fff3cd;
  border-right: 4px solid var(--warning);
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  margin: 1rem 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.page-header-line {
  color: #888;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed var(--border);
}

@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  .main-content { padding: 1rem 1rem 5rem; }
}

/* Custom premium styling for BPFS pages */

/* Grid layouts */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

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

/* Premium Cards */
.bp-card {
  background: #ffffff;
  border: 1px solid #eef2f5;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  margin-bottom: 1.25rem;
}
.bp-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(15, 76, 92, 0.08);
  border-color: rgba(15, 76, 92, 0.15);
}
.bp-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
}
.bp-card.accent::before {
  background: var(--accent);
}
.bp-card.warning::before {
  background: var(--warning);
}
.bp-card.danger::before {
  background: var(--danger);
}

.bp-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.bp-card-desc {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.7;
}

/* Metric / KPI Cards */
.metric-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
  transition: transform 0.2s;
}
.metric-card:hover {
  transform: scale(1.03);
}
.metric-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--primary);
  margin: 0.5rem 0;
  font-family: Vazirmatn, sans-serif;
}
.metric-label {
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

/* Timeline */
.bp-timeline {
  position: relative;
  margin: 2rem 0;
  padding-right: 1.5rem;
  border-right: 2px solid #e2e8f0;
}
.bp-timeline-item {
  position: relative;
  margin-bottom: 2rem;
}
.bp-timeline-item:last-child {
  margin-bottom: 0;
}
.bp-timeline-marker {
  position: absolute;
  right: -2.1rem;
  top: 0.25rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px rgba(26, 147, 111, 0.2);
}
.bp-timeline-item:nth-child(even) .bp-timeline-marker {
  background: var(--primary);
  box-shadow: 0 0 0 3px rgba(15, 76, 92, 0.2);
}
.bp-timeline-content {
  background: #fff;
  border: 1px solid #eef2f5;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.bp-timeline-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

/* SWOT Grid */
.swot-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 1.5rem 0;
}
.swot-box {
  border-radius: 12px;
  padding: 1.5rem;
  color: #1e293b;
  position: relative;
}
.swot-box h4 {
  font-size: 1.2rem;
  font-weight: 800;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.swot-s { background: #ecfdf5; border: 1px solid #a7f3d0; }
.swot-s h4 { color: #065f46; }
.swot-w { background: #fef2f2; border: 1px solid #fca5a5; }
.swot-w h4 { color: #991b1b; }
.swot-o { background: #eff6ff; border: 1px solid #bfdbfe; }
.swot-o h4 { color: #1e40af; }
.swot-t { background: #fffbeb; border: 1px solid #fde68a; }
.swot-t h4 { color: #92400e; }

/* BMC Grid */
.bmc-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 1rem;
  margin: 1.5rem 0;
}
.bmc-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}
.bmc-box h4 {
  font-size: 0.95rem;
  color: var(--primary);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.4rem;
  margin-bottom: 0.75rem;
}
.bmc-box ul {
  margin: 0;
  padding-right: 1rem;
}
.bmc-box li {
  font-size: 0.82rem;
  margin-bottom: 0.3rem;
  line-height: 1.5;
}
.bmc-partners { grid-column: 1 / 2; grid-row: 1 / 3; }
.bmc-activities { grid-column: 2 / 3; grid-row: 1 / 2; }
.bmc-resources { grid-column: 2 / 3; grid-row: 2 / 3; }
.bmc-propositions { grid-column: 3 / 4; grid-row: 1 / 3; }
.bmc-relationships { grid-column: 4 / 5; grid-row: 1 / 2; }
.bmc-channels { grid-column: 4 / 5; grid-row: 2 / 3; }
.bmc-segments { grid-column: 5 / 6; grid-row: 1 / 3; }
.bmc-costs { grid-column: 1 / 3; }
.bmc-revenues { grid-column: 3 / 6; }

@media (max-width: 992px) {
  .bmc-container {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .bmc-partners, .bmc-activities, .bmc-resources, .bmc-propositions, .bmc-relationships, .bmc-channels, .bmc-segments, .bmc-costs, .bmc-revenues {
    grid-column: span 1;
    grid-row: auto;
  }
}
@media (max-width: 576px) {
  .bmc-container {
    grid-template-columns: 1fr;
  }
  .bmc-partners, .bmc-activities, .bmc-resources, .bmc-propositions, .bmc-relationships, .bmc-channels, .bmc-segments, .bmc-costs, .bmc-revenues {
    grid-column: span 1;
  }
}

/* Badges */
.bp-badge {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
}
.bp-badge.primary { background: #e0f2fe; color: #0369a1; }
.bp-badge.accent { background: #d1fae5; color: #047857; }
.bp-badge.warning { background: #fef3c7; color: #b45309; }

/* Modern Table */
.modern-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  margin: 1.5rem 0;
}
.modern-table th {
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  padding: 0.85rem 1rem;
  font-size: 0.9rem;
}
.modern-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  color: #334155;
  font-size: 0.88rem;
}
.modern-table tr:last-child td {
  border-bottom: none;
}
.modern-table tr:nth-child(even) {
  background-color: #f8fafc;
}
.modern-table tr:hover {
  background-color: #f1f5f9;
}

/* Process steps */
.process-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0;
}
.process-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 1.25rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.01);
}
.process-step-num {
  background: var(--primary);
  color: #fff;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.process-step-content {
  flex: 1;
}
.process-step-title {
  font-weight: 700;
  color: var(--primary);
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.process-step-desc {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.6;
}

