/* ==========================================================================
   We Buy Exotics — Blog page
   Layers on top of styles.css: reuses its tokens, buttons, light navigation,
   closing CTA and footer, and adds only what this page introduces —
   the masthead with its featured post, and the post grid.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Shared additions
   -------------------------------------------------------------------------- */

/* Outline button on a light surface — the "View More" control. */
.btn--outline-dark{ background:rgba(0,0,0,.02); border-color:var(--n300); color:var(--ink); }
.btn--outline-dark:hover{ background:rgba(0,0,0,.06); border-color:var(--n400); }

.badge{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:2px 8px;
  border-radius:var(--r-lg);
  background:var(--red);
  color:var(--n50);
  font-weight:500;
  font-size:14px;
  line-height:20px;
}

/* --------------------------------------------------------------------------
   Masthead — title, lede and the featured post
   -------------------------------------------------------------------------- */

.bhero{
  background:var(--n50);
  display:flex;
  flex-direction:column;
  gap:32px;
}

.bhero__intro{ display:flex; flex-direction:column; gap:16px; }
.bhero__title{
  margin:0;
  font-family:var(--font-head);
  font-weight:900;
  font-size:48px;
  line-height:1.1;
  letter-spacing:2px;
  text-transform:uppercase;
  color:var(--ink);
}
.bhero__lede{ color:var(--ink); max-width:720px; }

/* Featured post ---------------------------------------------------------- */

.feature{
  position:relative;
  display:flex;
  height:320px;
  border:1px solid var(--n200);
  border-radius:var(--r-lg);
  overflow:hidden;
  background:#fff;
}
.feature__media{ flex:1 1 0; min-width:0; }
.feature__media img{ display:block; width:100%; height:100%; object-fit:cover; }

.feature .badge{ position:absolute; left:15px; top:17px; z-index:1; }

.feature__body{
  flex:1 1 0;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:32px;
  padding:24px 32px;
  border-left:1px solid var(--n200);
}
.feature__date{ font-size:14px; line-height:20px; color:var(--n500); }
.feature__title{ margin-top:16px; color:var(--ink); }
.feature__title a:hover{ color:var(--red); }

/* Clipped to the design's fixed height so every excerpt ends flush. */
.feature__excerpt{
  overflow:hidden;
  max-height:130px;
  color:var(--ink);
}
.feature__excerpt p + p{ margin-top:16px; }

/* --------------------------------------------------------------------------
   Post grid
   -------------------------------------------------------------------------- */

.posts{
  background:#fff;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:64px;
}
.posts__grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:24px;
  width:100%;
}

.post{
  display:flex;
  flex-direction:column;
  border:1px solid var(--n200);
  border-radius:var(--r-lg);
  overflow:hidden;
  background:#fff;
}
.post__media{ height:240px; }
.post__media img{ display:block; width:100%; height:100%; object-fit:cover; }

.post__body{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:20px 16px;
  border-top:1px solid var(--n200);
}
.post__date{ font-size:14px; line-height:20px; color:var(--n500); }
.post__title{
  margin:0;
  font-family:var(--font-head);
  font-weight:700;
  font-size:20px;
  line-height:24px;
  color:var(--ink);
}
.post__title a:hover{ color:var(--red); }
.post__excerpt{ font-size:14px; line-height:20px; color:var(--ink); }

/* --------------------------------------------------------------------------
   Card hover
   The featured post and the grid cards answer the pointer the same way the
   cards on the Why Us page do: they lift, warm their border to brand red and
   drop a soft red-tinted shadow, while the photograph eases forward. Gated on
   hover:hover so a tap on a phone cannot leave a card stuck mid-state.
   -------------------------------------------------------------------------- */

/* The title link covers the whole card, so the hover affordance is honest. */
.feature__title a::after,
.post__title a::after{ content:""; position:absolute; inset:0; }
.post{ position:relative; }

@media (hover:hover){
  .feature,
  .post{
    transition:transform .24s ease, border-color .24s ease, box-shadow .24s ease;
  }
  .feature:hover,
  .post:hover{
    transform:translateY(-4px);
    border-color:var(--red-bright);
    box-shadow:
      0 14px 30px -14px rgba(190,50,43,.30),
      0 2px 6px rgba(10,10,10,.05);
  }

  .feature__media img,
  .post__media img{ transition:transform .5s ease; }
  .feature:hover .feature__media img,
  .post:hover .post__media img{ transform:scale(1.05); }

  .feature__title a,
  .post__title a{ transition:color .18s ease; }
  .feature:hover .feature__title a,
  .post:hover .post__title a{ color:var(--red); }

  /* The inner edge follows the outer one so the card reads as one surface. */
  .feature:hover .feature__body,
  .post:hover .post__body{ border-color:var(--red-bright); }
}

/* Keyboard parity — the same treatment when the title link takes focus. */
.feature:focus-within,
.post:focus-within{
  border-color:var(--red-bright);
  box-shadow:
    0 14px 30px -14px rgba(190,50,43,.30),
    0 2px 6px rgba(10,10,10,.05);
}
.feature:focus-within .feature__body,
.post:focus-within .post__body{ border-color:var(--red-bright); }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width:1024px){
  .posts__grid{ grid-template-columns:repeat(2, minmax(0, 1fr)); }

  .bhero__title{ font-size:56px; }

  /* Below the two-column threshold the featured post stacks like a card. */
  .feature{ flex-direction:column; height:auto; }
  .feature__media{ flex:none; height:240px; }
  .feature__body{ gap:8px; padding:20px 16px; border-left:0; border-top:1px solid var(--n200); }
  .feature__title{ margin-top:0; font-size:24px; line-height:30px; }
  /* Stacked, the excerpt clamps to a teaser the way the post cards do. */
  .feature__excerpt{
    display:-webkit-box;
    -webkit-box-orient:vertical;
    -webkit-line-clamp:3;
    max-height:none;
    font-size:14px;
    line-height:20px;
  }
  .feature__excerpt p + p{ display:none; }
}

@media (max-width:640px){
  .bhero{ gap:20px; }
  .bhero__intro{ gap:20px; }
  .bhero__title{ font-size:48px; line-height:48px; letter-spacing:2.5px; }

  .posts{ gap:48px; }
  .posts__grid{ grid-template-columns:minmax(0, 1fr); gap:20px; }

  .feature__title{ font-size:20px; line-height:24px; }
}

/* ==========================================================================
   PAGINACION DEL INDICE
   El markup lo imprime el snippet "WBE Dynamic Blog Index and Article Layout",
   asi que se estiliza desde aca y no tocando el snippet: si se reimporta, esto
   sigue valiendo.
   ========================================================================== */

/* El snippet mete <span class="screen-reader-text">Page </span> dentro del
   boton activo, pero esa clase no estaba definida en el sitio: por eso el
   boton de la pagina actual decia "PAGE 5" en vez de "5". */
.screen-reader-text{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0 0 0 0);
  clip-path:inset(50%);
  white-space:nowrap;
  border:0;
}

/* A 390px los nueve controles con el .btn grande se partian en tres renglones.
   Los numeros pasan a cuadrados compactos y Previous/Next a flechas, que es lo
   unico que permite que entre todo en una sola linea. El nombre accesible de
   las flechas lo pone script.wp.js con un aria-label, porque el texto queda
   oculto. */
@media (max-width:640px){
  .wbe-blog-pagination{
    flex-wrap:nowrap;
    gap:6px;
    margin-top:40px;
  }
  .wbe-blog-pagination .btn{
    min-height:36px;
    min-width:36px;
    padding:0 6px;
    font-size:14px;
    line-height:14px;
    letter-spacing:0;
  }
  .wbe-blog-pagination__gap{
    padding:0 2px;
    color:var(--n500);
  }
  /* Previous y Next se vuelven flechas: el texto se achica a cero y el glifo
     entra por ::before, asi no hay que tocar el markup del snippet. */
  .wbe-blog-pagination a[rel="prev"],
  .wbe-blog-pagination a[rel="next"]{
    font-size:0;
    letter-spacing:0;
    padding:0;
    width:36px;
  }
  .wbe-blog-pagination a[rel="prev"]::before,
  .wbe-blog-pagination a[rel="next"]::before{
    font-size:20px;
    line-height:1;
    font-weight:500;
  }
  .wbe-blog-pagination a[rel="prev"]::before{ content:"\2039"; }
  .wbe-blog-pagination a[rel="next"]::before{ content:"\203A"; }
}

/* Telefonos angostos: con 8 o 9 controles 36px ya no entran, se cede un poco. */
@media (max-width:380px){
  .wbe-blog-pagination{ gap:4px; }
  .wbe-blog-pagination .btn{ min-width:32px; padding:0 4px; font-size:13px; }
  .wbe-blog-pagination a[rel="prev"],
  .wbe-blog-pagination a[rel="next"]{ width:32px; font-size:0; }
}
