/**
 * ============================================================================
 * RELATED CATEGORIES - Otras categorías al final del archivo
 * ============================================================================
 */

.related-categories {
    margin: 3rem auto;
    padding-top: 3rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.one-container .site-main > .related-categories:last-child {
    margin-bottom: 3rem;
}

.related-categories__title {
    font-size: var(--font-size-xl, 1.75rem);
    margin-bottom: 32px;
    text-align: center;
}

/* Grid responsivo: 3 columnas en desktop, 2 en tablet, 1 en móvil */
.related-categories__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* ============================================================================
   CARD DE CATEGORÍA
   ============================================================================ */

.related-category-card {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .7rem 1.3rem;
    border: 2px solid var(--color-brand-mid);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    position: relative;
}

.related-category-card:hover {
    border-color: var(--color-brand);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    color: inherit;
    border-radius: 0;
    background-color: var(--color-bg-light);
}

.related-category-card:focus-visible {
    outline: 3px solid var(--color-focus);
    outline-offset: 2px;
    border-radius: 16px;
}

/* Ícono de la categoría */
.related-category-card__icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.related-category-card__icon img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

/* Contenido (nombre + conteo) */
.related-category-card__content {
    flex: 1;
    min-width: 0;
}

.related-category-card__name {
    font-size: var(--font-size-base, 1rem);
    font-weight: var(--font-weight-semibold, 600);
    margin: 0 0 4px;
    line-height: 1.3;
    color: var(--color-text);
}

.related-category-card__count {
    font-size: var(--font-size-sm, 0.875rem);
    color: var(--color-text-muted);
    margin: 0;
}

/* Flecha indicadora */
.related-category-card__arrow {
    flex-shrink: 0;
    font-size: 1.25rem;
    color: var(--color-brand-mid);
    transition: transform 0.2s ease, color 0.2s ease;
}

.related-category-card:hover .related-category-card__arrow {
    transform: translateX(10px);
    color: var(--color-brand);
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 1024px) {
    .related-categories__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .related-categories {
        margin-top: 60px;
        padding-top: 40px;
    }

    .related-categories__title {
        font-size: 1.5rem;
        margin-bottom: 24px;
    }

    .related-categories__grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .related-category-card {
        padding: 16px 20px;
    }
}

/* ============================================================================
   DARK MODE
   ============================================================================ */

html[data-theme="dark"] .related-categories {
    border-top-color: rgba(255, 255, 255, 0.08);
}

html[data-theme="dark"] .related-category-card:hover {
    background-color: var(--color-bg-subtle);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

html[data-theme="dark"] .related-categories__grid {
    background-color: var(--color-bg-subtle);
}


/* ============================================================================
   HIGH CONTRAST
   ============================================================================ */

html[data-contrast="high"] .related-category-card {
    border-color: #ffffff;
}

html[data-contrast="high"] .related-category-card:hover {
    border-color: #ffd400;
    background-color: transparent;
    color: #ffd400;
}

html[data-contrast="high"] .related-category-card__name {
    color: #ffffff !important;
}

html[data-contrast="high"] .related-category-card__count {
    color: #cccccc !important;
}

html[data-contrast="high"] .related-category-card__arrow {
    color: #ffffff;
}

html[data-contrast="high"] .related-category-card:hover .related-category-card__arrow {
    color: #ffd400;
}

