/* ═══════════════════════════════════════════════════════════════ */
/* DOCPORTER - STYLESHEETS */
/* ═══════════════════════════════════════════════════════════════ */

/* Import Fonts - display:swap prevents FOUT */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600&family=DM+Sans:wght@300;400;500&display=swap');

/* ─────────────────────────────────────────────────────────────── */
/* GLOBALS */
/* ─────────────────────────────────────────────────────────────── */
a { text-decoration: none; }
.thanking { color: black; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; overflow-y: scroll; }
body { font-family: Arial, sans-serif; background: #f4f6f9; color: #333; min-height: 100vh; display: flex; flex-direction: column; }

/* ─────────────────────────────────────────────────────────────── */
/* NAV */
/* ─────────────────────────────────────────────────────────────── */
nav {
  background: #2563eb;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
nav .logo { color: #fff; font-size: 1.3rem; font-weight: bold; margin-right: auto; }
nav button {
  background: none; border: none; color: rgba(255,255,255,0.8);
  font-size: 0.95rem; cursor: pointer; padding: 6px 14px; border-radius: 6px;
}
nav button:hover, nav button.active {
  background: rgba(255,255,255,0.15); color: #fff;
}

/* ─────────────────────────────────────────────────────────────── */
/* PAGES */
/* ─────────────────────────────────────────────────────────────── */
.page { display: none; flex: 1; width: 100%; }
.page.active { display: flex; flex-direction: column; }

/* ─────────────────────────────────────────────────────────────── */
/* HOME */
/* ─────────────────────────────────────────────────────────────── */
.home-hero {
  background: #2563eb; color: #fff;
  text-align: center; padding: 60px 20px 50px;
}
.home-hero h1 { font-size: 2rem; margin-bottom: 10px; }
.home-hero p  { font-size: 1rem; opacity: 0.85; margin-bottom: 28px; }
.search-bar {
  display: flex; max-width: 500px; margin: 0 auto;
  background: #fff; border-radius: 8px; overflow: visible;
  position: relative; flex-wrap: wrap;
}
.search-bar input {
  flex: 1; border: none; padding: 13px 16px;
  font-size: 0.95rem; outline: none; color: #333;
  min-width: 0;
}
.search-bar button {
  background: #1d4ed8; color: #fff; border: none;
  padding: 0 24px; font-size: 0.95rem; cursor: pointer;
  flex-shrink: 0;
}
.search-bar button:hover { background: #1e40af; }

/* Live search dropdown */
.hero-dropdown {
  position: absolute; top: 100%; left: 0; right: 0;
  background: #fff; border: 1px solid #ddd;
  border-top: none; border-radius: 0 0 8px 8px;
  max-height: 400px; overflow-y: auto;
  z-index: 1000; box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  width: 100%;
}
.hero-dropdown-results {
  display: flex; flex-direction: column;
}
.hero-dropdown-item {
  padding: 16px 18px; border-bottom: 1px solid #eee;
  cursor: pointer; transition: all 0.2s;
  background: #fff; text-align: left; display: flex; flex-direction: column;
}
.hero-dropdown-item:hover {
  background: #f8f9fa; border-left: 4px solid #2563eb; padding-left: 14px;
}
.hero-dropdown-item-name {
  font-weight: 600; color: #1e293b; font-size: 0.98rem; margin-bottom: 6px;
}
.hero-dropdown-item-spec {
  font-size: 0.87rem; color: #2563eb; font-weight: 500; margin-bottom: 4px;
}
.hero-dropdown-item-meta {
  font-size: 0.82rem; color: #666; display: flex; gap: 12px;
}

.home-specs { max-width: 860px; margin: 40px auto; padding: 0 20px 80px; }
.home-specs h2 { font-size: 1.1rem; color: #555; margin-bottom: 16px; }
.spec-list { display: flex; flex-wrap: wrap; gap: 10px; }
.spec-btn {
  background: #fff; border: 1.5px solid #ddd; border-radius: 24px;
  padding: 8px 18px; font-size: 0.88rem; cursor: pointer;
  display: flex; align-items: center; gap: 6px; transition: 0.2s;
}
.spec-btn:hover { border-color: #2563eb; color: #2563eb; }

/* ─────────────────────────────────────────────────────────────── */
/* SEARCH PAGE */
/* ─────────────────────────────────────────────────────────────── */
.search-page { max-width: 580px; margin: 48px auto; padding: 0 20px; }
.search-page h1 { font-size: 1.5rem; margin-bottom: 24px; }
.form-group { margin-bottom: 18px; }
.form-group label {
  display: block; font-size: 0.85rem;
  font-weight: bold; margin-bottom: 6px; color: #555;
}
.form-group input, .form-group select {
  width: 100%; padding: 11px 14px; border: 1.5px solid #ddd;
  border-radius: 8px; font-size: 0.95rem; outline: none; background: #fff;
}
.form-group input:focus, .form-group select:focus { border-color: #2563eb; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }
.submit-btn {
  width: 100%; background: #2563eb; color: #fff; border: none;
  padding: 13px; border-radius: 8px; font-size: 1rem;
  font-weight: bold; cursor: pointer; margin-top: 8px;
}
.submit-btn:hover { background: #1d4ed8; }

/* ─────────────────────────────────────────────────────────────── */
/* RESULTS PAGE */
/* ─────────────────────────────────────────────────────────────── */
.results-top {
  background: #fff; padding: 16px 24px;
  border-bottom: 1px solid #e5e7eb;
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.results-top h2 { font-size: 1.1rem; }
.results-top span { font-size: 0.85rem; color: #888; }
.results-top select {
  border: 1.5px solid #ddd; border-radius: 6px;
  padding: 7px 12px; font-size: 0.88rem; outline: none; cursor: pointer;
}
.results-body {
  max-width: 800px; margin: 0 auto;
  padding: 24px 20px 60px;
  display: flex; flex-direction: column; gap: 16px;
}
.doc-card {
  background: #fff; border-radius: 10px; padding: 20px;
  display: flex; gap: 18px; align-items: flex-start;
  border: 1.5px solid #e5e7eb; transition: box-shadow 0.2s; cursor: pointer;
  will-change: box-shadow;
}
.doc-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.doc-avatar {
  width: 58px; height: 58px; border-radius: 50%;
  background: #dbeafe; display: flex; align-items: center;
  justify-content: center; font-size: 1.8rem; flex-shrink: 0;
}
.doc-info { flex: 1; }
.doc-name { font-size: 1.05rem; font-weight: bold; color: #1e293b; }
.doc-spec { font-size: 0.85rem; color: #2563eb; margin: 3px 0 8px; }
.doc-meta { font-size: 0.83rem; color: #666; display: flex; flex-wrap: wrap; gap: 14px; }
.doc-right { text-align: right; flex-shrink: 0; }
.doc-rating { font-size: 1rem; font-weight: bold; color: #f59e0b; }
.doc-reviews { font-size: 0.78rem; color: #999; }
.doc-fee { font-size: 0.9rem; font-weight: bold; color: #1e293b; margin-top: 6px; }
.doc-avail { font-size: 0.78rem; color: #16a34a; font-weight: 600; margin-top: 4px; }
.book-btn {
  display: block; margin-top: 12px; background: #2563eb; color: #fff;
  border: none; border-radius: 7px; padding: 9px 18px;
  font-size: 0.85rem; font-weight: bold; cursor: pointer;
}
.book-btn:hover { background: #1d4ed8; }
.no-results { text-align: center; padding: 60px 20px; color: #888; }
.no-results div { font-size: 2.5rem; margin-bottom: 12px; }

/* ─────────────────────────────────────────────────────────────── */
/* PROFILE PAGE */
/* ─────────────────────────────────────────────────────────────── */
.profile-page { max-width: 720px; margin: 40px auto; padding: 0 20px 60px; }
.back-btn {
  background: none; border: 1.5px solid #ddd; border-radius: 8px;
  padding: 8px 16px; font-size: 0.85rem; cursor: pointer;
  margin-bottom: 24px; display: inline-flex; align-items: center; gap: 6px;
}
.back-btn:hover { background: #f0f0f0; }
.profile-card {
  background: #fff; border-radius: 12px;
  border: 1.5px solid #e5e7eb; overflow: hidden;
}
.profile-header {
  background: #2563eb; color: #fff;
  padding: 32px 28px; display: flex; gap: 24px; align-items: center;
}
.profile-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.8rem; flex-shrink: 0;
}
.profile-header h1 { font-size: 1.5rem; margin-bottom: 4px; }
.profile-header p  { font-size: 0.95rem; opacity: 0.85; }
.profile-body { padding: 28px; }
.profile-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 20px; margin-bottom: 24px;
}
.profile-item label {
  display: block; font-size: 0.75rem;
  font-weight: bold; color: #888; text-transform: uppercase;
  letter-spacing: 0.5px; margin-bottom: 4px;
}
.profile-item span { font-size: 0.95rem; color: #1e293b; font-weight: 500; }
.profile-bio { margin-bottom: 24px; }
.profile-bio label {
  display: block; font-size: 0.75rem; font-weight: bold;
  color: #888; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px;
}
.profile-bio p { font-size: 0.92rem; color: #555; line-height: 1.6; }
.book-full-btn {
  width: 100%; background: #2563eb; color: #fff; border: none;
  padding: 14px; border-radius: 8px; font-size: 1rem;
  font-weight: bold; cursor: pointer;
}
.book-full-btn:hover { background: #1d4ed8; }

/* ─────────────────────────────────────────────────────────────── */
/* LOADING SPINNER */
/* ─────────────────────────────────────────────────────────────── */
.loading {
  text-align: center; padding: 60px 20px; color: #888;
}
.spinner {
  width: 40px; height: 40px; border: 4px solid #e5e7eb;
  border-top-color: #2563eb; border-radius: 50%;
  animation: spin 0.8s linear infinite; margin: 0 auto 16px;
  will-change: transform;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─────────────────────────────────────────────────────────────── */
/* ERROR BOX */
/* ─────────────────────────────────────────────────────────────── */
.error-box {
  background: #fef2f2; border: 1.5px solid #fecaca;
  border-radius: 8px; padding: 16px 20px; color: #dc2626;
  text-align: center; margin: 20px auto; max-width: 500px;
}

/* ─────────────────────────────────────────────────────────────── */
/* CREDITS SECTION */
/* ─────────────────────────────────────────────────────────────── */
#credits {
  text-align: center;
  padding: 32px 20px;
  color: #666;
  font-size: 0.9rem;
}

.credits-section {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 28px 24px;
  background: #0a0a0f;
  flex-wrap: wrap;
  font-family: 'DM Sans', sans-serif;
  width: 100%;
  flex-shrink: 0;
  opacity: 0;
  pointer-events: none;
}

.credits-section.cr-visible {
  opacity: 1;
  pointer-events: auto;
  animation: fadeInUp 0.7s cubic-bezier(.4,0,.2,1);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(36px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.credits-heading {
  width: 100%;
  text-align: center;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #444460;
  margin: 0 0 4px;
}

.credit-card {
  position: relative;
  width: 240px;
  padding: 22px 22px 18px;
  background: linear-gradient(145deg, #13131f 0%, #0d0d18 100%);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 18px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  overflow: hidden;
  transition: opacity 0.55s ease, transform 0.55s ease,
              box-shadow 0.35s ease, border-color 0.35s ease;
  will-change: transform, box-shadow;
}

.credits-section.cr-visible .credit-card:nth-child(2) {
  animation: slideUp 0.55s ease forwards;
  animation-delay: 0.15s;
}
.credits-section.cr-visible .credit-card:nth-child(3) {
  animation: slideUp 0.55s ease forwards;
  animation-delay: 0.3s;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.credit-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.credit-card.card-blue::before {
  background: radial-gradient(ellipse at 50% 0%, rgba(99,102,241,0.18) 0%, transparent 70%);
}

.credit-card.card-teal::before {
  background: radial-gradient(ellipse at 50% 0%, rgba(20,184,166,0.18) 0%, transparent 70%);
}

.credit-card:hover::before { opacity: 1; }

.credit-card:hover {
  transform: translateY(-6px) scale(1.02) !important;
}

.credit-card.card-blue:hover {
  box-shadow: 0 20px 50px rgba(99,102,241,0.22), 0 0 0 1px rgba(99,102,241,0.3);
  border-color: rgba(99,102,241,0.35);
}

.credit-card.card-teal:hover {
  box-shadow: 0 20px 50px rgba(20,184,166,0.22), 0 0 0 1px rgba(20,184,166,0.3);
  border-color: rgba(20,184,166,0.35);
}

.credit-card::after {
  content: '';
  position: absolute;
  top: -60%;
  left: -75%;
  width: 60%;
  height: 200%;
  background: linear-gradient(105deg, transparent 40%, rgba(255,255,255,0.045) 50%, transparent 60%);
  transform: skewX(-15deg);
  transition: left 0.55s ease;
  pointer-events: none;
}

.credit-card:hover::after { left: 130%; }

.avatar-ring {
  position: relative;
  width: 56px;
  height: 56px;
}

.avatar-ring svg.ring-svg {
  position: absolute;
  inset: -6px;
  width: calc(100% + 12px);
  height: calc(100% + 12px);
  animation: spinRing 8s linear infinite;
}

@keyframes spinRing {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.avatar-placeholder {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  position: relative;
  z-index: 1;
}

.card-blue .avatar-placeholder { background: linear-gradient(135deg, #4f46e5, #818cf8); }
.card-teal .avatar-placeholder { background: linear-gradient(135deg, #0d9488, #2dd4bf); }

.card-name {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 600;
  color: #f0f0f8;
  text-align: center;
  margin: 0;
  line-height: 1.2;
}

.card-title {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #555572;
  text-align: center;
  margin: -4px 0 0;
}

.card-divider {
  width: 32px;
  height: 1px;
  border-radius: 1px;
  margin: 0;
}

.card-blue .card-divider { background: linear-gradient(90deg, transparent, #6366f1, transparent); }
.card-teal .card-divider { background: linear-gradient(90deg, transparent, #14b8a6, transparent); }

.linkedin-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: all 0.25s ease;
}

.card-blue .linkedin-btn {
  background: rgba(99,102,241,0.12);
  color: #a5b4fc;
  border: 1px solid rgba(99,102,241,0.25);
}

.card-teal .linkedin-btn {
  background: rgba(20,184,166,0.12);
  color: #5eead4;
  border: 1px solid rgba(20,184,166,0.25);
}

.card-blue:hover .linkedin-btn {
  background: rgba(99,102,241,0.22);
  border-color: rgba(99,102,241,0.5);
}

.card-teal:hover .linkedin-btn {
  background: rgba(20,184,166,0.22);
  border-color: rgba(20,184,166,0.5);
}

.linkedin-icon { width: 12px; height: 12px; }

.corner-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 8px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 50px;
  font-weight: 500;
}

.card-blue .corner-tag {
  background: rgba(99,102,241,0.15);
  color: #818cf8;
  border: 1px solid rgba(99,102,241,0.2);
}

.card-teal .corner-tag {
  background: rgba(20,184,166,0.15);
  color: #2dd4bf;
  border: 1px solid rgba(20,184,166,0.2);
}

/* ─────────────────────────────────────────────────────────────── */
/* MEDIA QUERIES */
/* ─────────────────────────────────────────────────────────────── */
@media (max-width: 540px) {
  .doc-card { flex-direction: column; }
  .doc-right { text-align: left; }
  .book-btn { width: 100%; text-align: center; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-header { flex-direction: column; text-align: center; }
  .credits-section { gap: 16px; padding: 22px 16px; }
  .credit-card { width: 220px; }
  
  /* Reduce animations on mobile for better performance */
  .credit-card {
    transition: opacity 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  }
  .avatar-ring svg.ring-svg {
    animation: spinRing 12s linear infinite;
  }
}
