/*
Theme Name: Sierra Child
Template: sierra
Version: 1.0
Text Domain: sierra-child
*/

/* ======================= Base ======================= */
#menu-menu-secundario-es a { color: #093867; }
h6 { margin-bottom: 0; }
#page-header { background: #eff7ff; padding: 60px; }
.entry-subtitle { font-size: 16px; color: #194D9A !important; }
.entry-title { font-size: 40px; }
.elementskit-post-image-card { height: 100%; }
.ekit-heading--title.elementskit-section-title { margin: 0; }

/* =================== Imagenes fluidas =================== */
.blog :where(.ekit-wid-con) img:not([draggable]),
.archive :where(.ekit-wid-con) img:not([draggable]),
.search :where(.ekit-wid-con) img:not([draggable]),
.keydesign-card :where(img) {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block;
}

.elementskit-entry-thumb img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 16/9;
  object-fit: cover !important;
  display: block !important;
}

/* =================== Card de blog =================== */
.keydesign-card {
  background: #f2f8ff;
  border-radius: 15px;
  padding: 20px;
  overflow: hidden;
}
.keydesign-card .entry-image { border-radius: 10px; overflow: hidden; }
.keydesign-card .entry-image img {
  width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; display: block;
}
.keydesign-card .category-meta .blog-label a {
  color: #e19c5b !important; font-weight: 700; text-decoration: none;
}
.keydesign-card .post-title { margin: 10px 0 6px; }
.keydesign-card .entry-content-card .post-content p {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; margin: 0;
}

/* =================== Chips categorías =================== */
.widget_categories ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.widget_categories ul li { margin: 0; padding: 0; }
.widget_categories ul li a{
  display:inline-block; padding:6px 12px; font-size:14px; font-weight:600;
  color:#194d9a; background:#fff; border:2px solid #194d9a; border-radius:999px; text-decoration:none; transition:.2s;
}
.widget_categories ul li a:hover{ background:#194d9a; color:#fff; }

/* ========== Sticky en listado (fuera del carrusel) ========== */
@media (min-width: 992px) {
  article.keydesign-card.sticky{
    display:grid; grid-template-columns:minmax(280px,38%) 1fr; align-items:center;
    column-gap:28px; padding:25px; background:#F2F8FF; border-radius:14px; min-height:260px;
  }
  article.keydesign-card.sticky .entry-image{ grid-column:1; border-radius:12px; overflow:hidden; margin:0; }
  article.keydesign-card.sticky .entry-image a,
  article.keydesign-card.sticky .entry-image img{ display:block; width:100%; height:auto; aspect-ratio:16/9; object-fit:cover; }
  article.keydesign-card.sticky .entry-wrapper{ grid-column:2; display:flex; flex-direction:column; gap:6px; }
  article.keydesign-card.sticky .post-title{ font-size:20px; line-height:1.25; margin-top:0; }
  article.keydesign-card.sticky .entry-meta{ margin-top:0; font-size:.8rem; }
  article.keydesign-card.sticky .entry-content-card{ margin-top:0; font-size:.95rem; line-height:1.4; }
}
article.keydesign-card.sticky .category-meta{ display:block; text-align:left; margin-bottom:0; }
article.keydesign-card.sticky .category-meta::after{
  content:"Destacado"; display:block; width:max-content; font-size:.80rem; font-weight:700;
  text-transform:uppercase; letter-spacing:.04em; padding:6px 10px; margin:10px 0 6px 0;
  border-radius:999px; background:#E19E5D; color:#fff;
}
article.sticky .entry-meta .sticky-post{ display:none !important; }
@media (max-width: 991px){
  article.keydesign-card.sticky{ display:block; }
  article.keydesign-card.sticky .entry-image img{ height:auto; aspect-ratio:auto; }
}

/* ========== Carrusel sticky (Swiper) ========== */
.sticky-carousel{ grid-column:1 / -1; margin-bottom:0; display:block; width:100%; }
.sticky-carousel, .sticky-carousel *{ box-sizing:border-box; }
.sticky-carousel{ min-width:0; max-width:100%; overflow:hidden; }
.sticky-carousel .sticky-swiper{ width:100%; max-width:100%; min-width:0; }
.sticky-carousel .swiper-wrapper{ will-change:transform, height; }
.sticky-carousel .swiper-slide{ width:100% !important; max-width:100% !important; height:auto !important; }
main, .site-main, #main, .content-area, .container, .row, .sticky-carousel, .sticky-swiper{ min-width:0; }

.sticky-swiper{ position:relative; }
.sticky-swiper .swiper-pagination,
.sticky-swiper .sticky-swiper-pagination{
  position:relative; display:flex; justify-content:center; align-items:center; gap:5px; margin-top:25px; width:100%;
}
.sticky-swiper .swiper-pagination-bullet{ width:8px; height:8px; opacity:.4; background:currentColor; }
.sticky-swiper .swiper-pagination-bullet-active{ opacity:1; transform:scale(1.2); }

/* ===== Flechas: desktop visible, sutil gris ===== */
.sticky-swiper-prev,
.sticky-swiper-next{
  position:absolute; top:50%; transform:translateY(-50%);
  width:36px; height:36px; border-radius:50%;
  background:rgba(0,0,0,.15); cursor:pointer; z-index:5;
  color:#666;
  transition:background .2s ease;
}
.sticky-swiper-prev:hover,
.sticky-swiper-next:hover{ background:rgba(0,0,0,.25); }
.sticky-swiper-prev{ left:8px; }
.sticky-swiper-next{ right:8px; }
.sticky-swiper-prev::after,
.sticky-swiper-next::after{
  position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  color:#fff; font-weight:600; font-size:20px;
}
.sticky-swiper-prev::after{ content:'‹'; }
.sticky-swiper-next::after{ content:'›'; }

/* --- Responsive: ocultar flechas en tablet/móvil --- */
@media (max-width: 991px){
  .sticky-swiper-prev,
  .sticky-swiper-next{ display:none !important; }
}

/* Estructura del slide (desktop/tablet) */
.sticky-carousel article.keydesign-card.sticky{
  display:grid; grid-template-columns:minmax(300px,45%) 1fr; align-items:center;
  column-gap:28px; padding:25px; background:#F2F8FF; border-radius:14px; min-height:260px;
}
.sticky-carousel article.keydesign-card.sticky .entry-image{
  grid-column:1; width:100%; max-width:370px; height:auto; border-radius:12px; overflow:hidden; margin:0;
}
.sticky-carousel article.keydesign-card.sticky .entry-image img{
  width:100%; height:auto; aspect-ratio:16/9; object-fit:cover; display:block;
}
.sticky-carousel article.keydesign-card.sticky .entry-wrapper{ grid-column:2; display:flex; flex-direction:column; gap:6px; }
.sticky-carousel article.keydesign-card.sticky .post-title{ font-size:20px; line-height:1.25; margin:0; }
.sticky-carousel article.keydesign-card.sticky .entry-meta{ margin-top:0; font-size:.8rem; }
.sticky-carousel article.keydesign-card.sticky .entry-content-card{ margin:0; font-size:.95rem; line-height:1.4; }
.sticky-carousel article.keydesign-card.sticky .category-meta{ display:block; text-align:left; margin-bottom:0; }
.sticky-carousel article.keydesign-card.sticky .category-meta::after{
  content:'Destacado'; display:block; width:max-content; font-size:.80rem; font-weight:700; text-transform:uppercase;
  letter-spacing:.04em; padding:6px 10px; margin:10px 0 6px 0; border-radius:999px; background:#E19E5D; color:#fff;
}
.sticky-carousel article.sticky .entry-meta .sticky-post{ display:none !important; }

/* ===== Responsive slider: imagen siempre visible ===== */
@media (max-width: 767px){
  .sticky-carousel article.keydesign-card.sticky{
    display:block !important;
    padding:16px;
  }
  .sticky-carousel article.keydesign-card.sticky .entry-image{
    max-width:100% !important; margin-bottom:12px;
  }
  .sticky-carousel article.keydesign-card.sticky .entry-image img{
    width:100% !important; height:auto !important; aspect-ratio:16/9; display:block;
  }
  .sticky-carousel article.keydesign-card.sticky .entry-wrapper{ display:block; }
}

/* Tablet (2 columnas sin flechas) */
@media (min-width:768px) and (max-width:991px){
  .sticky-carousel article.keydesign-card.sticky{
    grid-template-columns:1fr 1fr; column-gap:20px;
  }
  .sticky-carousel article.keydesign-card.sticky .entry-image{ max-width:100%; }
}
