/* =========================================================
   QueBuscasRD — Negocios destacados (ranking de la portada)
   Lo carga includes/destacados_seccion.php

   Estilo "top del periódico": una lista numerada en dos
   columnas, con el número del puesto grande en itálica serif,
   una miniatura pequeña y los datos al lado. Sin tarjetas ni
   mosaico: filas separadas por una línea fina.
   ========================================================= */

.top-seccion { background: var(--fondo-alt); --linea-top: rgba(23, 35, 49, .14); }
.top-cabecera { margin-bottom: 22px; }

.top-lista {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 56px;
}


/* ---------- Fila ---------- */
.top {
    position: relative; min-width: 0;
    border-bottom: 1px solid var(--linea-top);
}
/* Cada fila lleva su línea abajo y solo la primera fila una arriba:
   así cada columna cierra bien con cualquier cantidad de negocios. */
.top-lista > :nth-child(-n+2) { border-top: 1px solid var(--linea-top); }
/* Con un solo destacado la invitación baja a la segunda fila: sin doble línea */
.top-lista > .top-invitacion:nth-child(2) { border-top: 0; }

.top-enlace {
    display: flex; align-items: center; gap: 18px;
    padding: 20px 48px 20px 0;
    color: inherit; text-decoration: none;
}
.top-enlace:focus-visible { outline: 2px solid var(--acento); outline-offset: 2px; border-radius: 6px; }

.top-numero {
    flex: 0 0 52px;
    font-family: var(--fuente-serif); font-style: italic; font-weight: 400;
    font-size: 46px; line-height: 1; letter-spacing: -.02em;
    color: #B9BEC4;
    color: color-mix(in srgb, var(--texto) 28%, transparent);
    transition: color .2s ease;
}
.top:hover .top-numero { color: var(--c, var(--texto)); }
.top-numero-fijo { display: grid; place-items: start; color: var(--amarillo-hondo); }
.top-numero-fijo svg { width: 30px; height: 30px; }


/* ---------- Miniatura ---------- */
.top-miniatura {
    position: relative; flex: 0 0 84px;
    width: 84px; height: 84px;
    border-radius: 14px; overflow: hidden;
    display: grid; place-items: center;
    background: var(--blanco);
    box-shadow: inset 0 0 0 1px rgba(23, 35, 49, .06);
}
.top-miniatura img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease; }
.top:hover .top-miniatura img { transform: scale(1.05); }
.top-miniatura-logo img { object-fit: contain; padding: 10px; }
.top-miniatura-color {
    background-color: #EEF1F3;
    background-color: color-mix(in srgb, var(--c) 11%, #fff);
    background-image: radial-gradient(color-mix(in srgb, var(--c) 20%, transparent) 1px, transparent 1.3px);
    background-size: 12px 12px;
    color: var(--c);
}
.top-miniatura-color svg { width: 26px; height: 26px; opacity: .85; }


/* ---------- Texto ---------- */
.top-cuerpo { flex: 1; min-width: 0; }
.top h3 {
    margin: 0 0 3px;
    font-size: 17.5px; font-weight: 700; line-height: 1.3; letter-spacing: -.015em;
    color: var(--texto);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.top:hover h3 { text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
.top-meta { margin: 0 0 8px; font-size: 13.5px; line-height: 1.4; color: var(--texto-suave); }
.top-meta span[aria-hidden] { margin: 0 4px; color: var(--texto-tenue); }
.top-recomendado {
    display: inline-block; margin-left: 6px; padding: 1px 7px;
    border-radius: 4px; background: var(--alerta-suave); color: #8A5A0B;
    font-size: 11.5px; font-weight: 600;
}

.top-resenas { display: flex; align-items: center; gap: 6px; margin: 0 0 6px; font-size: 13px; }
.top-resenas strong { font-weight: 700; color: var(--texto); }
.top-resenas-total { color: var(--texto-suave); }
.top-estrellas {
    position: relative; display: inline-block; width: 80px; height: 16px; flex: 0 0 80px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23E4DED3' d='M10 1.5l2.6 5.3 5.9.9-4.3 4.1 1 5.8L10 14.9l-5.2 2.7 1-5.8L1.5 7.7l5.9-.9z'/%3E%3C/svg%3E") repeat-x left center / 16px 16px;
}
.top-estrellas > span {
    position: absolute; inset: 0 auto 0 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23E0A526' d='M10 1.5l2.6 5.3 5.9.9-4.3 4.1 1 5.8L10 14.9l-5.2 2.7 1-5.8L1.5 7.7l5.9-.9z'/%3E%3C/svg%3E") repeat-x left center / 16px 16px;
}

.top-stats { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; }
.top-stats div { display: flex; align-items: center; gap: 6px; }
.top-stats dt { display: flex; }
.top-stats dt svg { width: 15px; height: 15px; color: var(--texto-tenue); }
.top-stats div + div dt svg { color: var(--peligro); }
.top-stats dd { margin: 0; font-size: 13px; color: var(--texto-suave); white-space: nowrap; }
.top-stats strong { font-size: 14.5px; font-weight: 700; color: var(--texto); }

.top-sr {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}


/* ---------- Corazón: discreto, a la derecha ---------- */
.top-fav {
    position: absolute; top: 50%; right: 0; z-index: 2;
    transform: translateY(-50%);
    width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center;
    background: transparent; color: var(--texto-tenue);
    border: 0; box-shadow: none; cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.top-fav:hover { background: #fff; color: var(--peligro); }
.top-fav svg { width: 18px; height: 18px; }
.top-fav:hover, .top-fav:active { transform: translateY(-50%); }


/* ---------- Invitación (cuando la lista es corta) ---------- */
.top-invitacion {
    grid-column: 1 / -1;
    display: flex; align-items: center; gap: 18px;
    padding: 22px 0;
    border-bottom: 1px solid var(--linea-top);
}
.top-invitacion .top-numero { color: color-mix(in srgb, var(--texto) 18%, transparent); }
.top-invitacion-texto { flex: 1; min-width: 0; }
.top-invitacion h3 { margin: 0 0 3px; font-size: 16px; white-space: normal; }
.top-invitacion p { margin: 0; font-size: 14px; color: var(--texto-suave); }
.top-invitacion-link {
    flex: 0 0 auto;
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 14.5px; font-weight: 600; color: var(--texto);
    border-bottom: 1.5px solid currentColor; padding-bottom: 2px;
}
.top-invitacion-link svg { width: 15px; height: 15px; transition: transform .15s; }
.top-invitacion-link:hover { color: var(--acento); }
.top-invitacion-link:hover svg { transform: translateX(3px); }


/* ---------- Celular: una columna ---------- */
@media (max-width: 780px) {
    .top-lista { grid-template-columns: minmax(0, 1fr); }
    .top-lista > :nth-child(2) { border-top: 0; }
    .top-enlace { gap: 14px; padding: 16px 40px 16px 0; }
    .top-numero { flex-basis: 36px; font-size: 34px; }
    .top-numero-fijo svg { width: 24px; height: 24px; }
    .top-miniatura { flex-basis: 68px; width: 68px; height: 68px; border-radius: 12px; }
    .top h3 { font-size: 16px; }
    .top-meta { font-size: 12.5px; margin-bottom: 6px; }
    .top-stats { gap: 2px 14px; }
    .top-stats dd { font-size: 12px; }
    .top-stats strong { font-size: 13.5px; }
    .top-invitacion { flex-wrap: wrap; gap: 8px 14px; }
    .top-invitacion-texto { flex-basis: calc(100% - 50px); }
    .top-invitacion-link { margin-left: 50px; }
}
