/* ============================================================
   INDEX PAGE REFINEMENTS · v4
   Desktop navigation, compact service cards, About spacing
   ============================================================ */

/* Visibility switches rely on the native hidden attribute. Keep it decisive
   even on components that otherwise declare display:grid/flex. */
.home-books [hidden],
.testimonials-slider-section [hidden]{
  display:none !important;
}

/* Desktop header mirrors the established About-page navigation rhythm. */
@media (min-width: 901px){
  .home-site-nav .nav-inner{
    min-height:84px;
  }
  .home-site-nav .desktop-nav{
    display:flex !important;
    align-items:center;
    gap:34px;
    margin-left:auto;
  }
  /* home.css previously hides .nav-dropdown globally with !important.
     Restore it explicitly on desktop so Work with me is visible. */
  .home-site-nav .nav-dropdown{
    display:block !important;
    position:relative;
  }
  .home-site-nav .global-menu-toggle{
    display:none !important;
  }
}

/* Navigation typography and CTA. */
.home-site-nav .desktop-nav > a,
.home-site-nav .nav-dropdown-toggle{
  color:#3d4843;
  font-family:"Montserrat",sans-serif;
  font-size:.92rem;
  font-weight:500;
  text-decoration:none;
}
.home-site-nav .nav-cta,
.home-site-nav .nav-cta:visited,
.home-site-nav .nav-cta:hover,
.home-site-nav .nav-cta:focus{
  color:#fff !important;
}

/* Work-with-me hover/focus dropdown. */
.home-site-nav .nav-dropdown{
  position:relative;
}
.home-site-nav .nav-dropdown-toggle{
  display:flex;
  align-items:center;
  gap:6px;
  border:0;
  background:none;
  cursor:pointer;
  padding:20px 0;
}
.home-site-nav .nav-dropdown-menu{
  position:absolute;
  top:calc(100% - 6px);
  left:-18px;
  width:250px;
  padding:8px;
  border:1px solid var(--line);
  border-radius:18px;
  background:var(--paper);
  box-shadow:var(--shadow);
  opacity:0;
  visibility:hidden;
  transform:translateY(-6px);
  transition:.18s ease;
  z-index:80;
}
.home-site-nav .nav-dropdown:hover .nav-dropdown-menu,
.home-site-nav .nav-dropdown:focus-within .nav-dropdown-menu{
  opacity:1;
  visibility:visible;
  transform:translateY(0);
}
.home-site-nav .nav-dropdown-menu a{
  display:block;
  padding:11px 12px;
  border-radius:10px;
  color:var(--ink);
  font-family:"Montserrat",sans-serif;
  font-size:.88rem;
  font-weight:500;
  line-height:1.35;
  text-decoration:none;
}
.home-site-nav .nav-dropdown-menu a:hover,
.home-site-nav .nav-dropdown-menu a:focus-visible{
  background:var(--bg);
}

/* Service cards: remove old number area and reduce overall height. */
.home-service-card{
  min-height:238px;
  padding:26px 28px;
  justify-content:flex-start;
  gap:22px;
}
.home-service-card > div{
  margin:0;
}
.home-service-card .service-link{
  margin-top:auto;
}
.service-topline{
  display:none !important;
}

/* Canonical service colours. These become the dominant page colours
   on the corresponding service pages for stronger visual coherence. */
.service-individual{background:#f4f0e8 !important;}
.service-couples{background:#e4edf0 !important;}
.service-separation{background:#e8ece3 !important;}

/* More breathing room before Collaborations. */
.home-about .small-link{
  display:inline-block;
  margin-bottom:38px;
}
.home-about .org-label{
  margin-top:0;
  margin-bottom:16px;
}
.home-about .org-carousel{
  margin-top:0;
}

/* Keep the page contained to the viewport at every width. */
html,body{
  max-width:100%;
  overflow-x:hidden;
}
.home-site-nav,
.hero,
.section,
.site-footer,
.org-carousel{
  max-width:100%;
}
.container,
.hero-grid,
.home-service-grid,
.recognition-grid,
.home-approach-grid,
.home-about-grid,
.home-books-head,
.home-book-row,
.home-final-cta-inner,
.home-about-grid > *,
.hero-grid > *,
.home-books-head > *{
  min-width:0;
}

/* The central visibility settings can show 1, 2 or 3 book cards without
   deleting or rebuilding any card markup. */
@media (min-width: 901px){
  .home-book-row[data-visible-count="1"]{
    grid-template-columns:minmax(0,1fr);
  }
  .home-book-row[data-visible-count="2"]{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .home-book-row[data-visible-count="3"]{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

/* When a testimonial image is disabled, keep the client name beside the
   testimonial text instead of reserving portrait space. */
.testimonial-slide.testimonial-image-hidden{
  grid-template-columns:max-content minmax(0,1fr);
  gap:24px;
  align-items:start;
}
.testimonial-slide.testimonial-image-hidden .testimonial-person{
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  align-self:start;
  padding-top:2px;
}
.testimonial-slide.testimonial-image-hidden .testimonial-name{
  text-align:left;
  white-space:nowrap;
}

@media (max-width: 900px){
  .home-site-nav .desktop-nav{
    display:none !important;
  }
  .home-site-nav .nav-dropdown{
    display:none !important;
  }
  .home-site-nav .global-menu-toggle{
    display:flex !important;
  }
  .home-service-card{
    min-height:auto;
  }
}

@media (max-width: 700px){
  .testimonial-slide.testimonial-image-hidden{
    grid-template-columns:max-content minmax(0,1fr);
    gap:18px;
    text-align:left;
  }
}

/* Homepage book cards are internal links to dedicated book pages. */
.home-book-feature{color:inherit;text-decoration:none;cursor:pointer;transition:transform .2s ease,box-shadow .2s ease}
.home-book-feature:hover{transform:translateY(-3px);box-shadow:0 15px 34px rgba(36,48,43,.08)}
.home-book-feature:focus-visible{outline:3px solid rgba(83,104,92,.28);outline-offset:4px}

/* Mobile-only homepage refinements */
@media (max-width: 900px){
  .home-about-grid{
    display:flex !important;
    flex-direction:column !important;
    gap:36px !important;
  }
  .home-about-image{
    order:-1 !important;
    width:100% !important;
  }
}
