/* Blog front page identity, deeper previews and desktop independent sticky browse rail. */

/* EscortWP .21 — desktop blog rail is structurally separated from the article card.
 * The front-page Locations rail works because its outer wrapper is only layout: the
 * sticky left rail and scrolling content are independent grid children. Mirror that
 * pattern here instead of painting the entire blog grid as one shared card. */
@media (min-width:961px){
  body.btg-blog-active{
    /* Keep the theme's horizontal clipping without creating a hidden overflow axis
     * that can interfere with sticky positioning in some browser engines. */
    overflow-x:clip!important;
  }

  body.btg-blog-active .btg-blog-shell{
    display:grid!important;
    grid-template-columns:242px minmax(0,1fr)!important;
    align-items:start!important;
    gap:18px!important;
    max-width:1280px;
    margin:26px auto 54px;
    background:transparent!important;
    border:0!important;
    border-radius:0!important;
    overflow:visible!important;
    box-shadow:none!important;
  }

  body.btg-blog-active .btg-blog-sidebar{
    grid-column:1!important;
    grid-row:1!important;
    align-self:start!important;
    position:sticky!important;
    top:8px!important;
    z-index:20!important;
    width:242px!important;
    min-width:242px!important;
    height:max-content!important;
    max-height:calc(100vh - 16px)!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    scrollbar-width:thin;
    border-radius:18px!important;
    box-shadow:0 15px 45px rgba(25,10,35,.14)!important;
  }

  body.admin-bar.btg-blog-active .btg-blog-sidebar{
    top:40px!important;
    max-height:calc(100vh - 48px)!important;
  }

  body.btg-blog-active .btg-blog-main{
    grid-column:2!important;
    grid-row:1!important;
    min-width:0!important;
    width:100%!important;
    margin:0!important;
    padding:20px 22px 36px!important;
    background:#f8f7fa!important;
    border:1px solid #e7dfe9!important;
    border-radius:18px!important;
    box-shadow:0 15px 45px rgba(25,10,35,.1)!important;
  }

  body.btg-blog-active .btg-blog-sidebar::-webkit-scrollbar{
    width:7px;
  }

  body.btg-blog-active .btg-blog-sidebar::-webkit-scrollbar-thumb{
    background:rgba(255,255,255,.24);
    border-radius:999px;
  }
}

/* EscortWP .23 — responsive excerpts + premium blog landing hero.
 * Blog cards deliberately render a longer desktop excerpt and a shorter mobile
 * excerpt so phone thumbnails/layout are not crowded by desktop-length copy.
 * The hero styles apply only to the blog landing intro; single article pages
 * continue to use their dedicated plain reading layout from btg-blog-layout.css. */
.btg-blog-intro{
  position:relative;
  display:flex;
  align-items:center;
  min-height:150px!important;
  margin:1px 0 20px;
  padding:28px 32px!important;
  overflow:hidden;
  border:1px solid rgba(255,47,151,.34)!important;
  border-radius:18px!important;
  background:
    radial-gradient(circle at 88% 18%,rgba(255,54,157,.24),transparent 31%),
    linear-gradient(135deg,#160b20 0%,#281033 54%,#3a1248 100%)!important;
  box-shadow:0 16px 38px rgba(31,8,40,.16);
}
.btg-blog-intro::before{
  content:"";
  position:absolute;
  top:24px;
  bottom:24px;
  left:0;
  width:4px;
  border-radius:0 999px 999px 0;
  background:linear-gradient(180deg,#ff4eaa,#f20d82);
  box-shadow:0 0 20px rgba(255,38,145,.45);
}
.btg-blog-intro::after{
  content:"";
  position:absolute;
  width:210px;
  height:210px;
  right:-72px;
  top:-96px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:50%;
  box-shadow:0 0 0 34px rgba(255,255,255,.025),0 0 0 70px rgba(255,46,151,.025);
  pointer-events:none;
}
.btg-blog-intro>div{position:relative;z-index:1;max-width:860px}
.btg-blog-intro span{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:5px 10px;
  border:1px solid rgba(255,112,190,.34);
  border-radius:999px;
  background:rgba(255,35,143,.12);
  color:#ff7fc4!important;
  font-size:11px!important;
  font-weight:900;
  letter-spacing:.14em;
  text-transform:uppercase;
}
.btg-blog-intro h1{
  margin:11px 0 8px!important;
  color:#fff!important;
  font-size:36px!important;
  line-height:1.08!important;
  letter-spacing:-.035em;
  text-shadow:0 2px 18px rgba(0,0,0,.18);
}
.btg-blog-intro p{
  max-width:760px;
  margin:0;
  color:#dfd0e5!important;
  font-size:15px;
  line-height:1.58;
}
.btg-blog-results-head{margin:2px 0 14px!important}
.btg-blog-results-head h2{font-size:25px!important}

/* Exact responsive excerpt lengths are rendered in PHP: 75 desktop / 25 mobile. */
.btg-blog-card__excerpt{
  min-height:0!important;
  max-height:none!important;
  overflow:visible!important;
  -webkit-line-clamp:unset!important;
  line-clamp:unset!important;
  -webkit-box-orient:initial!important;
}
.btg-blog-card p.btg-blog-card__excerpt--desktop{display:block!important}
.btg-blog-card p.btg-blog-card__excerpt--mobile{display:none!important}

@media(max-width:800px){
  .btg-blog-intro{
    min-height:0!important;
    margin-bottom:14px;
    padding:21px 18px 22px!important;
    border-radius:14px!important;
  }
  .btg-blog-intro::before{top:18px;bottom:18px;width:3px}
  .btg-blog-intro::after{width:150px;height:150px;right:-68px;top:-70px}
  .btg-blog-intro span{min-height:25px;padding:4px 8px;font-size:9px!important;letter-spacing:.12em}
  .btg-blog-intro h1{margin-top:9px!important;font-size:27px!important;line-height:1.12!important}
  .btg-blog-intro p{font-size:14px;line-height:1.5}
  .btg-blog-card p.btg-blog-card__excerpt--desktop{display:none!important}
  .btg-blog-card p.btg-blog-card__excerpt--mobile{display:block!important}
}

/* EscortWP .24 — mobile blog usability corrections.
 * - Keep the "Latest Articles" heading legible against the theme's dark phone background.
 * - Keep an obvious Close control pinned at the top of the Browse Blog drawer.
 * - Make the entire archive row tappable, not only the month/date text. */
@media(max-width:800px){
  body.btg-blog-active .btg-blog-results-head h2{
    color:#fff!important;
    text-shadow:0 1px 12px rgba(0,0,0,.22);
  }
  body.btg-blog-active .btg-blog-results-head>span{
    color:#eaddeb!important;
  }

  body.btg-blog-active .btg-blog-sidebar__mobile-head{
    display:flex!important;
    position:sticky;
    top:0;
    z-index:8;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    margin:-4px -2px 17px;
    padding:9px 2px 12px;
    border-bottom:1px solid rgba(255,255,255,.16);
    background:linear-gradient(180deg,#171027 0%,#1d102b 82%,rgba(29,16,43,.97) 100%);
    box-shadow:0 8px 18px rgba(10,4,16,.18);
  }
  body.btg-blog-active .btg-blog-sidebar__mobile-head strong{
    color:#fff!important;
    font-size:20px!important;
  }
  body.btg-blog-active .btg-blog-sidebar__close{
    display:inline-flex!important;
    width:auto!important;
    min-width:88px;
    height:40px!important;
    padding:0 12px!important;
    align-items:center;
    justify-content:center;
    gap:6px;
    border:1px solid rgba(255,255,255,.34)!important;
    border-radius:999px!important;
    background:linear-gradient(135deg,#f72a91,#d8177d)!important;
    color:#fff!important;
    box-shadow:0 7px 18px rgba(216,23,125,.28);
    font:inherit;
    font-weight:850;
    line-height:1;
    cursor:pointer;
  }
  body.btg-blog-active .btg-blog-sidebar__close>span:first-child{
    font-size:23px;
    line-height:1;
    transform:translateY(-1px);
  }
  body.btg-blog-active .btg-blog-sidebar__close-label{
    font-size:12px;
    letter-spacing:.01em;
  }

  body.btg-blog-active .btg-blog-archives li{
    position:relative;
    cursor:pointer;
    transition:border-color .16s ease,background .16s ease;
  }
  body.btg-blog-active .btg-blog-archives li>a{
    flex:1 1 auto;
    min-width:0;
  }
  body.btg-blog-active .btg-blog-archives li>a::after{
    content:"";
    position:absolute;
    z-index:2;
    inset:0;
    /* Expand the anchor hit-area to the full archive tab. */
    width:auto;
    height:auto;
  }
  body.btg-blog-active .btg-blog-archives li:hover,
  body.btg-blog-active .btg-blog-archives li:focus-within{
    border-color:#ff6ab7;
    background:rgba(245,42,145,.18);
  }
}


/* EscortWP .25 — redundant, always-visible phone drawer close control.
 * The header close remains, while this fallback sits directly below Search
 * so users can always exit the filter drawer on small screens. */
.btg-blog-mobile-inline-close{display:none}
@media(max-width:800px){
  body.btg-blog-active .btg-blog-mobile-inline-close{
    display:flex;
    justify-content:flex-end;
    margin:-7px 0 10px;
    padding:0 0 12px;
    border-bottom:1px solid rgba(255,255,255,.15);
  }
  body.btg-blog-active .btg-blog-mobile-inline-close button{
    display:inline-flex;
    min-height:38px;
    align-items:center;
    justify-content:center;
    gap:8px;
    padding:0 13px 0 15px;
    border:1px solid rgba(255,255,255,.34);
    border-radius:999px;
    background:linear-gradient(135deg,#f72a91,#d8177d);
    color:#fff;
    box-shadow:0 7px 18px rgba(216,23,125,.26);
    font:inherit;
    font-size:12px;
    font-weight:900;
    line-height:1;
    cursor:pointer;
  }
  body.btg-blog-active .btg-blog-mobile-inline-close button b{
    display:grid;
    place-items:center;
    width:21px;
    height:21px;
    border-radius:50%;
    background:rgba(255,255,255,.16);
    font-size:20px;
    font-weight:500;
    line-height:1;
  }
}

/* EscortWP .26 — archive rows use one consistent full-row hit area on desktop too. */
@media(min-width:801px){
  body.btg-blog-active .btg-blog-archives li{
    position:relative;
    cursor:pointer;
    transition:border-color .16s ease,background .16s ease;
  }
  body.btg-blog-active .btg-blog-archives li>a{
    flex:1 1 auto;
    min-width:0;
  }
  body.btg-blog-active .btg-blog-archives li>a::after{
    content:"";
    position:absolute;
    z-index:2;
    inset:0;
    width:auto;
    height:auto;
  }
  body.btg-blog-active .btg-blog-archives li:hover,
  body.btg-blog-active .btg-blog-archives li:focus-within{
    border-color:#ff6ab7;
    background:rgba(245,42,145,.18);
  }
}
