/*
 * Percival Page WordPress Version 14
 * Compact service/article headers, exact anchors and a refined mobile hero.
 */

:root {
  --percival-scroll-offset: 88px;
}

html {
  scroll-padding-top: var(--percival-scroll-offset);
}

section[id],
[id]:target,
#contenido {
  scroll-margin-top: var(--percival-scroll-offset);
}

/* Remove the preventive space left between the fixed header and a section. */
.percival-inner-page .site-header,
.percival-inner-page .site-header.is-scrolled {
  height: 88px !important;
}

/* Areas of practice and article-index secondary header. */
.percival-inner-page .detail-hero__inner {
  min-height: 220px;
  grid-template-columns: 68px minmax(0, 1fr);
  align-content: center;
  gap: 12px 22px;
  padding-top: 26px;
  padding-bottom: 28px;
}

.percival-inner-page .detail-breadcrumb {
  min-height: 34px;
  margin-bottom: 2px;
  padding: 7px 12px;
  font-size: 10px;
}

.percival-inner-page .detail-hero__icon {
  width: 68px;
  height: 68px;
}

.percival-inner-page .detail-hero__icon .lucide {
  width: 31px;
  height: 31px;
}

.percival-inner-page .detail-hero h1 {
  font-size: clamp(43px, 4.2vw, 56px);
  line-height: .98;
}

.percival-inner-page .detail-eyebrow {
  margin-bottom: 6px;
  font-size: 11px;
}

.percival-inner-page .detail-lead {
  max-width: 1050px;
  margin-top: 11px;
  font-size: 15px;
  line-height: 1.55;
}

.detail-content {
  padding: 54px 0 66px;
}

.detail-grid {
  gap: clamp(38px, 4.5vw, 62px);
}

.detail-main h2,
.detail-related h2 {
  font-size: clamp(31px, 3vw, 40px);
}

/* Article detail pages use the available space more efficiently. */
.percival-inner-page .article-hero {
  padding: 32px 0;
}

.article-hero__inner {
  min-height: 360px;
  grid-template-columns: minmax(0, .94fr) minmax(390px, 1.06fr);
}

.article-hero__copy {
  padding: clamp(34px, 4.3vw, 54px);
}

.article-hero__copy h1 {
  font-size: clamp(41px, 3.8vw, 58px);
}

.article-hero img {
  min-height: 360px;
}

.article-body {
  padding: 58px 0 76px;
}

.article-body__grid {
  gap: clamp(36px, 4.5vw, 60px);
}

.article-hub {
  padding: 56px 0 72px;
}

.article-hub__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.article-hub__grid a {
  min-height: 330px;
}

/* Six homepage articles form two balanced rows on wide screens. */
.blog__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.blog__grid article {
  min-height: 150px;
}

.blog {
  padding-bottom: 66px;
}

@media (max-width: 1100px) {
  .blog__grid,
  .article-hub__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  :root {
    --percival-scroll-offset: 96px;
  }

  .site-header,
  .site-header.is-scrolled,
  .percival-inner-page .site-header,
  .percival-inner-page .site-header.is-scrolled {
    height: 96px !important;
  }

  .main-nav {
    inset: 96px 0 auto;
  }

  .nav-shell {
    gap: 18px;
  }

  .brand {
    min-width: 0;
    flex-basis: 330px;
  }

  .brand img {
    width: 330px;
    max-height: 72px;
  }

  .menu-toggle {
    width: 50px;
    height: 50px;
    flex-basis: 50px;
  }

  .menu-toggle span {
    width: 24px;
  }

  .article-hero__inner {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .article-hero img {
    min-height: 0;
  }
}

@media (max-width: 560px) {
  :root {
    --percival-scroll-offset: 96px;
  }

  .shell {
    width: min(100% - 30px, 1700px);
  }

  .brand {
    flex-basis: 315px;
  }

  .brand img {
    width: 315px;
    max-height: 70px;
  }

  /* A more deliberate first impression on phones. */
  .hero,
  .hero__inner {
    min-height: 100svh;
  }

  .hero {
    background-position: 61% center;
  }

  .hero__overlay {
    background:
      linear-gradient(180deg, rgba(3,17,29,.34) 0%, rgba(3,17,29,.08) 18%, rgba(3,17,29,.82) 76%, rgba(3,17,29,.98) 100%),
      linear-gradient(90deg, rgba(3,17,29,.94), rgba(3,17,29,.58) 74%, rgba(3,17,29,.26));
  }

  .hero__inner {
    align-items: center;
    padding-top: 122px;
    padding-bottom: 54px;
  }

  .hero__copy {
    max-width: 430px;
  }

  .hero h1 {
    max-width: 420px;
    font-size: clamp(33px, 9.2vw, 40px);
    line-height: 1.06;
    letter-spacing: -.015em;
    text-shadow: 0 3px 24px rgba(0,0,0,.34);
  }

  .hero .gold-rule {
    width: 62px;
    margin-top: 24px;
  }

  .hero p {
    max-width: 390px;
    margin-top: 21px;
    font-size: 16px;
    line-height: 1.62;
    text-shadow: 0 2px 16px rgba(0,0,0,.3);
  }

  .hero__actions {
    max-width: 430px;
    margin-top: 42px;
  }

  .hero__actions .btn--outline {
    min-height: 66px;
    border-color: rgba(223,169,70,.96);
    background: rgba(3,17,29,.62);
    box-shadow: 0 14px 36px rgba(0,0,0,.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    font-size: 13px;
    letter-spacing: .025em;
  }

  /* Compact secondary headers on area and article pages. */
  .percival-inner-page .detail-hero__inner {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 10px;
    padding-top: 25px;
    padding-bottom: 30px;
  }

  .percival-inner-page .detail-breadcrumb {
    margin-bottom: 8px;
  }

  .percival-inner-page .detail-hero__icon {
    display: none;
  }

  .percival-inner-page .detail-hero h1 {
    font-size: clamp(34px, 10vw, 43px);
  }

  .percival-inner-page .detail-lead {
    margin-top: 9px;
    font-size: 14px;
    line-height: 1.5;
  }

  .detail-content {
    padding: 42px 0 52px;
  }

  .detail-grid {
    gap: 30px;
  }

  .percival-inner-page .article-hero {
    padding: 24px 0;
  }

  .article-hero__copy {
    padding: 26px 22px;
  }

  .article-hero__copy h1 {
    font-size: clamp(35px, 10.5vw, 46px);
  }

  .article-body,
  .article-hub {
    padding-top: 42px !important;
    padding-bottom: 58px !important;
  }

  .article-hub__grid {
    grid-template-columns: 1fr;
  }

  /* Six cards, three compact rows, with no artificial white voids. */
  .blog.section {
    padding-top: 38px;
    padding-bottom: 48px;
  }

  .blog__head {
    gap: 14px;
    margin-bottom: 17px;
  }

  .blog__head h2 {
    font-size: 32px;
    line-height: 1.02;
  }

  .blog__head .btn {
    min-height: 46px;
  }

  .blog__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .blog__grid article {
    min-height: 0;
    display: flex;
    flex-direction: column;
  }

  .blog__grid img {
    width: 100%;
    height: 96px;
    min-height: 96px;
  }

  .blog__grid div {
    min-height: 116px;
    padding: 10px;
  }

  .blog__grid h3 {
    min-height: 43px;
    display: -webkit-box;
    overflow: hidden;
    font-size: 10.5px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .blog__grid time {
    margin-top: 7px;
    font-size: 8px;
  }

  .blog__grid a {
    padding-top: 7px;
    font-size: 8.5px;
  }
}

@media (max-width: 410px) {
  .brand {
    flex-basis: 270px;
  }

  .brand img {
    width: 270px;
  }

  .hero h1 {
    font-size: clamp(31px, 9vw, 36px);
  }

  .blog__grid img {
    height: 88px;
    min-height: 88px;
  }
}
