/* Estilos generales */
.rnw-directorio-wrapper {
    font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    width: 100%;
    box-sizing: border-box;
}

.rnw-directorio-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.rnw-directorio-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.rnw-directorio-search,
.rnw-directorio-category-filter {
    padding: 0.6rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    flex: 1 1 180px;
    font-size: 0.9rem;
}

.rnw-directorio-category-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rnw-directorio-cat-btn {
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.12);
    font-size: 0.8rem;
    text-decoration: none;
    color: #111;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}

.rnw-directorio-cat-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    background: rgba(255,255,255,0.95);
}

/* Títulos de categoría */
.rnw-directorio-category-title {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
}

.rnw-directorio-category-count {
    font-size: 0.75em;
    opacity: 0.7;
}

/* Grilla de tarjetas */
.rnw-directorio-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1rem;
}

@media (min-width: 600px) {
    .rnw-directorio-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .rnw-directorio-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* Tarjetas */
.rnw-directorio-card {
    position: relative;
    border-radius: 18px;
    padding: 1rem 1.1rem;
    box-sizing: border-box;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(0,0,0,0.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.6);
}

/* Borde degradado glass */
.rnw-directorio-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(0,0,0,0.05), rgba(0,0,0,0.25));
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

/* Tarjeta normal */
.rnw-directorio-card-normal {
    background: linear-gradient(135deg, rgba(255,255,255,0.85), rgba(245,245,245,0.9));
    color: #111;
}

/* Tarjeta destacada */
.rnw-directorio-card-featured {
    background: linear-gradient(135deg, rgba(255,245,157,0.9), rgba(255,255,204,0.95));
    color: #111;
}

/* Listón destacado */
.rnw-directorio-ribbon {
    position: absolute;
    top: 10px;
    right: -45px;
    width: 140px;
    text-align: center;
    background: #e3342f;
    color: #fff;
    font-weight: 700;
    font-size: 0.7rem;
    transform: rotate(45deg);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 2;
}

.rnw-directorio-ribbon span {
    display: inline-block;
    padding: 3px 0;
}

/* Contenido de la tarjeta */
.rnw-directorio-business-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.rnw-directorio-business-whatsapp,
.rnw-directorio-business-web,
.rnw-directorio-business-description {
    font-size: 0.85rem;
    margin: 0.15rem 0;
}

.rnw-directorio-business-whatsapp strong,
.rnw-directorio-business-web strong {
    font-weight: 600;
}

.rnw-directorio-business-whatsapp a,
.rnw-directorio-business-web a {
    color: inherit;
    text-decoration: underline;
    word-break: break-all;
}

.rnw-directorio-no-posts {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Utilidades responsivas */
@media (max-width: 480px) {
    .rnw-directorio-category-buttons {
        overflow-x: auto;
        padding-bottom: 0.3rem;
    }
    .rnw-directorio-cat-btn {
        white-space: nowrap;
    }
}
