/* =========================================================
   POSTER – estilos Jobloxia (buscador, listas y single)
   ========================================================= */
:root{
  --jobloxia-blue:#2196F3;
  --jobloxia-blue-dark:#1976D2;
  --card-bg:#FFFFFF;
  --card-bd:#E7ECF3;
  --text:#0E1623;
  --muted:#6B778C;

  /* Ajustes rápidos */
  --search-button-min: 190px;   /* ancho mínimo del botón "Buscar" */
  --search-right-offset: 14px;  /* empuje del botón a la derecha en desktop */
}

/* =========================================================
   BUSCADOR (input + botón dentro de una “pastilla”)
   ========================================================= */
form.poster-search{ max-width:960px; margin:0 auto 22px; }
form.poster-search *{ box-sizing:border-box; }

form.poster-search .poster-pill{
  display:grid; grid-template-columns:1fr auto; align-items:center;
  gap:.6rem; padding:8px; background:#fff; border:1px solid var(--card-bd);
  border-radius:16px; box-shadow:0 10px 28px rgba(15,33,55,.10);
  padding-right: calc(8px + var(--search-right-offset)); /* empuje botón */
}

form.poster-search input[type="search"],
form.poster-search input[type="text"]{
  width:100% !important; height:60px; padding:0 18px !important;
  background:transparent !important; border:0 !important; outline:none !important;
  box-shadow:none !important; -webkit-appearance:none; appearance:none;
  border-radius:12px; font-size:18px; color:var(--text);
}
form.poster-search input::placeholder{ color:var(--muted); }

form.poster-search .poster-pill .poster-submit,
form.poster-search .poster-pill button,
form.poster-search .poster-pill input[type="submit"]{
  height:60px; min-width:var(--search-button-min); padding:0 24px !important;
  margin:0 !important; margin-right:var(--search-right-offset);
  background:var(--jobloxia-blue) !important; color:#fff !important;
  border:1px solid #208BE6 !important; border-radius:12px !important;
  font-weight:700; line-height:1 !important; box-shadow:none !important;
  text-decoration:none !important; display:inline-flex; align-items:center; justify-content:center; white-space:nowrap;
}
form.poster-search .poster-pill .poster-submit:hover,
form.poster-search .poster-pill button:hover,
form.poster-search .poster-pill input[type="submit"]{ background:var(--jobloxia-blue-dark) !important; }

form.poster-search input:focus{ box-shadow: inset 0 0 0 2px var(--card-bd) !important; }
form.poster-search .poster-pill .poster-submit:focus{ outline:none !important; box-shadow: 0 0 0 3px rgba(33,150,243,.25) !important; }

/* opcional: “flotar” buscador sobre el hero */
.jl-search{ margin-top:-40px; }

/* =========================================================
   LISTA DE AVISOS (cards)
   ========================================================= */
.poster-list{ display:grid; gap:.9rem; }

/* --- Grid con áreas para controlar móvil/desktop --- */
.poster-card{
  display:grid;
  grid-template-columns:56px 1fr auto;
  grid-template-areas:"icon info cta";
  align-items:center; gap:1rem;

  background:var(--card-bg);
  border:1px solid var(--card-bd);
  border-radius:14px;
  padding:1rem 1.1rem;
}

.poster-icon{ grid-area:icon; }
.poster-icon img{ width:42px; height:42px; object-fit:contain; image-rendering:auto; }

.poster-info{ grid-area:info; min-width:0; } /* evita empujar el botón */
.poster-title{ margin:0 0 .25rem; font-size:1.05rem; color:var(--text); }
.poster-meta{ color:var(--muted); font-size:.93rem; white-space:normal; }

.poster-cta{ grid-area:cta; justify-self:end; align-self:center; }

.poster-btn,
.poster-btn:visited,
.poster-btn:hover,
.poster-btn:focus{
  display:inline-block; background:var(--jobloxia-blue);
  color:#fff !important; text-decoration:none !important;
  padding:.6rem .9rem; border-radius:.7rem; font-weight:600;
  box-shadow:none !important; line-height:1 !important;
}
.poster-btn:hover{ background:var(--jobloxia-blue-dark); }

/* Paginación */
.poster-pagination ul{ list-style:none; display:flex; gap:.4rem; padding:0; margin:12px 0 0; }
.poster-pagination a, .poster-pagination span{
  display:inline-block; padding:.5rem .75rem; border:1px solid var(--card-bd);
  border-radius:.5rem; text-decoration:none; color:var(--text);
}
.poster-pagination .current{ background:var(--jobloxia-blue); color:#fff; border-color:var(--jobloxia-blue); }

/* =========================================================
   SINGLE DEL AVISO (detalle)
   ========================================================= */

/* Oculta título/autor/fecha del tema SOLO en este CPT */
body.single-poster_aviso .entry-header,
body.single-poster_aviso .entry-meta,
body.single-poster_aviso .ast-article-single .entry-header{ display:none !important; }

/* Fondo blanco y sin laterales grises SOLO en este CPT */
body.single-poster_aviso,
body.single-poster_aviso .site,
body.single-poster_aviso.ast-separate-container,
body.single-poster_aviso .ast-separate-container{ background:#fff !important; }

/* Quita la línea/borde bajo el header de Astra en este CPT */
body.single-poster_aviso .main-header-bar,
body.single-poster_aviso .site-header{ border-bottom:0 !important; box-shadow:none !important; }

/* Reduce aire del contenedor de contenido */
body.single-poster_aviso .site-content > .ast-container{
  padding-top:16px !important; padding-bottom:24px; background:#fff;
}

/* El “article” del tema sin borde/sombra/padding extra */
body.single-poster_aviso.ast-separate-container .ast-article-single,
body.single-poster_aviso.ast-separate-container .ast-article-post{
  background:transparent !important; border:none !important; box-shadow:none !important;
  padding:0 !important; margin:0 !important;
}

/* Nuestro contenedor */
.poster-single{ max-width:950px; margin:8px auto 0; }

.poster-single-head{ display:flex; gap:14px; align-items:center; margin:8px 0 18px; }
.poster-single-icon img{
  width:48px; height:48px; object-fit:contain;
  box-shadow:none !important; filter:none !important; border:0; background:transparent;
}
.poster-single-meta{ color:var(--muted) }
.poster-single-meta span+span{ margin-left:.35rem }

/* Cuerpo con fondo blanco + borde suave */
.poster-single-body{
  background:#fff; border:1px solid rgba(0,0,0,.12);
  border-radius:14px; padding:22px;
}

/* Imagen inicial pequeña */
.poster-single-body .wp-block-image:first-of-type img,
.poster-single-body > img:first-of-type,
.poster-single-body > p:first-child img{
  max-width:140px !important; height:auto !important; display:block; margin:0 auto 14px !important;
}

/* CTA "Ir a postular" (botón azul) */
.poster-single-cta{ margin:18px 0 }
.poster-apply,
.poster-apply:visited,
.poster-apply:hover,
.poster-apply:focus{
  display:inline-flex; align-items:center; justify-content:center;
  min-width:220px; height:56px; padding:0 20px; border-radius:12px;
  background:var(--jobloxia-blue); color:#fff !important; text-decoration:none !important;
  font-weight:700; border:1px solid #208BE6; box-shadow:none !important; line-height:1 !important;
}
.poster-apply:hover{ background:var(--jobloxia-blue-dark); }

/* Relacionados */
.poster-related{ max-width:950px; margin:26px auto 0; }
.poster-related h3{ margin:0 0 .8rem; font-size:1.15rem; color:var(--text); }
.poster-related .poster-list{ display:grid; gap:.9rem; }

/* =========================================================
   RESPONSIVE
   ========================================================= */

/* — Tablet: afina un poco tipografías/espacios si hace falta — */
@media (max-width:960px){
  .poster-title{ font-size:1rem; }
  .poster-meta{ font-size:.9rem; }
}

/* — Móvil: buscador y cards — */
@media (max-width:640px){
  /* Buscador en 2 filas */
  form.poster-search .poster-pill{
    grid-template-columns:1fr;
    gap:.5rem; padding:10px; padding-right:10px;
  }
  form.poster-search .poster-pill .poster-submit,
  form.poster-search .poster-pill button,
  form.poster-search .poster-pill input[type="submit"]{
    width:100% !important; margin-right:0 !important; min-width:unset; height:56px;
  }

  /* Card: distribuye en dos filas manteniendo el botón a la derecha del icono */
  .poster-card{
    grid-template-columns:48px 1fr;
    grid-template-areas:
      "icon info"
      "icon cta";
    align-items:start;
    gap:.75rem 1rem;
  }

  .poster-icon img{ width:38px; height:38px; }
  .poster-title{ font-size:1rem; }
  .poster-meta{ font-size:.9rem; }

  .poster-cta{ align-self:start; justify-self:end; }
  .poster-btn{ padding:.55rem .8rem; font-weight:600; border-radius:.65rem; }
}

/* — Por si el tema mete sombras en imágenes del contenido — */
body.single-poster_aviso .poster-single-body img{
  box-shadow:none !important; filter:none !important;
}
