*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --navy: var(--blue-900);
  --navy-2: var(--blue-700);
  --navy-3: var(--blue-500);
  --orange: var(--orange-500);
  --orange-d: var(--orange-600);
  --orange-l: var(--orange-50);
  --green: var(--success);
  --green-l: var(--success-light);
  --blue: var(--blue-500);
  --blue-l: var(--blue-50);
  --white: #ffffff;
  --profile-radius: var(--radius-lg, 16px);
}
body {
  font-family: var(--font-body);
  background-color: #f4f6fa;
  background-image:
    linear-gradient(rgba(15, 26, 56, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 26, 56, 0.015) 1px, transparent 1px);
  background-size: 32px 32px;
  background-attachment: fixed;
  color: var(--gray-900);
  min-height: 100vh;
}

/* Nav */
.p-nav {
  background: var(--navy);
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.p-nav img {
  height: 38px;
}
.p-nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.8);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: color .2s;
}
.p-nav-link:hover {
  color: var(--orange);
}

/* Hero cover banner */
.p-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  height: 240px;
  position: relative;
  overflow: hidden;
}
.p-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.p-hero::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to top, rgba(0,0,0,0.1), transparent);
  pointer-events: none;
}

/* Main Grid Layout */
.p-main {
  max-width: 1120px;
  margin: -100px auto 0;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 32px;
  align-items: start;
  position: relative;
  z-index: 10;
}

/* Left Sidebar Summary Card */
.p-side {
  position: sticky;
  top: 88px;
}
.p-profile-card {
  background: var(--white);
  border-radius: var(--profile-radius);
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.08), 0 0 1px 1px rgba(15, 23, 42, 0.02);
  border: 1px solid var(--gray-100);
  overflow: visible;
  padding: 32px 24px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Avatar overlapping top of the card */
.p-av {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--orange-d));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 800;
  color: #fff;
  margin: -92px auto 16px;
  border: 5px solid var(--white);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  position: relative;
}
.p-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.p-name {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 6px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.p-eyebrow {
  color: var(--orange);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .09em;
  margin-bottom: 8px;
  text-transform: uppercase;
}
.p-hl {
  font-size: 0.92rem;
  color: var(--gray-500);
  font-weight: 500;
  margin-bottom: 16px;
  line-height: 1.4;
  max-width: 240px;
}

/* Badges */
.p-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.p-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
}
.p-badge-v {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-dark);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.p-badge-e {
  background: var(--gray-100);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
}

.p-profile-card-body {
  width: 100%;
  border-top: 1px solid var(--gray-100);
  padding-top: 24px;
}

/* Stats in Sidebar */
.p-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}
.p-stat {
  padding: 8px 4px;
  background: var(--gray-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--gray-100);
  text-align: center;
}
.p-stat-v {
  font-size: 16px;
  font-weight: 800;
  color: var(--navy);
}
.p-stat-l {
  font-size: 10px;
  color: var(--gray-500);
  margin-top: 2px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Contact buttons */
.p-card-contacts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.p-contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all .2s;
  border: 1.5px solid;
  width: 100%;
}
.p-contact-btn.web {
  border-color: var(--orange);
  color: var(--white);
  background: var(--orange);
}
.p-contact-btn.web:hover {
  background: var(--orange-d);
  border-color: var(--orange-d);
  transform: translateY(-1px);
}
.p-contact-btn.cv {
  border-color: var(--gray-200);
  color: var(--gray-700);
  background: var(--white);
}
.p-contact-btn.cv:hover {
  border-color: var(--gray-400);
  background: var(--gray-50);
  color: var(--gray-900);
}

/* Right Content Area */
.p-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* High Conversion CTA Box */
.p-cta-box {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  border-radius: var(--profile-radius);
  box-shadow: 0 10px 30px -5px rgba(15, 23, 42, 0.15);
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border: none;
  position: relative;
  overflow: hidden;
}
.p-cta-kicker {
  color: #f4b77c;
  display: block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .06em;
  margin-bottom: 7px;
  text-transform: uppercase;
}
.p-cta-trust {
  display: flex;
  gap: 16px;
  list-style: none;
  width: 100%;
}
.p-cta-trust li {
  align-items: center;
  color: rgba(255,255,255,.72);
  display: flex;
  font-size: 12px;
  font-weight: 600;
  gap: 5px;
}
.p-cta-trust svg { fill: none; height: 13px; stroke: #f4b77c; stroke-width: 2.5; width: 13px; }
.p-cta-box::before {
  content: '';
  position: absolute;
  top: -50%; right: -20%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(209, 124, 43, 0.25) 0%, transparent 70%);
  pointer-events: none;
}
.p-cta-box-content h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.p-cta-box-content p {
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.7);
}
.p-cta-box-content strong {
  color: #ffffff;
}
.p-cta-box-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--orange);
  color: #fff;
  text-decoration: none;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  transition: all .2s;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(209, 124, 43, 0.4);
}
.p-cta-box-btn:hover {
  background: var(--orange-d);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(209, 124, 43, 0.5);
}

/* Premium Section Cards */
.p-card-premium {
  background: var(--white);
  border-radius: var(--profile-radius);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.04), 0 0 1px 0 rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(15, 23, 42, 0.05);
  padding: 32px;
}
.p-card-premium-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 16px;
}
.p-card-premium-title svg.title-icon {
  width: 20px;
  height: 20px;
  color: var(--orange);
  flex-shrink: 0;
}

/* Certificações — selo com proveniência.
   O texto por baixo do nome diz de onde veio a confirmação (registo oficial
   ou equipa da CP). É a diferença entre informar e garantir em nome próprio. */
.p-cert-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.p-cert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #dcfce7;
  border-radius: 10px;
  background: #f0fdf4;
}

.p-cert-icon {
  width: 18px;
  height: 18px;
  color: #15803d;
  flex-shrink: 0;
  margin-top: 2px;
}

.p-cert-name {
  margin: 0;
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
}

.p-cert-meta {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--gray-600, #4b5563);
}

/* Bio Content styling */
.p-bio {
  font-size: 15px;
  line-height: 1.8;
  color: var(--gray-700);
  white-space: pre-wrap;
}

/* Services Grid in right card */
.p-svcs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.p-svc-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  background: var(--white);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.p-svc-card:hover {
  border-color: var(--orange-300);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(209, 124, 43, 0.06);
}
.p-svc-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.p-svc-card-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--orange-l);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--orange);
  flex-shrink: 0;
}
.p-svc-card-icon svg {
  width: 16px;
  height: 16px;
}
.p-svc-card-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--navy);
}
.p-svc-card-desc {
  font-size: 13.5px;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 16px;
  flex: 1;
}
.p-svc-card-price {
  font-size: 13px;
  color: var(--success-dark);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
  width: fit-content;
}

/* Coverage Area pills */
.p-dists-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.p-dist-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #eff6ff;
  color: var(--blue-500);
  border-radius: 99px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid #dbeafe;
  transition: all .2s;
}
.p-dist-badge:hover {
  background: #dbeafe;
  color: var(--blue-700);
  transform: translateY(-1px);
}
.p-dist-badge svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* Bottom banner */
.p-trust-banner {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-d) 100%);
  border-radius: var(--profile-radius);
  padding: 40px 32px;
  text-align: center;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px -5px rgba(209, 124, 43, 0.3);
}
.p-trust-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
  opacity: 0.7;
}
.p-trust-banner-content h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
  color: #ffffff;
}
.p-trust-banner-content p {
  font-size: 14.5px;
  color: rgba(255,255,255,0.9);
  max-width: 480px;
  margin: 0 auto;
}
.p-trust-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  color: var(--orange-d);
  text-decoration: none;
  padding: 13px 28px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  transition: all .2s;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.p-trust-banner-btn:hover {
  background: var(--orange-50);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* Loader & Error */
.p-loader {
  text-align: center;
  padding: 120px 24px;
}
.p-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}
.p-dot {
  width: 10px;
  height: 10px;
  background: var(--orange);
  border-radius: 50%;
  animation: pdot 1.2s ease-in-out infinite;
}
.p-dot:nth-child(2) { animation-delay: .2s; }
.p-dot:nth-child(3) { animation-delay: .4s; }
@keyframes pdot { 0%,80%,100%{transform:scale(.6);opacity:.4} 40%{transform:scale(1);opacity:1} }
.p-loader p {
  font-size: 14px;
  color: var(--gray-400);
}
.p-err {
  text-align: center;
  padding: 90px 24px;
}
.p-err .emo {
  font-size: 60px;
  margin-bottom: 20px;
}
.p-err h2 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 10px;
}
.p-err p {
  font-size: 14.5px;
  color: var(--gray-500);
  margin-bottom: 24px;
}
.p-error-wrap { max-width: 520px; margin: 0 auto; padding: 16px; }
.p-error-btn {
  align-items: center;
  background: var(--orange);
  border-radius: 10px;
  color: #fff;
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
  padding: 11px 22px;
  text-decoration: none;
}
.p-mobile-cta { display: none; }

/* Horizontal summary inspired by a professional directory card */
.p-main {
  grid-template-columns: 1fr;
  margin-top: -96px;
  max-width: 1240px;
}
.p-profile-card {
  align-items: stretch;
  border-color: #efd9c4;
  border-radius: 28px;
  box-shadow: 0 18px 50px rgba(15, 26, 56, .08);
  display: block;
  padding: 38px 40px 34px;
  text-align: left;
}
.p-profile-top {
  align-items: flex-start;
  display: flex;
  gap: 28px;
  justify-content: space-between;
}
.p-profile-identity {
  align-items: center;
  display: flex;
  gap: 26px;
  min-width: 0;
}
.p-profile-copy { min-width: 0; }
.p-av {
  border: 1px solid var(--gray-200);
  box-shadow: none;
  flex: 0 0 124px;
  height: 124px;
  margin: 0;
  width: 124px;
}
.p-name-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.p-name {
  font-size: clamp(1.45rem, 2.4vw, 2rem);
  margin: 0;
}
.p-hl {
  color: var(--gray-500);
  font-size: .96rem;
  margin: 10px 0 14px;
  max-width: 700px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.p-eyebrow { margin-bottom: 7px; }
.p-badges { margin: 0; }
.p-profile-facts {
  align-items: center;
  color: var(--gray-500);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 600;
  gap: 8px 18px;
}
.p-profile-facts span { align-items: center; display: flex; gap: 6px; }
.p-profile-facts svg { fill: none; height: 16px; stroke: var(--orange); stroke-width: 1.8; width: 16px; }
.p-profile-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}
.p-action-link {
  color: var(--orange-d);
  font-size: 13px;
  font-weight: 700;
  padding: 12px 8px;
  text-decoration: none;
}
.p-action-link:hover { text-decoration: underline; }
.p-action-primary {
  background: var(--orange);
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(209, 124, 43, .2);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  padding: 13px 20px;
  text-decoration: none;
  white-space: nowrap;
}
.p-action-primary:hover { background: var(--orange-d); transform: translateY(-1px); }
.p-profile-categories {
  border-top: 1px solid var(--gray-100);
  display: grid;
  gap: 34px;
  grid-template-columns: 1fr 1fr;
  margin-top: 30px;
  padding-top: 26px;
}
.p-profile-category h2 {
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 15px;
  padding-bottom: 9px;
  position: relative;
}
.p-profile-category h2::after {
  background: var(--orange);
  bottom: 0;
  content: '';
  height: 3px;
  left: 0;
  position: absolute;
  width: 34px;
}
.p-summary-chips { display: flex; flex-wrap: wrap; gap: 9px; }
.p-summary-chips span {
  background: var(--blue-50);
  border: 1px solid transparent;
  border-radius: 99px;
  color: var(--navy);
  font-size: 12.5px;
  font-weight: 700;
  padding: 9px 17px;
}
.p-content { max-width: none; width: 100%; margin: 0; }
.p-intro-strip {
  align-items: center;
  background: var(--navy);
  border-radius: var(--profile-radius);
  color: #fff;
  display: flex;
  justify-content: space-between;
  padding: 18px 24px;
}
.p-intro-strip div { display: flex; flex-direction: column; gap: 3px; }
.p-intro-strip strong { font-family: var(--font-display); font-size: 15px; }
.p-intro-strip div span, .p-intro-strip > span { color: rgba(255,255,255,.7); font-size: 12.5px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
  .p-dot { animation: none; opacity: .7; }
}

@media (max-width: 850px) {
  .p-main {
    grid-template-columns: 1fr;
    margin-top: -60px;
    gap: 24px;
    padding: 0 16px 60px;
  }
  .p-side {
    position: static;
  }
  .p-profile-card {
    padding: 24px 20px 24px;
  }
  .p-av {
    width: 100px;
    height: 100px;
    margin: -74px auto 12px;
    font-size: 36px;
  }
  .p-cta-box {
    padding: 20px 24px;
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .p-cta-box-btn {
    justify-content: center;
  }
  .p-card-premium {
    padding: 22px 20px;
  }
  .p-hero { height: 190px; }
  .p-content { gap: 16px; }
  .p-mobile-cta {
    align-items: center;
    background: rgba(255,255,255,.97);
    border-top: 1px solid var(--gray-200);
    bottom: 0;
    box-shadow: 0 -8px 24px rgba(15,23,42,.08);
    display: flex;
    justify-content: space-between;
    left: 0;
    padding: 10px 16px max(10px, env(safe-area-inset-bottom));
    position: fixed;
    right: 0;
    z-index: 90;
  }
  .p-mobile-cta div { display: flex; flex-direction: column; }
  .p-mobile-cta strong { color: var(--navy); font-size: 13px; }
  .p-mobile-cta span { color: var(--gray-500); font-size: 11px; }
  .p-mobile-cta a {
    background: var(--orange);
    border-radius: 9px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    padding: 11px 16px;
    text-decoration: none;
  }
  .p-main { padding-bottom: 105px; }
}

@media (max-width: 520px) {
  .p-nav { height: 58px; padding: 0 16px; }
  .p-nav img { height: 31px; }
  .p-nav-link { font-size: 12px; }
  .p-stats-grid { grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); }
  .p-card-premium-title { margin-bottom: 18px; }
  .p-svcs-grid { grid-template-columns: 1fr; }
  .p-cta-trust { justify-content: center; }
  .p-trust-banner { padding: 30px 20px; }
}

@media (max-width: 900px) {
  .p-profile-card { border-radius: 20px; padding: 28px 24px; }
  .p-profile-top { flex-direction: column; }
  .p-profile-actions { width: 100%; }
  .p-action-primary { margin-left: auto; }
}

@media (max-width: 620px) {
  .p-main { margin-top: -52px; }
  .p-profile-card { padding: 24px 18px; }
  .p-profile-identity { align-items: flex-start; gap: 14px; }
  .p-av { flex-basis: 76px; height: 76px; margin: 0; width: 76px; font-size: 27px; }
  .p-hl { font-size: 13px; white-space: normal; }
  .p-profile-facts { align-items: flex-start; flex-direction: column; gap: 7px; }
  .p-profile-actions { flex-wrap: wrap; }
  .p-action-link { padding-left: 0; }
  .p-action-primary { text-align: center; width: 100%; }
  .p-profile-categories { gap: 24px; grid-template-columns: 1fr; }
  .p-intro-strip { align-items: flex-start; flex-direction: column; gap: 10px; }
}
