/* ==========================================================================
   PORTFOLIO & SERVICOS PERICIAIS - SANTOSHBDIA.COM.BR
   Dr. Santos H. B. Dias | Conformidade WCAG AAA Dark & Light Mode (ERR-UI-003)
   ========================================================================== */

.pf-breadcrumb-bar {
  background: var(--color-bg-darker);
  border-bottom: 1px solid var(--color-border-dark);
  padding: 12px 24px;
  font-size: 0.85rem;
}

.pf-breadcrumb {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--color-text-muted);
}

.pf-breadcrumb a {
  color: var(--color-primary-light);
  font-weight: 600;
}

.pf-breadcrumb a:hover {
  text-decoration: underline;
}

[data-theme="light"] .pf-breadcrumb a {
  color: #047857;
}

.pf-breadcrumb .sep {
  color: #94a3b8 !important;
}

.pf-breadcrumb .current {
  color: var(--color-text-main);
  font-weight: 600;
}

/* HERO DO PORTFOLIO E SUBPAGINAS */
.pf-hero {
  position: relative;
  padding: 72px 24px 64px;
  background-color: var(--color-bg-darker);
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--color-border-dark);
  overflow: hidden;
}

.pf-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(4, 9, 6, 0.94) 0%, rgba(11, 26, 18, 0.86) 60%, rgba(6, 14, 10, 0.78) 100%);
}

[data-theme="light"] .pf-hero-overlay {
  background: linear-gradient(135deg, rgba(248, 250, 252, 0.96) 0%, rgba(241, 245, 249, 0.92) 65%, rgba(248, 250, 252, 0.86) 100%) !important;
}

.pf-hero-container {
  position: relative;
  z-index: 2;
  max-width: 1240px;
  margin: 0 auto;
}

.pf-hero-content {
  max-width: 820px;
}

.pf-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.38);
  color: #34d399;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  margin-bottom: 18px;
}

[data-theme="light"] .pf-badge {
  background: rgba(5, 150, 105, 0.12);
  border-color: rgba(5, 150, 105, 0.38);
  color: #065f46 !important;
}

.pf-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -0.8px;
  color: #ffffff;
  margin-bottom: 18px;
}

[data-theme="light"] .pf-hero h1 {
  color: #0f172a !important;
}

.pf-hero p {
  font-size: 1.12rem;
  line-height: 1.75;
  color: #cbd5e1;
  margin-bottom: 30px;
}

[data-theme="light"] .pf-hero p {
  color: #334155 !important;
}

.pf-hero-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* GRID PRINCIPAL DE 8 SERVICOS (/portfolio/) */
.pf-section {
  padding: 76px 24px;
  background: var(--color-bg-dark);
}

.pf-section-alt {
  padding: 76px 24px;
  background: var(--color-bg-darker);
  border-top: 1px solid var(--color-border-dark);
  border-bottom: 1px solid var(--color-border-dark);
}

.pf-container {
  max-width: 1240px;
  margin: 0 auto;
}

.pf-section-header {
  max-width: 820px;
  margin: 0 auto 48px;
  text-align: center;
}

.pf-section-header h2 {
  font-size: clamp(1.75rem, 3.4vw, 2.45rem);
  font-weight: 800;
  color: var(--color-text-main);
  margin-bottom: 12px;
  letter-spacing: -0.4px;
}

.pf-section-header p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.pf-services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.pf-service-card {
  background: var(--color-surface-dark);
  border: 1px solid var(--color-border-dark);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
  transition: var(--transition);
}

[data-theme="light"] .pf-service-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.pf-service-card:hover {
  transform: translateY(-6px);
  border-color: var(--color-primary);
  box-shadow: 0 20px 42px rgba(16, 185, 129, 0.18);
}

[data-theme="light"] .pf-service-card:hover {
  border-color: #059669;
  box-shadow: 0 18px 38px rgba(5, 150, 105, 0.15);
}

.pf-service-image {
  width: 100%;
  height: 260px;
  overflow: hidden;
  position: relative;
  background: #060e0a;
}

.pf-service-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}

.pf-service-card:hover .pf-service-image img {
  transform: scale(1.04);
}

.pf-service-body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.pf-service-title {
  font-size: 1.38rem;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 14px;
  color: var(--color-text-main);
}

.pf-service-title a {
  color: inherit;
  text-decoration: none;
}

.pf-service-title a:hover {
  color: var(--color-primary-light);
}

[data-theme="light"] .pf-service-title a:hover {
  color: #047857;
}

.pf-service-text {
  color: var(--color-text-muted);
  font-size: 0.96rem;
  line-height: 1.68;
  margin-bottom: 14px;
}

.pf-service-footer {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* CARDS DE ESCOPO / ATUACAO COMPLEMENTAR (GRID DE 6) */
.pf-scope-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pf-scope-card {
  background: var(--color-surface-dark);
  border: 1px solid var(--color-border-dark);
  border-radius: 18px;
  padding: 28px 24px;
  transition: var(--transition);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}

[data-theme="light"] .pf-scope-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.pf-scope-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-accent);
}

.pf-scope-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  margin-bottom: 18px;
}

[data-theme="light"] .pf-scope-icon {
  background: rgba(5, 150, 105, 0.1);
  border-color: rgba(5, 150, 105, 0.28);
}

.pf-scope-card h3 {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--color-text-main);
  margin-bottom: 10px;
  line-height: 1.35;
}

.pf-scope-card p {
  font-size: 0.94rem;
  line-height: 1.65;
  color: var(--color-text-muted);
}

/* BLOCO "O QUE E" (OVERVIEW TECNICO) */
.pf-overview-box {
  background: var(--color-surface-dark);
  border: 1px solid var(--color-border-emerald);
  border-radius: 22px;
  padding: 44px;
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.32);
}

[data-theme="light"] .pf-overview-box {
  background: #ffffff;
  border-color: rgba(5, 150, 105, 0.32);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.06);
}

.pf-overview-box h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  color: var(--color-text-main);
  margin-bottom: 20px;
}

.pf-overview-box p {
  font-size: 1.04rem;
  line-height: 1.85;
  color: var(--color-text-muted);
  margin-bottom: 16px;
}

.pf-overview-box p:last-child {
  margin-bottom: 0;
}

/* METODOLOGIAS E BASE NORMATIVA (GRID DE 2) */
.pf-method-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.pf-method-card {
  background: var(--color-surface-dark);
  border: 1px solid var(--color-border-dark);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}

[data-theme="light"] .pf-method-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.pf-method-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #060e0a;
}

.pf-method-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pf-method-body {
  padding: 32px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pf-method-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--color-accent-light);
  margin-bottom: 8px;
}

[data-theme="light"] .pf-method-tag {
  color: #b45309;
}

.pf-method-body h3 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--color-text-main);
  margin-bottom: 14px;
  line-height: 1.3;
}

.pf-method-body p {
  color: var(--color-text-muted);
  font-size: 0.98rem;
  line-height: 1.72;
  margin-bottom: 18px;
}

.pf-method-list {
  list-style: none;
  padding: 0;
  margin: auto 0 0 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pf-method-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--color-text-main);
}

.pf-method-list li::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.18);
  color: #34d399;
  font-size: 0.78rem;
  font-weight: 900;
  flex-shrink: 0;
}

[data-theme="light"] .pf-method-list li::before {
  background: rgba(5, 150, 105, 0.15);
  color: #047857;
}

/* ETAPAS DO SERVICO (5 PASSOS) */
.pf-steps-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

.pf-step-card {
  background: var(--color-surface-dark);
  border: 1px solid var(--color-border-dark);
  border-radius: 18px;
  padding: 26px 20px;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  transition: var(--transition);
}

[data-theme="light"] .pf-step-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}

.pf-step-card:hover {
  transform: translateY(-4px);
  border-color: var(--color-primary);
}

.pf-step-num {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-weight: 900;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
}

.pf-step-card h4 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--color-text-main);
  margin-bottom: 8px;
}

.pf-step-card p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--color-text-muted);
}

/* PDF EMBED CONTAINER */
.pf-pdf-frame {
  width: 100%;
  height: 680px;
  border-radius: 16px;
  border: 1px solid var(--color-border-dark);
  background: #0f172a;
  margin-top: 20px;
}

/* CTA BANNER FINAL */
.pf-cta-banner {
  background: linear-gradient(135deg, #112219 0%, #060e0a 100%);
  border: 1.5px solid var(--color-border-gold);
  border-radius: 24px;
  padding: 56px 40px;
  text-align: center;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .pf-cta-banner {
  background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%) !important;
  border-color: rgba(5, 150, 105, 0.38) !important;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08) !important;
}

.pf-cta-banner h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 14px;
}

[data-theme="light"] .pf-cta-banner h2 {
  color: #0f172a !important;
}

.pf-cta-banner p {
  max-width: 740px;
  margin: 0 auto 28px;
  font-size: 1.06rem;
  line-height: 1.75;
  color: #cbd5e1;
}

[data-theme="light"] .pf-cta-banner p {
  color: #334155 !important;
}

.pf-cta-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* RESPONSIVIDADE */
@media (max-width: 1024px) {
  .pf-scope-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pf-steps-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .pf-hero {
    padding: 48px 18px 44px;
  }
  .pf-section,
  .pf-section-alt {
    padding: 52px 18px;
  }
  .pf-services-grid,
  .pf-scope-grid,
  .pf-method-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .pf-steps-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .pf-overview-box {
    padding: 26px 20px;
  }
  .pf-cta-banner {
    padding: 36px 20px;
  }
  .pf-hero-actions .btn,
  .pf-cta-actions .btn {
    width: 100%;
  }
  .pf-pdf-frame {
    height: 460px;
  }
}
