/* =============================================
   Portfolio Page – Dr. Nizar Kattata
   Specific styles (supplement to style.css)
   ============================================= */

/* ---- Page Base ---- */
.portfolio-page { background: #f0f4f8; }

/* ---- Breadcrumb bar ---- */
.pf-breadcrumb {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0;
}

.pf-breadcrumb .breadcrumb { margin-bottom: 0; }

/* ---- Hero ---- */
.pf-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #0cb8d6 100%);
  color: white;
  padding: 3rem 0 2.5rem;
  position: relative;
  overflow: hidden;
}

.pf-hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 80% 20%, rgba(0,201,177,0.18) 0%, transparent 50%),
    radial-gradient(circle at 10% 80%, rgba(255,255,255,0.06) 0%, transparent 40%);
  pointer-events: none;
}

.pf-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

/* Avatar */
.pf-avatar-wrap { display: flex; flex-direction: column; align-items: center; gap: 0.6rem; flex-shrink: 0; }

.pf-avatar {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), rgba(255,255,255,0.3));
  border: 4px solid rgba(255,255,255,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 900;
  color: white;
  font-family: 'Cairo', sans-serif;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
  letter-spacing: -1px;
  overflow: hidden;
}

.pf-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover; 
  border-radius: 50%;
  display: block;
}

.pf-verified {
  background: var(--accent);
  color: var(--primary-dark);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 50px;
  white-space: nowrap;
}

/* Identity */
.pf-identity { flex: 1; min-width: 240px; }

.pf-title-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.5rem; }

.pf-name {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 900;
  font-family: 'Cairo', sans-serif;
  line-height: 1.1;
  margin: 0;
}

.pf-spec-badge {
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.35);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.3rem 0.85rem;
  border-radius: 50px;
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

.pf-subtitle {
  font-size: 0.95rem;
  opacity: 0.82;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.pf-quick-stats {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.pf-qs { display: flex; flex-direction: column; }
.pf-qs-n { font-size: 1.4rem; font-weight: 900; line-height: 1; color: var(--accent); }
.pf-qs-l { font-size: 0.75rem; opacity: 0.75; }

.pf-qs-div {
  width: 1px;
  height: 32px;
  background: rgba(255,255,255,0.25);
}

/* CTA */
.pf-hero-cta { display: flex; flex-direction: column; gap: 0.65rem; flex-shrink: 0; }

.pf-hero-cta .btn { width: 100%; justify-content: center; min-width: 180px; }

/* ---- Anchor Nav ---- */
.pf-anchor-nav {
  background: var(--white);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: var(--navbar-height);
  z-index: 80;
  overflow-x: auto;
  scrollbar-width: none;
}

.pf-anchor-nav::-webkit-scrollbar { display: none; }

.pf-anchor-list {
  display: flex;
  gap: 0;
  white-space: nowrap;
  padding: 0 1rem;
}

.pf-anchor {
  display: inline-block;
  padding: 0.85rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
  border-bottom: 3px solid transparent;
  transition: var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.pf-anchor:hover { color: var(--primary); }
.pf-anchor.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ---- Layout ---- */
.pf-layout { padding: 2rem 0 4rem; }

.pf-grid {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.75rem;
  align-items: start;
}

/* ---- Cards ---- */
.pf-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
  scroll-margin-top: calc(var(--navbar-height) + 56px);
  transition: box-shadow 0.3s ease;
}

.pf-card:hover { box-shadow: 0 4px 20px var(--shadow); }
.pf-card:last-child { margin-bottom: 0; }

.pf-card-compact { padding: 1.25rem; }

/* ---- Card header line ---- */
.pf-card-header-line {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

/* ---- Section title ---- */
.pf-section-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.pf-section-title h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin: 0;
}

.pf-section-icon {
  width: 42px;
  height: 42px;
  background: var(--primary-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1rem;
  flex-shrink: 0;
}

.pf-section-icon.accent {
  background: rgba(0,201,177,0.12);
  color: var(--accent-dark);
}

/* ---- Section label ---- */
.pf-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

/* ---- Text ---- */
.pf-text {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.85;
  margin-bottom: 1rem;
}

.pf-text:last-child { margin-bottom: 0; }

/* ---- Sidebar Info List ---- */
.pf-info-list { display: flex; flex-direction: column; gap: 0.85rem; }

.pf-info-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
}

.pf-info-list li i {
  color: var(--primary);
  font-size: 0.9rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
  width: 16px;
}

.pf-info-list li div {
  display: flex;
  flex-direction: column;
}

.pf-info-list li strong {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.1rem;
}

.pf-info-list li span { font-size: 0.875rem; color: var(--text); }

/* ---- Languages ---- */
.pf-lang-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.pf-lang-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  background: var(--off-white);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.pf-flag { font-size: 1rem; }

/* ---- Payment ---- */
.pf-payment-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.pf-pay-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  background: var(--primary-light);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary-dark);
}

/* Insurance */
.pf-insurance-list { display: flex; flex-direction: column; gap: 0.65rem; }

.pf-insurance-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.75rem;
  background: var(--off-white);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.pf-ins-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.pf-ins-icon.cnam { background: linear-gradient(135deg, #0a6e8a, #00c9b1); color: white; }
.pf-ins-icon.private { background: var(--primary-light); color: var(--primary); }

.pf-insurance-item > div { display: flex; flex-direction: column; }
.pf-insurance-item strong { font-size: 0.82rem; color: var(--text); }
.pf-insurance-item span { font-size: 0.75rem; color: var(--text-muted); }

/* ---- Hours table ---- */
.pf-hours-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }

.pf-hours-table tr { border-bottom: 1px solid var(--border); }
.pf-hours-table tr:last-child { border-bottom: none; }
.pf-hours-table td { padding: 0.5rem 0.25rem; vertical-align: middle; }
.pf-hours-table td:first-child { color: var(--text); font-weight: 600; width: 45%; }
.pf-hours-table td.open { color: var(--primary); font-weight: 700; }
.pf-hours-table td.closed { color: var(--text-muted); font-style: italic; }

/* ---- Sidebar sticky ---- */
.pf-sidebar { position: sticky; top: calc(var(--navbar-height) + 60px); }

/* ---- Timeline ---- */
.pf-timeline { position: relative; padding-right: 1.5rem; }

.pf-timeline::before {
  content: '';
  position: absolute;
  right: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), var(--border));
}

.pf-timeline-item {
  position: relative;
  padding-right: 1.75rem;
  padding-bottom: 2rem;
}

.pf-timeline-item:last-child { padding-bottom: 0; }

.pf-tl-dot {
  position: absolute;
  right: -1.5rem;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--border);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--border);
}

.pf-tl-dot.current {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,201,177,0.3), 0 0 0 5px rgba(0,201,177,0.1);
}

.pf-tl-period {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.current-dot { color: var(--accent); font-size: 0.5rem; }

.pf-tl-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.pf-tl-place {
  font-size: 0.82rem;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.pf-tl-desc { font-size: 0.875rem; color: var(--text-light); line-height: 1.7; }

/* ---- Education list ---- */
.pf-edu-list { display: flex; flex-direction: column; gap: 0; }

.pf-edu-item {
  display: flex;
  gap: 1.25rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}

.pf-edu-item:last-child { border-bottom: none; }

.pf-edu-year {
  background: var(--primary);
  color: white;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.25rem 0.65rem;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  height: fit-content;
  margin-top: 0.1rem;
}

.pf-edu-body h3 { font-size: 0.95rem; font-weight: 700; color: var(--text); margin-bottom: 0.25rem; }

.pf-edu-body p {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* ---- Address ---- */
.pf-address-block {
  background: var(--off-white);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}

.pf-address-info { display: flex; flex-direction: column; gap: 0.85rem; }

.pf-address-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.pf-address-item i {
  color: var(--primary);
  font-size: 0.9rem;
  margin-top: 0.15rem;
  flex-shrink: 0;
  width: 16px;
}

.pf-address-item > div { display: flex; flex-direction: column; gap: 0.1rem; }
.pf-address-item strong { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.pf-address-item span { font-size: 0.875rem; color: var(--text); line-height: 1.5; }

/* Map */
.pf-map-wrap { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }

.pf-map {
  width: 100%;
  height: 280px;
  border: none;
  display: block;
}

.pf-map-link {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: var(--white);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: 50px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.pf-map-link:hover { background: var(--primary); color: white; }

/* ---- RDV card ---- */
.pf-card-rdv { border-top: 4px solid var(--accent); }

.pf-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.pf-contact-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
  background: var(--off-white);
}

.pf-contact-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px var(--shadow);
  border-color: transparent;
  color: var(--text);
}

.pf-cc-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  color: white;
}

.pf-contact-card.phone .pf-cc-icon { background: var(--primary); }
.pf-contact-card.mobile .pf-cc-icon { background: #16a34a; }
.pf-contact-card.email .pf-cc-icon { background: #ea580c; }
.pf-contact-card.website .pf-cc-icon { background: #0891b2; }
.pf-contact-card.facebook .pf-cc-icon { background: #1877f2; }
.pf-contact-card.instagram .pf-cc-icon { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }

.pf-cc-body { display: flex; flex-direction: column; gap: 0.1rem; }
.pf-cc-body strong { font-size: 0.82rem; color: var(--text); font-weight: 700; }
.pf-cc-body span { font-size: 0.82rem; color: var(--primary); font-weight: 600; }
.pf-cc-body em { font-size: 0.72rem; color: var(--text-muted); font-style: normal; }

/* ---- Actes grid ---- */
.pf-actes-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.pf-acte-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.1rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  background: var(--white);
  transition: var(--transition);
}

.pf-acte-btn i { color: var(--primary); font-size: 0.85rem; }

.pf-acte-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow);
}

.pf-acte-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.pf-acte-btn.active i { color: var(--accent); }

/* ---- Gallery ---- */
.pf-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 160px;
  gap: 0.75rem;
}

.pf-gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  cursor: pointer;
}

.pf-gallery-wide { grid-column: span 2; }

.pf-gallery-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: white;
  transition: transform 0.35s ease;
}

.pf-gallery-item:hover .pf-gallery-ph { transform: scale(1.06); }

.pf-gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  color: white;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.6rem 0.75rem 0.5rem;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.pf-gallery-item:hover .pf-gallery-overlay { opacity: 1; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .pf-grid { grid-template-columns: 280px 1fr; }
}

@media (max-width: 768px) {
  .pf-grid { grid-template-columns: 1fr; }
  .pf-sidebar { position: static; }

  .pf-hero-inner { flex-direction: column; text-align: center; }
  .pf-hero-cta { flex-direction: row; }
  .pf-quick-stats { justify-content: center; }
  .pf-subtitle { justify-content: center; }
  .pf-title-row { justify-content: center; }

  .pf-gallery { grid-template-columns: repeat(2, 1fr); }
  .pf-gallery-wide { grid-column: span 2; }

  .pf-contact-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .pf-gallery { grid-template-columns: 1fr 1fr; grid-auto-rows: 130px; }
  .pf-contact-grid { grid-template-columns: 1fr; }
  .pf-hero-cta { flex-direction: column; }
  .pf-hero-cta .btn { min-width: auto; width: 100%; }
}
