/* ==========================================================
   RuGo v102 — SHARED BRANCH HIERARCHY + EXACT LAB RHYTHM

   Admin corrections:
   1. LAB + PROJECTS right justification must use the exact main LAB SPACE
      text edge, not an approximate mirrored padding.
   2. Title/subtitle separation must match main LAB SPACE exactly.
   3. Family-to-family visual separation must match main LAB SPACE.
   4. Secondary titles on BOTH branches are 0.5x so they no longer compete
      with the true screen title.

   True titles remain full scale:
   - PROYECTOS ESPECIALES
   - COMUNIDAD

   Secondary titles at 0.5x:
   - NECESIDAD / INTEGRACIÓN / DESARROLLO
   - COLABORACIÓN / APORTE / APRENDIZAJE

   Runtime JS measures approved main LAB v083 and supplies:
   --rugo-lab-title-copy-gap
   --rugo-lab-family-gap
   --rugo-lab-right-shift
   --rugo-lab-right-inset

   No approximated LAB coordinates are hard-coded.
   ========================================================== */

:root{
  --rugo-secondary-branch-title-scale:
    clamp(19px,calc((100cqh / 8) * .2915),37px);
}

/* ----------------------------------------------------------
   BOTH SHARED BRANCHES — LAB title/copy + family rhythm
   ---------------------------------------------------------- */

/* Remove inherited SERVICES pre-title padding from the secondary families.
   Visual separation is now governed by the measured LAB family gap. */
.special-projects-v099 .services-overview-family__content-zone,
.lab-projects-v100 .services-overview-family__content-zone{
  padding-top:0!important;
}

/* First-family split statement zone also gets no inherited approximation. */
.special-projects-v099 .services-overview-family--residential
  .services-overview-family__statement-zone,
.lab-projects-v100 .services-overview-family--residential
  .services-overview-family__statement-zone{
  padding-top:0!important;
}

/* Exact title → subtitle separation, measured from main LAB v083. */
.special-projects-v099 .services-overview-family__statement,
.lab-projects-v100 .services-overview-family__statement{
  margin-top:var(--rugo-lab-title-copy-gap,0px)!important;
}

/* Preserve each branch's horizontal statement anchoring.
   Proyectos Especiales stays left.
   LAB stays right. */
.special-projects-v099 .services-overview-family__statement{
  margin-left:.08em!important;
  margin-right:0!important;
}

.lab-projects-v100 .services-overview-family__statement{
  margin-left:auto!important;
  margin-right:0!important;
}

/* Exact visual family separation, measured from main LAB v083. */
.special-projects-v099__overview,
.lab-projects-v100__overview{
  gap:var(--rugo-lab-family-gap,calc((100cqh / 8) * .32))!important;
}

/* Fourth family follows the same measured visual separation. */
.special-projects-v099__development,
.lab-projects-v100__aprendizaje{
  top:calc(100% + var(--rugo-lab-family-gap,calc((100cqh / 8) * .32)))!important;
}

/* ----------------------------------------------------------
   HIERARCHY — SECONDARY TITLES 0.5x
   ---------------------------------------------------------- */

/* PROYECTOS ESPECIALES remains the true full-scale title. */
.special-projects-v099
  .services-overview-family--strategy
  .services-overview-family__title,
.special-projects-v099
  .services-overview-family--systems
  .services-overview-family__title,
.special-projects-v099
  .special-projects-v099__development
  .services-overview-family__title{
  font-size:var(--rugo-secondary-branch-title-scale)!important;
}

/* COMUNIDAD remains the true full-scale title. */
.lab-projects-v100
  .services-overview-family--strategy
  .services-overview-family__title,
.lab-projects-v100
  .services-overview-family--systems
  .services-overview-family__title,
.lab-projects-v100
  .lab-projects-v100__aprendizaje
  .services-overview-family__title{
  font-size:var(--rugo-secondary-branch-title-scale)!important;
}

/* ----------------------------------------------------------
   LAB + PROJECTS — EXACT MAIN-LAB RIGHT EDGE
   ---------------------------------------------------------- */

/* v101 established right text alignment.
   v102 moves the complete editorial overview to the exact text-right
   coordinate measured from the approved main LAB screen. */
.lab-projects-v100__overview{
  translate:var(--rugo-lab-right-shift,0px) 0!important;
}

/* All LAB branch family text remains right aligned and shares one edge. */
.lab-projects-v100 .services-overview-family,
.lab-projects-v100 .services-overview-family__content-zone,
.lab-projects-v100 .services-overview-family__title-zone,
.lab-projects-v100 .services-overview-family__statement-zone,
.lab-projects-v100 .services-overview-family__title,
.lab-projects-v100 .services-overview-family__statement{
  text-align:right!important;
}

/* COLABORACIÓN no longer exceeds the justification:
   - 0.5x title scale
   - exact same right edge as main LAB
   - same title measure box */
.lab-projects-v100 .services-overview-family__title,
.lab-projects-v100 .services-overview-family__statement{
  width:min(100%,var(--services-title-measure))!important;
  max-width:var(--services-title-measure)!important;
  margin-left:auto!important;
  margin-right:0!important;
}

/* CTA follows the SAME main-LAB right alignment line.
   The button's right box edge, including the master arrow, lands on the
   measured reference inset. */
.lab-projects-v100__cta{
  right:var(--rugo-lab-right-inset,clamp(64px,5.2vw,88px))!important;
}

/* Preserve the approved main title sizes explicitly. */
.special-projects-v099
  .services-overview-family--residential
  .services-overview-family__title,
.lab-projects-v100
  .services-overview-family--residential
  .services-overview-family__title{
  font-size:var(--services-title-scale)!important;
}