
/* ---- css/cover-fixed-geometry-v4309.css ---- */
/* v.4309 — stable first-screen cover geometry, loaded LAST on cover pages.
   Goal: cover X/Y/size must not depend on text height or page-specific align-self rules. */
@media (min-width: 801px) {
  .page__main-block .main-block__container {
    width: min(calc(100% - 48px), 1360px) !important;
    max-width: 1360px !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: minmax(360px, 0.78fr) minmax(560px, 1.22fr) !important;
    grid-template-areas: "heading image" "body image" !important;
    column-gap: clamp(54px, 5vw, 86px) !important;
    row-gap: 28px !important;
    align-items: start !important;
    padding: clamp(82px, 7vw, 106px) 0 clamp(54px, 6vw, 88px) !important;
    margin: 0 auto !important;
  }

  .page__main-block .main-block__heading { grid-area: heading !important; }
  .page__main-block .main-block__body { grid-area: body !important; }

  .page__main-block .main-block__image._ibg {
    grid-area: image !important;
    position: relative !important;
    inset: auto !important;
    align-self: start !important;
    justify-self: stretch !important;
    width: 100% !important;
    height: auto !important;
    min-width: 0 !important;
    margin: 96px 0 0 0 !important;
    transform: none !important;
    overflow: hidden !important;
  }

  .page__main-block .main-block__image._ibg > img[src*="cover_"] {
    position: static !important;
    inset: auto !important;
    display: block !important;
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    aspect-ratio: 16 / 10 !important;
    object-fit: cover !important;
    object-position: center center !important;
    margin: 0 !important;
    transform: none !important;
  }
}

/* v.4311 — unified hero heading position.
   graphology.html is the approved visual reference. The heading block is
   pinned to one top-left point of the shared desktop hero grid so X/Y does
   not vary with page-specific rules or the height of the body content. */
@media (min-width: 801px) {
  .page__main-block .main-block__heading {
    grid-area: heading !important;
    position: relative !important;
    inset: auto !important;
    align-self: start !important;
    justify-self: start !important;
    width: 100% !important;
    max-width: 520px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    z-index: 2 !important;
  }
  .page__main-block .main-block__title,
  .page__main-block .main-block__subtitle {
    position: static !important;
    inset: auto !important;
    transform: none !important;
  }
  .page__main-block .main-block__title {
    margin-top: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  .page__main-block .main-block__subtitle {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}


/* v.4312 — unify the vertical position of the author block with graphology.html.
   The left heading and body share one grid row. The body receives a fixed
   reference offset equal to graphology.html: one title line + 8px gap +
   one subtitle line + the approved 28px heading/body gap. This makes the
   avatar + “Исакова Лариса” start at the same Y on every cover page,
   regardless of the page-specific heading height. */
@media (min-width: 801px) {
  .page__main-block .main-block__container {
    grid-template-areas: "heading image" !important;
    grid-template-rows: auto !important;
  }

  .page__main-block .main-block__heading {
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: start !important;
  }

  .page__main-block .main-block__body {
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: start !important;
    padding-top: calc(
      clamp(38.08px, 3.36vw, 53.76px) +
      8px +
      clamp(33.04px, 2.773vw, 47.2px) +
      28px
    ) !important;
  }

  .page__main-block .main-block__image._ibg {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }
}

/* v.4314 — lock the “Исакова Лариса” author block to the services.html
   desktop reference position on every analogous cover page.
   The author is taken out of normal flow and pinned to one Y coordinate;
   equivalent flow space is reserved so following page-specific content cannot
   pull the author up/down. services.html therefore remains the visual reference. */
@media (min-width: 801px) {
  .page__main-block .main-block__body {
    --g74-author-top-services: calc(
      clamp(38.08px, 3.36vw, 53.76px) +
      8px +
      clamp(33.04px, 2.773vw, 47.2px) +
      28px
    );
    position: relative !important;
    inset: auto !important;
    margin: 0 !important;
    transform: none !important;
    padding-top: calc(var(--g74-author-top-services) + 90px) !important;
  }

  .page__main-block .main-block__body > .main-block__text:first-child {
    position: absolute !important;
    top: var(--g74-author-top-services) !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    width: 100% !important;
    max-width: 500px !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    z-index: 3 !important;
  }
}

/* v.4316 — index.html: make “Юридические услуги” typographically identical
   to the main title on graphology.html. Kept as a div to avoid adding a second H1
   on index.html; only visual typography is synchronized. */
body.page-index .page__main-block .g74-title-like-graphology {
  font-family: Montserrat, sans-serif !important;
  font-size: 40px !important;
  line-height: 137% !important;
  letter-spacing: 0.2px !important;
  font-weight: 800 !important;
}
@media (max-width: 480px) {
  body.page-index .page__main-block .g74-title-like-graphology {
    font-size: 30px !important;
  }
}


/* ---- css/heading-unified-v4317.css ---- */
/* v.4317 — unified visible page heading typography.
   Reference: index.html visible "Юридические услуги" title from approved v.4316.
   Important: index.html uses .main-block__title on a div, not the SEO-hidden H1.
   Therefore both visible .main-block__title and visible semantic H1 are normalized. */

.page__main-block .main-block__title,
h1:not(.seo-visually-hidden) {
  font-family: Montserrat, sans-serif !important;
  font-size: 40px !important;
  line-height: 137% !important;
  letter-spacing: 0.2px !important;
  font-weight: 800 !important;
}

@media (max-width: 480px) {
  .page__main-block .main-block__title,
  h1:not(.seo-visually-hidden) {
    font-size: 30px !important;
  }
}

/* v.4319 — keep the visible first-screen page title on one line on desktop.
   The title may use the free horizontal space above the cover image instead of
   wrapping inside the left 520px text column and colliding with the fixed author block. */
@media (min-width: 801px) {
  .page__main-block .main-block__heading {
    width: max-content !important;
    max-width: none !important;
    overflow: visible !important;
  }

  .page__main-block .main-block__title {
    display: block !important;
    width: max-content !important;
    max-width: none !important;
    white-space: nowrap !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
  }
}


/* v.4325 — menu-matching first word accent in hero titles.
   Uses the same red-brown accent as the active upper-navigation item (#850909). */
.page__main-block .main-block__title > .hero-title-menu-word,
h1.main-block__title > .hero-title-menu-word,
h1.activity-h1 > .hero-title-menu-word {
  color:#34465a !important;
}


/* ---- css/header-v4444-09.css ---- */
/* v4444-09: header-only correction */
@media (min-width:771px){
  .header__container{column-gap:20px !important;}
  .g74-prelogo-nav{
    flex:0 0 auto !important;
    width:auto !important;
    min-width:0 !important;
    margin:0 !important;
    overflow:visible !important;
    background-color:rgba(250,250,250,1) !important;
  }
  .g74-prelogo-nav > a{
    float:left !important;
    display:block !important;
    color:rgba(13,92,99,1) !important;
    text-align:center !important;
    padding:10px 10px !important;
    text-decoration:none !important;
    font-size:14px !important;
  }
  .header__container > .g74-prelogo-nav,
  .header__container > .g74-header-feather,
  .header__container > .g74-header-name{
    margin-left:0 !important;
    margin-right:0 !important;
  }
}
.topnav > a[aria-current="page"]:not(.icon),
.topnav > a.active:not(.icon){
  background-color:rgba(133,9,9,1) !important;
  color:#fff !important;
  font-weight:700 !important;
}
.topnav > a[aria-current="page"]:not(.icon) span,
.topnav > a.active:not(.icon) span{color:#fff !important;}

