/* ===== HERO ===== */
.repo-hero{
  background:#321e4c;
  width:100%;
  padding:4rem 0;
}
.repo-hero .repo-hero-text{
  color:#ddd;
  line-height:1.6;
  opacity:.95;
}

/* botones arriba del h2 */
.repo-backlinks .btn{
  border-radius:6px;
  padding:.35rem .9rem;
  font-size:.75rem;
}

/* ===== HEAD ===== */
.section-title{ color: var(--bg-realce); }

/* ===== BUSCADOR (pequeño base, se expande hover/focus) ===== */
.repo-search{
  position:relative;
  display:flex;
  align-items:center;
  gap:.35rem;
}
.repo-search-input{
  width:170px;
  height:34px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.2);
  background:#111;
  color:#fff;
  padding:.35rem 2.1rem .35rem .9rem;
  transition:width .25s ease, border-color .2s ease;
}
.repo-search:hover .repo-search-input,
.repo-search-input:focus{
  width:320px;
  outline:none;
  border-color: rgba(0,199,230,.7);
}
.repo-search-btn{
  position:absolute;
  right:.35rem;
  width:28px;
  height:28px;
  border-radius:50%;
  border:0;
  background:#00c7e6;
  color:#001014;
  display:flex;
  align-items:center;
  justify-content:center;
}

/* dropdown preview */
.repo-search-preview{
  position:absolute;
  top:42px;
  left:0;
  width:100%;
  background:#0f0f0f;
  border:1px solid rgba(255,255,255,.12);
  border-radius:12px;
  overflow:hidden;
  z-index:50;
  box-shadow:0 10px 30px rgba(0,0,0,.35);
}
.repo-preview-item{
  width:100%;
  text-align:left;
  background:transparent;
  border:0;
  color:#fff;
  padding:.6rem .8rem;
  display:flex;
  flex-direction:column;
  gap:.1rem;
}
.repo-preview-item:hover{ background: rgba(0,199,230,.12); }
.repo-preview-title{ font-size:.8rem; font-weight:600; }
.repo-preview-obs{ font-size:.65rem; opacity:.7; text-transform:capitalize; }
.repo-preview-empty{ padding:.7rem .8rem; opacity:.7; font-size:.75rem; }

/* ===== MIGAS / CRUMBS ===== */
.repo-breadcrumbs{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:.35rem;
}
.repo-breadcrumbs-label{
  color:#cfcfcf;
  font-size:.75rem;
  margin-right:.25rem;
}
.repo-crumb{
  font-size:.7rem;
  padding:.22rem .55rem;
  border-radius:999px;
  background:#161616;
  color:#eaeaea;
  border:1px solid rgba(255,255,255,.12);
  transition: background .2s ease, border-color .2s ease, transform .05s ease;
}
.repo-crumb:hover{
  border-color: rgba(0,199,230,.45);
}
.repo-crumb.active{
  background:#00c7e6;
  color:#001014;
  border-color:#00c7e6;
}

/* ===== CARDS ===== */
.card-dark{
  background:#1a1a1a;
  border:1px solid rgba(255,255,255,.08);
}
.title-card{ font-size:1rem; color:#fff; }

/* ===== VISTA MATERIAL ===== */
.vista-material{
  padding:3rem 0 4rem;
  transition:opacity .35s ease, transform .35s ease;
  transform: translateY(10px);
}
.vista-material.show{
  opacity:1 !important;
  transform: translateY(0);
}
.vista-material #pvTitle{ color: var(--bg-realce); }

/* ===== GALERÍA ===== */
.repo-gallery-img{
  width:100%;
  height:220px;
  object-fit:cover;
}
.repo-hidden{ display:none !important; }

/* ===== BOTÓN VER MÁS ===== */
.btn-vermas{
  border:0;
  text-decoration:none;
  display:inline-flex;
  justify-content:center;
  background-color: var(--bg-realce);
  color: var(--mim-white);
  padding:.55rem 1.2rem;
  border-radius:8px;
  transition: background-color .2s ease;
}
.btn-vermas:hover{ background-color:#00c7e6; color: var(--mim-white); }

/* =========================
   Repo layout (ajustes)
========================= */

.repo-section-header {
  margin-top: 0.5rem;
}

.repo-back-buttons .repo-back-btn {
  padding: 0.35rem 0.75rem !important;
  font-size: 0.85rem !important;
  border-radius: 6px !important;
}

/* =========================
   Migas (crumbs) pequeñas
========================= */

.obs-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin: 0.75rem 0 1rem;
}

.obs-breadcrumb-label {
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  margin-right: 0.25rem;
}

.obs-crumb {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.92);
  font-size: 0.78rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  line-height: 1.2;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.obs-crumb:hover {
  background: rgba(0,199,230,0.15);
  border-color: rgba(0,199,230,0.55);
}

.obs-crumb.active {
  background: rgba(0,199,230,0.18);
  border-color: rgba(0,199,230,0.8);
  color: #fff;
}

/* =========================
   Meta texto blanco (autor/año)
========================= */
.repo-meta {
  font-size: 0.8rem;
}
.repo-meta-item {
  display: inline-block;
  margin: 0 0.35rem;
  color: rgba(255,255,255,0.75);
}

/* =========================
   Buscador expandible + contraste
========================= */

.repo-search-wrap {
  margin-left: auto;
}

.expandable-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.search-input {
  width: 220px;           /* pequeño base */
  height: 36px;
  padding: 0 44px 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: #fff;            /* ✅ contraste */
  outline: none;
  transition: width 0.25s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.search-input::placeholder {
  color: rgba(255,255,255,0.65); /* ✅ se lee */
}

.expandable-search:hover .search-input,
.search-input:focus {
  width: 360px; /* se expande */
  background: rgba(255,255,255,0.10);
  border-color: rgba(0,199,230,0.65);
}

/* ✅ Quitar “caja” del icono lupa */
.search-icon-btn{
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 !important;
}

/* opcional: que el ícono quede centrado y clickeable */
.search-icon-btn{
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  cursor: pointer;
}
.search-icon-btn i{ pointer-events: none; }


.search-icon-btn:hover {
  background: rgba(0,199,230,0.25);
}

/* =========================
   Autocomplete dropdown
========================= */

.repo-suggest {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(520px, 90vw);
  background: #141414;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.45);
  z-index: 9999;
}

.repo-suggest-item {
  width: 100%;
  display: flex;
  gap: 10px;
  align-items: center;
  text-align: left;
  padding: 10px;
  border: 0;
  background: transparent;
  border-radius: 12px;
  color: #fff;
}

.repo-suggest-item:hover {
  background: rgba(255,255,255,0.06);
}

.repo-suggest-thumb {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 42px;
  background: rgba(255,255,255,0.06);
}

.repo-suggest-thumb.ph {
  border: 1px dashed rgba(255,255,255,0.18);
}

.repo-suggest-title {
  font-size: 0.92rem;
  font-weight: 600;
  display: block;
}

.repo-suggest-sub {
  display: block;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.65);
  margin-top: 2px;
}

/* =========================
   Galería "Ver más"
========================= */
.repo-gallery-hidden {
  display: none !important;
}

.repo-gallery-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

/* Responsive */
@media (max-width: 768px) {
  .search-input {
    width: 200px;
  }
  .expandable-search:hover .search-input,
  .search-input:focus {
    width: min(92vw, 360px);
  }
}
/* -----------------------------
   ✅ Contraste textos pequeños
------------------------------ */
.repo-meta,
.repo-meta .repo-meta-item,
#repoNoResults,
.search-input::placeholder {
  color: #eaeaea !important;
  opacity: 0.9;
}

.search-input {
  color: #ffffff !important;
}

/* -----------------------------
   ✅ Botones volver (sobre H2)
------------------------------ */
.repo-backbar {
  justify-content: flex-start;
}

/* -----------------------------
   ✅ Migas de pan reales (chicas)
------------------------------ */
.obs-breadcrumb {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.obs-breadcrumb-label {
  color: #ffffff;
  font-size: 0.85rem;
  opacity: 0.9;
}

.obs-crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.obs-filter-link {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(0, 0, 0, 0.25);
  color: #ffffff;
  font-size: 0.59rem;
  padding: 8px 10px;
  border-radius: 999px;
  line-height: 1;
  transition: 0.2s ease;
}

.obs-filter-link:hover {
  border-color: rgba(0, 199, 230, 0.8);
}

.obs-filter-link.is-active {
  background: rgba(0, 199, 230, 0.22);
  border-color: rgba(0, 199, 230, 1);
}

/* -----------------------------
   ✅ Header sección: H2 + buscador
------------------------------ */
.repo-section-head {
  margin-top: 8px;
}

/* buscador base pequeño + expande hover/focus */
.expandable-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
}

.search-input {
  width: 220px;            /* base pequeño */
  height: 40px;
  padding: 0 44px 0 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.35);
  border-radius: 8px;
  outline: none;
  transition: width 0.25s ease, background 0.25s ease;
}

.expandable-search:hover .search-input,
.search-input:focus {
  width: 340px;            /* expandido */
  background: rgba(255,255,255,0.12);
}

.search-icon-btn {
  position: absolute;
  right: 6px;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 0;

  color: #fff;
}

/* -----------------------------
   ✅ Dropdown sugerencias (tipo Falabella)
------------------------------ */
.repo-suggest {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(520px, 90vw);
  background: #141414;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  z-index: 100;
}

.repo-suggest-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.repo-suggest-title {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 8px;
}

.repo-suggest-item {
  width: 100%;
  text-align: left;
  border: 0;
  background: rgba(255,255,255,0.04);
  color: #fff;
  padding: 10px 10px;
  border-radius: 10px;
  margin-bottom: 8px;
  transition: 0.15s ease;
}

.repo-suggest-item:hover {
  background: rgba(0,199,230,0.12);
}

.repo-suggest-text {
  display: block;
  font-size: 0.9rem;
  line-height: 1.2;
}

.repo-suggest-meta {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.7);
}

.repo-suggest-empty {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  padding: 8px 2px;
}

/* -----------------------------
   ✅ Galería: "ver más" + ocultos
------------------------------ */
.repo-gal-col.is-hidden {
  display: none !important;
}

.repo-gal-img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

/* Mobile tweaks */
@media (max-width: 768px) {
  .search-input { width: 200px; }
  .expandable-search:hover .search-input,
  .search-input:focus { width: 260px; }

  .repo-suggest-grid { grid-template-columns: 1fr; }
}


/* ✅ Mobile: reemplazar migas por select */
.obs-mobile-select{
  display: none;
  width: 100%;
  max-width: 520px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.25);
  color: #fff;
}

@media (max-width: 768px){
  .obs-crumbs{ display: none; }          /* ocultar chips */
  .obs-mobile-select{ display: block; }  /* mostrar select */
}

/* ✅ Ocultar PDFs extra (paginado local) */
.repo-card-col.is-hidden {
  display: none !important;
}
/* =========================
   Observatorios: chips + selects
========================= */
.obs-select{
  max-width: 520px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.25);
  color: #fff;
}

/* Desktop: mostrar dropdown si quieres, y mantener chips */
.obs-select-desktop{ display: block; margin-left: 10px; }
.obs-select-mobile{ display: none; }

/* Mobile: ocultar chips y mostrar dropdown mobile */
@media (max-width: 768px){
  .obs-crumbs{ display: none; }
  .obs-select-desktop{ display: none; }
  .obs-select-mobile{ display: block; width: 100%; }
}

/* =========================
   PDFs: ocultar por paginado
========================= */
.repo-card-col.is-hidden{
  display: none !important;
}

/* =========================
   Mobile search: lupa -> expandir
========================= */
@media (max-width: 768px){
  .expandable-search{
    width: 100%;
    justify-content: flex-end;
  }

  .expandable-search.is-collapsed .search-input{
    width: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  .expandable-search.is-collapsed .search-icon-btn{
    position: static;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(255,255,255,0.25) !important;
  }

  .expandable-search.is-open{
    justify-content: flex-start;
    gap: 10px;
  }

  .expandable-search.is-open .search-input{
    width: 100% !important;
    max-width: 520px;
    opacity: 1 !important;
    pointer-events: auto !important;
    padding: 0 44px 0 12px !important;
    border: 1px solid rgba(255,255,255,0.35) !important;
  }

  .expandable-search.is-open .search-icon-btn{
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: transparent !important;
    border: 0 !important;
  }
}
