/*
 Theme Name:   Maag Child
 Template:     maag
 Version:      1.0
 Description:  Tema hijo de Maag
 Author:       Norzex
*/

ul.destacados-list {
  display:flex;
  gap:.55rem;
  list-style:none;
  margin:0;
  padding:0;
  font-size:.84rem;          /* keep it on one line, no horizontal scroll */
  white-space: nowrap; 
}
ul.destacados-list > li { flex: 0 0 auto; }
ul.destacados-list a {
  display: inline-block;
  padding: .4rem .2rem;
  text-decoration: none;
  border-radius: .4rem;
}
ul.destacados-list a:hover { text-decoration: underline; }

/* “Más” dropdown */
ul.destacados-list > li.destacados-more { position: relative; }
ul.destacados-list .destacados-more-btn {
  padding: .4rem .6rem;
  cursor: pointer;
  background: transparent;
  border: 1px solid transparent;
  color:#FFF;
  font-size:.84rem;
}
ul.destacados-list .destacados-more-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: .25rem;
  min-width: 12rem;
  list-style: none;
  padding: .25rem 0;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: .4rem;
  box-shadow: 0 8px 20px rgba(0,0,0,.08);
  display: none;
  z-index: 1000;
  background:#1e2327;
  color:#FFF;
}
ul.destacados-list li.destacados-more.open > .destacados-more-menu { display: block; }
ul.destacados-list .destacados-more-menu li a {
  display: block;
  padding: .5rem .75rem;
}
ul.destacados-list .destacados-more-menu li a:hover { background: #1e2327; }
.destacados-list .destacados-item a {
  text-decoration:none;
}

.topwords-bar { overflow-x:scroll; scrollbar-width: none; }
.topwords-bar::-webkit-scrollbar { scrollbar-width: none; }
.topwords-bar ul { justify-content:flex-start !important; max-width:1400px; position:relative; }

.cs-entry__tags { margin-top:0 !important; }

.crp_related { background:#FBFBFB; padding:12px; }
html[data-scheme="dark"] .crp_related,
body[data-scheme="dark"] .crp_related,
html[data-scheme="dark"] .crp_related_widget,
body[data-scheme="dark"] .crp_related_widget,
html[data-scheme="dark"] .crp_related_shortcode,
body[data-scheme="dark"] .crp_related_shortcode,
html[data-scheme="dark"] .crp_related_block,
body[data-scheme="dark"] .crp_related_block {
  background: #222 !important;
  color: #fff !important;
}
.crp_related span { font-size:14px; font-weight:bold; }
.crp_related.crp-thumbs-grid ul { grid-template-columns:1fr 1fr; padding:0 !important; margin:0; }
.crp_related.crp-thumbs-grid ul li { border:0; box-shadow:none; border-radius:0; }
.crp_related.crp-thumbs-grid ul li a.crp_link { padding:0; display:flex; gap:6px; }
.crp_related.crp-thumbs-grid figure { flex:0 0 100px; object-fit:cover; }
.crp_related.crp-thumbs-grid figure img { width:100px; height:100px !important; object-fit:cover; }
.crp_related.crp-thumbs-grid .crp_title { background:none; text-shadow:none; font-size:.82em; color:#111 !important; position:relative; }
html[data-scheme="dark"] .crp_related.crp-thumbs-grid .crp_title, body[data-scheme="dark"] .crp_related.crp-thumbs-grid .crp_title { color:#EEE !important; }
.crp_related.crp-thumbs-grid li:hover .crp_title { background:none; font-weight:bold; }
.crp_related.crp-thumbs-grid a { aspect-ratio: unset; max-width:none; }

@media (max-width: 550px) {
.crp_related { padding:7px; }
.crp_related.crp-thumbs-grid figure { flex:0 0 70px; }
.crp_related.crp-thumbs-grid figure img { width:70px; height:70px !important; }
.crp_related.crp-thumbs-grid .crp_title { font-size:.72em; }
}

@media (prefers-color-scheme: dark) {
.crp_related {
  background: #222 !important;
  color: #fff;
}

.crp_related .crp_title {
  color: #fff !important;
}

.crp_related.crp-thumbs-grid ul li a.crp_link:hover {
  background: #222 !important;
}

.crp_related.crp-thumbs-grid .crp_title { color:#EAEAEA !important; }

}

.crp_related[data-scheme=dark] { background: #111 !important;
  color: #fff; }

@media (min-width: 992px) {
    .cs-header-topbar__main {
        min-height: 110px;
    }
}


/* Desktop: make burger menu an off-canvas side panel */
@media (min-width: 992px) {

  /* Turn the dropdown into a fixed side panel (hidden off-screen by default) */
  .cs-burger-menu{
    position: fixed;
    top: var(--cs-wpadminbar-height);
    right: 0;
    left: auto;

    width: 360px;
    max-width: 90vw;

    height: calc(100vh - var(--cs-wpadminbar-height));
    max-height: none;

    /* Keep theme’s flex layout, but hide as a sliding panel */
    display: flex;                 /* overrides theme's display:none  [oai_citation:2‡style.css](sediment://file_00000000a2cc71fd8432677068834fbd) */
    transform: translateX(100%);
    visibility: hidden;
    opacity: 1;                    /* theme toggles opacity; we control visibility/transform */
    pointer-events: none;

    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    transition: transform .35s ease, visibility 0s linear .35s;
    z-index: 110;                  /* theme uses 110 already  [oai_citation:3‡style.css](sediment://file_00000000a2cc71fd8432677068834fbd) */
  }

  /* When active, slide it in */
  .cs-burger-active .cs-burger-menu{
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    transition: transform .35s ease;
  }

  /* Make the overlay sit behind the panel and be clickable */
  .cs-burger-active .cs-header-overlay{
    display: block;                /* theme shows it with .cs-burger-visible; force it here too  [oai_citation:4‡style.css](sediment://file_00000000a2cc71fd8432677068834fbd) */
    z-index: 109;
  }
}

/* Always use the OFFCANVAS (mobile-style) side panel, even on desktop */
@media (min-width: 992px) {

  /* Show the offcanvas (mobile) toggle on desktop */
  .cs-header__offcanvas-toggle {
    display: flex !important;
  }

  /* Hide the desktop burger toggle that opens the big burger menu */
  .cs-header__burger-toggle {
    display: none !important;
  }

  /* Optional: prevent the desktop burger mega menu from ever appearing */
  .cs-burger-menu {
    display: none !important;
  }
}

/* ===================================================================
   Bloque "Márcanos como medio preferente" bajo la foto del post
   Ver: inc/risbel-google-banner.php
   =================================================================== */

/*
 * Pildora dentro de pildora: la capsula exterior es gris y ocupa todo el
 * ancho; la interior es blanca y se recorta contra ella. Todo el bloque es un
 * unico <a>, asi que cualquier punto es clicable; el "boton" es un <span>
 * porque anidar enlaces es HTML invalido.
 */
.risbel-google-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  margin: 1.75rem 0;
  padding: 0.5rem 0.5rem 0.5rem 1.375rem;
  background: var(--cs-layout-background, #f4f4f5);
  border-radius: 999px;
  text-decoration: none;
  color: var(--cs-color-primary);
  transition: background-color 0.15s ease;
}

.risbel-google-cta:hover,
.risbel-google-cta:focus-visible {
  background: var(--cs-layout-background, #ededf0);
  text-decoration: none;
  color: var(--cs-color-primary);
}

.risbel-google-cta:focus-visible {
  outline: 2px solid var(--cs-color-accent, #167ee6);
  outline-offset: 2px;
}

/* Texto: hereda la tipografia de la meta para pertenecer a la pagina. */
.risbel-google-cta__text {
  font-family: var(--cs-font-category-family), sans-serif;
  /* Un escalon por encima de la meta (0.75rem) y por debajo del cuerpo (1rem). */
  font-size: 0.875rem;
  line-height: 1.4;
  letter-spacing: var(--cs-font-category-letter-spacing);
  color: var(--cs-color-primary);
  min-width: 0;
}

.risbel-google-cta__text strong {
  font-weight: 700;
}

/* La pildora interior. */
.risbel-google-cta__btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  padding: 0.5rem 1rem;
  background: var(--cs-site-background, #fff);
  border-radius: 999px;
  font-family: var(--cs-font-category-family), sans-serif;
  font-size: 0.875rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: var(--cs-font-category-letter-spacing);
  color: var(--cs-color-primary);
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

/* Al pasar el raton sobre CUALQUIER punto del bloque, responde el boton. */
.risbel-google-cta:hover .risbel-google-cta__btn,
.risbel-google-cta:focus-visible .risbel-google-cta__btn {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.14);
  transform: translateY(-1px);
}

.risbel-google-cta__icon {
  width: 1.0625rem;
  height: 1.0625rem;
  flex: 0 0 auto;
  display: block;
}

/*
 * Se apila hasta 767px, no hasta 575px: entre 576 y 767 el contenedor todavia
 * es estrecho (~535px), el texto parte en dos lineas y queda apretado contra
 * el boton. La fila horizontal necesita ~660px de contenedor para caber en una
 * sola linea, que es lo que hay a partir de 768px.
 */
@media (max-width: 767px) {
  .risbel-google-cta {
    flex-direction: column;
    align-items: stretch;
    gap: 0.625rem;
    padding: 1rem;
    border-radius: 1.25rem;
    text-align: center;
  }
  .risbel-google-cta__btn {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .risbel-google-cta,
  .risbel-google-cta__btn {
    transition: none;
  }
  .risbel-google-cta:hover .risbel-google-cta__btn {
    transform: none;
  }
}
