/* ============================================================
   OUR TEAM SECTION — Shared + Team Listing + Profiles + Book
   Loaded on: /our-team/contributor/, /our-team/contributor/{name}, /our-team/estate-planning-guide
   Inherits from: /assets/css/global.css
   ============================================================ */

/* ------------------------------------------------------------------
   1. SHARED COMPONENTS — Tab Nav, Hero, Trust Bar, Breadcrumbs, Content
   ------------------------------------------------------------------ */

/* Cross-Link Banner — shows link to the opposite page only */
.cross-link-bar {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: linear-gradient(135deg, #f0f4f8 0%, #e8eef5 100%);
  border-bottom: 2px solid #d0d8e2;
  padding: 14px 24px;
  flex-wrap: wrap;
}
.cross-link-center {
  display: contents;
}
.cross-link-cover {
  width: 72px;
  height: auto;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
  flex-shrink: 0;
  transform: rotate(8deg);
}
.cross-link-cover-left {
  display: none;
}
.cross-link-cover-right {
  transform: rotate(8deg);
}
.cross-link-label {
  font-family: var(--bodyfont);
  font-size: 20px;
  color: var(--charcoal);
  font-weight: 500;
  letter-spacing: .3px;
}
.cross-link-btn {
  display: inline-block;
  padding: 12px 36px;
  background: linear-gradient(135deg, var(--darkblue-2) 0%, #003366 100%);
  color: var(--white);
  font-family: var(--headingfont);
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--border-rad);
  box-shadow: 4px 5px 14px rgba(15,35,65,.68), 6px 8px 28px rgba(15,35,65,.48);
  transition: transform .2s, box-shadow .2s, background .2s;
  letter-spacing: .3px;
  animation: btn-glow 2s ease-in-out infinite;
}
.cross-link-btn:hover {
  background: linear-gradient(135deg, #002a6b 0%, #004080 100%);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 6px 7px 20px rgba(15,35,65,.82), 8px 10px 40px rgba(15,35,65,.6);
  animation: none;
}
@keyframes btn-glow {
  0%, 100% { box-shadow: 4px 5px 14px rgba(15,35,65,.68), 6px 8px 28px rgba(15,35,65,.48); }
  50% { box-shadow: 6px 7px 22px rgba(15,35,65,.85), 8px 12px 44px rgba(15,35,65,.6); }
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--darkblue-2) 0%, #003366 100%);
  color: var(--white);
  text-align: center;
  padding: 48px 20px 40px;
}
.hero h1 {
  color: var(--white);
  font-family: var(--headingfont);
  font-weight: 700;
  font-size: 2rem;
  margin: 0 0 16px;
}
.hero p {
  color: rgba(255,255,255,.85);
  font-size: 16px;
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Trust Bar / Stats */
.trust-bar {
  background-color: #0a2a4a;
  padding: 24px 20px;
}
.stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  max-width: 800px;
  margin: 0 auto;
}
.stat {
  text-align: center;
  min-width: 90px;
}
.stat-num {
  font-family: var(--headingfont);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--white);
}
.stat-label {
  font-size: 12px;
  color: rgba(255,255,255,.7);
  margin-top: 4px;
  font-family: var(--bodyfont);
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* Content Wrapper */
.content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

/* Breadcrumbs */
.breadcrumb {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 20px;
  font-size: 13px;
  font-family: var(--bodyfont);
  color: var(--darkgrey);
}
.breadcrumb a {
  color: var(--blue);
  text-decoration: none;
  font-size: 13px;
  font-weight: 400;
}
.breadcrumb a:hover {
  text-decoration: underline;
}

/* Section descriptions used on book page */
.section-desc {
  color: var(--charcoal);
  font-size: 16px;
  margin-bottom: 24px;
  line-height: 1.6;
}


/* ------------------------------------------------------------------
   2. TEAM LISTING PAGE — Grid, Cards, EEAT
   ------------------------------------------------------------------ */

.team-group {
  margin-bottom: 40px;
}
.team-group h2 {
  text-align: center;
  margin-bottom: 8px;
}
.group-desc {
  text-align: center;
  color: var(--darkgrey);
  font-size: 15px;
  max-width: 780px;
  margin: 0 auto 32px;
  line-height: 1.5;
}

/* Card Grid */
.team-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
.team-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--white);
  border-radius: var(--border-rad);
  padding: 28px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  border: 1px solid #e8ecf0;
}
.team-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}

/* Card Headshot — image or initials fallback */
img.card-headshot {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 14px;
}
div.card-headshot {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: #d6e4f0;
  color: var(--darkblue-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--headingfont);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.team-card h3 {
  color: var(--darkblue-2);
  font-size: 17px;
  margin: 0 0 4px;
  font-weight: 700;
}
.card-title {
  color: var(--darkgrey);
  font-size: 14px;
  margin-bottom: 8px;
}
.card-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 8px;
  font-family: var(--bodyfont);
}
.card-exp {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 6px;
}
.card-creds {
  font-size: 13px;
  color: var(--darkgrey);
  margin-bottom: 10px;
  font-style: italic;
}
.card-bio {
  font-size: 14px;
  color: var(--charcoal);
  line-height: 1.5;
  margin-bottom: 12px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  margin-top: auto;
}

/* EEAT Editorial Standards */
.eeat-section {
  background: var(--white);
  border-radius: var(--border-rad);
  padding: 40px 28px;
  margin-top: 40px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  border: 1px solid #e8ecf0;
}
.eeat-section h2 {
  text-align: center;
  margin-bottom: 8px;
}
.eeat-section > p {
  text-align: center;
  color: var(--darkgrey);
  font-size: 15px;
  max-width: 700px;
  margin: 0 auto 28px;
}
.eeat-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.eeat-item {
  text-align: center;
  padding: 20px 16px;
  background: var(--offWhiteNew);
  border-radius: var(--border-rad);
}
.eeat-item .icon {
  font-size: 2rem;
  margin-bottom: 8px;
}
.eeat-item h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--darkblue-2);
  margin: 0 0 6px;
}
.eeat-item p {
  font-size: 13px;
  color: var(--darkgrey);
  line-height: 1.5;
  margin: 0;
}


/* ------------------------------------------------------------------
   3. INDIVIDUAL PROFILE PAGES
   ------------------------------------------------------------------ */

.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 20px 24px;
  gap: 20px;
}
.profile-header .headshot {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e8ecf0;
}
.profile-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profile-info h1 {
  margin: 0;
  font-family: var(--headingfont);
  font-size: 1.75rem;
  font-weight: 700;
}
.profile-info .title {
  color: var(--darkgrey);
  font-size: 16px;
}
.role-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
  background: #fef3c7;
  color: #5b4a1e;
  font-family: var(--bodyfont);
  align-self: center;
  margin: 4px 0;
}
.experience {
  font-size: 14px;
  color: var(--charcoal);
}

/* Profile Body Sections */
.profile-body {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 48px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.bio-section,
.credentials-section,
.expertise-section,
.articles-section {
  background: var(--white);
  border-radius: var(--border-rad);
  padding: 28px 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  border: 1px solid #e8ecf0;
}
.bio-section h2,
.credentials-section h2,
.expertise-section h2,
.articles-section h2 {
  font-size: 1.25rem;
  margin: 0 0 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e8ecf0;
}
.bio-section p {
  line-height: 1.7;
  margin: 0 0 14px;
}
.bio-section p:last-child {
  margin-bottom: 0;
}
.credentials-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.credentials-section li {
  padding: 0;
  font-size: 16px;
  line-height: 1.6;
}

/* Expertise Tags */
.expertise-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.expertise-tag {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid #ccd6e0;
  border-radius: 20px;
  font-size: 13px;
  color: var(--charcoal);
  background: var(--offWhiteNew);
  font-family: var(--bodyfont);
}

/* Articles Placeholder */
.article-placeholder {
  text-align: center;
  padding: 24px;
  background: var(--offWhiteNew);
  border-radius: var(--border-rad);
  color: var(--darkgrey);
  font-size: 14px;
  line-height: 1.6;
}

/* Articles list (populated by /our-team/assets/JS/contributor-articles.js) */
.article-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.article-item {
  border-bottom: 1px solid #e8ecf0;
}
.article-item:last-child {
  border-bottom: none;
}
.article-item-link {
  display: block;
  padding: 14px 4px;
  color: var(--charcoal);
  text-decoration: none;
  transition: background 0.15s ease, padding-left 0.15s ease;
}
.article-item-link:hover {
  background: var(--offWhiteNew);
  padding-left: 10px;
  color: var(--brightBlueNew);
}
.article-item-title {
  display: block;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.4;
}
.article-item-meta {
  display: block;
  font-size: 12px;
  color: var(--darkgrey);
  margin-top: 4px;
  letter-spacing: 0.2px;
}

/* Profile page initials fallback (David McInerney) */
.profile-header .headshot-initials {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background-color: #d6e4f0;
  color: var(--darkblue-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--headingfont);
  font-size: 2.5rem;
  font-weight: 700;
  border: 3px solid #e8ecf0;
}


/* ------------------------------------------------------------------
   4. BOOK LANDING PAGE
   ------------------------------------------------------------------ */

/* Book Hero — side-by-side layout */
.hero-layout {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  max-width: 1000px;
  margin: 0 auto;
}
.hero-cover {
  flex-shrink: 0;
}
.hero-cover img {
  max-width: 220px;
  height: auto;
  border-radius: var(--border-rad);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.hero-text {
  text-align: center;
}
.hero-text h1 {
  font-size: 1.75rem;
}
.subtitle {
  font-size: 16px;
  color: rgba(255,255,255,.8);
  margin-bottom: 12px;
  line-height: 1.5;
  font-style: italic;
}
.authors {
  font-size: 15px;
  color: rgba(255,255,255,.7);
  margin-bottom: 20px;
}
.cta-btn {
  display: inline-block;
  padding: 12px 32px;
  background-color: var(--darkblue-2);
  color: var(--white);
  border: 2px solid rgba(255,255,255,.3);
  border-radius: var(--border-rad);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: background-color .2s, border-color .2s;
}
.cta-btn:hover {
  background-color: #002a6b;
  border-color: rgba(255,255,255,.6);
  color: var(--white);
}

/* Key Takeaways */
.key-takeaway {
  background: var(--offWhiteNew);
  border-radius: var(--border-rad);
  padding: 28px 24px;
  margin-bottom: 36px;
  border-left: 4px solid var(--blue);
}
.key-takeaway h3 {
  color: var(--darkblue-2);
  font-size: 1.1rem;
  margin: 0 0 12px;
}
.key-takeaway ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.key-takeaway li {
  padding: 4px 0 4px 24px;
  position: relative;
  font-size: 15px;
  line-height: 1.5;
  color: var(--charcoal);
}
.key-takeaway li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: #1c6924;
  font-weight: 700;
}

/* Five-Lens Framework */
.five-lens {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
.lens-card {
  text-align: center;
  background: var(--white);
  border-radius: var(--border-rad);
  padding: 20px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  border: 1px solid #e8ecf0;
}
.lens-card .icon {
  font-size: 2rem;
  margin-bottom: 8px;
}
.lens-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--darkblue-2);
  margin: 0 0 6px;
}
.lens-card p {
  font-size: 13px;
  color: var(--darkgrey);
  line-height: 1.5;
  margin: 0;
}

/* Parts Grid */
.part-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 40px;
}
.part-card {
  background: var(--white);
  border-radius: var(--border-rad);
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  border: 1px solid #e8ecf0;
}
.part-card h4 {
  font-size: 16px;
  font-weight: 700;
  color: var(--darkblue-2);
  margin: 0 0 8px;
}
.part-card p {
  font-size: 14px;
  color: var(--charcoal);
  line-height: 1.5;
  margin: 0 0 8px;
}
.chapters {
  font-size: 12px;
  color: var(--darkgrey);
  font-style: italic;
}

/* Appendix Grid */
.appendix-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-bottom: 40px;
}
.appendix-item {
  padding: 10px 14px;
  background: var(--white);
  border-radius: var(--border-rad);
  font-size: 14px;
  color: var(--charcoal);
  border: 1px solid #e8ecf0;
}

/* Author Cards (book contributor grid) */
.author-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-bottom: 40px;
}
.author-card {
  text-align: center;
  background: var(--white);
  border-radius: var(--border-rad);
  padding: 24px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  border: 1px solid #e8ecf0;
}
.initials {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: #d6e4f0;
  color: var(--darkblue-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--headingfont);
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 auto 12px;
}
.author-card h4 {
  color: var(--darkblue-2);
  font-size: 17px;
  margin: 0 0 4px;
}
.author-card .role {
  font-size: 14px;
  color: var(--darkgrey);
  margin-bottom: 8px;
}
.badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
  font-family: var(--bodyfont);
}
.author-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--charcoal);
  margin: 0;
}

/* Related Articles List */
.article-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
}
.article-list li {
  padding: 12px 0;
  border-bottom: 1px solid #e8ecf0;
}
.article-list li:last-child {
  border-bottom: none;
}
.article-list a {
  font-size: 16px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}
.article-list a:hover {
  text-decoration: underline;
}
.article-list .cat {
  font-size: 13px;
  color: var(--darkgrey);
  margin-top: 2px;
}
.browse-btn {
  display: inline-block;
  padding: 10px 28px;
  background: var(--darkblue-2);
  color: var(--white);
  border-radius: var(--border-rad);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.browse-btn:hover {
  background: #002a6b;
  color: var(--white);
}

/* FAQ Block */
.faq-block {
  margin-bottom: 40px;
}
.faq-item {
  padding: 20px 0;
  border-bottom: 1px solid #e8ecf0;
}
.faq-item:last-child {
  border-bottom: none;
}
.faq-item h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--darkblue-2);
  margin: 0 0 8px;
}
.faq-item p {
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* CTA Banner (bottom of book page) */
.cta-banner {
  background: linear-gradient(135deg, var(--darkblue-2) 0%, #003366 100%);
  border-radius: var(--border-rad);
  text-align: center;
  padding: 48px 24px;
  margin-top: 20px;
}
.cta-banner h2 {
  color: var(--white);
  margin: 0 0 12px;
}
.cta-banner p {
  color: rgba(255,255,255,.8);
  font-size: 16px;
  margin: 0 0 20px;
}
.cta-banner .cta-btn {
  margin-bottom: 16px;
}
.sub-link {
  font-size: 13px;
  color: rgba(255,255,255,.6);
}
.sub-link a {
  color: rgba(255,255,255,.8);
  text-decoration: underline;
  font-weight: 400;
  font-size: 13px;
}


/* ------------------------------------------------------------------
   5. RESPONSIVE — Tablet (768px+)
   ------------------------------------------------------------------ */
@media (min-width: 768px) {

  .hero h1 { font-size: 2.5rem; }
  .hero { padding: 56px 28px 48px; }

  .book-tab { font-size: 16px; padding: 14px 36px; }

  /* Team Grid — 2 columns */
  .team-grid { grid-template-columns: repeat(2, 1fr); }

  /* EEAT — 2 columns */
  .eeat-grid { grid-template-columns: repeat(2, 1fr); }

  /* Profile header — horizontal */
  .profile-header {
    flex-direction: row;
    text-align: left;
    align-items: flex-start;
    padding: 32px 20px 28px;
  }
  .profile-info { align-items: flex-start; }
  .role-badge { align-self: flex-start; }

  /* Book hero — side by side */
  .hero-layout {
    flex-direction: row;
    text-align: left;
    gap: 40px;
  }
  .hero-text { text-align: left; }
  .hero-cover img { max-width: 260px; }

  /* Five Lens — 3 columns on tablet */
  .five-lens { grid-template-columns: repeat(3, 1fr); }

  /* Parts grid — 2 columns */
  .part-grid { grid-template-columns: repeat(2, 1fr); }

  /* Appendix — 2 columns */
  .appendix-grid { grid-template-columns: repeat(2, 1fr); }

  /* Author grid — 2 columns */
  .author-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ------------------------------------------------------------------
   6. RESPONSIVE — Desktop (1024px+)
   ------------------------------------------------------------------ */
@media (min-width: 1024px) {

  /* Team Grid — 3 columns */
  .team-grid { grid-template-columns: repeat(3, 1fr); }

  /* EEAT — all 5 in a row */
  .eeat-grid { grid-template-columns: repeat(5, 1fr); }

  /* Five Lens — all 5 */
  .five-lens { grid-template-columns: repeat(5, 1fr); }

  /* Author grid — 3 on book page */
  .author-grid { grid-template-columns: repeat(3, 1fr); }

  /* Book hero cover larger */
  .hero-cover img { max-width: 300px; }
  .hero-text h1 { font-size: 2.25rem; }

  /* Profile headshot larger */
  .profile-header .headshot { width: 150px; height: 150px; }
  .profile-header .headshot-initials { width: 150px; height: 150px; font-size: 3rem; }
}
